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": "TjHXrPfNNP"
}
],
"deletionErrors": [
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": 9315290.686858058
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": 75341137.22592086
},
{
"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": "wmRshwBgL"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"value": false
}
],
"regularErrors": [
{
"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": -8499975.027107134
},
{
"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": true
},
{
"xpath": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"value": "Tqq"
}
]
}
}
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": {
"bA": [
{
"fn": {
"vl": "eu aute",
"puKc": "et officia do",
"UTjdoBXeT": "sunt dolore ut do",
"XpZylwKEHWH": "adipisicing dolore velit ad irure",
"KcSmP": "do dolor officia ex"
}
}
]
},
"faml": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "warning"
},
"_keys": [
"P"
],
"_children": [
{
"l": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "warning"
},
"_value": "N"
}
},
{
"x": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "error"
}
}
},
{
"b": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "notices"
},
"_value": "V"
}
}
]
},
"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:hostname",
"/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"
]
}
}
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"
]
}