aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorZhuoyao Huang <10112215@zte.com.cn>2018-09-18 19:51:53 +0800
committerZhuoyao Huang <10112215@zte.com.cn>2018-09-18 19:51:53 +0800
commit78deca887bcd72261d9e4dfa6c1bc910deee87b5 (patch)
tree4dae250ab167af322a3cc0f4f19600258c349d9b /platform-logic/generic-resource-api/src/main/xml
parent29ae4c6b7b516eaac66bb359e6fcb3dad4a742a9 (diff)
call wan-connection rpc
and fix the xml validation error since 2018/7/27 2:10:24 Issue-ID: SDNC-354 Change-Id: Ia491ffdcff028256b5a0f3da623202de71e94df2 Signed-off-by: Zhuoyao Huang <10112215@zte.com.cn> Former-commit-id: f6f517a0132ab6547612b84b73b52ac4115af9ff
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.xml825
1 files changed, 424 insertions, 401 deletions
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 05328d29..f2e71fad 100644
--- 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,420 +1,443 @@
-<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">
- <switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>
- <outcome value='Created'>
- <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 assign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
- </return>
- </outcome>
- <outcome value='PendingDelete'>
- <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 assign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
- </return>
- </outcome>
- <outcome value='PendingCreate'>
- <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 assign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" />
- </return>
+<?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"></call>
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="assign">
+ <block atomic="true">
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`">
+ <outcome value="Created">
+ <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 assign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`"/>
+ </return>
+ </outcome>
+ <outcome value="PendingDelete">
+ <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 assign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`"/>
+ </return>
+ </outcome>
+ <outcome value="PendingCreate">
+ <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 assign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`"/>
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-assign" mode="sync"></call>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="activate">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="ActivateSOTNConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sotn-network-topology-operation-activate" mode="sync"></call>
+ </outcome>
+ <outcome value="ActivateDCINetworkInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="dci-connects-network-topology-operation-activate" mode="sync"></call>
+ </outcome>
+ <outcome value="ActivateSDWANConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sdwan-network-topology-operation-activate" mode="sync"></call>
+ </outcome>
+ <outcome value="other">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.service-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="wan-connection"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-topology-operation-activate" mode="sync"></call>
+ </outcome>
+ <outcome value="false">
+ <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="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>
- <outcome value='Other'>
- <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign' mode='sync' ></call>
+ <outcome value="Other">
+ <set>
+ <parameter name="nidx" value="`$tmp.nidx`"/>
+ </set>
</outcome>
- </switch>
- </block>
- </outcome>
- <outcome value='activate'>
- <switch test='`$network-topology-operation-input.request-information.request-action`'>
- <outcome value='ActivateSOTNConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sotn-network-topology-operation-activate' mode='sync' ></call>
- </outcome>
- <outcome value='ActivateDCINetworkInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='dci-connects-network-topology-operation-activate' mode='sync' ></call>
- </outcome>
- <outcome value='ActivateSDWANConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sdwan-network-topology-operation-activate' mode='sync' ></call>
- </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='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>
- <outcome value='Other'>
- <set>
- <parameter name='nidx' value='`$tmp.nidx`' />
- </set>
- </outcome>
- </switch>
- </block>
- </outcome>
- </switch>
- <switch test='`$network-topology-operation-input.network-information.network-instance-group-id`'>
- <outcome value=''>
- <return status='success'>
- <parameter name='' value='' />
- </return>
- </outcome>
- <outcome value='Other'>
- <block>
- <switch test='`$service-data.network-instance-groups.network-instance-group_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-instance-group-id not found in service-data" />
- </return>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <for index='ngidx' start='0' end='`$service-data.network-instance-groups.network-instance-_length`' >
- <switch test="`$service-data.network-instance-groups.network-instance-group[$nidx].network-instance-group-id == $network-topology-operation-input.network-information.network-instance-group-id`">
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='tmp.ngidx' value='`$ngidx`' />
- <parameter name='ctx.network-instance-group-data.' value='`$service-data.network-instance-groups.network-instance-group[$ngidx].`' />
- </set>
- </block>
- </outcome>
- </switch>
- </for>
- </block>
- </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>
+ </switch>
+ </block>
+ </outcome>
</switch>
- </outcome>
- <outcome value='changeassign'>
- <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>
+ <switch test="`$network-topology-operation-input.network-information.network-instance-group-id`">
+ <outcome value="">
+ <return status="success"></return>
+ </outcome>
+ <outcome value="Other">
+ <block>
+ <switch test="`$service-data.network-instance-groups.network-instance-group_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-instance-group-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='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>
- <outcome value='Other'>
- <set>
- <parameter name='nidx' value='`$tmp.nidx`' />
- </set>
- </outcome>
- </switch>
- </block>
+ <outcome value="Other">
+ <block atomic="true">
+ <for index="ngidx" start="0" end="`$service-data.network-instance-groups.network-instance-_length`">
+ <switch test="`$service-data.network-instance-groups.network-instance-group[$nidx].network-instance-group-id == $network-topology-operation-input.network-information.network-instance-group-id`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.ngidx" value="`$ngidx`"/>
+ <parameter name="ctx.network-instance-group-data." value="`$service-data.network-instance-groups.network-instance-group[$ngidx].`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
</outcome>
- </switch>
- <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-changeassign' mode='sync' ></call>
- </block>
+ </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'>
- <switch test='`$network-topology-operation-input.request-information.request-action`'>
- <outcome value='DeactivateSOTNConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sotn-network-topology-operation-deactivate' mode='sync' ></call>
- </outcome>
- <outcome value='DeActivateDCINetworkInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='dci-connects-network-topology-operation-deactivate' mode='sync' ></call>
- </outcome>
- <outcome value='DeactivateSDWANConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sdwan-network-topology-operation-deactivate' mode='sync' ></call>
- </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='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>
- <outcome value='Other'>
- <set>
- <parameter name='nidx' value='`$tmp.nidx`' />
- </set>
- </outcome>
- </switch>
- </block>
- </outcome>
- </switch>
- <switch test='`$network-topology-operation-input.network-information.network-instance-group-id`'>
- <outcome value=''>
- <return status='success'>
- <parameter name='' value='' />
- </return>
- </outcome>
- <outcome value='Other'>
- <block>
- <switch test='`$service-data.network-instance-groups.network-instance-group_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-instance-group-id not found in service-data" />
- </return>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <for index='ngidx' start='0' end='`$service-data.network-instance-groups.network-instance-_length`' >
- <switch test="`$service-data.network-instance-groups.network-instance-group[$nidx].network-instance-group-id == $network-topology-operation-input.network-information.network-instance-group-id`">
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='tmp.ngidx' value='`$ngidx`' />
- <parameter name='ctx.network-instance-group-data.' value='`$service-data.network-instance-groups.network-instance-group[$ngidx].`' />
- </set>
- </block>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- </block>
- </outcome>
- </switch>
- <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-deactivate' mode='sync' ></call>
- </block>
- </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="changeassign">
+ <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="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>
+ <outcome value="Other">
+ <set>
+ <parameter name="nidx" value="`$tmp.nidx`"/>
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-changeassign" mode="sync"></call>
+ </block>
+ </outcome>
+ <outcome value="deactivate">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeactivateSOTNConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sotn-network-topology-operation-deactivate" mode="sync"></call>
+ </outcome>
+ <outcome value="DeActivateDCINetworkInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="dci-connects-network-topology-operation-deactivate" mode="sync"></call>
+ </outcome>
+ <outcome value="DeactivateSDWANConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sdwan-network-topology-operation-deactivate" mode="sync"></call>
+ </outcome>
+ <outcome value="Other">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.service-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="wan-connection"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-topology-operation-deactivate" mode="sync"></call>
</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='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>
- <outcome value='Other'>
- <set>
- <parameter name='nidx' value='`$tmp.nidx`' />
- </set>
- </outcome>
- </switch>
- </block>
+ <outcome value="false">
+ <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="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>
- <switch test='`$network-topology-operation-input.network-information.network-instance-group-id`'>
- <outcome value=''>
- <return status='success'>
- <parameter name='' value='' />
- </return>
+ <outcome value="Other">
+ <set>
+ <parameter name="nidx" value="`$tmp.nidx`"/>
+ </set>
</outcome>
- <outcome value='Other'>
- <block>
- <switch test='`$service-data.network-instance-groups.network-instance-group_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-instance-group-id not found in service-data" />
- </return>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <for index='ngidx' start='0' end='`$service-data.network-instance-groups.network-instance-_length`' >
- <switch test="`$service-data.network-instance-groups.network-instance-group[$nidx].network-instance-group-id == $network-topology-operation-input.network-information.network-instance-group-id`">
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='tmp.ngidx' value='`$ngidx`' />
- <parameter name='ctx.network-instance-group-data.' value='`$service-data.network-instance-groups.network-instance-group[$ngidx].`' />
- </set>
- </block>
- </outcome>
- </switch>
- </for>
- </block>
- </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>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.network-instance-group-id`">
+ <outcome value="">
+ <return status="success"></return>
+ </outcome>
+ <outcome value="Other">
+ <block>
+ <switch test="`$service-data.network-instance-groups.network-instance-group_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-instance-group-id not found in service-data"/>
+ </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="`'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 value="Other">
+ <block atomic="true">
+ <for index="ngidx" start="0" end="`$service-data.network-instance-groups.network-instance-_length`">
+ <switch test="`$service-data.network-instance-groups.network-instance-group[$nidx].network-instance-group-id == $network-topology-operation-input.network-information.network-instance-group-id`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.ngidx" value="`$ngidx`"/>
+ <parameter name="ctx.network-instance-group-data." value="`$service-data.network-instance-groups.network-instance-group[$ngidx].`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
</outcome>
- </switch>
- </block>
- </outcome>
- <outcome value='create'>
- <switch test='`$network-topology-operation-input.request-information.request-action`'>
- <outcome value='CreateSOTNConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sotn-network-topology-operation-create' mode='sync' ></call>
- </outcome>
- <outcome value='CreateSDWANConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sdwan-network-topology-operation-create' mode='sync' ></call>
- </outcome>
- <outcome value='other'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-create' mode='sync' ></call>
- </block>
- </outcome>
+ </switch>
+ </block>
+ </outcome>
</switch>
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-deactivate" mode="sync"></call>
+ </block>
</outcome>
- <outcome value='delete'>
- <switch test='`$network-topology-operation-input.request-information.request-action`'>
- <outcome value='DeleteSOTNConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sotn-network-topology-operation-delete' mode='sync' ></call>
- </outcome>
- <outcome value='DeleteSDWANConnectivityInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sdwan-network-topology-operation-delete' mode='sync' ></call>
- </outcome>
- <outcome value='other'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-delete' mode='sync' ></call>
- </block>
- </outcome>
+ </execute>
+ </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="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>
+ <outcome value="Other">
+ <set>
+ <parameter name="nidx" value="`$tmp.nidx`"/>
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.network-instance-group-id`">
+ <outcome value="">
+ <return status="success"></return>
+ </outcome>
+ <outcome value="Other">
+ <block>
+ <switch test="`$service-data.network-instance-groups.network-instance-group_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-instance-group-id not found in service-data"/>
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <for index="ngidx" start="0" end="`$service-data.network-instance-groups.network-instance-_length`">
+ <switch test="`$service-data.network-instance-groups.network-instance-group[$nidx].network-instance-group-id == $network-topology-operation-input.network-information.network-instance-group-id`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.ngidx" value="`$ngidx`"/>
+ <parameter name="ctx.network-instance-group-data." value="`$service-data.network-instance-groups.network-instance-group[$ngidx].`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </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="create">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="CreateSOTNConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sotn-network-topology-operation-create" mode="sync"></call>
+ </outcome>
+ <outcome value="CreateSDWANConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sdwan-network-topology-operation-create" mode="sync"></call>
+ </outcome>
+ <outcome value="other">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.service-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="wan-connection"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-topology-operation-create" mode="sync"></call>
</outcome>
- <outcome value='reoptimize'>
- <switch test='`$network-topology-operation-input.request-information.request-action`'>
- <outcome value='ReoptimizeSOTNInstance'>
- <call module='GENERIC-RESOURCE-API' rpc='sotn-network-topology-operation-reoptimize' mode='sync' ></call>
- </outcome>
- </switch>
+ <outcome value="false">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-create" mode="sync"></call>
+ </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>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="delete">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeleteSOTNConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sotn-network-topology-operation-delete" mode="sync"></call>
+ </outcome>
+ <outcome value="DeleteSDWANConnectivityInstance">
+ <call module="GENERIC-RESOURCE-API" rpc="sdwan-network-topology-operation-delete" mode="sync"></call>
+ </outcome>
+ <outcome value="other">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.service-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="wan-connection"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-topology-operation-deactivate" mode="sync"></call>
</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>
+ <outcome value="false">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-delete" mode="sync"></call>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </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>
+ </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>