cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1577
Views
15
Helpful
2
Replies

NSO Rollback no-deploy through RESTCONF API

david_hgd
Level 1
Level 1

Is it possible to perform a rollback through NSO RESTCONF API specifying parameters such as "no-deploy"?

 

I have tried the following procedure, but the "no-deploy" flag is not working/ignored:

POST /restconf/data/tailf-rollback:rollback-files/apply-rollback-file?no-deploy' \
--header 'Content-Type: application/yang-data+json' \
--data-raw '{
    "input": {
        "fixed-number": "10593",
        "selective": ""
    }
}
'

This call would rollback and deploy the configuration straight to the network device, ignoring the "no-deploy" flag. Do I have to specify this parameter in another format?

 

We are using NSO 4.7.2.1

 

Thanks, regards!

2 Replies 2

tcragg1
Cisco Employee
Cisco Employee

That may be a bug in RESTCONF. I encountered a similar issue with the dry-run parameter being ignored when trying to trigger a rollback through RESTCONF in NSO 5.2, and was told by NSO support that the parameter should be accepted, and that this was a bug.

 

Do you get the same behaviour if you try other parameters, like dry-run or no-networking? If so, I would suggest raising a support case.

The basic problem is that an action in RESTCONF is not the same as a configuration change – and therefore doesn’t respect commit flags.

An action can do almost anything it wants, including starting multiple transactions with different flags of its own choosing.

This will work today if you use one of the transactional APIs – NETCONF or json-rpc for instance – but there have been plans to add additional action parameters to make this functionality accessible through RESTCONF for some actions.
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: