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": "aeEBJhy"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": 78744569.04419032
}
],
"deletionErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": true
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": true
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": "ZLrTJyzh"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": "cG"
}
],
"regularErrors": [
{
"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": true
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": "ZqzNnRNbwkY"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": true
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": 41322119.54101339
}
]
}
}
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": {
"o": [
{
"PMNkVHdyxv": {
"TEsdUSk": "ex magna",
"bPgxPmMZata": "esse adipisicing proident",
"DG": "in Excepteur ut eu nisi",
"j": "nostrud nisi ipsum elit",
"AaEMe": "minim occaecat"
}
}
]
},
"faml": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "error"
}
},
"action": "create"
},
"deletionErrors": {
"xpaths": [
"/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"/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: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"
]
}