aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml94
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml49
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml6
3 files changed, 98 insertions, 51 deletions
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 c2561f6b..2b280fc1 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
@@ -3,31 +3,6 @@
<method rpc="network-topology-operation-create" mode="sync">
<block atomic="true">
<call module="GENERIC-RESOURCE-API" rpc="validate-network-input-parameters" mode="sync" />
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false">
- <outcome value="success">
- <block atomic="true" />
- </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`" />
- </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`" />
- </return>
- </outcome>
- </get-resource>
- <set>
- <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.serviceUrl`" />
- <parameter name="prop.sdncRestApi.templateDir" value="/opt/onap/sdnc/data" />
- <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.user-name`" />
- <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.password`" />
- </set>
<for index="idx" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`">
<block>
<switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`">
@@ -247,6 +222,51 @@
</switch>
</block>
</for>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $prop.l3vpn.pe1_id AND depth = '0'" pfx="tmp.aai.pnf" local-only="false">
+ <outcome value="success">
+ <set>
+ <parameter name="tmp.thirdparty-sdnc-id" value="`$tmp.aai.pnf.relationship-list.relationship[0].relationship-data[0].relationship-value`" />
+ </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`" />
+ </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`" />
+ </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 = $tmp.thirdparty-sdnc-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.templateDir" value="/opt/onap/sdnc/data" />
+ <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`" />
+ </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`" />
+ </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`" />
+ </return>
+ </outcome>
+ </get-resource>
<execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
<parameter name="ctx-destination" value="prop.l3vpn.vpn-policy1-id" />
<outcome value="failure">
@@ -354,28 +374,28 @@
<outcome value="l3vpn-ipwan">
<block atomic="true">
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
- <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'" />
- <parameter name="restapiUser" value="$prop.sdncRestApi.thirdpartySdnc.user" />
- <parameter name="restapiPassword" value="$prop.sdncRestApi.thirdpartySdnc.password" />
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.tempDir + '/l3smvpntemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'`" />
+ <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="post" />
<parameter name="responsePrefix" value="restapi-result" />
</execute>
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
- <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'" />
- <parameter name="restapiUser" value="$prop.sdncRestApi.thirdpartySdnc.user" />
- <parameter name="restapiPassword" value="$prop.sdncRestApi.thirdpartySdnc.password" />
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.tempDir +'/l3smsitetemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/sites'`" />
+ <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="post" />
<parameter name="responsePrefix" value="restapi-result" />
</execute>
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
- <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'" />
- <parameter name="restapiUser" value="$prop.sdncRestApi.thirdpartySdnc.user" />
- <parameter name="restapiPassword" value="$prop.sdncRestApi.thirdpartySdnc.password" />
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.tempDir +'/l3smvrftemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vrf-attributes'`" />
+ <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="post" />
<parameter name="responsePrefix" value="restapi-result" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
index 8d9dac1b..c947a383 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
@@ -51,11 +51,44 @@
</set>
</outcome>
</switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'pe1_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.pe1_id" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
</block>
</for>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $prop.l3vpn.pe1_id AND depth = '0'" pfx="tmp.aai.pnf" local-only="false">
+ <outcome value="success">
+ <set>
+ <parameter name="tmp.thirdparty-sdnc-id" value="`$tmp.aai.pnf.relationship-list.relationship[0].relationship-data[0].relationship-value`" />
+ </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`" />
+ </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`" />
+ </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 = $tmp.thirdparty-sdnc-id AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false">
<outcome value="success">
- <block atomic="true" />
+ <set>
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].serviceUrl`" />
+ <parameter name="prop.sdncRestApi.templateDir" value="/opt/onap/sdnc/data" />
+ <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`" />
+ </set>
</outcome>
<outcome value="not-found">
<return status="failure">
@@ -72,19 +105,13 @@
</return>
</outcome>
</get-resource>
- <set>
- <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.serviceUrl`" />
- <parameter name="prop.sdncRestApi.templateDir" value="/opt/onap/sdnc/data" />
- <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.user-name`" />
- <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.password`" />
- </set>
<switch test="`$prop.l3vpn.service-type`">
<outcome value="l3vpn-ipwan">
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
- <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services/vpnservice='+$prop.l3vpn.name'" />
- <parameter name="restapiUser" value="$prop.sdncRestApi.thirdpartySdnc.user" />
- <parameter name="restapiPassword" value="$prop.sdncRestApi.thirdpartySdnc.password" />
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services/vpnservice=' + $prop.l3vpn.name`" />
+ <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="delete" />
<parameter name="responsePrefix" value="restapi-result" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml
index 9c13bbf5..435ecf00 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml
@@ -24,10 +24,10 @@
<parameter name="tmp.value" value="" />
</set>
<set>
- <parameter name="tmp.name" value="'$network-topology-operation-input.network-request-input.network-input-parameters.param[i].name'" />
- <parameter name="tmp.value" value="'$network-topology-operation-input.network-request-input.network-input-parameters.param[i].value'" />
+ <parameter name="tmp.name" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[i].name`" />
+ <parameter name="tmp.value" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[i].value`" />
</set>
- <switch test="'$tmp.name'">
+ <switch test="`$tmp.name`">
<outcome value="name">
<switch test="`$tmp.value`">
<outcome value="">