aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml
diff options
context:
space:
mode:
authorBrandon, Bruce (bb2697) <bb2697@att.com>2018-07-26 18:10:42 +0000
committerBrandon, Bruce (bb2697) <bb2697@att.com>2018-07-26 18:10:42 +0000
commit5a41e5c15bdbfba0e84e89e13bb06d9930988e77 (patch)
tree72fa804d3fc3f1e286e3c8e1209309e97a3ff528 /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml
parent3b79de733187d2c1c9bccf626958a43bb06dbf2e (diff)
Generic resource API DG catch up
Generic resource API DG catch up with several new capabilities Change-Id: I6ba4a1716693a2fb0ba5314f60038277a50249a3 Issue-ID: SDNC-403 Signed-off-by: Brandon, Bruce (bb2697) <bb2697@att.com> Former-commit-id: dd97cf829ce1c0b3bbb0e98e93a2e6619d945beb
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml')
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml628
1 files changed, 348 insertions, 280 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml
index b6a2fd56..cb8450bf 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml
@@ -1,280 +1,348 @@
-<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='security-zone-topology-operation-assign' mode='sync'>
-<block atomic="true"><set>
-<parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
-<parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
-<parameter name='tmp.ar.sz-vnf-id' value='`$security-zone-topology-operation-input.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id`' />
-
-
-</set><set>
-<parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'
- + $tmp.ar.allotted-resource-id
- + '/allotted-resource-data/security-zone-topology/'` " />
-
-</set><execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
- <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
- <parameter name='contextPrefix' value='prop' />
-</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.sz-allottedresource`"/>
- <parameter name="outputPath" value="tmp.ar-url"/>
- <parameter name="target" value="{allotted-resource-id}"/>
- <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>
-</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.vnf-provided-allottedresource`" />
- <parameter name="outputPath" value="tmp.vnf-p-ar-url" />
- <parameter name="target" value="{service-instance-id}" />
- <parameter name="replacement" value="`$tmp.ar.parent-service-instance-id`" />
-</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.vnf-p-ar-url`" />
- <parameter name="outputPath" value="tmp.vnf-p-ar-url" />
- <parameter name="target" value="{vnf-id}"/>
- <parameter name="replacement" value="`$tmp.ar.sz-vnf-id`"/>
-</execute><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='GET' />
- <parameter name="responsePrefix" value="mdsal-ar" />
-
-<outcome value='success'>
-<block atomic="true">
-<set>
-<parameter name='bk-sz-ar' value='$mdsal-ar.' />
-</set><switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>
-<outcome value='1'>
-<block atomic='true'>
-<set>
-<parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />
-</set><switch test='`$sz-ar.allotted-resource-data.allotted-resource-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="`'Existing security-zone-allotted-resource with order status of ' + $sz-ar.allotted-resource-data.allotted-resource-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="`'Existing security-zone-allotted-resource with order status of ' + $sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />
-</return></outcome></switch><set>
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />
-
-</set></block></outcome></switch></block></outcome><outcome value='Other'>
-<block atomic="true">
-</block></outcome></execute><set>
-<parameter name='sz-ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
-<parameter name='sz-ar.allotted-resource-status.action' value="`$security-zone-topology-operation-input.request-information.request-action` " />
-<parameter name='sz-ar.allotted-resource-status.rpc-name' value="security-zone-topology-operation" />
-<parameter name='sz-ar.allotted-resource-status.rpc-action' value="`$security-zone-topology-operation-input.sdnc-request-header.svc-action` " />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$security-zone-topology-operation-input.request-information.` " />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$security-zone-topology-operation-input.sdnc-request-header.` " />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$security-zone-topology-operation-input.service-information.` " />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$security-zone-topology-operation-input.allotted-resource-information.` " />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.' value="`$security-zone-topology-operation-input.security-zone-request-input.` " /></set><set>
-<parameter name='sz-ar-identifiers.consuming-service-instance-id' value="`$security-zone-topology-operation-input.service-information.service-instance-id` " />
-<parameter name='sz-ar-identifiers.parent-service-instance-id' value="`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />
-<parameter name='sz-ar-identifiers.allotted-resource-type' value="`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
-<parameter name='sz-ar-identifiers.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
-
-</set><set>
-<parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.'
-value="`$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.`" />
-
-
-</set><switch test='$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid'>
-<outcome value=''>
-<set>
-<parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-invariant-uuid'
-value="`$ar-model.invariant-uuid`" />
-
-
-</set></outcome></switch><switch test='$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid'>
-<outcome value=''>
-<set>
-<parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-uuid'
-value="`$ar-model.uuid`" />
-
-
-</set></outcome></switch><switch test='$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.model-version'>
-<outcome value=''>
-<set>
-<parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-version'
-value="`$ar-model.version`" />
-
-
-</set></outcome></switch><switch test='`$ar-model.ecomp-generated-naming`'>
-<outcome value='Y'>
-<block atomic="true">
-<switch test='`$ar-model.naming-policy`'>
-<outcome value='oam_security_zone_name'>
-<block atomic='true'>
-<set>
-<parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
-</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$TenantOAMNetworkRole"/>
- <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`"/>
-
-</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$LandingNetworkRole"/>
- <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`"/>
-
-</execute><set>
-<parameter name='sz-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
-</set></block></outcome><outcome value='Other'>
-<block atomic='true'>
-<set>
-<parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
-</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$TenantOAMNetworkRole"/>
- <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`"/>
-
-</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ar-name`"/>
- <parameter name="outputPath" value="tmp.ar-name"/>
- <parameter name="target" value="$LandingNetworkRole"/>
- <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`"/>
-
-</execute><set>
-<parameter name='sz-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
-</set></block></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="Error in allotted-resource-model data. Ecomp-generated-naming should be true" />
-
-</return></outcome></switch><set>
-<parameter name='sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.'
-value="`$sz-ar-identifiers.`" />
-
-
-</set><set>
-<parameter name='sz-ar-assignments.vlan-tag' value="`$security-zone-topology-operation-input.security-zone-request-input.vlan-tag` " />
-<parameter name='sz-ar-assignments.trusted-network-role' value="`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role` " />
-<parameter name='sz-ar-assignments.untrusted-network-role' value="`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role` " />
-<parameter name='sz-ar-assignments.security-zone-service-instance-id' value="`$tmp.ar.parent-service-instance-id` " />
-
-</set><call module='GENERIC-RESOURCE-API' rpc='generate-panorama-name' mode='sync' >
-</call><set>
-<parameter name='sz-ar-assignments.security-zone-name-untrusted' value="`$tmp.untrust-sz` " />
-<parameter name='sz-ar-assignments.security-zone-name-trusted' value="`$tmp.trust-sz` " />
-
-
-</set><set>
-<parameter name='sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.'
-value="`$sz-ar-assignments.`" />
-
-
-</set><switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>
-<outcome value=''>
-<set>
-<parameter name='tmp.cidx' value="`0`" />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value="1" />
-
-
-</set></outcome><outcome value='Other'>
-<block atomic="true"><for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >
-<switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">
-
-<outcome value='true'>
-<block atomic="true"><set>
-<parameter name='tmp.cidx' value='`$cidx`' />
-<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />
-<parameter name='tmp.found-cidx' value='true' /></set><break/></block></outcome></switch></for><switch test='`$tmp.found-cidx`'>
-<outcome value='false'>
-<block atomic="true"><set>
-<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />
-</set></block></outcome></switch></block></outcome></switch><set>
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value="`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value="`$tmp.ar.self-link` " />
-<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />
-
-</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >
- <parameter name="outputPath" value="tmp.current-time" />
-
-</execute><set>
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$security-zone-topology-operation-input.request-information.request-action`' />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`' />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$security-zone-topology-operation-input.sdnc-request-header.svc-request-id`' />
-<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
-</set><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="allotted-resource"
- key="customer.global-customer-id = $service-data.service-information.global-customer-id AND
- service-subscription.service-type = $service-data.service-information.subscription-service-type AND
- service-instance.service-instance-id = $service-data.service-information.service-instance-id AND
- allotted-resource.id = $tmp.ar.allotted-resource-id"
- pfx='pfx' local-only='false' force='false'>
- <parameter name="description" value="`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type`" />
- <parameter name="selflink" value="`$tmp.ar.self-link`" />
- <parameter name="model-invariant-id" value="`$ar-model.invariant-uuid`" />
- <parameter name="model-version-id" value="`$ar-model.uuid`" />
- <parameter name="operational-status" value="null" />
-<outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="AAI failed" />
-</return></outcome><outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="AAI failed" />
-</return></outcome></update><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.sz.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='PUT' />
- <parameter name="responsePrefix" value="mdsal-ar" />
-
-<outcome value='success'>
-<block>
-<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='DELETE' />
- <parameter name="responsePrefix" value="parent" />
-
-<outcome value='success'>
-<block>
-</block></outcome><outcome value='failure'>
-<block>
-</block></outcome><outcome value='not-found'>
-<block>
-</block></outcome></execute></block></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 updating md-sal for security-zone-allotted-resource" />
-</return></outcome><outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating md-sal for security-zone-allotted-resource" />
-</return></outcome></execute><set>
-<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
-<parameter name='security-zone-object-path' value="`$tmp.ar.self-link`"/>
-<parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
- + $security-zone-topology-operation-input.service-information.service-instance-id
- + '/service-data/service-topology/'`"/>
-
-</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>
+<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='security-zone-topology-operation-assign' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+ <parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+ <parameter name='tmp.ar.sz-vnf-id' value='`$security-zone-topology-operation-input.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id`' />
+ </set>
+ <set>
+ <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/security-zone-topology/'` " />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.sz-allottedresource`"/>
+ <parameter name="outputPath" value="tmp.ar-url"/>
+ <parameter name="target" value="{allotted-resource-id}"/>
+ <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.vnf-provided-allottedresource`" />
+ <parameter name="outputPath" value="tmp.vnf-p-ar-url" />
+ <parameter name="target" value="{service-instance-id}" />
+ <parameter name="replacement" value="`$tmp.ar.parent-service-instance-id`" />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.vnf-p-ar-url`" />
+ <parameter name="outputPath" value="tmp.vnf-p-ar-url" />
+ <parameter name="target" value="{vnf-id}"/>
+ <parameter name="replacement" value="`$tmp.ar.sz-vnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="mdsal-ar" />
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='bk-sz-ar' value='$mdsal-ar.' />
+ </set>
+ <switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>
+ <outcome value='1'>
+ <block atomic='true'>
+ <set>
+ <parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />
+ </set>
+ <switch test='`$sz-ar.allotted-resource-data.allotted-resource-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="`'Existing security-zone-allotted-resource with order status of ' + $sz-ar.allotted-resource-data.allotted-resource-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="`'Existing security-zone-allotted-resource with order status of ' + $sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='sz-ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ <parameter name='sz-ar.allotted-resource-status.action' value="`$security-zone-topology-operation-input.request-information.request-action` " />
+ <parameter name='sz-ar.allotted-resource-status.rpc-name' value="security-zone-topology-operation" />
+ <parameter name='sz-ar.allotted-resource-status.rpc-action' value="`$security-zone-topology-operation-input.sdnc-request-header.svc-action` " />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$security-zone-topology-operation-input.request-information.` " />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$security-zone-topology-operation-input.sdnc-request-header.` " />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$security-zone-topology-operation-input.service-information.` " />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$security-zone-topology-operation-input.allotted-resource-information.` " />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.' value="`$security-zone-topology-operation-input.security-zone-request-input.` " />
+ </set>
+ <set>
+ <parameter name='sz-ar-identifiers.consuming-service-instance-id' value="`$security-zone-topology-operation-input.service-information.service-instance-id` " />
+ <parameter name='sz-ar-identifiers.parent-service-instance-id' value="`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />
+ <parameter name='sz-ar-identifiers.allotted-resource-type' value="`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
+ <parameter name='sz-ar-identifiers.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ </set>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.'
+value="`$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.`" />
+ </set>
+ <switch test='$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid'>
+ <outcome value=''>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-invariant-uuid'
+value="`$ar-model.invariant-uuid`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid'>
+ <outcome value=''>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-uuid'
+value="`$ar-model.uuid`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='$security-zone-topology-operation-input.allotted-resource-information.onap-model-information.model-version'>
+ <outcome value=''>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-version'
+value="`$ar-model.version`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$ar-model.ecomp-generated-naming`'>
+ <outcome value='Y'>
+ <block atomic="true">
+ <switch test='`$ar-model.naming-policy`'>
+ <outcome value='oam_security_zone_name'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$TenantOAMNetworkRole"/>
+ <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$LandingNetworkRole"/>
+ <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`"/>
+ </execute>
+ <set>
+ <parameter name='sz-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$TenantOAMNetworkRole"/>
+ <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ar-name`"/>
+ <parameter name="outputPath" value="tmp.ar-name"/>
+ <parameter name="target" value="$LandingNetworkRole"/>
+ <parameter name="replacement" value="`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`"/>
+ </execute>
+ <set>
+ <parameter name='sz-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />
+ </set>
+ </block>
+ </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="Error in allotted-resource-model data. Ecomp-generated-naming should be true" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.'
+value="`$sz-ar-identifiers.`" />
+ </set>
+ <set>
+ <parameter name='sz-ar-assignments.vlan-tag' value="`$security-zone-topology-operation-input.security-zone-request-input.vlan-tag` " />
+ <parameter name='sz-ar-assignments.trusted-network-role' value="`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role` " />
+ <parameter name='sz-ar-assignments.untrusted-network-role' value="`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role` " />
+ <parameter name='sz-ar-assignments.security-zone-service-instance-id' value="`$tmp.ar.parent-service-instance-id` " />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='generate-panorama-name' mode='sync' ></call>
+ <set>
+ <parameter name='sz-ar-assignments.security-zone-name-untrusted' value="`$tmp.untrust-sz` " />
+ <parameter name='sz-ar-assignments.security-zone-name-trusted' value="`$tmp.trust-sz` " />
+ </set>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.'
+value="`$sz-ar-assignments.`" />
+ </set>
+ <switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.cidx' value="`0`" />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value="1" />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >
+ <switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.cidx' value='`$cidx`' />
+ <parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />
+ <parameter name='tmp.found-cidx' value='true' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$tmp.found-cidx`'>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value="`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value="`$tmp.ar.self-link` " />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >
+ <parameter name="outputPath" value="tmp.current-time" />
+ </execute>
+ <set>
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$security-zone-topology-operation-input.request-information.request-action`' />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$security-zone-topology-operation-input.sdnc-request-header.svc-request-id`' />
+ <parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="allotted-resource"
+ key="customer.global-customer-id = $service-data.service-information.global-customer-id AND
+ service-subscription.service-type = $service-data.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $service-data.service-information.service-instance-id AND
+ allotted-resource.id = $tmp.ar.allotted-resource-id"
+ pfx='pfx' local-only='false' force='false'>
+ <parameter name="description" value="`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type`" />
+ <parameter name="selflink" value="`$tmp.ar.self-link`" />
+ <parameter name="model-invariant-id" value="`$ar-model.invariant-uuid`" />
+ <parameter name="model-version-id" value="`$ar-model.uuid`" />
+ <parameter name="operational-status" value="null" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="AAI failed" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="AAI failed" />
+ </return>
+ </outcome>
+ </update>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.sz.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ar" />
+ <outcome value='success'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='DELETE' />
+ <parameter name="responsePrefix" value="parent" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </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 updating md-sal for security-zone-allotted-resource" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating md-sal for security-zone-allotted-resource" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+ <parameter name='security-zone-object-path' value="`$tmp.ar.self-link`"/>
+ <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $security-zone-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'`"/>
+ </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