Provision Backup Restore
Provision is used to apply startup configuration to ICX devices. Backup is used to get the running configuration, and restore is used to apply running configuration. The URI to input file with configuration commands is:
/cli-template/input-file
Consider the following guidelines for provision:
- Input should be in the same format as in
show running-configcommand output. - Input should have the existing configuration and the required configuration.
- The input sent for provision will be considered as the startup configuration.
- Do not enter the
write memorycommand after provision RESTCONF, or the running configuration will overwrite the changes in the startup configuration. - While reloading the device, opting to save the running configuration will result in loss of the required configuration.
Use the following POST method to update the startup-config in ICX with the inputted startup-config sent through the RESTCONF:
{
"icx-openconfig-cli-template:input" : {
"input-file-content" : "ver 09.0.10cdevT213\n!\nstack unit 1\n........",
"type" : "provision"
}
}
Use the following POST method to export the current running-config in ICX to the sender through RESTCONF:
{
"icx-openconfig-cli-template:input" : {
"type" : "backup"
}
}
Use the following POST method to apply the running-config sent through RESTCONF into the ICX.
{
"icx-openconfig-cli-template:input" : {
"input-file-content" : "ver 09.0.10cdevT213\n!\nstack unit 1\n........",
"type" : "restore"
}
}
Supported HTTP Operations
URL: https://<host>/restconf/data/cli-template/input-file
Request body: {
"icx-openconfig-cli-template:input" : {
"input-file-content" : "ver 09.0.10cdevT213\n!\nstack unit 1\n........",
"type" : "provision"
}
}
Response body:
{
"icx-openconfig-cli-template:output" : {
"result" : "success"
}
}
URL: https://<host>/restconf/data/cli-template/input-file
Request body: {
"icx-openconfig-cli-template:input" : {
"type" : "backup"
}
}
Response body:
{
"icx-openconfig-cli-template:output" : {
"result" : "ver 09.0.10cdevT213\n!\nstack unit 1....."
}
}
URL: https://<host>/restconf/data/cli-template/input-file
Request body: {
"icx-openconfig-cli-template:input" : {
"input-file-content" : "ver 09.0.10cdevT213\n!\nstack unit 1\n........",
"type" : "restore"
}
}
Response body:
{
"icx-openconfig-cli-template:output" : {
"result" : "{\n\"config_apply_status\": \"SUCCESS\",\n}\n"
}
}