cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
578
Views
10
Helpful
1
Replies

NSO jsonrpc issue 4.7

apaulin
Cisco Employee
Cisco Employee

Hi everyone,

Does anyone tried to use jsonrpc with NSO 4.7?
I tried to simply create a simple authgroup (Or anything) , but I get this error message "trans.confirmed_commit_needs_config_writable_through_candidate"

//create something
[->]{"jsonrpc":"2.0","id":19,"method":"new_trans","params":{"db": "running","mode": "read_write" ,"conf_mode": "private","tag": "test","on_pending_changes": "reuse"}}
[->]{"jsonrpc":"2.0","id":19,"method":"create","params":{"th": 1,"path":"/devices/authgroups/group{default}"}}
[->]{"jsonrpc":"2.0","id":19,"method":"set_value","params":{"th": 1,"path":"/devices/authgroups/group{default}/default-map/remote-name","value": "admin","dryrun": false}}
[->]{"jsonrpc":"2.0","id":19,"method":"set_value","params":{"th": 1,"path":"/devices/authgroups/group{default}/default-map/remote-password","value": "admin","dryrun": false}}
[->]{"jsonrpc":"2.0","id":19,"method":"validate_commit","params":{"th": 1}}
[->]{"jsonrpc":"2.0","id":19,"method":"commit","params":{"th": 1,"timeout": 600,"release_locks" : true,"flags": ["dry-run=native"]}}

//Error
 {"code":-32000,"type":"trans.confirmed_commit_needs_config_writable_through_candidate","message":"Confirmed commit needs config writable-through-candidate"}


It works fine on 4.5, but not on 4.7

Thanks

1 Accepted Solution

Accepted Solutions

jessicach2
Cisco Employee
Cisco Employee

@apaulin wrote:

Hi everyone,

Does anyone tried to use jsonrpc with NSO 4.7?
I tried to simply create a simple authgroup (Or anything) , but I get this error message "trans.confirmed_commit_needs_config_writable_through_candidate"

//create something
[->]{"jsonrpc":"2.0","id":19,"method":"new_trans","params":{"db": "running","mode": "read_write" ,"conf_mode": "private","tag": "test","on_pending_changes": "reuse"}}
[->]{"jsonrpc":"2.0","id":19,"method":"create","params":{"th": 1,"path":"/devices/authgroups/group{default}"}}
[->]{"jsonrpc":"2.0","id":19,"method":"set_value","params":{"th": 1,"path":"/devices/authgroups/group{default}/default-map/remote-name","value": "admin","dryrun": false}}
[->]{"jsonrpc":"2.0","id":19,"method":"set_value","params":{"th": 1,"path":"/devices/authgroups/group{default}/default-map/remote-password","value": "admin","dryrun": false}}
[->]{"jsonrpc":"2.0","id":19,"method":"validate_commit","params":{"th": 1}}
[->]{"jsonrpc":"2.0","id":19,"method":"commit","params":{"th": 1,"timeout": 600,"release_locks" : true,"flags": ["dry-run=native"]}}

//Error
 {"code":-32000,"type":"trans.confirmed_commit_needs_config_writable_through_candidate","message":"Confirmed commit needs config writable-through-candidate"}


It works fine on 4.5, but not on 4.7

Thanks


The commit with a timeout parameter represents a confirmed commit. For the JSON-RPC API a confirmed

commit is only valid for the candidate datastore together with the configuration parameters running/access

set to writable-through-candidate and conf_mode set to exclusive or shared. Please try it without timeout parameter. 

View solution in original post

1 Reply 1

jessicach2
Cisco Employee
Cisco Employee

@apaulin wrote:

Hi everyone,

Does anyone tried to use jsonrpc with NSO 4.7?
I tried to simply create a simple authgroup (Or anything) , but I get this error message "trans.confirmed_commit_needs_config_writable_through_candidate"

//create something
[->]{"jsonrpc":"2.0","id":19,"method":"new_trans","params":{"db": "running","mode": "read_write" ,"conf_mode": "private","tag": "test","on_pending_changes": "reuse"}}
[->]{"jsonrpc":"2.0","id":19,"method":"create","params":{"th": 1,"path":"/devices/authgroups/group{default}"}}
[->]{"jsonrpc":"2.0","id":19,"method":"set_value","params":{"th": 1,"path":"/devices/authgroups/group{default}/default-map/remote-name","value": "admin","dryrun": false}}
[->]{"jsonrpc":"2.0","id":19,"method":"set_value","params":{"th": 1,"path":"/devices/authgroups/group{default}/default-map/remote-password","value": "admin","dryrun": false}}
[->]{"jsonrpc":"2.0","id":19,"method":"validate_commit","params":{"th": 1}}
[->]{"jsonrpc":"2.0","id":19,"method":"commit","params":{"th": 1,"timeout": 600,"release_locks" : true,"flags": ["dry-run=native"]}}

//Error
 {"code":-32000,"type":"trans.confirmed_commit_needs_config_writable_through_candidate","message":"Confirmed commit needs config writable-through-candidate"}


It works fine on 4.5, but not on 4.7

Thanks


The commit with a timeout parameter represents a confirmed commit. For the JSON-RPC API a confirmed

commit is only valid for the candidate datastore together with the configuration parameters running/access

set to writable-through-candidate and conf_mode set to exclusive or shared. Please try it without timeout parameter.