aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-deactivate.xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-deactivate.xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-deactivate.xml113
1 files changed, 106 insertions, 7 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-deactivate.xml
index 2f87fbd5..2d10d4e3 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-deactivate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-deactivate.xml
@@ -107,13 +107,48 @@
</return>
</outcome>
</execute>
+ <for index='ntidx' start='0' end='`$mdsal-psd.service-data.networks.network_length`' >
+ <block atomic="true">
+ <switch test="`$mdsal-psd.service-data.networks.network[$ntidx].network-data.request-information.request-action == 'ActivateSDWANConnectivityInstance'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <for index="paramidx" start="0" end="`$mdsal-psd.service-data.networks.network[$ntidx].network-data.network-request-input.network-input-parameters.param_length`">
+ <block>
+ <switch test="`$mdsal-psd.service-data.networks.network[$ntidx].network-data.network-request-input.network-input-parameters.param[$paramidx].name == 'name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.name' value='`$mdsal-psd.service-data.networks.network[$ntidx].network-data.network-request-input.network-input-parameters.param[$paramidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$mdsal-psd.service-data.networks.network[$ntidx].network-data.network-request-input.network-input-parameters.param[$paramidx].name == 'topology'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.topology' value='`$mdsal-psd.service-data.networks.network[$ntidx].network-data.network-request-input.network-input-parameters.param[$paramidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$mdsal-psd.service-data.networks.network[$ntidx].network-data.network-request-input.network-input-parameters.param[$paramidx].name == 'vpn-id'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.vpn1Id' value='`$mdsal-psd.service-data.networks.network[$ntidx].network-data.network-request-input.network-input-parameters.param[$paramidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
<set>
<parameter name='prop.siteAttachements_length' value='0' />
<parameter name='prop.siteIds_length' value='0' />
</set>
<for index='pidx' start='0' end='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`' >
<block atomic="true">
- <switch test="`$prop.ar.provided-allotted-resource-id == $tmp.ar.allotted-resource-id`">
+ <switch test="`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[$pidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">
<outcome value='false'>
<block atomic="true">
<set>
@@ -177,20 +212,20 @@
<outcome value='success'>
<block atomic="true">
<for index='pnidx' start='0' end='`$mdsal-parentsd.service-data.networks.network_length`' >
- <block>
+ <block atomic="true">
<switch test="`$mdsal-parentsd.service-data.networks.network[$pnidx].network-data.request-information.request-action == 'ActivateSDWANConnectivityInstance'`">
<outcome value='true'>
<block atomic="true">
<for index="paramidx" start="0" end="`$mdsal-parentsd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param_length`">
<block>
- <switch test="`$mdsal-psd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param[$paramidx].name == 'topology'`">
+ <switch test="`$mdsal-parentsd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param[$paramidx].name == 'topology'`">
<outcome value='true'>
<set>
- <parameter name='prop.topology' value='`$mdsal-psd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param[$paramidx].value`' />
+ <parameter name='prop.topology' value='`$mdsal-parentsd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param[$paramidx].value`' />
</set>
</outcome>
</switch>
- <switch test="`$mdsal-psd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param[$paramidx].name == 'vpn-id'`">
+ <switch test="`$mdsal-parentsd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param[$paramidx].name == 'vpn-id'`">
<outcome value='true'>
<set>
<parameter name='prop.vpn1Id' value='`$mdsal-parentsd.service-data.networks.network[$pnidx].network-data.network-request-input.network-input-parameters.param[$paramidx].value`' />
@@ -302,6 +337,71 @@
</return>
</outcome>
</get-resource>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing get token rest api" />
+ </return>
+ </outcome>
+ </execute>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="service-subscription"
+ key= 'service-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type
+ AND customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id'
+ force="true" pfx="tmp.AnAI-data-tenant">
+ <outcome value='success'>
+ <switch test='`$tmp.AnAI-data-tenant.temp-ub-sub-account-id`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing get token rest api" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='prop.tenant-id' value='`$tmp.AnAI-data-tenant.temp-ub-sub-account-id`' />
+ </set>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing get token rest api" />
+ </return>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/baseservice/tenants/authorization/' + $prop.tenant-id`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="put"/>
+ <parameter name="responsePrefix" value="tenant-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ </execute>
<call module='GENERIC-RESOURCE-API' rpc='sdwan-wanport-vnf-topology-operation-underlay' mode='sync' ></call>
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-vpn-topology.json'`" />
@@ -413,8 +513,7 @@
allotted-resource.id = $tmp.ar.allotted-resource-id"
pfx='pfx' local-only='false' force='false'>
<parameter name="selflink" value="`$tmp.ar.self-link`" />
- <parameter name="model-invariant-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`" />
- <parameter name="model-version-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`" />
+ <!--parameter name="model-invariant-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`" /><parameter name="model-version-id" value="`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`" /-->
<parameter name="operational-status" value="PendingDelete" />
<outcome value='failure'>
<return status='failure'>