Open muhammad-rafi opened 3 years ago
One thing I like to mention here, I check the headers in restconf.py and it seems like you are using "application/yang-data+xml", however for nxos we need to use dot notation not hypen e.g "application/yang.data+xml", please check my post on LinkedIn. https://www.linkedin.com/posts/muhammad-rafi-0a37a248_cisconetworking-devnet-classof2020-activity-6824186783543111681-d7zD
@muhammad-rafi you are right, Cisco uses "application/yang.data+xml" in NXOS 9.3.10 and says they are implementing RESTCONF Protocol draft-ietf-netconf-restconf-10.
See Cisco Nexus 9000 NX-OS Programmability Guide
This breaks much of ansible.netcommons code because many places are hardwired to use the RFC 8040 MIME type.
There is no easy workaround but to use the default XML output by NX-OS at the moment. See also PR #464 I filed for fixing the XML deserialization.
SUMMARY
I have been running restconf_get module against nxos 9.3(1) and 7.0(3)I7(8)) but I see no ouput when the playbook running, however, it seems like playbook runs OK. Just F.Y.I it works fine on IOSXE and I do see output for any restconf call on iosxe but dont see it on nxos unfortunately
ISSUE TYPE
COMPONENT NAME
ansible.netcommon.restconf_get
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
NXOS 7.0(3)I7(8) and 9.3(3)
STEPS TO REPRODUCE
Use my playbook below to reproduce this, this is against publicly available Cisco nxos sandbox
EXPECTED RESULTS
It should be the get request output, in my case name of the device
ACTUAL RESULTS