cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1724
Views
0
Helpful
2
Replies

Different NETCONF get-config behavior between NX-OS and IOS-XR

sosul
Level 1
Level 1

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?

2 Replies 2

cousintroy
Level 1
Level 1

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.

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.

Review Cisco Networking for a $25 gift card