SDWAN port templates 32/86232/1
authorshashikanth.vh <shashikanth.vh@huawei.com>
Thu, 25 Apr 2019 05:09:21 +0000 (10:39 +0530)
committershashikanth.vh <shashikanth.vh@huawei.com>
Thu, 25 Apr 2019 05:09:26 +0000 (10:39 +0530)
SDWAN port templates added based on the
IPMode static or dhcp

Change-Id: Ib6d9e2dd13d92d49a1323525646c01bf795346c1
Issue-ID: SDNC-653
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
Former-commit-id: 6cacb9781777b6f7cd317a60da5556bc4514982d

platform-logic/restapi-templates/src/main/json/sdwan-port-cellular.json [new file with mode: 0644]
platform-logic/restapi-templates/src/main/json/sdwan-port-ethernet.json [new file with mode: 0644]
platform-logic/restapi-templates/src/main/json/sdwan-wan-port-dhcp.json [new file with mode: 0644]
platform-logic/restapi-templates/src/main/json/sdwan-wan-port-static.json [new file with mode: 0644]

diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-port-cellular.json b/platform-logic/restapi-templates/src/main/json/sdwan-port-cellular.json
new file mode 100644 (file)
index 0000000..b274c1b
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    "ports": [
+        {
+            "portType": ${prop.wan.portType},
+            "portNumber": ${prop.wan.portNumber},
+            "deviceId": ${prop.wan.deviceId},
+            "portSwitch": "layer3-port",
+            "linkInfo": {
+                 "linkType": "Cellular",
+                 "cellular": {
+                     "apn" : ${prop.wan.apn-name}
+                 },
+                 "atm": null,
+                 "ethernet": null                 
+            }
+        }
+    ]
+}
diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-port-ethernet.json b/platform-logic/restapi-templates/src/main/json/sdwan-port-ethernet.json
new file mode 100644 (file)
index 0000000..d24cf4f
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    "ports": [
+        {
+            "portType": ${prop.wan.portType},
+            "portNumber": ${prop.wan.portNumber},
+            "deviceId": ${prop.wan.deviceId},
+            "portSwitch": "layer3-port",
+            "linkInfo": {
+                 "linkType": "Ethernet",
+                 "cellular": null,
+                 "atm": null,
+                 "ethernet": {
+                      "negotiationMode": "auto",
+                      "media": "copper",
+                      "duplex": "half",
+                      "speed": 10
+                 }
+            }
+        }
+    ]
+}
diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-wan-port-dhcp.json b/platform-logic/restapi-templates/src/main/json/sdwan-wan-port-dhcp.json
new file mode 100644 (file)
index 0000000..58cf796
--- /dev/null
@@ -0,0 +1,45 @@
+{
+    "tnps": [
+        {
+            "name": ${prop.wan.name},
+            "siteId": ${prop.wan.siteId},
+            "deviceId": ${prop.wan.deviceId},
+            "portId": ${prop.wan.devicePortId},
+            "inSubInterface": false,
+            "vlanId": "null",            
+            "ipConnection": {
+                "ipv4": {
+                    "publicIP": null,
+                    "accessType": "IPoE",
+                    "ipMode": "DHCP",
+                    "customerAddress": "",
+                    "prefixLength": null,
+                    "providerAddress": "",
+                    "peerIp": null,
+                    "userName": null,
+                    "userKey": null
+                }
+             },
+             "transportNetworkInfo": {
+                 "transportNetworkId": ${prop.wan.transportNetworkId},
+                 "workMode": "active"
+             },
+            "attributes": {
+                "inputBandwidth": ${prop.wan.inputBandwidth},
+                "outputBandwidth": ${prop.wan.outputBandwidth},
+                "mtu": 1500,
+                "TCPmss": 1200
+            },
+                       "ntp": [
+              {
+                "serverIP": "11.11.11.11",
+                "authentication": false,
+                "mode": "MD5",
+                "authKey": "123456",
+                "authId": 123
+              }
+            ],
+            "description": ${prop.wan.description}
+        }
+    ]
+}
diff --git a/platform-logic/restapi-templates/src/main/json/sdwan-wan-port-static.json b/platform-logic/restapi-templates/src/main/json/sdwan-wan-port-static.json
new file mode 100644 (file)
index 0000000..9825b6e
--- /dev/null
@@ -0,0 +1,45 @@
+{
+    "tnps": [
+        {
+            "name": ${prop.wan.name},
+            "siteId": ${prop.wan.siteId},
+            "deviceId": ${prop.wan.deviceId},
+            "portId": ${prop.wan.devicePortId},
+            "inSubInterface": false,
+            "vlanId": "null",            
+            "ipConnection": {
+                "ipv4": {
+                    "publicIP": null,
+                    "accessType": "IPoE",
+                    "ipMode": "Static",
+                    "customerAddress": ${prop.wan.ip-address},
+                    "prefixLength": ${prop.wan.prefixLength},
+                    "providerAddress": ${prop.wan.providerIpAddress},
+                   "peerIp": null,
+                    "userName": null,
+                    "userKey": null
+                }
+             },
+             "transportNetworkInfo": {
+                 "transportNetworkId": ${prop.wan.transportNetworkId},
+                 "workMode": "active"
+             },
+            "attributes": {
+                "inputBandwidth": ${prop.wan.inputBandwidth},
+                "outputBandwidth": ${prop.wan.outputBandwidth},
+                "mtu": 1500,
+                "TCPmss": 1200
+            },
+                       "ntp": [
+              {
+                "serverIP": "11.11.11.11",
+                "authentication": false,
+                "mode": "MD5",
+                "authKey": "123456",
+                "authId": 123
+              }
+            ],
+            "description": ${prop.wan.description}
+        }
+    ]
+}