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": "py",
"phcfg": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "error"
},
"_keys": [
"tGTrbjVyaa",
"fToni"
],
"_children": [
{
"w": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "error"
}
}
},
{
"f": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "notices"
},
"_value": "g"
}
},
{
"n": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "notices"
}
}
},
{
"R": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "error"
},
"_value": "T"
}
},
{
"N": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ios",
"condition": "cant",
"severity": "error"
},
"_value": "Z"
}
}
]
}
}
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": "1",
"maxLength": "4",
"default": -25571114.12604724,
"direction": "vertical",
"required": false,
"enforce": false,
"hidden": false
},
"id": "elit proident laboris",
"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"
},
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": "1",
"max": null,
"minLength": null,
"maxLength": null,
"default": -64104015.947342984,
"direction": "vertical",
"required": true,
"enforce": true,
"hidden": true
},
"id": "est in proident anim 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": "key545385c3-fc66-491b-bf6f-abc2214366dc"
}
],
"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"
}
},
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
}
],
"_id": "b61e1140-5c22-67c2-609d-baec9a71eb71",
"groups": [
"c15829c2ad24c8da8c1302a9",
"8c66c6dd88c0cab8ad146d88",
"52004cf0d28f12029d160178",
"654bd0e461bc2e4163a8d004"
],
"created": "1958-05-29T02:42:06.722Z",
"created_by": "74b7bc3ef9ae59dbb0575688",
"last_updated": "2013-10-23T17:03:10.903Z",
"last_updated_by": "e71addf243e7b253e1416987",
"tags": [
"incididunt dolor esse sed in",
"nostrud mollit tempor nisi sed"
]
},
"faml": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "warning"
},
"_keys": [
"loY"
],
"_children": [
{
"g": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "warning"
}
}
}
]
}
}