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": -13399991.88158992
},
{
"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:ip/ios:default-gateway",
"value": false
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": -51379599.010698885
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": true
}
],
"deletionErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": "IdQQFaiWYqR"
},
{
"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": -7111819.773739651
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": "siPFrVF"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": true
}
],
"regularErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": 34417334.31344089
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": -36077507.09028816
}
]
}
}
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": {
"qaWS": [
{
"OlisIOV": {
"QyPvaKZrr": "anim ullamco nisi dolor",
"EMMXnppqIFW": "eu ut consequat anim dolore",
"q": "in",
"lyAmU": "in pariatur veniam do",
"zTx": "dolore magna commodo"
}
}
]
},
"faml": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ios",
"condition": "must",
"severity": "notices"
}
},
"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:ip/ios:default-gateway",
"/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:version"
]
}
}
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"
]
}