New DGs required for creation of a cloud leased-line (E-TREE) service.
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / cloud_leased_line / GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-find-maximum-used-tpn.json
diff --git a/platform-logic/generic-resource-api/src/main/json/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-find-maximum-used-tpn.json b/platform-logic/generic-resource-api/src/main/json/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-find-maximum-used-tpn.json
new file mode 100644 (file)
index 0000000..343def6
--- /dev/null
@@ -0,0 +1,289 @@
+[\r
+    {\r
+        "id": "48a61ee8.0b719",\r
+        "type": "dgstart",\r
+        "name": "DGSTART",\r
+        "outputs": 1,\r
+        "x": 173,\r
+        "y": 135,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "e311175c.73cf98"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e311175c.73cf98",\r
+        "type": "service-logic",\r
+        "name": "GENERIC-RESOURCE-API ${project.version}",\r
+        "module": "GENERIC-RESOURCE-API",\r
+        "version": "${project.version}",\r
+        "comments": "",\r
+        "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>",\r
+        "outputs": 1,\r
+        "x": 309,\r
+        "y": 248,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "f0c04bab.58634"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "f0c04bab.58634",\r
+        "type": "method",\r
+        "name": "cll-vnf-topology-operation-find-maximum-used-tpn",\r
+        "xml": "<method rpc='cll-vnf-topology-operation-find-maximum-used-tpn' mode='sync'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 425.0001220703125,\r
+        "y": 350,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "7e34bfe8.37391"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "7e34bfe8.37391",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "outputs": 1,\r
+        "x": 599.9688720703125,\r
+        "y": 430.74163818359375,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "c553bcbc.9ba518",\r
+                "9e275680.4bddb"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "c553bcbc.9ba518",\r
+        "type": "save",\r
+        "name": "get all-vpn-bindings from aai",\r
+        "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"vpn-bindings\"\n\t    key=\"selflink = 'https://aai.onap:8443/aai/v21/network/vpn-bindings\"\n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.aai.allvpnbindings\" >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 826,\r
+        "y": 431,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "dac99129.1b70d8",\r
+                "f2598ce0.05b6e8",\r
+                "6bee9d7e.dbbb84"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "dac99129.1b70d8",\r
+        "type": "success",\r
+        "name": "success",\r
+        "xml": "<outcome value='success'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1048,\r
+        "y": 429,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "e7d398c3.c1aec"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "f2598ce0.05b6e8",\r
+        "type": "not-found",\r
+        "name": "not-found",\r
+        "xml": "<outcome value='not-found'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1058.490966796875,\r
+        "y": 305.57403564453125,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "6bee9d7e.dbbb84",\r
+        "type": "failure",\r
+        "name": "failure",\r
+        "xml": "<outcome value='failure'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1056,\r
+        "y": 349,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "c0d94944.aeb218"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e7d398c3.c1aec",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic=\"true\">",\r
+        "atomic": "true",\r
+        "outputs": 1,\r
+        "x": 1212,\r
+        "y": 430,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "f7213a60.a7bf88"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "c0d94944.aeb218",\r
+        "type": "returnFailure",\r
+        "name": "return failure",\r
+        "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value='' />\n",\r
+        "comments": "",\r
+        "x": 1223,\r
+        "y": 348,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "f7213a60.a7bf88",\r
+        "type": "for",\r
+        "name": "for allvpnbidx in allvpnbindings",\r
+        "xml": "<for index='allvpnbidx' start='0' end='`$tmp.aai.allvpnbindings.vpn-binding_length`' >\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 200,\r
+        "y": 580,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "d3ed1465.8f79e8"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "d3ed1465.8f79e8",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic='true'>",\r
+        "atomic": "true",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 463,\r
+        "y": 580,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "d00c4aae.149b2"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "d00c4aae.149b2",\r
+        "type": "switchNode",\r
+        "name": "switch customer-vpn-id is greater than maxtpn",\r
+        "xml": "<switch test=\"`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id >= $maxtpn `\">\n\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 752,\r
+        "y": 580,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "e8157a5b.cfaa1",\r
+                "f2a0edb3.6895e"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "e8157a5b.cfaa1",\r
+        "type": "outcomeTrue",\r
+        "name": "true",\r
+        "xml": "<outcome value='true'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1034,\r
+        "y": 560,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "b8fa7ef9.c40c38"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "f2a0edb3.6895e",\r
+        "type": "outcomeFalse",\r
+        "name": "false",\r
+        "xml": "<outcome value='false'>\n",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1034,\r
+        "y": 609,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            []\r
+        ]\r
+    },\r
+    {\r
+        "id": "b8fa7ef9.c40c38",\r
+        "type": "block",\r
+        "name": "block : atomic",\r
+        "xml": "<block atomic='true'>",\r
+        "atomic": "true",\r
+        "comments": "",\r
+        "outputs": 1,\r
+        "x": 1202,\r
+        "y": 560,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": [\r
+            [\r
+                "66fd0662.02fed8",\r
+                "8abe9ad2.6ab3e"\r
+            ]\r
+        ]\r
+    },\r
+    {\r
+        "id": "9e275680.4bddb",\r
+        "type": "set",\r
+        "name": "set initial maxtpn and newToBeUsedMaxtpn",\r
+        "xml": "<set>\n<parameter name='maxtpn' value='1' />\n<parameter name='newToBeUsedMaxtpn' value='1' />\n",\r
+        "comments": "",\r
+        "x": 851,\r
+        "y": 244,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "66fd0662.02fed8",\r
+        "type": "set",\r
+        "name": "set maxtpn",\r
+        "xml": "<set>\n<parameter name='maxtpn' value='`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id`' />\n",\r
+        "comments": "",\r
+        "x": 1377,\r
+        "y": 560,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": []\r
+    },\r
+    {\r
+        "id": "8abe9ad2.6ab3e",\r
+        "type": "set",\r
+        "name": "set newToBeUsedMaxtpn",\r
+        "xml": "<set>\n<parameter name='newToBeUsedMaxtpn' value='`$maxtpn + $tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].route-distinguisher`' />\n",\r
+        "comments": "",\r
+        "x": 1407,\r
+        "y": 611,\r
+        "z": "4bbda34f.42b12c",\r
+        "wires": []\r
+    }\r
+]
\ No newline at end of file