cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
848
Views
2
Helpful
3
Replies

JSON-RPC request for device sync-from

uwankhed
Cisco Employee
Cisco Employee

Hi

I was wondering if I can execute device sync-from request using JSON-RPC. I tried searching in NSO web-ui guide, but couldn't locate anything in there. In general, is there a way to create JSON-RPC equivalent request for operations that can be done from NSO CLI?

-Umesh

1 ACCEPTED SOLUTION

Accepted Solutions

frjansso
Cisco Employee
Cisco Employee

Yes, please see the attached python script.

//Fredrik

View solution in original post

3 REPLIES 3

frjansso
Cisco Employee
Cisco Employee

Yes, please see the attached python script.

//Fredrik

Thanks Fredrik. One follow up question - what is the use of "validate_commit" request after sync-from request. What does it do?

-Umesh

fatal: [core1]: FAILED! => {"changed": false, "msg": "NSO commit returned JSON-RPC error: {u'data': {u'message': u'Network Element Driver: device core1: out of sync'}, u'message': u'Method failed', u'code': -32000, u'type': u'rpc.method.failed', u'internal': u'jsonrpc_tx_commit257'}"}
fatal: [core2]: FAILED! => {"changed": false, "msg": "NSO commit returned JSON-RPC error: {u'data': {u'message': u'Network Element Driver: device core2: out of sync'}, u'message': u'Method failed', u'code': -32000, u'type': u'rpc.method.failed', u'internal': u'jsonrpc_tx_commit257'}"}
fatal: [access1]: FAILED! => {"changed": false, "msg": "NSO commit returned JSON-RPC error: {u'data': {u'message': u'Failed to connect to device access1: connection refused: No route to host (Host unreachable)'}, u'message': u'Method failed', u'code': -32000, u'type': u'rpc.method.failed', u'internal': u'jsonrpc_tx_commit257'}"}

 

I am facing this issue regarding sync please help if faced this issue before, Thanks in Advanced.

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 community: