diff options
author | Dan Timoney <dtimoney@att.com> | 2018-11-30 20:54:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-30 20:54:38 +0000 |
commit | 7bbb319bc5b1f49d192d22cc5ebb677b244ec27d (patch) | |
tree | d683283bff4b0186fe1d3226a0e5adb6d58cc466 /platform-logic/generic-resource-api/src/main/xml | |
parent | 07035f9c6207928b776baf3a5a6ef43649acb1bf (diff) | |
parent | aec94c4be277c4abe8ac2af0f5326c84f6de06dd (diff) |
Merge "CCVPN closed loop issue fix"
Former-commit-id: d020224ad94888ca6b66a71854ac0a92f038d562
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.xml | 853 |
1 files changed, 431 insertions, 422 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 f2e71fad..663135a2 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,443 +1,452 @@ <?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> +<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="Other"> - <set> - <parameter name="nidx" value="`$tmp.nidx`"/> - </set> + <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> - </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 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"> - <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 value='Other'> + <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign' mode='sync' ></call> </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> + </switch> + </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> + <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'> + <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-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> + </execute> + </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="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 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"> - <set> - <parameter name="nidx" value="`$tmp.nidx`"/> - </set> + <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> - </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='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'> + <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> + <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-deactivate' mode='sync' ></call> + </block> + </outcome> + </execute> + </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='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="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 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> - </block> - </outcome> - </switch> - <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-deactivate" mode="sync"></call> - </block> + </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> - </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> + <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='false'> + <block atomic="true"> + <call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-create' mode='sync' ></call> + </block> + </outcome> + </execute> + </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="false"> - <block atomic="true"> - <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-create" mode="sync"></call> - </block> + <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> + <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> - </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 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> - <outcome value="false"> - <block atomic="true"> - <call module="GENERIC-RESOURCE-API" rpc="network-topology-operation-delete" mode="sync"></call> - </block> + <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> - </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> + </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> |