Summary
Create Smart Template
Description
Create a Smart Template from native Config
Route
POST /smart_template/st/autogenerate
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
operating_system |
string |
yes |
NED ID |
native_config |
string |
yes |
Native device configuration |
Copied to Clipboard
{
"operating_system": "iosxr",
"native_config": "hostname someHost"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"operating_system": {
"type": "string",
"examples": [
"ios",
"junos",
"iosxr"
]
},
"native_config": {
"type": "string",
"examples": [
"hostname someHost",
"interface GigabitEthernet1/1"
]
}
},
"required": [
"operating_system",
"native_config"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
config |
object |
Smart Template object |
Copied to Clipboard
{
"faml": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "notices"
}
},
"form": {
"name": "Form 123",
"children": [
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": "1",
"max": null,
"minLength": "1",
"maxLength": "4",
"default": "culpa consectetur ad minim cillum",
"direction": "vertical",
"required": false,
"enforce": true,
"hidden": false
},
"id": "aute",
"type": "container",
"element": "{\"type\":\"service_model\",\"id\":{\"name\":\"/ncs:services/devices:stringified_json\"}",
"name": "vlan_id_123",
"display_name": "vlan",
"source_type": "service_model",
"source": "/ncs:services/abc_devices:ios.device",
"key": "key545385c3-fc66-491b-bf6f-abc2214366dc"
}
],
"elements": [
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
}
],
"_id": "7ff1cb6a-23ff-4f3e-7595-83cb9c4309b2",
"groups": [
"ee1af0e3e3de9eb94ac54678"
],
"created": "1974-03-06T23:26:59.981Z",
"created_by": "87a101f5db9762c94a94996d",
"last_updated": "1955-07-13T12:55:36.355Z",
"last_updated_by": "60f9607779dae2d8945a1e5b",
"tags": [
"et elit"
]
}
}