Summary
setLeaf Task
Description
Set Leaf and Its Values.
Route
POST /nso_manager/setLeaf/:adapterId
Roles
admin
Parameters
Details Example Schema
Name
Type
Required
Description
adapterId
string
yes
The host that the leaf should be applied to.
path
string
yes
The NSO (Network Services Orchestrator) path for the config. This is in the key path format. If you want to use a variable, wrap it in !<variable name>!. NSO documentation for this can be found in the JSON-RPC FAQ for NSO 4.7
value
string
yes
The value for the path. Wrap variables with !!.
variables
string
yes
Key value variable definition.
set
boolean
yes
True for create/update, False for delete.
dryRun
boolean
yes
True for dry-run, False for provision.
options
string
yes
Options
Copied to Clipboard
{
"path": "/devices/device{device0}/config/hostname",
"value": "hostname%itential.com",
"variables": "action-type pyaction",
"set": true,
"dryRun": true,
"options": "outformat"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"path": {
"title": "path",
"type": "string",
"examples": [
"/itential_commands/native2Pronghorn",
"/devices/device{device0}/config/hostname",
"/d:config/device{eth0}/date (only an example of KeyPath; this is not NSO valid)"
]
},
"value": {
"type": "string",
"examples": [
"hostname%itential.com"
]
},
"variables": {
"type": "string",
"examples": [
"action-type pyaction"
]
},
"set": {
"type": "boolean"
},
"dryRun": {
"type": "boolean"
},
"options": {
"type": "string",
"title": "options",
"enum": [
"outformat",
"async",
"sync",
"no_overwrite",
"staging",
"dryrun"
]
}
},
"required": [
"path",
"value",
"variables",
"set",
"dryRun",
"options"
],
"additionalProperties": false
}
Return
Details Example Schema
Name
Type
Description
result
object
Status of set leaf.
Copied to Clipboard
[
{
"action": "update",
"path_raw": "/devices/device{device0}/config/<!cmd!>",
"path_evaluated": "/devices/device{device0}/config/hostname",
"value_raw": "<!cmd!>",
"value_evaluated": "hostname"
},
{
"action": "update",
"path_raw": "/devices/device{device0}/config/<!cmd!>",
"path_evaluated": "/devices/device{device0}/config/hostname",
"value_raw": "<!cmd!>",
"value_evaluated": "hostname"
}
]
Copied to Clipboard
{
"oneOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string",
"examples": [
"update"
]
},
"path_raw": {
"type": "string",
"examples": [
"/devices/device{device0}/config/<!cmd!>"
]
},
"path_evaluated": {
"type": "string",
"examples": [
"/devices/device{device0}/config/hostname"
]
},
"value_raw": {
"type": "string",
"examples": [
"<!cmd!>"
]
},
"value_evaluated": {
"type": "string",
"examples": [
"hostname"
]
}
}
}
}
]
}