Summary
Get smart template errors
Description
Get the smart template instance from xpath expressions
Route
POST /golden_config/getSmartTemplateInstance
Roles
admin
engineering
support
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
complianceErrorsClassified |
object |
yes |
Array of errors, device and tree information |
Copied to Clipboard
{
"complianceErrorsClassified": {
"regexErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": false
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": -28824730.93156098
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": -33290357.69886759
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": "Ck"
}
],
"deletionErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": -8847376.54670395
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": true
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": "GkcabXPmv"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": -81165247.20219913
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": -49912879.27961072
}
],
"regularErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": -32092888.42534837
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": false
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": -47724410.37254347
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": "R"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": -18737739.96486503
}
]
}
}
Copied to Clipboard
{
"type": "object",
"properties": {
"complianceErrorsClassified": {
"$ref": "complianceErrorsClassified"
}
},
"required": [
"complianceErrorsClassified"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
smartTemplateInstance |
object |
Errors with the instance for dry run in smart template |
Copied to Clipboard
{
"regularErrors": {
"variables": {
"FiEU": [
{
"PjpPFchGYLq": {
"fzWedwBYqPu": "laboris enim in",
"F": "mollit irure quis",
"cnthnUMP": "ipsum",
"cdG": "et nostrud",
"JAGTK": "amet ut proident laboris nulla"
}
}
]
},
"faml": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "warning"
},
"_keys": [
"kTgmxryFB",
"SaJPvsZyl",
"yVROnxInJ",
"qpwqNOvDc",
"NamGuwvw"
],
"_children": [
{
"Z": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "warning"
}
}
}
]
},
"action": "create"
},
"deletionErrors": {
"xpaths": [
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway"
]
}
}
Copied to Clipboard
{
"type": "object",
"properties": {
"regexErrors": {
"type": "object"
},
"regularErrors": {
"$ref": "smartTemplateInstance"
},
"deletionErrors": {
"properties": {
"xpaths": {
"type": "array",
"items": {
"type": "string",
"examples": [
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version"
]
}
}
},
"required": [
"xpaths"
]
}
},
"required": [
"regexErrors",
"regularErrors",
"deletionErrors"
]
}