CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
300 stars 190 forks source link

Option to include prefix in yang patch #1662

Open srikanthsubbaramu opened 3 weeks ago

srikanthsubbaramu commented 3 weeks ago

Hi Michal,

Thank you for the enhancement on https://github.com/CESNET/netopeer2/issues/1657

But on yangpatch we receive, we notice that only module is included in target, we are using ydk to map the patch for adopting,

currently we see target is printed like

/_3gpp-common-managed-element:ManagedElement[id='100']/_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction[id='100']/_3gpp-nr-nrm-nrcellcu:NRCellCU[id='18']

But we wanted something with prefix with namespace , so it could easily be parsed

mapping to above, it would be like **/urn:3gpp:sa5:**_3gpp-common-managed-element:ManagedElement[id='100]/**urn:3gpp:sa5:**_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction[id='100']/**urn:3gpp:sa5:**_3gpp-nr-nrm-nrcellcu:NRCellCU[id='10'] Need to understand if this can be enabled via any option in establish-push subscription. Thanks, Srikanth
michalvasko commented 3 weeks ago

In my experience, using module names is the easiest XPath to parse. In any case, the format cannot be changed without directly changing the code but you can easily get the mode namespaces if you just find the module struct lys_module based on its name and use its ns member.