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": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "warning"
},
"_value": "D"
},
"form": {
"name": "Form 123",
"children": [
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": "1",
"max": "4",
"minLength": "1",
"maxLength": "4",
"default": 90433703.04492342,
"direction": "vertical",
"required": false,
"enforce": true,
"hidden": true
},
"id": "Ut laboris sed in",
"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": "service.vlanid"
}
],
"elements": [
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
}
],
"_id": "415d4f41-de8c-08d7-894b-781064f003db",
"groups": [
"3f60472ff651e145b14142e2",
"910b10bb78104b6da855f16f"
],
"created": "1944-09-27T15:52:11.479Z",
"created_by": "776f05d423cb61fbb2054653",
"last_updated": "1971-07-30T16:24:13.678Z",
"last_updated_by": "0870169dc39d7803416446a2",
"tags": [
"irure qui eu",
"incididunt amet veniam sed dolor",
"dolor"
]
}
}