diff options
author | ramu.n <ramu.n@huawei.com> | 2017-09-27 21:08:48 +0530 |
---|---|---|
committer | ramu.n <ramu.n@huawei.com> | 2017-09-27 21:10:39 +0530 |
commit | 1edee32aa30f6803289958a0110a6f899e54274c (patch) | |
tree | 541cc9a3b55801105929773fb02a7e5a3c925c02 /platform-logic/generic-resource-api/src/main/xml | |
parent | c3e2005d4a8bc51460a8ad9661c8961ad8c6eaf4 (diff) |
Add DGs for VoLTE use case
Add network-topology-operation-delete sub DG for delete underlay L3VPN configuration
Change-Id: Iba9380aaf33f48116fa46a416efff34c130cfc52
Issue-Id: SDNC-27
Signed-off-by: Ramu N <ramu.n@huawei.com>
Former-commit-id: 6cb45a1f39166566d0229e4dba430223a9877141
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
2 files changed, 61 insertions, 1 deletions
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 new file mode 100644 index 00000000..ca5fa9df --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml @@ -0,0 +1,47 @@ +<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='network-topology-operation-delete' mode='sync'>
+<block atomic="true">
+<call module='GENERIC-RESOURCE-API' rpc='validate-network-input-parameters' mode='sync' >
+</call><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'`">
+<outcome value='true'>
+<set>
+<parameter name='prop.l3vpn.name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
+</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'service-type'`">
+<outcome value='true'>
+<set>
+<parameter name='prop.l3vpn.service-type' value='`$network-topology-operation-input.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="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"></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="Network model is_bound_to_vpn=true but no vpn_binding is present" />
+
+</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 retrieving vpn binding" />
+
+</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="format" value="json"/>
+<parameter name="httpMethod" value="delete"/>
+<parameter name="responsePrefix" value="restapi-result"/></execute></outcome></switch></block></method></service-logic>
\ No newline at end of file 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 e865258c..07d717a0 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 @@ -106,7 +106,20 @@ <parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
</return></outcome></switch></block></outcome><outcome value='deactivate'>
</outcome><outcome value='delete'>
-</outcome><outcome value='Other'>
+<block atomic="true"><outcome value='DeleteNetworkInstance'><block atomic="true"><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'`">
+<outcome value='true'>
+<switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`">
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
+</return></outcome></switch></outcome></switch></block></for></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
+</return></outcome></block></outcome><outcome value='Other'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
|