01-21-2018 11:15 PM - edited 03-01-2019 06:21 PM
In my previous discussion, https://supportforums.cisco.com/t5/network-management/netconf-get-config-error-wrong-document-namespaces-not-specified/td-p/3298323 I could make get-config work in NX-OS. However I'm opening a new one because the output is quite different from what I expect.
NX-OS returns the configuration in CLI text format.
<?xml version="1.0" encoding="utf-8"?> <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:pfx1="http://www.cisco.com/nxos:7.3.1.D1.1.:urib" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">!Command: show running-config !Time: Tue Jan 16 18:00:27 2018 version 7.3(1)D1(1) hostname MASKED_FOR_ANONYMITY feature telnet feature ospf ...... xml server max-session 6 xml server validate all</data>
But what I expect is XML structured data like IOS-XR returns.
<?xml version="1.0" encoding="utf-8"?> <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <aaa xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-admin-cfg"> <usernames> <username> ...... </data>
Does NX-OS provide another command for XML-structured config data tree?
04-10-2018 08:38 AM
If you happen to have discovered a way to get the data from NX-OS in a structured XML format I would love to know as I am having the same exact issue with no idea how to get around it.
04-16-2018 01:34 AM
The CLI commands, which are supported through XML, are limited to CLI configuration commands and EXEC mode show commands (and responses) that are wrapped in <CLI> tags.
The following commands and conditions are not supported:
•The do configuration mode command.
•EXEC mode commands other than show commands except for the following items:
–show history
–show user
–show users
–show terminal
•Administration EXEC mode commands
•Iterators for responses to <CLI> commands issued through XML. For example, iterators are not supported for the output of the show run and show configuration commands.
•Sending a request in <CLI> format and getting back an XML encoded response.
•Sending an XML encoded request and getting back a response in <CLI> format.
•Only one XML <CLI> request can be issued at a time across all client sessions on the router.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide