aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorramu.n <ramu.n@huawei.com>2017-10-08 15:55:10 +0530
committerramu.n <ramu.n@huawei.com>2017-10-08 15:56:23 +0530
commite605656999c6062db5d11c38ea40dbf73b2fb34f (patch)
treec9b459d2d64ce6751c9467c6c2470b8ce732ac96 /platform-logic/generic-resource-api/src/main/xml
parenta26adc924eba86198fbf91e0932023fb2f79bb0d (diff)
Underlay delete flow DGs modification for VoLTE
*overlay delete operation validate network-id is received in the request and get network-topology-operation-input from this network-id *set oper-status Change-Id: I22291fbb34ca0d2ae51403ea27e5ca413141cb32 Issue-Id: SDNC-111 Signed-off-by: Ramu N <ramu.n@huawei.com> Former-commit-id: a8e7d59abcc55950e76f36cf4c2d280f55a38381
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.xml5
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml64
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml55
3 files changed, 90 insertions, 34 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 06cb3a32..81ddee29 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
@@ -405,6 +405,11 @@
<parameter name="networkId" value="`$prop.l3vpn.network-id`" />
<parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.l3vpn.network-id + '/network-data/'` " />
</set>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status" value="Created" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
+ </set>
<return status="success">
<parameter name="ack-final-indicator" value="Y" />
<parameter name="error-code" value="200" />
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 019f4dab..8d9dac1b 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
@@ -3,19 +3,51 @@
<method rpc="network-topology-operation-delete" mode="sync">
<block atomic="true">
<call module="GENERIC-RESOURCE-API" rpc="validate-network-input-parameters" mode="sync" />
- <for index="idx" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`">
+ <switch test="`$service-data.networks.network_length`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <for index="nidx" start="0" end="`$service-data.networks.network_length`">
+ <switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.nidx" value="`$nidx`" />
+ <parameter name="ctx.network-data." value="`$service-data.networks.network[$nidx].`" />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.nidx`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <for index="idx" start="0" end="`$service-data.networks.network[$tmp.nidx].network-data.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'`">
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.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`" />
+ <parameter name="prop.l3vpn.name" value="`$service-data.networks.network[$tmp.nidx].network-data.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'`">
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.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`" />
+ <parameter name="prop.l3vpn.service-type" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
</set>
</outcome>
</switch>
@@ -59,6 +91,28 @@
</execute>
</outcome>
</switch>
+ <block atomic="true">
+ <set>
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.sdnc-request-header." value="`$network-topology-operation-input.sdnc-request-header.`" />
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.request-information." value="`$network-topology-operation-input.request-information.`" />
+ </set>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
+ </set>
+ <set>
+ <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $networkId + '/network-data/'` " />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status" value="Deleted" />
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
+ </set>
+ </block>
+ <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>
</service-logic>
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 6ba9d230..e54026dc 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
@@ -263,37 +263,34 @@
</outcome>
<outcome value="delete">
<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 DeleteNetworkInstance for svc-action=delete" />
- </return>
- </outcome>
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeleteNetworkInstance">
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="requiredParameters">
+ <parameter name="$network-topology-operation-input.network-information.network-id" value="" />
+ </execute>
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <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>
+ </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 DeleteNetworkInstance for svc-action=delete" />
+ </return>
+ </outcome>
+ </switch>
</block>
</outcome>
</switch>
</block>
</method>
-</service-logic> \ No newline at end of file
+</service-logic>