I am trying to fetch details from the device in Devnet sandbox using the netconf protocol as below, but I am not able to get the details as it is returning me None.
Could someone help me understand if I am doing something wrong?
import xmltodict
router = {
"host" : "sandbox-iosxe-latest-1.cisco.com",
"port" : "830",
"username" : "developer",
"password" : "C1sco12345"
}
intf_filter = '''
<filter>
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>GigabitEthernet1</name>
</interface>
</interfaces>
<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>GigabitEthernet1</name>
</interface>
</interfaces-state>
</filter>
'''
with manager.connect(**router, hostkey_verify=False) as m:
#result = m.get(intf_filter)
result = m.get(('subtree', intf_filter))
python_response = xmltodict.parse(result.xml)["rpc-reply"]["data"]
print(python_response)