I am using ncclient to get information from a router (IOS-XR), however I am not able to get the status. I mean, If I run from the router the command "Show interfaces description" I can see the interface, status, protocol and description. I want to do the same with Netconf using ncclient. Anyone have any idea how to do it? I have tried with get_config and I can get the description but not the status(up, down,admin-down) and protocol (up, down,admin-down)
Thanks
The Netconf protocol distinguishes between configuration and operational data. In order to retrieve operational data like e.g. the interface status you have to use the
getoperation instead of theget-configoperation.According to RFC 6241:
get-config is used to "Retrieve all or part of a specified configuration datastore." (config data only)
get is used to "Retrieve running configuration and device state information." (config + oper data)
Whether a node stores configuration or operational data depends on how it is defined in the corresponding YANG module. A node can ether be
config falseorconfig true(default)