diff options
Diffstat (limited to 'platform-logic')
6 files changed, 398 insertions, 268 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.json b/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.json index c785b72d..044737f5 100644 --- a/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.json +++ b/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.json @@ -371,9 +371,9 @@ "wires": [
[
"dd179bba.27e578",
- "a736e107.ab857",
"51dd454b.e64094",
- "e9ba305b.3f7b08"
+ "e9ba305b.3f7b08",
+ "a736e107.ab857"
]
]
},
@@ -389,24 +389,6 @@ "wires": []
},
{
- "id": "a736e107.ab857",
- "type": "get-resource",
- "name": "get-resource src tp",
- "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"p-interface\" \n\t\tkey=\"pnf.pnf-name = $tmp.src-pnf-name\n\t\t AND p-interface.interface-name = $tmp.cross-link.src-ltpId\"\n pfx='tmp.aai.src-tp' local-only='false' >\n \n <!--AND depth = '0'\"-->\n\n\n",
- "comments": "",
- "outputs": 1,
- "x": 2359.5001220703125,
- "y": 529,
- "z": "5b68e0d.bd97b2",
- "wires": [
- [
- "30082dde.5085da",
- "a603f43.0659d88",
- "ed057305.d13bc"
- ]
- ]
- },
- {
"id": "30082dde.5085da",
"type": "success",
"name": "success",
@@ -815,7 +797,7 @@ "id": "51dd454b.e64094",
"type": "get-resource",
"name": "get-resource dst tp",
- "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"p-interface\" \n\t\tkey=\"pnf.pnf-name = $tmp.src-pnf-name\n\t\t AND p-interface.interface-name = $tmp.cross-link.src-ltpId\"\n pfx='tmp.aai.dst-tp' local-only='false' >\n \n <!--AND depth = '0'\"-->\n\n\n",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"p-interface\" \n\t\tkey=\"pnf.pnf-name = $tmp.dst-pnf-name\n\t\t AND p-interface.interface-name = $tmp.cross-link.dst-ltpId\"\n pfx='tmp.aai.dst-tp' local-only='false' >\n \n <!--AND depth = '0'\"-->\n\n\n",
"comments": "",
"outputs": 1,
"x": 2313.5001220703125,
@@ -2038,5 +2020,45 @@ "66a31e69.f659b8"
]
]
+ },
+ {
+ "id": "a736e107.ab857",
+ "type": "get-resource",
+ "name": "get-resource src tp",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"p-interface\" \n\t\tkey=\"pnf.pnf-name = $tmp.src-pnf-name\n\t\t AND p-interface.interface-name = $tmp.cross-link.src-ltpId\"\n pfx='tmp.aai.src-tp' local-only='false' >\n \n <!--AND depth = '0'\"-->\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2359.5001220703125,
+ "y": 529,
+ "z": "5b68e0d.bd97b2",
+ "wires": [
+ [
+ "30082dde.5085da",
+ "a603f43.0659d88",
+ "ed057305.d13bc"
+ ]
+ ]
+ },
+ {
+ "id": "85e1ebfe.ba8e78",
+ "type": "comment",
+ "name": "among all ttps, find the one that has relationship to p-interface (TODO: check node/pnf is the same between this p-interface's pnf and the ttp's pnf)",
+ "info": "",
+ "comments": "",
+ "x": 5703,
+ "y": 377,
+ "z": "5b68e0d.bd97b2",
+ "wires": []
+ },
+ {
+ "id": "1ff536a0.bad579",
+ "type": "comment",
+ "name": "among all ttps, find the one that has relationship to p-interface (TODO: check node/pnf is the same between this p-interface's pnf and the ttp's pnf)",
+ "info": "",
+ "comments": "",
+ "x": 5697,
+ "y": 749,
+ "z": "5b68e0d.bd97b2",
+ "wires": []
}
]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.json b/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.json index 6005d810..48817a42 100644 --- a/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.json +++ b/platform-logic/generic-resource-api/src/main/json/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.json @@ -84,8 +84,7 @@ "5733466d.dcbb88",
"6d51d616.88647",
"aab160b4.f76088",
- "48dc3a93.b23a44",
- "672fc75a.1e91b"
+ "48dc3a93.b23a44"
]
]
},
@@ -588,7 +587,7 @@ "id": "e85654b4.901fd",
"type": "execute",
"name": "execute split tp-id to get pnf-name",
- "xml": "<!--<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >-->\n<!--<parameter name=\"original_string\" value='`tmp.unis.uni[$vidx].tp-id`'/>-->\n<!--<parameter name=\"regex\" value=\"nodeId\"/>-->\n<!--<parameter name=\"tmp.unis.uni[$vidx].pnf-name\" value=\"\"/>-->\n\n<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`tmp.aai.uni.tp-id`'/>\n<parameter name=\"regex\" value=\"nodeId\"/>\n<parameter name=\"tmp.aai.uni.pnf-name\" value=\"\"/>",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`tmp.aai.uni.tp-id`'/>\n<parameter name=\"regex\" value=\"[^-]+$\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n\n",
"comments": "",
"outputs": 1,
"x": 2596,
@@ -636,8 +635,8 @@ {
"id": "9111f685.17b2e8",
"type": "set",
- "name": "set ipAddress prefixLength",
- "xml": "<set>\n<parameter name='prop.lan.ip-address' value='`$ipandMask[0]`' />\n<parameter name='prop.lan.prefixLength' value='`$ipandMask[1]`' />",
+ "name": "set ltpId",
+ "xml": "<set>\n<parameter name='tmp.src.ltpId' value='`$param-prefix[$param-prefix_length -1]`' />\n",
"comments": "",
"x": 3041,
"y": 673,
@@ -1137,7 +1136,10 @@ "f7756434.d014e",
"a9643f3f.4f04b",
"ae925256.a68df",
- "ee991e0.ab6b36"
+ "ee991e0.ab6b36",
+ "3ce3b19a.7c10c6",
+ "d661efba.3fa238",
+ "c6d53bc.53f5bc8"
]
]
},
@@ -1194,8 +1196,8 @@ {
"id": "678c3911.078e2",
"type": "execute",
- "name": "execute RestconfApiCallNode Create ethernet Service with token",
- "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"patch\"/>\n<parameter name='dirPath' value=\"/opt/onap/sdnc/restconfapi/yang\" />\n<parameter name=\"responsePrefix\" value=\"vpn-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
+ "name": "execute RestApiCallNode Create ethernet Service with token",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`\" />\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"patch\"/>\n<parameter name='dirPath' value=\"/opt/onap/sdnc/restconfapi/yang\" />\n<parameter name=\"responsePrefix\" value=\"vpn-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
"comments": "",
"outputs": 1,
"x": 1660.52734375,
@@ -1301,8 +1303,8 @@ {
"id": "42cb8b06.e7daec",
"type": "execute",
- "name": "execute RestconfApiCallNode Create ethernet Service without token",
- "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"patch\"/>\n<parameter name='dirPath' value=\"/opt/onap/sdnc/restconfapi/yang\" />\n<parameter name=\"responsePrefix\" value=\"vpn-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
+ "name": "execute RestApiCallNode Create ethernet Service without token",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`\" />\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"patch\"/>\n<parameter name='dirPath' value=\"/opt/onap/sdnc/restconfapi/yang\" />\n<parameter name=\"responsePrefix\" value=\"vpn-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
"comments": "",
"outputs": 1,
"x": 1670.52734375,
diff --git a/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.xml b/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.xml index 3ea459a5..8bf518e2 100644 --- a/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.xml +++ b/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-get-otn-tunnel-path-from-oof.xml @@ -154,7 +154,7 @@ </return>
</outcome>
</get-resource>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $tmp.src-pnf-name AND p-interface.interface-name = $tmp.cross-link.src-ltpId" pfx="tmp.aai.dst-tp" local-only="false">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $tmp.dst-pnf-name AND p-interface.interface-name = $tmp.cross-link.dst-ltpId" pfx="tmp.aai.dst-tp" local-only="false">
<!--AND depth = '0'"-->
<outcome value="success">
<block>
diff --git a/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml b/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml index 7a4eedf3..d8e111c0 100644 --- a/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml @@ -1,65 +1,63 @@ -<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='sotn-vf-operation-uni-activate' mode='sync'>
+<service-logic xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="${project.version}">
+ <method rpc="sotn-vf-operation-uni-activate" mode="sync">
<block atomic="true">
- <switch test='`$service-data.vnfs.vnf_length`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ <switch test="`$service-data.vnfs.vnf_length`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data"/>
</return>
</outcome>
</switch>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <for index="idx" start="0" end="`$service-data.vnfs.vnf_length`">
<switch test="`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`">
- <outcome value='true'>
+ <outcome value="true">
<block atomic="true">
<set>
- <parameter name='vnf-index' value='`$idx`' />
+ <parameter name="vnf-index" value="`$idx`"/>
</set>
<set>
- <parameter name='tmp.vnf-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name="tmp.vnf-id" value="`$vf-module-topology-operation-input.vnf-information.vnf-id`"/>
</set>
</block>
</outcome>
</switch>
</for>
- <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
- <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
- <parameter name='contextPrefix' value='prop' />
+ <execute plugin="org.onap.ccsdk.sli.plugins.prop.PropertiesNode" method="readProperties">
+ <parameter name="fileName" value="%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties"/>
+ <parameter name="contextPrefix" value="prop"/>
</execute>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value='0'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`">
+ <outcome value="0">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data"/>
</return>
</outcome>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data"/>
</return>
</outcome>
- <outcome value='Other'>
+ <outcome value="Other">
<block atomic="true">
<set>
- <parameter name='vf-module-length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ <parameter name="vf-module-length" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`"/>
</set>
- <for index='idx' start='0' end='`$vf-module-length`' >
+ <for index="idx" start="0" end="`$vf-module-length`">
<switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`">
- <outcome value='true'>
+ <outcome value="true">
<block atomic="true">
<set>
- <parameter name='tmp.vidx' value='`$idx`' />
- <parameter name='ctx.vf-module-data.' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.`' />
+ <parameter name="tmp.vidx" value="`$idx`"/>
+ <parameter name="ctx.vf-module-data." value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.`"/>
</set>
<set>
- <parameter name='vf-module-request-input.' value='`$ctx.vf-module-data.vf-module-request-input.`' />
+ <parameter name="vf-module-request-input." value="`$ctx.vf-module-data.vf-module-request-input.`"/>
</set>
</block>
</outcome>
@@ -68,89 +66,78 @@ </block>
</outcome>
</switch>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="generic-vnf"
- key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
- pfx='tmp.aai.generic-vnf' local-only='false' >
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="generic-vnf" key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id" pfx="tmp.aai.generic-vnf" local-only="false">
<!--AND depth = '0'"-->
- <outcome value='success'>
+ <outcome value="success">
<block>
- <for silentFailure='true' index='vidx' start='0' end='`$tmp.aai.generic-vnf.relationship-list.relationship_length`' >
- <switch test='`$tmp.aai.generic-vnf.relationship-list.relationship[$vidx].related-to`'>
- <outcome value='uni'>
+ <for silentFailure="true" index="vidx" start="0" end="`$tmp.aai.generic-vnf.relationship-list.relationship_length`">
+ <switch test="`$tmp.aai.generic-vnf.relationship-list.relationship[$vidx].related-to`">
+ <outcome value="uni">
<block atomic="true">
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="uni"
- key="uni.id = $tmp.aai.generic-vnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value"
- pfx='tmp.aai.uni' local-only='false' >
- <outcome value='success'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="uni" key="uni.id = $tmp.aai.generic-vnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value" pfx="tmp.aai.uni" local-only="false">
+ <outcome value="success">
<block>
<set>
- <!--<parameter name='`tmp.unis.uni[$vidx].tpId`' value="`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value`" />-->
- <parameter name='`tmp.unis.uni[$vidx].`' value="`$tmp.aai.uni.`" />
+ <!--
+ <parameter name='`tmp.unis.uni[$vidx].tpId`' value="`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value`" />
+ -->
+ <parameter name="`tmp.unis.uni[$vidx].`" value="`$tmp.aai.uni.`"/>
</set>
- <!--<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >-->
- <!--<parameter name="original_string" value='`tmp.unis.uni[$vidx].tp-id`'/>-->
- <!--<parameter name="regex" value="nodeId"/>-->
- <!--<parameter name="tmp.unis.uni[$vidx].pnf-name" value=""/>-->
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
- <parameter name="original_string" value='`tmp.aai.uni.tp-id`'/>
- <parameter name="regex" value="nodeId"/>
- <parameter name="tmp.aai.uni.pnf-name" value=""/>
- <outcome value='success'>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="split">
+ <parameter name="original_string" value="`tmp.aai.uni.tp-id`"/>
+ <parameter name="regex" value="[^-]+$"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ <outcome value="success">
<set>
- <parameter name='prop.lan.ip-address' value='`$ipandMask[0]`' />
- <parameter name='prop.lan.prefixLength' value='`$ipandMask[1]`' />
+ <parameter name="tmp.src.ltpId" value="`$param-prefix[$param-prefix_length -1]`"/>
</set>
</outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='' />
- <parameter name='error-message' value="An error occured while splitting sna1_route" />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value=""/>
+ <parameter name="error-message" value="An error occured while splitting sna1_route"/>
</return>
</outcome>
</execute>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="pnf"
- key="'pnf.pnf-name = $tmp.unis.uni[$vidx].pnf-name'
- AND depth = '0'"
- pfx='tmp.aai.pnf' local-only='false' >
- <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="'pnf.pnf-name = $tmp.unis.uni[$vidx].pnf-name' AND depth = '0'" pfx="tmp.aai.pnf" local-only="false">
+ <!--
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ -->
<!-- resource="generic-vnf" -->
- <!-- key="'generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id' -->
+ <!--
+ key="'generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id'
+ -->
<!-- AND depth = '0'"-->
- <!-- pfx='tmp.aai.generic-vnf' local-only='false' >-->
- <outcome value='success'>
+ <!--
+ pfx='tmp.aai.generic-vnf' local-only='false' >
+ -->
+ <outcome value="success">
<block>
<set>
- <parameter name='`$tmp.unis.uni[$vidx].node-id`' value="`$tmp.aai.pnf.pnf-id`" />
+ <parameter name="`$tmp.unis.uni[$vidx].node-id`" value="`$tmp.aai.pnf.pnf-id`"/>
</set>
- <for silentFailure='true' index='ridx' start='0' end='`$tmp.aai.pnf.relationship-list.relationship_length`' >
- <switch test='`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].related-to`'>
- <outcome value='thirdparty-controller'>
+ <for silentFailure="true" index="ridx" start="0" end="`$tmp.aai.pnf.relationship-list.relationship_length`">
+ <switch test="`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].related-to`">
+ <outcome value="thirdparty-controller">
<block atomic="true">
<set>
- <parameter name='`$tmp.unis.uni[$vidx].thirdparty-sdnc-id`' value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
+ <parameter name="`$tmp.unis.uni[$vidx].thirdparty-sdnc-id`" value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`"/>
</set>
</block>
</outcome>
- <outcome value='network-resource'>
+ <outcome value="network-resource">
<block atomic="true">
<set>
- <parameter name='`$tmp.unis.uni[$vidx].network-id`' value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
+ <parameter name="`$tmp.unis.uni[$vidx].network-id`" value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`"/>
</set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="network-resource"
- key="'network-resource.network-id = $tmp.unis.uni[$vidx].network-id'
- AND depth = '0'"
- pfx='tmp.aai.network-resource' local-only='false' >
- <outcome value='success'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-resource" key="'network-resource.network-id = $tmp.unis.uni[$vidx].network-id' AND depth = '0'" pfx="tmp.aai.network-resource" local-only="false">
+ <outcome value="success">
<set>
- <parameter name="`$tmp.unis.uni[$vidx].network-id`" value="`$tmp.aai.network-resource.network-id`" />
- <parameter name="`$tmp.unis.uni[$vidx].provider-id`" value="`$tmp.aai.network-resource.provider-id`" />
- <parameter name="`$tmp.unis.uni[$vidx].client-id`" value="`$tmp.aai.network-resource.client-id`" />
- <parameter name="`$tmp.unis.uni[$vidx].te-topo-id`" value="`$tmp.aai.network-resource.te-topo-id`" />
- <parameter name="`$tmp.unis.uni[$vidx].network-type`" value="`$tmp.aai.network-resource.network-type`" />
+ <parameter name="`$tmp.unis.uni[$vidx].network-id`" value="`$tmp.aai.network-resource.network-id`"/>
+ <parameter name="`$tmp.unis.uni[$vidx].provider-id`" value="`$tmp.aai.network-resource.provider-id`"/>
+ <parameter name="`$tmp.unis.uni[$vidx].client-id`" value="`$tmp.aai.network-resource.client-id`"/>
+ <parameter name="`$tmp.unis.uni[$vidx].te-topo-id`" value="`$tmp.aai.network-resource.te-topo-id`"/>
+ <parameter name="`$tmp.unis.uni[$vidx].network-type`" value="`$tmp.aai.network-resource.network-type`"/>
</set>
</outcome>
</get-resource>
@@ -168,131 +155,208 @@ </outcome>
</switch>
</for>
- <switch test='`$tmp.unis.uni_length < 2`' >
- <outcome value='true'>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
+ <switch test="`$tmp.unis.uni_length < 2`">
+ <outcome value="true">
+ <return status="success">
+ <parameter name="ack-final-indicator" value="Y"/>
+ <parameter name="error-code" value="200"/>
+ <parameter name="error-message" value="`$error-message`"/>
</return>
</outcome>
</switch>
</block>
</outcome>
</get-resource>
- <call module='GENERIC-RESOURCE-API' rpc='sotn-get-otn-tunnel-path-from-oof' mode='sync' ></call>
- <set>
- <parameter name='tmp.unis.uni[0].id' value="`$vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
- <parameter name='tmp.unis.uni[0].tp-id' value="networkId-providerId-5555-clientId-6666-topologyId-11-nodeId-0.190.0.1" />
- <parameter name='tmp.unis.uni[0].access-provider-id' value="`$domain-A.provider-id`" />
- <parameter name='tmp.unis.uni[0].access-client-id' value="`$domain-A.client-id`" />
- <parameter name='tmp.unis.uni[0].access-topology-id' value="`$domain-A.topology-id`" />
- <parameter name='tmp.unis.uni[0].access-node-id' value="0.190.0.1" />
- <parameter name='tmp.unis.uni[0].src-access-ltp-id' value="1234" />
- <parameter name='tmp.unis.uni[0].dst-access-ltp-id' value="5678" />
- <parameter name='tmp.unis.uni[0].network-id' value="domain2-providerId-5555-clientId-6666-topologyId-11" />
- <parameter name='tmp.unis.uni[1].id' value="5642e9dd-496c-4ef6-be97-5caf4e9beec9" />
- <parameter name='tmp.unis.uni[1].tp-id' value="networkId-domain2-providerId-5555-clientId-6666-topologyId-11-nodeId-0.191.0.4" />
- <parameter name='tmp.unis.uni[1].access-provider-id' value="`$domain-B.provider-id`" />
- <parameter name='tmp.unis.uni[1].access-client-id' value="`$domain-B.client-id`" />
- <parameter name='tmp.unis.uni[1].access-topology-id' value="`$domain-B.topology-id`" />
- <parameter name='tmp.unis.uni[1].access-node-id' value="0.190.0.3" />
- <parameter name='tmp.unis.uni[1].src-access-ltp-id' value="9123" />
- <parameter name='tmp.unis.uni[1].dst-access-ltp-id' value="4567" />
- <parameter name='tmp.unis.uni[1].network-id' value="domain2-providerId-5555-clientId-6666-topologyId-11" />
- <parameter name='tmp.unis.uni_length' value="2" />
- </set>
- <for index='vidx' start='0' end='`$tmp.unis.uni_length`' >
+ <call module="GENERIC-RESOURCE-API" rpc="sotn-get-otn-tunnel-path-from-oof" mode="sync"/>
+ <for index="vidx" start="0" end="`$tmp.unis.uni_length`">
<block atomic="true">
<set>
- <parameter name='oof.vpn.' value='`$tmp.unis.uni[$vidx].`' />
+ <parameter name="oof.vpn." value="`$tmp.unis.uni[$vidx].`"/>
</set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="network-resource"
- key="network-resource.network-id = $oof.vpn.network-id"
- pfx='tmp.aai.network-resource' local-only='false' >
- <outcome value='success'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-resource" key="network-resource.network-id = $oof.vpn.network-id" pfx="tmp.aai.network-resource" local-only="false">
+ <outcome value="success">
<block>
- <for index='ridx' start='0' end='`$tmp.aai.network-resource.relationship-list.relationship_length`' >
- <switch test='`$tmp.aai.network-resource.relationship-list.relationship[$ridx].related-to`'>
- <outcome value='esr-thirdparty-sdnc'>
+ <for index="ridx" start="0" end="`$tmp.aai.network-resource.relationship-list.relationship_length`">
+ <switch test="`$tmp.aai.network-resource.relationship-list.relationship[$ridx].related-to`">
+ <outcome value="esr-thirdparty-sdnc">
<set>
- <parameter name='prop.sdncRestApi.thirdpartySdnc.id' value="`$tmp.aai.network-resource.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.id" value="`$tmp.aai.network-resource.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`"/>
</set>
</outcome>
</switch>
</for>
</block>
</outcome>
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`"/>
</return>
</outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`"/>
</return>
</outcome>
</get-resource>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="esr-thirdparty-sdnc"
- key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
- depth = '1'"
- pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
- <outcome value='success'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false">
+ <outcome value="success">
<set>
- <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
- <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
- <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
- <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >-->
- <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />-->
- <!--<parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />-->
- <!--<parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />-->
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`"/>
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`"/>
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`"/>
+ <!--
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ -->
+ <!--
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
+ -->
+ <!--
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ -->
+ <!--
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ -->
<!--<parameter name="format" value="json"/>-->
<!--<parameter name="httpMethod" value="get"/>-->
- <!--<parameter name="responsePrefix" value="topology"/>-->
- <!--<parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>-->
- <!--<parameter name="trustStorePassword" value="adminadmin"/>-->
- <!--<parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>-->
- <!--<parameter name="keyStorePassword" value="adminadmin"/>-->
+ <!--
+ <parameter name="responsePrefix" value="topology"/>
+ -->
+ <!--
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ -->
+ <!--
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ -->
+ <!--
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ -->
+ <!--
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ -->
</set>
</outcome>
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`"/>
</return>
</outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`"/>
</return>
</outcome>
</get-resource>
- <call module='GENERIC-RESOURCE-API' rpc='sotn-create-otn-tunnel' mode='sync' ></call>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`"/>
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value="success">
+ <set>
+ <parameter name="prop.sdncRestApi.token_id" value="`$token-result.data.token_id`"/>
+ </set>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Error executing get token rest api"/>
+ </return>
+ </outcome>
+ </execute>
+ <call module="GENERIC-RESOURCE-API" rpc="sotn-create-otn-tunnel" mode="sync"/>
+ <set>
+ <parameter name="ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type" value="ietf-eth-tran-types:mef-10-bwp"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type" value="ietf-eth-tran-types:p2p-svc"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status" value="ietf-te-types:tunnel-state-up"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id" value="0"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type" value="ietf-eth-tran-types:port-classification"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id" value="1"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type" value="ietf-eth-tran-types:port-classification"/>
+ </set>
<set>
- <parameter name='ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type' value='ietf-eth-tran-types:mef-10-bwp' />
- <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type' value='ietf-eth-tran-types:p2p-svc' />
- <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status' value='ietf-te-types:tunnel-state-up' />
- <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id' value='0' />
- <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type' value='ietf-eth-tran-types:port-classification' />
- <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id' value='1' />
- <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-provider-id" value="`$oof.vpn.access-provider-id`"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-client-id" value="`$oof.vpn.access-client-id`"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-topology-id" value="`$oof.vpn.access-topology-id`"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-node-id" value="`$oof.vpn.access-node-id`"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-ltp-id" value="`$oof.vpn.src-access-ltp-id`"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-node-id" value="`$oof.vpn.access-node-id`"/>
+ <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-ltp-id" value="`$oof.vpn.dst-access-ltp-id`"/>
</set>
+ <switch test="`$prop.sdncRestApi.token_id`">
+ <outcome value="">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`"/>
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <parameter name="dirPath" value="/opt/onap/sdnc/restconfapi/yang"/>
+ <parameter name="responsePrefix" value="vpn-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Error executing Create vpn rest api"/>
+ </return>
+ </outcome>
+ <outcome value="success">
+ <block atomic="true"/>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value="Other">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`"/>
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <parameter name="dirPath" value="/opt/onap/sdnc/restconfapi/yang"/>
+ <parameter name="responsePrefix" value="vpn-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`"/>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Error executing Create vpn rest api"/>
+ </return>
+ </outcome>
+ <outcome value="success">
+ <block atomic="true"/>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
</block>
</for>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
+ <return status="success">
+ <parameter name="ack-final-indicator" value="Y"/>
+ <parameter name="error-code" value="200"/>
+ <parameter name="error-message" value="`$error-message`"/>
</return>
</block>
</method>
diff --git a/platform-logic/restapi-templates/src/main/json/sotn-ethernet-service.json b/platform-logic/restapi-templates/src/main/json/sotn-ethernet-service.json index 582e88e3..6fdb4e10 100644 --- a/platform-logic/restapi-templates/src/main/json/sotn-ethernet-service.json +++ b/platform-logic/restapi-templates/src/main/json/sotn-ethernet-service.json @@ -1,42 +1,64 @@ { "ietf-eth-tran-service:etht-svc": { - "globals": { - "etht-svc-bandwidth-profiles": [ - { - "bandwidth-profile-name": ${prop.global.sotn.bandwidth-profile-name}, - "bandwidth-profile-type": "ietf-eth-tran-types:mef-10-bwp", - "CIR": ${prop.global.sotn.cir}, - "EIR": ${prop.global.sotn.eir}, - "color-aware": ${prop.global.sotn.colorAware}, - "coupling-flag": ${prop.global.sotn.couplingFlag} - } - ] - }, "etht-svc-instances": [ { "etht-svc-name": ${prop.global.sotn.etht-svc-name}, - "access-provider-id": ${oof.vpn.access-provider-id}, - "access-client-id": ${oof.vpn.access-client-id}, - "access-topology-id": ${oof.vpn.access-topology-id}, + "te-topology-identifier":{ + "provider-id":${oof.vpn.access-provider-id}, + "client-id":${oof.vpn.access-client-id}, + "topology-id":${oof.vpn.access-topology-id} + }, "etht-svc-type": "ietf-eth-tran-types:p2p-svc", + "underlay":{ + "pw":{ + "pw-name":"pwName", + "pw-id":"123", + "pw-paths":[ + { + "path-id":"123", + "tp-tunnels":[ + { + "name":"tptunnel-22" + } + ] + } + ] + } + }, + "resilience":{ + "protection":{ + "enable":"true", + "hold-off-time":"0", + "protection-reversion-disable":"true", + "protection-type":"ietf-te-types:lsp-protection-unprotected", + "wait-to-revert":"0" + } + }, "admin-status": "ietf-te-types:tunnel-state-up", - "etht-svc-access-ports": [ - { - "access-port-id": "0", - "access-node-id": ${oof.vpn.access-node-id}, - "access-ltp-id": ${oof.vpn.src-access-ltp-id}, - "service-classification-type": "ietf-eth-tran-types:port-classification", - "ingress-egress-bandwidth-profile-name": ${prop.global.sotn.bandwidth-profile-name} - }, + "etht-svc-end-points":[ { - "access-port-id": "1", - "access-node-id": ${oof.vpn.access-node-id}, - "access-ltp-id": ${oof.vpn.dst-access-ltp-id}, - "service-classification-type": "ietf-eth-tran-types:port-classification", - "ingress-egress-bandwidth-profile-name": ${prop.global.sotn.bandwidth-profile-name} + "etht-svc-end-point-name":"source-point-name", + "etht-svc-access-points":[ + { + "access-point-id":"0", + "access-node-id":${oof.vpn.access-node-id}, + "access-ltp-id":${oof.vpn.src-access-ltp-id} + }, + { + "access-point-id":"1", + "access-node-id":${oof.vpn.access-node-id}, + "access-ltp-id":${oof.vpn.dst-access-ltp-id} + } + ], + "outer-tag":{ + "tag-type":"ietf-eth-tran-types:classify-c-vlan", + "vlan-value":1 + }, + "service-classification-type":"ietf-eth-tran-types:vlan-classification", + "ingress-egress-bandwidth-profile":${prop.global.sotn.bandwidth-profile-name} } ] } ] } -}
\ No newline at end of file +} diff --git a/platform-logic/restapi-templates/src/main/json/sotn-otn-tunnel-service.json b/platform-logic/restapi-templates/src/main/json/sotn-otn-tunnel-service.json index 085d4944..38869639 100644 --- a/platform-logic/restapi-templates/src/main/json/sotn-otn-tunnel-service.json +++ b/platform-logic/restapi-templates/src/main/json/sotn-otn-tunnel-service.json @@ -3,34 +3,54 @@ "tunnels":{ "tunnel":[ { - "destination": ${oof.vpn.access-node-id}, - "source": ${otn-domain.node-id}, - "src-ttp-id": ${otn-domain.ttp-id}, - "ietf-otn-tunnel:src-tpn": ${otn-domain.tpn}, - "name": "otntunnel-22", - "te-topology-identifier": { - "client-id": ${otn-domain.client-id}, - "provider-id": ${otn-domain.provider-id}, - "topology-id": ${otn-domain.te-topo-id} - } + "destination": ${ietf-te_te.tunnels.tunnel[0].destination}, + "source": ${ietf-te_te.tunnels.tunnel[0].source}, + "src-ttp-id": ${ietf-te_te.tunnels.tunnel[0].src-ttp-id}, + "dst-ttp-id": ${ietf-te_te.tunnels.tunnel[0].dst-ttp-id}, + "ietf-otn-tunnel:src-tpn": ${ietf-te_te.tunnels.tunnel[0].ietf-otn-tunnel_src-tpn}, + "ietf-otn-tunnel:dst-tpn": ${ietf-te_te.tunnels.tunnel[0].ietf-otn-tunnel_dst-tpn}, + "te-bandwidth": { + "ietf-otn-tunnel:odu-type": "ietf-otn-types:prot-ODUFlex-gfp" }, + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": ${ietf-te_te.tunnels.tunnel[0].name}, + "restoration": { + "enable": "false", + "hold-off-time": "0", + "restoration-reversion-disable": "true", + "restoration-type": "ietf-te-types:lsp-restoration-restore-any", + "wait-to-revert": "0" + }, + "switching-type": "ietf-te-types:switching-otn", + "provisioning-state": "ietf-te-types:tunnel-state-down", + "te-topology-identifier": { + "client-id": ${ietf-te_te.tunnels.tunnel[0].te-topology-identifier.client-id}, + "provider-id": ${ietf-te_te.tunnels.tunnel[0].te-topology-identifier.provider-id}, + "topology-id": ${ietf-te_te.tunnels.tunnel[0].te-topology-identifier.topology-id} + } + }, { - "destination": ${oof.vpn.access-node-id}, - "source": ${otn-domain.node-id}, - "src-ttp-id": ${otn-domain.ttp-id}, - "ietf-otn-tunnel:src-tpn": ${otn-domain.tpn}, - "name": "tptunnel-22", - "dependency-tunnels": { - "dependency-tunnel": [ - "name": "tptunnel-22" - ] - }, - "te-topology-identifier": { - "client-id": ${otn-domain.client-id}, - "provider-id": ${otn-domain.provider-id}, - "topology-id": ${otn-domain.te-topo-id} - } - } + "destination": ${ietf-te_te.tunnels.tunnel[1].destination}, + "source": ${ietf-te_te.tunnels.tunnel[1].source}, + "encoding": "ietf-te-types:lsp-encoding-packet", + "name": ${ietf-te_te.tunnels.tunnel[1].name}, + "dependency-tunnels": { + "dependency-tunnel": [ + { + "name": ${ietf-te_te.tunnels.tunnel[0].name}, + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-type": "ietf-te-types:switching-otn" + } + ] + }, + "switching-type": "ietf-te-types:switching-psc1", + "te-topology-identifier": { + "client-id": ${ietf-te_te.tunnels.tunnel[1].te-topology-identifier.client-id}, + "provider-id": ${ietf-te_te.tunnels.tunnel[1].te-topology-identifier.provider-id}, + "topology-id": ${ietf-te_te.tunnels.tunnel[1].te-topology-identifier.topology-id} + }, + "provisioning-state": "ietf-te-types:tunnel-state-down" + } ] } } |