diff options
7 files changed, 384 insertions, 18 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.json b/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.json new file mode 100644 index 00000000..f1c1bcb8 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.json @@ -0,0 +1,277 @@ +[
+ {
+ "id": "dcad323c.dc4798",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 128,
+ "y": 72,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "2c6d583b.e0ed6"
+ ]
+ ]
+ },
+ {
+ "id": "2c6d583b.e0ed6",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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}'>",
+ "outputs": 1,
+ "x": 264,
+ "y": 185,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "710efd23.956604"
+ ]
+ ]
+ },
+ {
+ "id": "710efd23.956604",
+ "type": "method",
+ "name": "tsli-vnf-topology-operation-find-maximum-used-tpn",
+ "xml": "<method rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 380.0001220703125,
+ "y": 287,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "86a8a352.0226a"
+ ]
+ ]
+ },
+ {
+ "id": "86a8a352.0226a",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 554.9688720703125,
+ "y": 367.74163818359375,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "d7203925.27f628",
+ "5563cab3.b9ec1c"
+ ]
+ ]
+ },
+ {
+ "id": "d7203925.27f628",
+ "type": "save",
+ "name": "get all-vpn-bindings from aai",
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 781,
+ "y": 368,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "8a1cac64.d9f088",
+ "28ca26e4.951a3a",
+ "79b4f344.796bac"
+ ]
+ ]
+ },
+ {
+ "id": "8a1cac64.d9f088",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1003,
+ "y": 366,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "cb805cfc.55e7f"
+ ]
+ ]
+ },
+ {
+ "id": "28ca26e4.951a3a",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1013.490966796875,
+ "y": 242.57403564453125,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "79b4f344.796bac",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1011,
+ "y": 286,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "e9ad4f40.e410c8"
+ ]
+ ]
+ },
+ {
+ "id": "cb805cfc.55e7f",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1167,
+ "y": 367,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "d1872098.535da"
+ ]
+ ]
+ },
+ {
+ "id": "e9ad4f40.e410c8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value='' />\n",
+ "comments": "",
+ "x": 1178,
+ "y": 285,
+ "z": "ad0d9df6.18fd58",
+ "wires": []
+ },
+ {
+ "id": "d1872098.535da",
+ "type": "for",
+ "name": "for allvpnbidx in allvpnbindings",
+ "xml": "<for index='allvpnbidx' start='0' end='`$tmp.aai.allvpnbindings.vpn-binding_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 155,
+ "y": 517,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "867efd8f.191748"
+ ]
+ ]
+ },
+ {
+ "id": "867efd8f.191748",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 418,
+ "y": 517,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "3686747b.9b8034"
+ ]
+ ]
+ },
+ {
+ "id": "3686747b.9b8034",
+ "type": "switchNode",
+ "name": "switch customer-vpn-id is greater than maxtpn",
+ "xml": "<switch test=\"`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id >= $maxtpn `\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 707,
+ "y": 517,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "56c65c47.d113d4",
+ "dfa2f5df.4bb658"
+ ]
+ ]
+ },
+ {
+ "id": "56c65c47.d113d4",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 989,
+ "y": 497,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "25625bbf.e04704"
+ ]
+ ]
+ },
+ {
+ "id": "dfa2f5df.4bb658",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 989,
+ "y": 546,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "25625bbf.e04704",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1157,
+ "y": 497,
+ "z": "ad0d9df6.18fd58",
+ "wires": [
+ [
+ "a0dd57a5.212ef"
+ ]
+ ]
+ },
+ {
+ "id": "5563cab3.b9ec1c",
+ "type": "set",
+ "name": "set maxtpn",
+ "xml": "<set>\n<parameter name='maxtpn' value='0' />\n\n\n",
+ "comments": "",
+ "x": 747,
+ "y": 305,
+ "z": "ad0d9df6.18fd58",
+ "wires": []
+ },
+ {
+ "id": "a0dd57a5.212ef",
+ "type": "set",
+ "name": "set maxtpn",
+ "xml": "<set>\n<parameter name='maxtpn' value='`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id`' />\n",
+ "comments": "",
+ "x": 1332,
+ "y": 497,
+ "z": "ad0d9df6.18fd58",
+ "wires": []
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.json b/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.json index 47e80d28..0ec5d2ec 100644 --- a/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.json +++ b/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.json @@ -466,7 +466,8 @@ "d6aa9ec.33fa46",
"6c32ab13.072304",
"35f98555.2ceed2",
- "63cf541.20dacac"
+ "63cf541.20dacac",
+ "eb9a9d75.279478"
]
]
},
@@ -1165,8 +1166,8 @@ "xml": "<call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof' mode='sync' >\n\n",
"comments": "",
"outputs": 1,
- "x": 2825,
- "y": 2386,
+ "x": 2829,
+ "y": 2315,
"z": "cd8c161.e76ffe8",
"wires": [
[]
@@ -1178,8 +1179,8 @@ "name": "set attachment_param",
"xml": "<set>\n<parameter name='prop.connection-attachment.access-provider-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -9]`' />\n<parameter name='prop.connection-attachment.access-client-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -7]`' />\n<parameter name='prop.connection-attachment.access-topology-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -5]`' />\n<parameter name='prop.connection-attachment.access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' />\n<parameter name='prop.connection-attachment.access-ltp-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -1]`' />\n\n<parameter name='prop.remote.connection-attachment.access-provider-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -9]`' />\n<parameter name='prop.remote.connection-attachment.access-client-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -7]`' />\n<parameter name='prop.remote.connection-attachment.access-topology-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -5]`' />\n<parameter name='prop.remote.connection-attachment.access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' />\n<parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -1]`' />\n\n<!--<parameter name='prop.remote.connection-attachment.access-provider-id' value='`$oof.vpn.access-provider-id`' />-->\n<!--<parameter name='prop.remote.connection-attachment.access-client-id' value='`$oof.vpn.access-client-id`' />-->\n<!--<parameter name='prop.remote.connection-attachment.access-topology-id' value='`$oof.vpn.access-topology-id`' />-->\n<!--<parameter name='prop.remote.connection-attachment.access-node-id' value='`$oof.vpn.access-node-id`' />-->\n<!--<parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />-->\n",
"comments": "",
- "x": 2623,
- "y": 2265,
+ "x": 2627,
+ "y": 2194,
"z": "cd8c161.e76ffe8",
"wires": []
},
@@ -1189,8 +1190,8 @@ "name": "TODO: FIXME",
"info": "put proper values for src topology-id, node-id, ltp-id, etc (in domain A)\nand dst topology-id, node-id, ltp-id, etc (in domain B)",
"comments": "",
- "x": 2589,
- "y": 2199,
+ "x": 2593,
+ "y": 2128,
"z": "cd8c161.e76ffe8",
"wires": []
},
@@ -2972,8 +2973,8 @@ "name": "set query_param",
"xml": "<set>\n<parameter name='prop.ethsrvType' value='`$network-route-A`' />\n\n",
"comments": "",
- "x": 2604,
- "y": 2318,
+ "x": 2608,
+ "y": 2247,
"z": "cd8c161.e76ffe8",
"wires": []
},
@@ -3019,7 +3020,7 @@ "id": "3340e53d.b2b492",
"type": "save",
"name": "save vpn-binding otnIdx resource (aka. OTN) in AAI",
- "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' \n key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >\n<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />\n<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />\n<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />\n<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->\n<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />\n<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->\n<parameter name='access-client-id' value='`$tmp.access-client-id`' />\n<!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />-->\n<parameter name='access-topology-id' value='`$tmp.access-topology-id`' />\n<!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />-->\n<parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' />\n<parameter name='src-access-ltp-id' value='`$tmp.otninfo[$otnidx].srcPort.src-tunnel-tp-id`' />\n<!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />-->\n<parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' />\n<parameter name='dst-access-ltp-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-tunnel-tp-id`' />\n<parameter name='route-distinguisher' value='`$gfp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />\n\n\n<parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' />\n<parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' />\n<parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' />\n\n<!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) -->\n<parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' />\n\n",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' \n key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >\n<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />\n<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />\n<!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />-->\n<parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />\n<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->\n<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />\n<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->\n<parameter name='access-client-id' value='`$tmp.access-client-id`' />\n<!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />-->\n<parameter name='access-topology-id' value='`$tmp.access-topology-id`' />\n<!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />-->\n<parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' />\n<parameter name='src-access-ltp-id' value='`$tmp.otninfo[$otnidx].srcPort.src-tunnel-tp-id`' />\n<!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />-->\n<parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' />\n<parameter name='dst-access-ltp-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-tunnel-tp-id`' />\n<parameter name='route-distinguisher' value='`$gfp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />\n\n\n<parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' />\n<parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' />\n<parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' />\n\n<!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) -->\n<parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' />\n\n",
"comments": "",
"outputs": 1,
"x": 3768,
@@ -4950,8 +4951,33 @@ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n <parameter name=\"filename\" value=\"`$filenamemm`\" />\n",
"comments": "",
"outputs": 1,
- "x": 2615,
- "y": 2432,
+ "x": 2619,
+ "y": 2361,
+ "z": "cd8c161.e76ffe8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ba4816e9.f5d79",
+ "type": "set",
+ "name": "set maxtpn",
+ "xml": "<set>\n<parameter name='maxtpn' value='`($maxtpn + $gfp)`' />",
+ "comments": "",
+ "x": 3646,
+ "y": 2964,
+ "z": "cd8c161.e76ffe8",
+ "wires": []
+ },
+ {
+ "id": "eb9a9d75.279478",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:tsli-vnf-topology-operation-find-maximum-used-tpn",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2812,
+ "y": 2425,
"z": "cd8c161.e76ffe8",
"wires": [
[]
diff --git a/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.json b/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.json index 0d4161a1..42490961 100644 --- a/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.json +++ b/platform-logic/generic-resource-api/src/main/json/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.json @@ -464,7 +464,8 @@ "c6ccb3e9.91ea18",
"6963f6fb.4a135",
"40ae5836.eda238",
- "31cde3.5ded021e"
+ "31cde3.5ded021e",
+ "e15a89e6.e78d8"
]
]
},
@@ -2991,8 +2992,8 @@ "xml": "<for index='otnidx' start='0' end='`$tmp.otninfo_length`' >",
"comments": "",
"outputs": 1,
- "x": 4274,
- "y": 2329,
+ "x": 4269,
+ "y": 2390,
"z": "a1c94a24.22ed9",
"wires": [
[
@@ -3004,7 +3005,7 @@ "id": "5b2c57a6.c56358",
"type": "save",
"name": "save vpn-binding otnIdx resource (aka. OTN) in AAI",
- "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' \n key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >\n<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />\n<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />\n<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />\n<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->\n<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />\n<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->\n<parameter name='access-client-id' value='`$tmp.access-client-id`' />\n<!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />-->\n<parameter name='access-topology-id' value='`$tmp.access-topology-id`' />\n<!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />-->\n<parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' />\n<parameter name='src-access-ltp-id' value='`$tmp.otninfo[$otnidx].srcPort.src-tunnel-tp-id`' />\n<!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />-->\n<parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' />\n<parameter name='dst-access-ltp-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-tunnel-tp-id`' />\n<parameter name='route-distinguisher' value='`$gfp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />\n\n\n<parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' />\n<parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' />\n<parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' />\n\n<!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) -->\n<parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' />\n\n\n",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' \n key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >\n<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />\n<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />\n<!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />-->\n<parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />\n<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->\n<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />\n<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->\n<parameter name='access-client-id' value='`$tmp.access-client-id`' />\n<!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />-->\n<parameter name='access-topology-id' value='`$tmp.access-topology-id`' />\n<!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />-->\n<parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' />\n<parameter name='src-access-ltp-id' value='`$tmp.otninfo[$otnidx].srcPort.src-tunnel-tp-id`' />\n<!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />-->\n<parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' />\n<parameter name='dst-access-ltp-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-tunnel-tp-id`' />\n<parameter name='route-distinguisher' value='`$gfp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />\n\n\n<parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' />\n<parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' />\n<parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' />\n\n<!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) -->\n<parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' />\n\n\n",
"comments": "",
"outputs": 1,
"x": 5397,
@@ -5628,5 +5629,19 @@ "wires": [
[]
]
+ },
+ {
+ "id": "e15a89e6.e78d8",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:tsli-vnf-topology-operation-find-maximum-used-tpn",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4436,
+ "y": 2331,
+ "z": "a1c94a24.22ed9",
+ "wires": [
+ []
+ ]
}
]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/resources/graph.versions b/platform-logic/generic-resource-api/src/main/resources/graph.versions index 64cfedce..063b287a 100755 --- a/platform-logic/generic-resource-api/src/main/resources/graph.versions +++ b/platform-logic/generic-resource-api/src/main/resources/graph.versions @@ -287,4 +287,6 @@ GENERIC-RESOURCE-API tsli-vnf-topology-operation-trans-slice-deactivate ${projec GENERIC-RESOURCE-API tsli-vnf-topology-operation-trans-slice-delete ${project.version} sync GENERIC-RESOURCE-API tsli-vnf-topology-operation-trans-slice-modify ${project.version} sync GENERIC-RESOURCE-API tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof ${project.version} sync +GENERIC-RESOURCE-API tsli-vnf-topology-operation-find-maximum-used-tpn ${project.version} sync + diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.xml new file mode 100644 index 00000000..111aed3a --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-find-maximum-used-tpn.xml @@ -0,0 +1,42 @@ +<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}'>
+ <method rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='maxtpn' value='0' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-bindings"
+ key="selflink = 'https://aai.onap:8443/aai/v21/network/vpn-bindings"
+ local-only="false"
+ pfx="tmp.aai.allvpnbindings" >
+ <outcome value='not-found'></outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='allvpnbidx' start='0' end='`$tmp.aai.allvpnbindings.vpn-binding_length`' >
+ <block atomic='true'>
+ <switch test="`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id >= $maxtpn `">
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='maxtpn' value='`$tmp.aai.allvpnbindings.vpn-binding[$allvpnbidx].customer-vpn-id`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml index 446a74a8..4c336b63 100644 --- a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml @@ -734,6 +734,7 @@ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name="filename" value="`$filenamemm`" />
</execute>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' ></call>
<for index='otnidx' start='0' end='`$tmp.otninfo_length`' >
<block atomic='true'>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
@@ -871,7 +872,8 @@ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >
<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />
<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />
- <parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />
+ <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />-->
+ <parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />
<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->
<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />
<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->
diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml index 6d57a785..9a8a9179 100644 --- a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml +++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-modify.xml @@ -848,6 +848,7 @@ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name="filename" value="`$filenamemm`" />
</execute>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' ></call>
<for index='otnidx' start='0' end='`$tmp.otninfo_length`' >
<block atomic='true'>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
@@ -981,7 +982,8 @@ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >
<parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />
<parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />
- <parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />
+ <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />-->
+ <parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />
<!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->
<parameter name='access-provider-id' value='`$tmp.access-provider-id`' />
<!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->
|