diff options
author | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-10-04 15:03:44 +0530 |
---|---|---|
committer | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-10-04 09:38:09 +0000 |
commit | fdde7ced2af69fdd6f3fdae6362b06bf22fe8136 (patch) | |
tree | f7286415c061ae45b16ee093d114392e41094274 /platform-logic/generic-resource-api/src/main/xml | |
parent | 934177c0efb84b6e4d2e41bdb2e0ad2c3c8f5949 (diff) |
Patched DCI overlay DG to main DG
Changes includes:
1) Patched DCI overlay DGs with network-topology-operation DG.
2) Prefixed DCI overlay dg with dci-connects to avoid duplication
with existing network-topology-operation-activate DG.
Change-Id: I3b9f99fb5f1e5be27707aaa7c7b2dc9144c74398
Issue-Id: SDNC-110
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Former-commit-id: bd0ebcc0e2f442233845fa6fe631c19173e8ac35
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
2 files changed, 202 insertions, 110 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml index 617073b4..ebd32db5 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <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="network-topology-operation-activate" mode="sync"> + <method rpc="dci-connects-network-topology-operation-activate" mode="sync"> <block atomic="true"> <call module="GENERIC-RESOURCE-API" rpc="validate-network-input-parameters" mode="sync" /> <block atomic="true"> diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation.xml index cb82d329..00848f98 100755 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation.xml @@ -1,109 +1,201 @@ -<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='network-topology-operation' mode='sync'>
-<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-network-input' mode='sync' >
-</call><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
-<outcome value='assign'>
-<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign' mode='sync' >
-</call></block></outcome><outcome value='activate'>
-<block atomic="true"><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><switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>
-<outcome value='PendingCreate'>
-<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-activate' mode='sync' >
-</call></outcome><outcome value='Other'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Network is not in appropriate state for activate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" /></return></outcome></switch></block></outcome><outcome value='deactivate'>
-<block atomic="true"><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><switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>
-<outcome value='Created'>
-<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-deactivate' mode='sync' >
-</call></outcome><outcome value='Other'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Network is not in appropriate state for deactivate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" /></return></outcome></switch></block></outcome><outcome value='unassign'>
-<block atomic="true"><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><switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>
-<outcome value='PendingCreate'>
-<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-unassign' mode='sync' >
-</call></outcome><outcome value='PendingDelete'>
-<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-unassign' mode='sync' >
-</call></outcome><outcome value='Other'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Network is not in appropriate state for unassign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" /></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="sdnc-request-header.svc-action is a required input" />
-</return></outcome><outcome value='create'>
-<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-create' mode='sync' >
-</call></block></outcome><outcome value='delete'>
-<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-delete' mode='sync' >
-</call></block></outcome></switch><set>
-<parameter name="ack-final" value="Y"/></set><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> +<?xml version="1.0" encoding="UTF-8"?>
+<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="network-topology-operation" mode="sync">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-network-input" mode="sync" />
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="assign">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-assign" mode="sync" />
+ </block>
+ </outcome>
+ <outcome value="activate">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="ActivateDCINetworkInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="dci-connects-network-topology-operation-activate" mode="sync" />
+ </outcome>
+ <outcome value="other">
+ <block atomic="true">
+ <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>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`">
+ <outcome value="PendingCreate">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-activate" mode="sync" />
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for activate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="deactivate">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeActivateDCINetworkInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="dci-connects-network-topology-operation-deactivate" mode="sync" />
+ </outcome>
+ <outcome value="other">
+ <block atomic="true">
+ <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>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`">
+ <outcome value="Created">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-deactivate" mode="sync" />
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for deactivate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="unassign">
+ <block atomic="true">
+ <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>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`">
+ <outcome value="PendingCreate">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-unassign" mode="sync" />
+ </outcome>
+ <outcome value="PendingDelete">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-unassign" mode="sync" />
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for unassign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
+ </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="sdnc-request-header.svc-action is a required input" />
+ </return>
+ </outcome>
+ <outcome value="create">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-create" mode="sync" />
+ </block>
+ </outcome>
+ <outcome value="delete">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-delete" mode="sync" />
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="ack-final" value="Y" />
+ </set>
+ <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>
\ No newline at end of file |