04-19-2020 11:41 PM
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
Solved! Go to Solution.
04-19-2020 11:54 PM
@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.
04-19-2020 11:54 PM
@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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide