Summary
Translate FAML to Smart Template
Description
Translate FAML object to Smart Template
Route
POST /smart_template/phcfg/to/st
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
name |
string |
yes |
Name of the FAML object |
phcfg |
object |
yes |
FAML object |
Copied to Clipboard
{
"name": "mWuRTRpuKKx",
"phcfg": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "notices"
},
"_keys": [
"YUlH"
],
"_children": [
{
"N": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "warning"
}
}
}
]
}
}
Return
DetailsExampleSchema
Name |
Type |
Description |
template |
object |
Smart Template object |
Copied to Clipboard
{
"form": {
"name": "Form 123",
"children": [
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": "1",
"max": "4",
"minLength": null,
"maxLength": null,
"default": null,
"direction": "vertical",
"required": true,
"enforce": false,
"hidden": false
},
"id": "culpa",
"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"
}
},
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
},
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
}
],
"_id": "8d8cf229-fa74-e5cf-2bb1-cc0afe9992ae",
"groups": [
"d663b43a99c3ac52e62c0442"
],
"created": "1977-12-13T03:52:08.012Z",
"created_by": "450ca877ec70077066f9c7fa",
"last_updated": "1993-10-15T16:23:25.418Z",
"last_updated_by": "2fbb770e67baab269c3ddced",
"tags": [
"consequat officia",
"amet nostrud ut",
"magna Lorem",
"officia cupidatat",
"dolore ad"
]
},
"faml": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "notices"
},
"_keys": [
"IGx"
],
"_children": [
{
"M": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "cant",
"severity": "warning"
},
"_value": "J"
}
},
{
"j": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ios",
"condition": "cant",
"severity": "warning"
}
}
},
{
"M": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "error"
}
}
},
{
"h": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "notices"
},
"_value": "f"
}
}
]
}
}