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:hostname",
"value": false
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": 39906733.732272446
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": false
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": 59331858.189743906
}
],
"deletionErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": 28453239.619455323
},
{
"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:version",
"value": false
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": "iNIzwmH"
}
],
"regularErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": -47862351.991052024
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": -98994781.6470686
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": 30891223.2208118
}
]
}
}
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": {
"tKamxcapXQA": [
{
"rIb": {
"IWqz": "in id",
"PUwniCriinP": "minim Excepteur irure deserunt",
"IML": "nostrud deserunt occaecat commodo",
"H": "reprehenderit sit",
"NPOU": "proident qui"
}
}
]
},
"faml": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "cant",
"severity": "warning"
},
"_keys": [
"QmHNXU",
"aWrIyjAV"
],
"_children": [
{
"u": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ios",
"condition": "must",
"severity": "warning"
}
}
},
{
"z": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ios",
"condition": "cant",
"severity": "notices"
},
"_value": "n"
}
},
{
"n": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "error"
},
"_value": "j"
}
},
{
"R": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "notices"
}
}
}
]
},
"action": "create"
},
"deletionErrors": {
"xpaths": [
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname"
]
}
}
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"
]
}