cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2342
Views
0
Helpful
1
Replies

Fetch xml format of show running config in JSON RPC command output

Chitra
Cisco Employee
Cisco Employee

Hi,

Can we retrieve configuration in xml format under result tag of json rpc output?

Appending "| display xml " dint work .Can anyone please suggest other options  ?

PS : Tried below 2 request.

1)

{

                   "jsonrpc":"2.0",

                   "id":1,

                   "method":"run_action",

                   "params":{

                             "path":"/ncs:devices/device{192.168.99.183}/live-status/ios-stats:exec/any",

                             "th":1,

                                             "params":{

                                                        "args": ["show running-config | display xml"]

                                                      }

                            }

                  }

2)

{

"jsonrpc":"2.0",

"id":1,

"method":"show_config",

"params":{

   "th":1,

   "path":"/aaa"

}

}'


Thanks,

Chitra

1 Accepted Solution

Accepted Solutions

Jan Lindblad
Cisco Employee
Cisco Employee

The IOS NED exec rpc string is sent to the *device* for execution, so only commands recognized by the device will work.

View solution in original post

1 Reply 1

Jan Lindblad
Cisco Employee
Cisco Employee

The IOS NED exec rpc string is sent to the *device* for execution, so only commands recognized by the device will work.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: