From 17cfd6d0d69e6da78d55cb76ed0446fca170eead Mon Sep 17 00:00:00 2001 From: "ramu.n" Date: Fri, 10 Nov 2017 12:20:23 +0530 Subject: [PATCH] Update underlay DG for integration issues *Fix typo mistakes in underlay network-input-parameter names *Fix rest api parameters for IP-WAN & SPTN controller *Update underlay JSON template for IP-WAN controller Change-Id: I6308b7123561c032093dbff65b770389f92ca4fc Issue-Id: SDNC-188 Signed-off-by: Ramu N --- ...URCE-API_network-topology-operation-create.json | 149 +++++++++++++------ ...OURCE-API_network-topology-operation-create.xml | 92 +++++++----- .../src/main/json/l3smsitetemplate.json | 163 ++++++++------------- .../src/main/json/l3smvpntemplate.json | 3 +- .../src/main/json/l3smvrftemplate.json | 84 ++++++++++- 5 files changed, 306 insertions(+), 185 deletions(-) diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-create.json index dc7dae8e..4f1126c1 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-create.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-create.json @@ -66,7 +66,6 @@ "e986dd0a.7fdf58", "ba17de0c.0ea5e", "39b02aa1.204f3e", - "eb55ec0a.7da3a8", "bee6a021.504aa8", "f7d82967.39b968", "e292252a.39cff8", @@ -87,7 +86,7 @@ "id": "ec4c3437.b9425", "type": "execute", "name": "execute RestApiCallNode Create IPWAN L3VPN", - "xml": "\n\n\n\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n\n\n\n\n\n", "comments": "", "outputs": 1, "x": 1121.0001831054688, @@ -96,7 +95,7 @@ "wires": [ [ "d40cc8a7.624908", - "550c17e5.cfd818" + "c80688e8.50ffd" ] ] }, @@ -131,11 +130,11 @@ "id": "257293b6.92d5cc", "type": "execute", "name": "execute RestApiCallNode Create SPTN L3VPN", - "xml": "\n\n\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n", "comments": "", "outputs": 1, - "x": 1157.6668701171875, - "y": 1239.666748046875, + "x": 1053.6668701171875, + "y": 1261.666748046875, "z": "d1c71750.37b338", "wires": [ [] @@ -1279,7 +1278,7 @@ "id": "e986dd0a.7fdf58", "type": "record", "name": "record", - "xml": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "comments": "", "outputs": 1, "x": 726, @@ -1296,8 +1295,8 @@ "xml": "\n", "comments": "", "outputs": 1, - "x": 712, - "y": 1143.0000305175781, + "x": 611, + "y": 1143, "z": "d1c71750.37b338", "wires": [ [ @@ -1314,8 +1313,8 @@ "xml": "\n", "comments": "", "outputs": 1, - "x": 667, - "y": 1060, + "x": 705, + "y": 1070, "z": "d1c71750.37b338", "wires": [ [ @@ -1330,8 +1329,8 @@ "xml": "\n", "comments": "", "outputs": 1, - "x": 856, - "y": 1247, + "x": 786, + "y": 1258, "z": "d1c71750.37b338", "wires": [ [ @@ -1346,8 +1345,8 @@ "xml": "\n", "comments": "", "outputs": 1, - "x": 852, - "y": 1291, + "x": 779, + "y": 1304, "z": "d1c71750.37b338", "wires": [ [ @@ -1361,16 +1360,16 @@ "name": "return failure", "xml": "\n\t\n\t\n \n\n", "comments": "", - "x": 1035, - "y": 1290, + "x": 942, + "y": 1308, "z": "d1c71750.37b338", "wires": [] }, { "id": "39b02aa1.204f3e", "type": "execute", - "name": "execute vpn-policy2-id", - "xml": "\n\n", + "name": "execute vpn-policy1 entry id", + "xml": "\n\n", "comments": "", "outputs": 1, "x": 820, @@ -1409,22 +1408,11 @@ "z": "d1c71750.37b338", "wires": [] }, - { - "id": "eb55ec0a.7da3a8", - "type": "set", - "name": "set policy entry", - "xml": "\n\n\n\n", - "comments": "", - "x": 806, - "y": 569, - "z": "d1c71750.37b338", - "wires": [] - }, { "id": "521ff026.a9cd98", "type": "execute", "name": "execute split ac1-route", - "xml": "\n\n\n\n", + "xml": "\n\n\n\n", "comments": "", "outputs": 1, "x": 2210, @@ -1527,7 +1515,7 @@ "id": "e2a6c5f2.23e27", "type": "execute", "name": "execute split ac2-route", - "xml": "\n\n\n\n", + "xml": "\n\n\n\n", "comments": "", "outputs": 1, "x": 2203, @@ -1670,8 +1658,8 @@ "atomic": "false", "comments": "", "outputs": 1, - "x": 834, - "y": 1060, + "x": 838, + "y": 1135, "z": "d1c71750.37b338", "wires": [ [ @@ -1686,16 +1674,16 @@ "id": "c47fb352.4e0cc", "type": "execute", "name": "execute RestApiCallNode IPWAN Site Config", - "xml": "\n\n\n\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n\n\n\n\n\n", "comments": "", "outputs": 1, - "x": 1111, - "y": 1181.0000305175781, + "x": 1106, + "y": 1219, "z": "d1c71750.37b338", "wires": [ [ "d40cc8a7.624908", - "550c17e5.cfd818" + "df1ccdd8.7bf27" ] ] }, @@ -1703,11 +1691,11 @@ "id": "59489a1b.74de3c", "type": "execute", "name": "execute RestApiCallNode IPWAN VRF Config", - "xml": "\n\n\n\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n\n\n\n\n\n", "comments": "", "outputs": 1, - "x": 1091, - "y": 1121.0000305175781, + "x": 1120, + "y": 1122, "z": "d1c71750.37b338", "wires": [ [ @@ -2125,7 +2113,7 @@ "id": "e652cb3f.9ae0d", "type": "execute", "name": "execute RestApiCallNode Get token", - "xml": "\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n\n\n", "comments": "", "outputs": 1, "x": 979, @@ -2185,7 +2173,7 @@ "id": "8a3a1639.1431d", "type": "set", "name": "set token-id", - "xml": "\n\n", + "xml": "\n\n", "comments": "", "x": 1368, "y": 906, @@ -2203,7 +2191,9 @@ "y": 1078, "z": "d1c71750.37b338", "wires": [ - [] + [ + "28652dba.d39e02" + ] ] }, { @@ -2226,7 +2216,7 @@ "id": "d57e2b04.e0fea", "type": "returnFailure", "name": "return failure", - "xml": "\n\t\n\t\n \n", + "xml": "\n\t\n\t\n \n", "comments": "", "x": 1373, "y": 1357.3929443359375, @@ -2246,5 +2236,74 @@ "wires": [ [] ] + }, + { + "id": "28652dba.d39e02", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1234, + "y": 1409, + "z": "d1c71750.37b338", + "wires": [ + [] + ] + }, + { + "id": "df1ccdd8.7bf27", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1324, + "y": 1473, + "z": "d1c71750.37b338", + "wires": [ + [ + "948b66a6.ef156" + ] + ] + }, + { + "id": "948b66a6.ef156", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\t\n\t\n \n", + "comments": "", + "x": 1353.75, + "y": 1530.7501220703125, + "z": "d1c71750.37b338", + "wires": [] + }, + { + "id": "359e3cd1.226de4", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\t\n\t\n \n", + "comments": "", + "x": 1210, + "y": 1061, + "z": "d1c71750.37b338", + "wires": [] + }, + { + "id": "c80688e8.50ffd", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1065, + "y": 1058, + "z": "d1c71750.37b338", + "wires": [ + [ + "359e3cd1.226de4" + ] + ] } ] diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml index d7ee6d01..f4fd9eef 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml @@ -152,7 +152,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -276,7 +276,7 @@ - + @@ -284,10 +284,6 @@ - - - - @@ -342,20 +338,20 @@ - - - - - - + + + + + + - - + + @@ -372,20 +368,20 @@ - - - - - - + + + + + + - - + + @@ -406,9 +402,13 @@ + + + + - + @@ -427,31 +427,43 @@ + + + + - - + + + + - + - + + + + + - + + + - + @@ -463,13 +475,19 @@ + + + + - + + + - + @@ -477,11 +495,11 @@ - - - - - + + + + + diff --git a/platform-logic/restapi-templates/src/main/json/l3smsitetemplate.json b/platform-logic/restapi-templates/src/main/json/l3smsitetemplate.json index 016879c3..585c3114 100644 --- a/platform-logic/restapi-templates/src/main/json/l3smsitetemplate.json +++ b/platform-logic/restapi-templates/src/main/json/l3smsitetemplate.json @@ -23,18 +23,24 @@ "site":[ { "site-id": ${prop.l3vpn.site1_name}, + "site-name":"Site-forhuawei1", + "vrf-control-option": { + "custom-vrf": "true", + "vrf-definition-policy": "site-and-vpn-policy" + }, "vpn-policies": { "vpn-policy": [ { "vpn-policy-id": ${prop.l3vpn.vpn-policy1-id}, + "vpn-policy-name": "policy-forhuawei1", "entries": [ - { - "id": ${prop.l3vpn.entry1-id}, - "vpn": { - "vpn-id": ${prop.l3vpn.name}, - "site-role": "huawei-ac-net-l3vpn-svc:any-to-any-role" - } + { + "id": ${prop.l3vpn.entry1-id}, + "vpn": { + "vpn-id": ${prop.l3vpn.name}, + "site-role": "huawei-ac-net-l3vpn-svc:any-to-any-role" } + } ] } ] @@ -47,136 +53,93 @@ "appointed-access": { "ne-id": ${prop.l3vpn.pe1_id}, "ltp-id": ${prop.l3vpn.ac1_id}, + "admin-status":"admin-up", "vlan": { - "type": "huawei-ac-net-l3vpn-svc:vlan-dot1q", - "vlan-id": ${prop.l3vpn.sna1_svlan} + "huawei-ac-net-l3vpn-svc:type": "vlan-dot1q", + "vlan-id": ${prop.l3vpn.ac1_svlan}, + "sub-if-number":"dyn-allocate" } } }, "ip-connection": { "ipv4": { - "address-allocation-type": "huawei-ac-net-l3vpn-svc:static-address", "addresses": { - "provider-address": ${prop.l3vpn.ac1-peer-ip}, - "customer-address": ${prop.l3vpn.ac1-ip}, - "mask": "24" + "provider-address": ${prop.l3vpn.ac1_ip}, + "customer-address": ${prop.l3vpn.ac1_peer_ip}, + "mask": "30" } } }, - "service": { - "mtu": "1500" - }, "routing-protocols": { "routing-protocol": [ { "type": ${prop.l3vpn.ac1_protocol}, "static": { - "cascaded-lan-prefixes": [ + "cascaded-lan-prefixes": { "ipv4-lan-prefixes": [ { "ip-prefix": ${prop.l3vpn.sna1-route.ip-prefix}, - "next-hop": ${prop.l3vpn.sna1-route.next-hop} + "next-hop": ${prop.l3vpn.sna1-route.next-hop}, + "preference":"100" } ] } - ] - } - "bgp": { - "peers": [ - { - "peer-ip": ${prop.l3vpn.peer1-ip}, - "remote-as": ${prop.l3vpn.ac1_protocol_bgp_as} - } - ] } } - } ] }, "vpn-attachment": { - "vpn-policy-id": ${prop.l3vpn.name} - } - } - ] - }, - { - "site-id": ${prop.l3vpn.site2_name}, - "vpn-policies": { - "vpn-policy": [ - { - "vpn-policy-id": ${prop.l3vpn.vpn-policy2-id}, - "entries": [ - { - "id": ${prop.l3vpn.entry2-id}, - "vpn": { - "vpn-id": ${prop.l3vpn.name}, - "site-role": "huawei-ac-net-l3vpn-svc:any-to-any-role" - } + "vpn-policy-id": ${prop.l3vpn.vpn-policy1-id} } - ] - } - ] - }, - "site-network-accesses": { - "site-network-access": [ + }, { - "site-network-access-id": ${prop.l3vpn.sna2_name}, - "bearer": { - "appointed-access": { - "ne-id": ${prop.l3vpn.pe2_id}, + "site-network-access-id": ${prop.l3vpn.sna2_name}, + "bearer": { + "appointed-access": { + "ne-id": ${prop.l3vpn.pe2_id}, "ltp-id": ${prop.l3vpn.ac2_id}, + "admin-status": "admin-up", "vlan": { - "type": "huawei-ac-net-l3vpn-svc:vlan-dot1q", - "vlan-id": ${prop.l3vpn.sna2_svlan} - } + "huawei-ac-net-l3vpn-svc:type": "vlan-dot1q", + "vlan-id": ${prop.l3vpn.ac2_svlan}, + "sub-if-number": "dyn-allocate" + } } - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "huawei-ac-net-l3vpn-svc:static-address", - "addresses": { - "provider-address": ${prop.l3vpn.ac2-peer-ip}, - "customer-address": ${prop.l3vpn.ac2-ip}, - "mask": "24" + }, + "ip-connection": { + "ipv4": { + "addresses": { + "provider-address": ${prop.l3vpn.ac2_ip}, + "customer-address": ${prop.l3vpn.ac2_peer_ip}, + "mask": "30" } } - }, - "service": { - "mtu": "1500" - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": ${prop.l3vpn.ac2_protocol}, - "static": { - "cascaded-lan-prefixes": [ - { - "ipv4-lan-prefixes": [ - { - "ip-prefix": ${prop.l3vpn.sna2-route.ip-prefix}, - "next-hop": ${prop.l3vpn.sna2-route.next-hop} - } - ] - } - ] - } - "bgp": { - "peers": [ - { - "peer-ip": ${prop.l3vpn.peer2-ip}, - "remote-as": ${prop.l3vpn.ac2_protocol_bgp_as} - } - ] - } + }, + "routing-protocols": { + "routing-protocol": [ + { + "huawei-ac-net-l3vpn-svc:type": ${prop.l3vpn.ac2_protocol}, + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "ip-prefix": ${prop.l3vpn.sna2-route.ip-prefix}, + "next-hop": ${prop.l3vpn.sna2-route.next-hop}, + "preference": "100" + } + ] } - ] - }, - "vpn-attachment": { - "vpn-policy-id": ${prop.l3vpn.name} - } - } + } + } ] + }, + "vpn-attachment": { + "vpn-policy-id": ${prop.l3vpn.vpn-policy1-id} + } +} +] +} } ] } diff --git a/platform-logic/restapi-templates/src/main/json/l3smvpntemplate.json b/platform-logic/restapi-templates/src/main/json/l3smvpntemplate.json index 67f127ce..fa940a48 100644 --- a/platform-logic/restapi-templates/src/main/json/l3smvpntemplate.json +++ b/platform-logic/restapi-templates/src/main/json/l3smvpntemplate.json @@ -25,7 +25,8 @@ "vpn-id": ${prop.l3vpn.name}, "customer-name": "huawei", "vpn-service-topology": ${prop.l3vpn.topology}, - "route-exchange-policy": "huawei-ac-net-l3vpn-svc:vpnv4-way" + "route-exchange-policy": "vpnv4-way", + "address-family":"ipv4", } ] } diff --git a/platform-logic/restapi-templates/src/main/json/l3smvrftemplate.json b/platform-logic/restapi-templates/src/main/json/l3smvrftemplate.json index 732af278..1957135f 100644 --- a/platform-logic/restapi-templates/src/main/json/l3smvrftemplate.json +++ b/platform-logic/restapi-templates/src/main/json/l3smvrftemplate.json @@ -20,16 +20,96 @@ */ { + "huawei-ac-net-l3vpn-svc-vfi:vrf-attributes": { "vrf-attribute": [ { "vrf-attribute-id": ${prop.l3vpn.vrf1-id}, "ne-id": ${prop.l3vpn.pe1_id}, - "vpn-policy-id": ${prop.l3vpn.vpn-policy1-id} + "vpn-policy-id": ${prop.l3vpn.vpn-policy1-id}, + "site-id": ${prop.l3vpn.site1_name}, + "address-families": { + "address-family": [ + { + "af-type": "ipv4", + "tunnel-service": { + "type": "huawei-ac-net-l3vpn-svc-vfi:auto-select", + "auto-select": { + "select-tunnels": { + "select-tunnel": { + "type": "ldp", + "priority": 3 + } + } + } + }, + "access-protocols": { + "protocol": { + "type": "huawei-ac-net-l3vpn-svc:bgp", + "bgp": { + "import-routes": { + "import-route": [{ + "type": "huawei-ac-net-l3vpn-svc:static", + "policy-type": "none" + }, + { + "type": "huawei-ac-net-l3vpn-svc:direct", + "policy-type": "none" + } + ] + } + } + } + }, + "popgo": true + } + ] + } }, { "vrf-attribute-id": ${prop.l3vpn.vrf2-id}, "ne-id": ${prop.l3vpn.pe2_id}, - "vpn-policy-id": ${prop.l3vpn.vpn-policy2-id} + "vpn-policy-id": ${prop.l3vpn.vpn-policy1-id}, + "site-id": ${prop.l3vpn.site1_name}, + "address-families": { + "address-family": [ + { + "af-type": "ipv4", + "tunnel-service": { + "type": "huawei-ac-net-l3vpn-svc-vfi:auto-select", + "auto-select": { + "select-tunnels": { + "select-tunnel": [ + { + "type": "ldp", + "priority": 3 + } + ] + } + } + }, + "access-protocols": { + "protocol": { + "type": "huawei-ac-net-l3vpn-svc:bgp", + "bgp": { + "import-routes": { + "import-route": [{ + "type": "huawei-ac-net-l3vpn-svc:static", + "policy-type": "none" + }, + { + "type": "huawei-ac-net-l3vpn-svc:direct", + "policy-type": "none" + } + ] + } + } + } + }, + "popgo": true + } + ] + } } ] + } } -- 2.16.6