CiscoDevNet / ydk-gen

Generate model-driven APIs from YANG models
http://ciscodevnet.github.io/ydk-gen/
Apache License 2.0
135 stars 74 forks source link

Fix issue #1096. #1097

Closed drewtoto closed 1 day ago

drewtoto commented 4 months ago

Section 3.1 of the RESTCONF Protocol (RFC 8040) published by IETF at https://datatracker.ietf.org/doc/html/rfc8040#section-3.1 specifies that the root resource is discovered by getting "/.well-known/host-meta" resource and finding the element containing the "restconf" attribute.

Fix parsing of "/.well-known/host-meta" response by iterating through each of the elements until one containing "rel='restconf'" is found and use the value found in the href attribute as the Root Resource.