Summary
Get Smart Template Instance for 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:hostname",
"value": -28313402.833941177
}
],
"deletionErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": -99805071.88700223
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": 45685940.84708652
},
{
"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:ip/ios:default-gateway",
"value": true
}
],
"regularErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"value": "ZneVW"
},
{
"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": "WEsB"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": "aDmO"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": "epnXtVjQmyE"
}
]
}
}
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": {
"SZ": [
{
"AGQhPGOpiH": {
"P": "laborum elit Ut ullamco",
"pjRsUNzh": "magna",
"tdoyQnqf": "aliquip amet irure",
"z": "aute tempor dolore Excepteur",
"spvfiKPJQ": "aute"
}
}
]
},
"faml": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ios",
"condition": "cant",
"severity": "error"
}
},
"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: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: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"
]
}