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": "ios",
"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": "ncs",
"condition": "cant",
"severity": "error"
},
"_keys": [
"dvJpqWV"
],
"_children": [
{
"Y": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "error"
}
}
},
{
"D": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ios",
"condition": "must",
"severity": "notices"
},
"_value": "w"
}
}
]
},
"form": {
"name": "Form 123",
"children": [
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": "1",
"max": "4",
"minLength": null,
"maxLength": "4",
"default": 84530843.35585594,
"direction": "vertical",
"required": false,
"enforce": true,
"hidden": false
},
"id": "sint amet proident",
"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": "93c5f847-a532-d628-e7c2-6b48b468a2d1",
"groups": [
"4ab1d20b168fb778f8f231ec",
"92e3f1fbce7fa76de141e89f"
],
"created": "2012-01-27T06:56:15.922Z",
"created_by": "a3e4291cab0d323f80159f17",
"last_updated": "2021-05-12T04:04:14.354Z",
"last_updated_by": "901b3f7a2691b8d8c147b6f6",
"tags": [
"ullamco voluptate dolor sed",
"sint nostrud id commodo quis",
"deserunt voluptate cillum aliqua occaecat"
]
}
}