Very often when building Python maagic scripts or applications, or even within service/action logic, it is cumbersome to manually draft the Python object paths, could the BU add into the ncs_cli or even as a separate standalone tool, which took in XPATH statements generated from the ncs_cli, the auto-generated Python Maagic paths?
admin@ncs# show running-config devices device netsim-ios-0 config ios:interface | display xpath
/devices/device[name='netsim-ios-0']/config/ios:interface/Loopback[name='0']
/devices/device[name='netsim-ios-0']/config/ios:interface/FastEthernet[name='0/0']
/devices/device[name='netsim-ios-0']/config/ios:interface/FastEthernet[name='1/0']
/devices/device[name='netsim-ios-0']/config/ios:interface/FastEthernet[name='1/1']
admin@ncs# show running-config devices device netsim-ios-0 config ios:interface
devices device netsim-ios-0
config
ios:interface Loopback0
no shutdown
exit
ios:interface FastEthernet0/0
no shutdown
exit
ios:interface FastEthernet1/0
no shutdown
exit
ios:interface FastEthernet1/1
no shutdown
exit
!
!
admin@ncs#
would like
admin@ncs# show running-config devices device netsim-ios-0 config ios:interface | display maagic
root.devices.device["netsim-ios-0"].config.ios__interface.GigabitEthernet["0"]
etc