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

NSO: convert objects from junos rpc call to text

bnguye
Level 1
Level 1

I'm using Junos RPC in NSO to retrieve configs and am trying to convert the objects to text to save to file and to parse the content using Genie. Is there a solution, i.e. maagic API, etc., that can convert the objects returned from the RPC calls to text (config text, json, xml)?

1 Reply 1

rogaglia
Cisco Employee
Cisco Employee

Hi, You can always convert "to string" the output from any NSO command but you need to navigate the maagic object to create the output that you decide. What I am sensing that you would like to have the same output as a CLI show command in Junos to then use the CLI libraries in Genie. This is possible via a special rpc in the Junos NED (see README file): admin@ncs# devices device mx960-1 rpc rpc-request-shell-execute request-shell-execute command "cli show cli"