Skip to content

Commit 47fec85

Browse files
committed
fix generate template alias resolution
1 parent e9b9275 commit 47fec85

10 files changed

+73
-26
lines changed

generate_templates.py

+1
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ def resolve_alias(devicemap, sku_map):
452452
except KeyError:
453453
pass
454454

455+
alias_map.update(devicemap)
455456
return alias_map
456457

457458
def lookup_devicemap(vendor, sku, sku_map):

templates/Juniper-SSR120-AE-template.json

+8-3
Large diffs are not rendered by default.

templates/Juniper-SSR130-AE-template.json

+8-3
Large diffs are not rendered by default.

templates/Juniper-SSR400-C-template.json

+8-3
Large diffs are not rendered by default.

templates/Juniper-SSR400-CW-template.json

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "Juniper-SSR400-CW-Template",
3-
"description": "Adds a standalone Juniper SSR400-CW router: Juniper SSR400-W - 10 ethernet + WiFi",
3+
"description": "Adds a standalone Juniper SSR400-CW router: Juniper SSR400-CW - 10 ethernet + 5G + WiFi",
44
"enabled": true,
55
"persistInput": false,
66
"builtin": true,
77
"mode": "advanced",
8-
"help": "# Juniper SSR400-CW Router\n\nThis adds a basic Juniper SSR400-CW Session Smart Router to your configuration.\n\n\n\n\n##Generate Config\nSelect the generate config icon at the top of the page, and proceed to configuration. Validate and commit to finish adding the new router to running configuration.\n\n## Port Details\nThis template assumes all WAN interfaces on your device will be connected to a network providing it DHCP address assignment, and with connectivity to your conductor.\n\nIt will configure LAN interfaces providing a DHCP server to connected endpoints. From the LAN, the router local GUI and CLI will be accessible at `192.168.128.1`\n\n",
9-
"body": "{% editgroup %}\n\n{\n \"authority\": {\n \"security\": [\n {\n \"name\": \"internal-encrypt-hmac-disable\",\n \"description\": \"Security policy built by builtin router template\",\n \"encrypt\": \"false\",\n \"adaptiveEncryption\": \"false\",\n \"hmacMode\": \"disabled\"\n }\n ],\n \"router\": [\n {\n \"_value\": {\n \"name\": \"{{routerName}}\",\n \"description\": \"{{routerDescription}}\",\n \"location\": \"{{routerLocation}}\",\n \"interNodeSecurity\": \"internal-encrypt-hmac-disable\",\n \"system\": {\n \"ntp\": {\n \"server\": [\n {\n \"ipAddress\": \"216.239.35.0\"\n },\n {\n \"ipAddress\": \"216.239.35.4\"\n },\n {\n \"ipAddress\": \"216.239.35.8\"\n },\n {\n \"ipAddress\": \"216.239.35.12\"\n }\n ]\n }\n },\n \"dnsConfig\": [\n {\n \"mode\": \"static\",\n \"address\": [\n \"1.1.1.1\",\n \"8.8.8.8\"\n ]\n }\n ],\n \"applicationIdentification\": {\n \"mode\": [\n \"all\"\n ]\n },\n \"node\": [\n {\n \"name\": \"node1\",\n \"role\": \"combo\",\n \"description\": \"{{routerName}} router node\",\n \"deviceInterface\": []\n }\n ]\n },\n \"_operation\": \"create\"\n }\n ]\n }\n}",
8+
"help": "# Juniper SSR400-CW Router\n\nThis adds a basic Juniper SSR400-CW Session Smart Router to your configuration.\nLTE is available on your platform.\n\n\n\n##Generate Config\nSelect the generate config icon at the top of the page, and proceed to configuration. Validate and commit to finish adding the new router to running configuration.\n\n## Port Details\nThis template assumes all WAN interfaces on your device will be connected to a network providing it DHCP address assignment, and with connectivity to your conductor.\n\nIt will configure LAN interfaces providing a DHCP server to connected endpoints. From the LAN, the router local GUI and CLI will be accessible at `192.168.128.1`\n\n",
9+
"body": "{% editgroup %}\n\n{\n \"authority\": {\n \"security\": [\n {\n \"name\": \"internal-encrypt-hmac-disable\",\n \"description\": \"Security policy built by builtin router template\",\n \"encrypt\": \"false\",\n \"adaptiveEncryption\": \"false\",\n \"hmacMode\": \"disabled\"\n }\n ],\n \"router\": [\n {\n \"_value\": {\n \"name\": \"{{routerName}}\",\n \"description\": \"{{routerDescription}}\",\n \"location\": \"{{routerLocation}}\",\n \"interNodeSecurity\": \"internal-encrypt-hmac-disable\",\n \"system\": {\n \"ntp\": {\n \"server\": [\n {\n \"ipAddress\": \"216.239.35.0\"\n },\n {\n \"ipAddress\": \"216.239.35.4\"\n },\n {\n \"ipAddress\": \"216.239.35.8\"\n },\n {\n \"ipAddress\": \"216.239.35.12\"\n }\n ]\n }\n },\n \"dnsConfig\": [\n {\n \"mode\": \"static\",\n \"address\": [\n \"1.1.1.1\",\n \"8.8.8.8\"\n ]\n }\n ],\n \"applicationIdentification\": {\n \"mode\": [\n \"all\"\n ]\n },\n \"node\": [\n {\n \"name\": \"node1\",\n \"role\": \"combo\",\n \"description\": \"{{routerName}} router node\",\n \"deviceInterface\": [\n {\n \"name\": \"lte-0-0\",\n \"description\": \"LTE device interface\",\n \"type\": \"lte\",\n \"enabled\": \"true\",\n \"forwarding\": \"true\",\n \"targetInterface\": \"TBD\",\n \"networkInterface\": [\n {\n \"name\": \"lte-0-0\",\n \"description\": \"\",\n \"sourceNat\": \"true\",\n \"management\": \"false\",\n \"defaultRoute\": \"false\",\n \"managementVector\": {\n \"priority\": \"200\",\n \"name\": \"mgmt\"\n },\n \"dhcp\": \"v4\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"_operation\": \"create\"\n }\n ]\n }\n}",
1010
"schema": {
1111
"type": "object",
1212
"definitions": {
@@ -156,7 +156,13 @@
156156
"type": "object",
157157
"title": "Ports",
158158
"description": "Port and network settings.",
159-
"properties": {}
159+
"properties": {
160+
"lte-0-0": {
161+
"title": "WAN - lte-0-0",
162+
"description": "LTE device interface",
163+
"$ref": "#/definitions/wanPort"
164+
}
165+
}
160166
}
161167
}
162168
}

templates/Juniper-SSR400-W-template.json

+8-3
Large diffs are not rendered by default.

templates/Juniper-SSR440-C-template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Juniper-SSR440-C-Template",
3-
"description": "Adds a standalone Juniper SSR440-C router: Juniper SSR400-C - 10 ethernet + 5G",
3+
"description": "Adds a standalone Juniper SSR440-C router: Juniper SSR440-C - 10 ethernet + 5G",
44
"enabled": true,
55
"persistInput": false,
66
"builtin": true,

templates/Juniper-SSR440-template.json

+8-3
Large diffs are not rendered by default.

templates/Silicom-90500-0151-G11-template.json

+8-3
Large diffs are not rendered by default.

templates/Silicom-90500-0151-G71-template.json

+13-3
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)