aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-06 11:03:15 -0400
committerDan Timoney <dtimoney@att.com>2017-09-06 19:17:34 -0400
commit79a537071550d5ae0df0c58572ff2b5aa3065c72 (patch)
tree75d0cc1e0e0a0c0fdc09c1a6e932f8f72d9c106b /platform-logic/generic-resource-api/src/main/xml
parent98ddb133dec262b727b93eab40f384b88fed864a (diff)
Add generic-resource-api DG seed code
Add seed code for generic-resource-api directed graphs. Change-Id: I51df937740d54d6f907c79fe322e4ffafe53537c Issue-ID: SDNC-45 Signed-off-by: Dan Timoney <dtimoney@att.com> Former-commit-id: b014b942536d93f55664b67a36436168e623bcec
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml295
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml981
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml308
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml264
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml226
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.xml121
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation.xml26
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml123
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.xml376
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml397
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-l3network-network-id.xml27
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-panorama-name.xml97
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-unique-name.xml268
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-activate.xml100
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml779
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-deactivate.xml81
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-unassign.xml229
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation.xml105
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml31
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-delete-policy.xml31
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-update-notify-operation.xml42
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_process-eipam-pools.xml941
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.xml118
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml280
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-create.xml100
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.xml118
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.xml105
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.xml81
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation.xml26
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-assign.xml123
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-deactivate.xml42
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-delete.xml62
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation.xml24
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-contrail-route-input.xml162
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml274
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-security-zone-input.xml157
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-service-input.xml49
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml54
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml44
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.xml108
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml573
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.xml95
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml111
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation.xml21
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-activate.xml64
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml383
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.xml57
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml64
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml21
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/SUBNET-API_managed-network-notification.xml92
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/SUBNET-API_subnet-allocated-notification.xml455
51 files changed, 9711 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml
new file mode 100755
index 00000000..0d099265
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml
@@ -0,0 +1,295 @@
+<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='contrail-route-topology-operation-activate' mode='sync'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+
+
+
+</set><set>
+<parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/contrail-route-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.cr-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.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">
+<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>
+<outcome value='1'>
+<block atomic='true'>
+<set>
+<parameter name='bk-cr-ar' value='$mdsal-ar.' />
+</set><set>
+<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />
+</set><switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>
+<outcome value='Created'>
+<block>
+</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="`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + ', expecting Created.'`" />
+</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><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></outcome></switch></block></outcome><outcome value='Other'>
+<block atomic="true">
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></block></outcome></execute><set>
+<parameter name='ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+<parameter name='ar.allotted-resource-status.action' value="`$contrail-route-topology-operation-input.request-information.request-action` " />
+<parameter name='ar.allotted-resource-status.rpc-name' value="contrail-route-topology-operation" />
+<parameter name='ar.allotted-resource-status.rpc-action' value="`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$contrail-route-topology-operation-input.request-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$contrail-route-topology-operation-input.sdnc-request-header.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$contrail-route-topology-operation-input.service-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$contrail-route-topology-operation-input.allotted-resource-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.` " />
+</set><set>
+<parameter name='ar-assignments.' value="`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`" />
+
+
+
+</set><switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>
+
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error activating contrail route. Source network not found" />
+</return></outcome><outcome value='Other'><block>
+<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="Error activating contrail route. Source network not found" />
+</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 == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`">
+
+<outcome value='true'>
+<block>
+<set>
+<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />
+<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />
+
+
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tenant"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
+ tenant.tenant-id = $tmp.ar.tenant-id"
+ pfx='aai.tenant' local-only='false' >
+
+<outcome value='success'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />
+
+
+</set></block></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="Tenant not found in AAI" />
+
+</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="Tenant not found in AAI" />
+
+</return></outcome></get-resource></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 activating contrail route. Source network not found" />
+</return></outcome></switch></for></block></outcome></switch></block></outcome></switch><set>
+<parameter name='tmp.fq-name' value="`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` " />
+</set><set>
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+</set><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='apply' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />
+<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />
+<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />
+
+<outcome value='success'>
+<block>
+</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="Failed to apply policy in Contrail to source network" />
+</return></outcome></execute><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id"
+ local-only="false"
+ pfx="aai.dest-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='success'>
+<block atomic="true"></block></outcome></get-resource><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='apply' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />
+<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />
+<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />
+
+<outcome value='success'>
+<block>
+</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="Failed to apply policy in Contrail to source network" />
+</return></outcome></execute><get-resource plugin="com.att.sdnctl.sli.aai.AAIService"
+resource="related-link"
+key="l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id"
+local-only="true"
+pfx="tmp.AnAI-src">
+
+
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to get related link for l3-network in AAI" />
+</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="Failed to get related link for l3-network in AAI" />
+</return></outcome></get-resource><get-resource plugin="com.att.sdnctl.sli.aai.AAIService"
+resource="related-link"
+key="l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id"
+local-only="true"
+pfx="tmp.AnAI-dest">
+
+
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to get related link for l3-network in AAI" />
+</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="Failed to get related link for l3-network in AAI" />
+</return></outcome></get-resource><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-policy:relationship-list"
+ key="network-policy.network-policy-id = $ar-assignments.contrail-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+<parameter name="relationship-list.relationship[0].related-link" value="`tmp.AnAI-src.related-link`" />
+<parameter name="relationship-list.relationship[1].related-to" value="l3-network" />
+<parameter name="relationship-list.relationship[1].related-link" value="`tmp.AnAI-dest.related-link`" />
+
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to save network policy in AAI" />
+</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="Failed to save network policy in AAI" />
+</return></outcome></save><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="operational-status" value="in-service-path" />
+<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.core.slipluginutils.SliPluginUtils' method='setTime' >
+ <parameter name="outputPath" value="tmp.current-time" />
+
+</execute><set>
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
+</set><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.cr.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>
+</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 contrail-route-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 contrail-route-allotted-resource" />
+</return></outcome></execute><set>
+<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+<parameter name='contrail-route-object-path' value="`$tmp.ar.self-link`"/>
+<parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $contrail-route-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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml
new file mode 100755
index 00000000..ea56942d
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml
@@ -0,0 +1,981 @@
+<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='contrail-route-topology-operation-assign' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+ <parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+ <parameter name='tmp.ar.contrail-applied-service-instance-id' value='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.service-instance-id`' />
+ <parameter name='tmp.ar.allotted-resource-type' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`' />
+ </set>
+ <set>
+ <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/contrail-route-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.cr-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.network`"/>
+ <parameter name="outputPath" value="tmp.ar-parentnetwork-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="`$prop.restapi.vnf`"/>
+ <parameter name="outputPath" value="tmp.ar-contrailappliedsvc-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$tmp.ar.contrail-applied-service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.parent-provided-resource`"/>
+ <parameter name="outputPath" value="tmp.parent-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.parent-ar-url`"/>
+ <parameter name="outputPath" value="tmp.parent-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.network-provided-resource`"/>
+ <parameter name="outputPath" value="tmp.network-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.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">
+ <switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>
+ <outcome value='1'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error: Existing contrail route allotted resource" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ <parameter name='ar.allotted-resource-status.action' value="`$contrail-route-topology-operation-input.request-information.request-action` " />
+ <parameter name='ar.allotted-resource-status.rpc-name' value="contrail-route-topology-operation" />
+ <parameter name='ar.allotted-resource-status.rpc-action' value="`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` " />
+ <parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$contrail-route-topology-operation-input.request-information.` " />
+ <parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$contrail-route-topology-operation-input.sdnc-request-header.` " />
+ <parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$contrail-route-topology-operation-input.service-information.` " />
+ <parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$contrail-route-topology-operation-input.allotted-resource-information.` " />
+ <parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.` " />
+ </set>
+ <set>
+ <parameter name='ar-identifiers.consuming-service-instance-id' value="`$contrail-route-topology-operation-input.service-information.service-instance-id` " />
+ <parameter name='ar-identifiers.parent-service-instance-id' value="`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />
+ <parameter name='ar-identifiers.allotted-resource-type' value="`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type` " />
+ <parameter name='ar-identifiers.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+ </set>
+ <set>
+ <parameter name='ar.allotted-resource-data.contrail-route-topology.ecomp-model-information.'
+value="`$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.`" />
+ </set>
+ <switch test='$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-invariant-uuid'>
+ <outcome value=''>
+ <set>
+ <parameter name='ar.allotted-resource-data.contrail-route-topology.ecomp-model-information.model-invariant-uuid'
+value="`$ar-model.invariant-uuid`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-uuid'>
+ <outcome value=''>
+ <set>
+ <parameter name='sar.allotted-resource-data.contrail-route-topology.ecomp-model-information.model-uuid'
+value="`$ar-model.uuid`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-version'>
+ <outcome value=''>
+ <set>
+ <parameter name='ar.allotted-resource-data.contrail-route-topology.ecomp-model-information.model-version'
+value="`$ar-model.version`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error assigning contrail route. Source network not found" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <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="Error assigning contrail route. Source network not found" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='source-network-found' value='false' />
+ </set>
+ <for index='nidx' start='0' end='`$service-data.networks.network_length`' >
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="tmp.ar-name="/>
+ <parameter name="field3" value="`$tmp.ar-name`"/>
+ <parameter name="field4" value="service-data-network-id" />
+ <parameter name="field5" value="`$service-data.networks.network[$nidx].network-id`" />
+ <parameter name="field6" value="contrail-route-input-network-id" />
+ <parameter name="field7" value="`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`" />
+ <parameter name="field8" value="`$nidx`" />
+ </record>
+ <switch test="`$service-data.networks.network[$nidx].network-id == $contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`">
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />
+ <parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />
+ <parameter name='source-network-found' value='true' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tenant"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
+ tenant.tenant-id = $tmp.ar.tenant-id"
+ pfx='aai.tenant' local-only='false' >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />
+ </set>
+ </block>
+ </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="Tenant not found in AAI" />
+ </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="Tenant not found in AAI" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$source-network-found`">
+ <outcome value='false'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error assigning contrail route. Source network not found" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$ar-model.ecomp-generated-naming`'>
+ <outcome value='Y'>
+ <block atomic="true">
+ <switch test='`$ar-model.naming-policy`'>
+ <outcome value='oam_network_policy'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.ar-name' value='$TenantName_$CloudRegionID_$TenantNetworkRole_$LandingNetworkRole_policy_' />
+ </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="$TenantName"/>
+ <parameter name="replacement" value="`$tmp.ar.tenant-name`"/>
+ </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="$CloudRegionID"/>
+ <parameter name="replacement" value="`$tmp.ar.cloud-region-id`"/>
+ </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="$TenantNetworkRole"/>
+ <parameter name="replacement" value="`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.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="`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-role`"/>
+ </execute>
+ <set>
+ <parameter name='generate-unique-name-input.index-table-name' value='CONTRAIL_ROUTE_NAME_INDEX' />
+ <parameter name='generate-unique-name-input.index-table-prefix-column' value='contrail_route_name_prefix' />
+ <parameter name='generate-unique-name-input.name-table-type' value='CONTRAIL_ROUTE_INSTANCE' />
+ <parameter name='generate-unique-name-input.prefix' value="`$tmp.ar-name`" />
+ <parameter name='generate-unique-name-input.index-length' value='2' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="tmp.ar-name="/>
+ <parameter name="field3" value="`$tmp.ar-name`"/>
+ <parameter name="field4" value="generate-unique-name-input.prefix" />
+ <parameter name="field5" value="`$generate-unique-name-input.prefix`" />
+ </record>
+ <call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='tmp.ar-name' value='`$generate-unique-name-output.generated-name`' />
+ </set>
+ </outcome>
+ </call>
+ <set>
+ <parameter name='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='$TenantName_$CloudRegionID_$TenantNetworkRole_$LandingNetworkRole_policy_' />
+ </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="$TenantName"/>
+ <parameter name="replacement" value="`$tmp.ar.tenant-name`"/>
+ </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="$CloudRegionID"/>
+ <parameter name="replacement" value="`$tmp.ar.cloud-region-id`"/>
+ </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="$TenantNetworkRole"/>
+ <parameter name="replacement" value="`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.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="`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-role`"/>
+ </execute>
+ <set>
+ <parameter name='generate-unique-name-input.index-table-name' value='CONTRAIL_ROUTE_NAME_INDEX' />
+ <parameter name='generate-unique-name-input.index-table-prefix-column' value='contrail_route_name_prefix' />
+ <parameter name='generate-unique-name-input.name-table-type' value='CONTRAIL_ROUTE_INSTANCE' />
+ <parameter name='generate-unique-name-input.prefix' value="`$tmp.ar-name`" />
+ <parameter name='generate-unique-name-input.index-length' value='2' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="tmp.ar-name="/>
+ <parameter name="field3" value="`$tmp.ar-name`"/>
+ <parameter name="field4" value="generate-unique-name-input.prefix" />
+ <parameter name="field5" value="`$generate-unique-name-input.prefix`" />
+ </record>
+ <call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='tmp.ar-name' value='`$generate-unique-name-output.generated-name`' />
+ </set>
+ </outcome>
+ </call>
+ <set>
+ <parameter name='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='ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.'
+value="`$ar-identifiers.`" />
+ </set>
+ <set>
+ <parameter name='ar-assignments.source-network.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.` " />
+ <parameter name='ar-assignments.dest-network.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.` " />
+ <parameter name='ar-assignments.contrail-applied-service.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.` " />
+ </set>
+ <set>
+ <parameter name='tmp.fq-name' value='$defaultDomain.$defaultProject.$sdncNetworkPolicy' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.fq-name`"/>
+ <parameter name="outputPath" value="tmp.fq-name"/>
+ <parameter name="target" value="$defaultDomain"/>
+ <parameter name="replacement" value="default-domain"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.fq-name`"/>
+ <parameter name="outputPath" value="tmp.fq-name"/>
+ <parameter name="target" value="$defaultProject"/>
+ <parameter name="replacement" value="`$tmp.ar.tenant-name`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.fq-name`"/>
+ <parameter name="outputPath" value="tmp.fq-name"/>
+ <parameter name="target" value="$sdncNetworkPolicy"/>
+ <parameter name="replacement" value="`$tmp.ar-name`"/>
+ </execute>
+ <switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-id`'>
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-parentnetwork-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="parent-net" />
+ <outcome value='success'>
+ <block atomic="true">
+ <switch test='`$parent-net.networks.network_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name='ar-assignments.dest-network.network-id' value="`$parent-net.networks.network[0].network-id` " />
+ </set>
+ </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: Network id not found. Parent Service should only have one network" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error: No existing parent netorks" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='ar-assignments.dest-network.network-id' value="`$contrail-route-request-input.dest-network.network-id` " />
+ </set>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-contrailappliedsvc-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="vnf" />
+ <outcome value='success'>
+ <block atomic="true">
+ <switch test='`$vnf.vnfs.vnf_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name='ar-assignments.contrail-applied-service.vnf-id' value="`$vnf.vnfs.vnf[0].vnf-id` " />
+ </set>
+ </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: vnf id not found. Contrail applied service should only have one vnf" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error: No existing contrail applied service vnfs" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`'>
+ <outcome value=''>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ar-assignments.contrail-applied-service.vnf-id"
+ pfx='aai.vnf' local-only='false' >
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Vnf not found in AAI" />
+ </return>
+ </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 retrieving vnf from AAI" />
+ </return>
+ </outcome>
+ </get-resource>
+ <switch test='`$aai.vnf.vf-modules.vf-module_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="VF Module not found in AAI" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <for index='idx' start='0' end='`$aai.vnf.vf-modules.vf-module_length`' >
+ <switch test='`$aai-vf-module.contrail-service-instance-fqdn`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='ar-assignments.contrail-applied-service.contrail-fqdn' value="`$aai-vf-module.contrail-service-instance-fqdn` " />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='ar-assignments.contrail-applied-service.contrail-fqdn' value="`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn` " />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$ar-assignments.contrail-applied-service.contrail-fqdn`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error: No vf-module with contrail-service-instance-fqdn found in AAI" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='ar-assignments.fq-name' value="`$tmp.fq-name` " />
+ </set>
+ <set>
+ <parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.'
+value="`$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="`$contrail-route-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='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />
+ <parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />
+ <parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />
+ <parameter name='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="`$contrail-route-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.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='PUT' />
+ <parameter name="responsePrefix" value="parent" />
+ <outcome value='success'>
+ <block></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 contrail-route-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 contrail-route-allotted-resource" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-ar-url`"/>
+ <parameter name="outputPath" value="tmp.network-ar-url"/>
+ <parameter name="target" value="{network-id}"/>
+ <parameter name="replacement" value="`$ar-assignments.dest-network.network-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-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="net-ar" />
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.found-nidx' value='false' />
+ </set>
+ <switch test='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`'>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value="1" />
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[0]' value="`$tmp.ar.allotted-resource-id`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-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="p-network-ar" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' >
+ <switch test="`$net-ar.network-provided-allotted-resources.network-provided-ar-id[$nidx] == $tmp.ar.allotted-resource-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.found-nidx' value='true' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$tmp.found-nidx`'>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.nidx' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' />
+ </set>
+ <set>
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length + 1`' />
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[$tmp.nidx]' value="`$tmp.ar.allotted-resource-id`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-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="p-network-ar" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.found-nidx' value='false' />
+ </set>
+ <switch test='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`'>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value="1" />
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[0]' value="`$tmp.ar.allotted-resource-id`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-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="p-network-ar" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' >
+ <switch test="`$net-ar.network-provided-allotted-resources.network-provided-ar-id[$nidx] == $tmp.ar.allotted-resource-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.found-nidx' value='true' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$tmp.found-nidx`'>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.nidx' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' />
+ </set>
+ <set>
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length + 1`' />
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[$tmp.nidx]' value="`$tmp.ar.allotted-resource-id`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-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="p-network-ar" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.found-nidx' value='false' />
+ </set>
+ <switch test='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`'>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value="1" />
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[0]' value="`$tmp.ar.allotted-resource-id`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-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="p-network-ar" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' >
+ <switch test="`$net-ar.network-provided-allotted-resources.network-provided-ar-id[$nidx] == $tmp.ar.allotted-resource-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.found-nidx' value='true' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$tmp.found-nidx`'>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.nidx' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' />
+ </set>
+ <set>
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length + 1`' />
+ <parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[$tmp.nidx]' value="`$tmp.ar.allotted-resource-id`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-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="p-network-ar" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='not-found'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.cr.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='failure'>
+ <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>
+ <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 contrail-route-allotted-resource. Parent provided resource rolled back" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <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>
+ <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 contrail-route-allotted-resource. Parent provided resource rolled back" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+ <parameter name='contrail-route-object-path' value="`$tmp.ar.self-link`"/>
+ <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $contrail-route-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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml
new file mode 100755
index 00000000..1eb00a55
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml
@@ -0,0 +1,308 @@
+<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='contrail-route-topology-operation-create' mode='sync'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+
+
+
+</set><set>
+<parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/contrail-route-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.cr-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.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">
+<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>
+<outcome value='1'>
+<block atomic='true'>
+<set>
+<parameter name='bk-cr-ar' value='$mdsal-ar.' />
+</set><set>
+<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />
+</set></block></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></outcome></switch></block></outcome><outcome value='Other'>
+<block atomic="true">
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></block></outcome></execute><set>
+<parameter name='ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+<parameter name='ar.allotted-resource-status.action' value="`$contrail-route-topology-operation-input.request-information.request-action` " />
+<parameter name='ar.allotted-resource-status.rpc-name' value="contrail-route-topology-operation" />
+<parameter name='ar.allotted-resource-status.rpc-action' value="`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$contrail-route-topology-operation-input.request-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$contrail-route-topology-operation-input.sdnc-request-header.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$contrail-route-topology-operation-input.service-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$contrail-route-topology-operation-input.allotted-resource-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.` " />
+</set><set>
+<parameter name='ar-assignments.' value="`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`" />
+
+
+
+</set><switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>
+
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error assigning contrail route. Source network not found" />
+</return></outcome><outcome value='Other'><block>
+<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="Error assigning contrail route. Source network not found" />
+</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 == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`">
+
+<outcome value='true'>
+<block>
+<set>
+<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />
+<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />
+
+
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tenant"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
+ tenant.tenant-id = $tmp.ar.tenant-id"
+ pfx='aai.tenant' local-only='false' >
+
+<outcome value='success'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />
+
+
+</set></block></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="Tenant not found in AAI" />
+
+</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="Tenant not found in AAI" />
+
+</return></outcome></get-resource></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 assigning contrail route. Source network not found" />
+</return></outcome></switch></for></block></outcome></switch></block></outcome></switch><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id"
+ local-only="false"
+ pfx="aai.src-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='success'>
+<block atomic="true"></block></outcome></get-resource><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id"
+ local-only="false"
+ pfx="aai.dest-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='success'>
+<block atomic="true"></block></outcome></get-resource><set>
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+</set><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.contrail-route-topology-operation-create"/>
+<parameter name='field3' value='network-policy' />
+<parameter name='field4' value='create' />
+<parameter name='field5' value='contrailResp' />
+<parameter name='field6' value='default-domain' />
+<parameter name='field7' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />
+<parameter name='field8' value='`$tmp.ar.tenant-name`' />
+<parameter name='field9' value='`$ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`' />
+<parameter name='field10' value='$aai.dest-network.contrail-network-fqdn' />
+<parameter name='field11' value='$aai.src-network.contrail-network-fqdn' />
+<parameter name='field12' value='&lt;&gt;' />
+<parameter name='field13' value='$tmp.ar.cloud-region-id' />
+
+
+</record><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='create' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='default-domain' value='default-domain' />
+<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />
+<parameter name='default-project' value='`$tmp.ar.tenant-name`' />
+<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->
+<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />
+<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />
+<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />
+<parameter name='direction' value='&lt;&gt;' />
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+
+<outcome value='success'>
+<block>
+</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="`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `" />
+</return></outcome></execute><switch test='`$contrailResp.resp-code`'>
+
+<outcome value='0'>
+<block>
+</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="`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `" />
+</return></outcome></switch><set>
+<parameter name='ar-assignments.contrail-id' value="`$contrailResp.network-policy.uuid`" />
+
+
+
+</set><call module='GENERIC-RESOURCE-API' rpc='policy-manager-create-policy' mode='sync' >
+<outcome value='failure'>
+<block atomic="true">
+<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='delete' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='default-domain' value='default-domain' />
+<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />
+<parameter name='default-project' value='`$tmp.ar.tenant-name`' />
+<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->
+<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />
+<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />
+<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />
+<parameter name='direction' value='&lt;&gt;' />
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+
+<outcome value='success'>
+<block>
+</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="`'Failed to create Policy in Policy Mgr. Rollback failed to delete policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `" />
+</return></outcome></execute><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to create policy in PolicyMgr. '+ $error-message + 'Contrail network policy rolled back.'`" />
+</return></block></outcome><outcome value='success'>
+<block atomic="true"></block></outcome></call><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-policy"
+ key="network-policy.network-policy-id = $ar-assignments.contrail-id" >
+<!-- Create l3-network object -->
+<parameter name="network-policy-id" value="`$ar-assignments.contrail-id`" />
+<parameter name="network-policy-fqdn" value="`$ar-assignments.fq-name`" />
+
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to save network policy in AAI" />
+</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="Failed to save network policy in AAI" />
+</return></outcome></save><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="operational-status" value="out-of-service-path" />
+<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><set>
+<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' value='`$ar-assignments.`' />
+
+
+
+</set><set>
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >
+ <parameter name="outputPath" value="tmp.current-time" />
+
+</execute><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.cr.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>
+</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 contrail-route-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 contrail-route-allotted-resource" />
+</return></outcome></execute><set>
+<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+<parameter name='contrail-route-object-path' value="`$tmp.ar.self-link`"/>
+<parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $contrail-route-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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml
new file mode 100755
index 00000000..01c01749
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml
@@ -0,0 +1,264 @@
+<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='contrail-route-topology-operation-deactivate' mode='sync'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-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:contrail-route-allotted-resources/contrail-route-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/contrail-route-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.cr-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.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">
+<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>
+<outcome value='1'>
+<block atomic='true'>
+<set>
+<parameter name='bk-cr-ar' value='$mdsal-ar.' />
+</set><set>
+<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />
+</set><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><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></outcome></switch></block></outcome><outcome value='Other'>
+<block atomic="true">
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></block></outcome></execute><set>
+<parameter name='ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+<parameter name='ar.allotted-resource-status.action' value="`$contrail-route-topology-operation-input.request-information.request-action` " />
+<parameter name='ar.allotted-resource-status.rpc-name' value="contrail-route-topology-operation" />
+<parameter name='ar.allotted-resource-status.rpc-action' value="`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$contrail-route-topology-operation-input.request-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$contrail-route-topology-operation-input.sdnc-request-header.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$contrail-route-topology-operation-input.service-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$contrail-route-topology-operation-input.allotted-resource-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.` " />
+</set><set>
+<parameter name='ar-assignments.' value="`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`" />
+
+
+
+</set><switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>
+
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error activating contrail route. Source network not found" />
+</return></outcome><outcome value='Other'><block>
+<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="Error activating contrail route. Source network not found" />
+</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 == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`">
+
+<outcome value='true'>
+<block>
+<set>
+<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />
+<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />
+
+
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tenant"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
+ tenant.tenant-id = $tmp.ar.tenant-id"
+ pfx='aai.tenant' local-only='false' >
+
+<outcome value='success'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />
+
+
+</set></block></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="Tenant not found in AAI" />
+
+</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="Tenant not found in AAI" />
+
+</return></outcome></get-resource></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 activating contrail route. Source network not found" />
+</return></outcome></switch></for></block></outcome></switch></block></outcome></switch><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id"
+ local-only="false"
+ pfx="aai.src-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='success'>
+<block atomic="true"></block></outcome></get-resource><set>
+<parameter name='tmp.fq-name' value="`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` " />
+</set><set>
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+</set><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='remove' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />
+<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />
+<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />
+
+<outcome value='success'>
+<block>
+</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="Failed to remove policy in Contrail from source network" />
+</return></outcome></execute><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id"
+ local-only="false"
+ pfx="aai.dest-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`" /></return></outcome><outcome value='success'>
+<block atomic="true"></block></outcome></get-resource><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='remove' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />
+<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />
+<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />
+
+<outcome value='success'>
+<block>
+</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="Failed to remove policy in Contrail from dest network" />
+</return></outcome></execute><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-policy:relationship-list"
+ key="network-policy.network-policy-id = $ar-assignments.contrail-id and related-to = 'l3-network' " >
+
+
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to save network policy in AAI" />
+</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="Failed to save network policy in AAI" />
+</return></outcome></delete><set>
+<parameter name='ar-assignments.vlan-tag' value="" />
+
+
+
+</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="operational-status" value="out-of-service-path" />
+<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.core.slipluginutils.SliPluginUtils' method='setTime' >
+ <parameter name="outputPath" value="tmp.current-time" />
+
+</execute><set>
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
+</set><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.cr.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>
+</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 contrail-route-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 contrail-route-allotted-resource" />
+</return></outcome></execute><set>
+<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+<parameter name='contrail-route-object-path' value="`$tmp.ar.self-link`"/>
+<parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $contrail-route-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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml
new file mode 100755
index 00000000..147aa608
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml
@@ -0,0 +1,226 @@
+<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='contrail-route-topology-operation-delete' mode='sync'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-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:contrail-route-allotted-resources/contrail-route-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/contrail-route-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.cr-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.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">
+<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>
+<outcome value='1'>
+<block atomic='true'>
+<set>
+<parameter name='bk-cr-ar' value='$mdsal-ar.' />
+</set><set>
+<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />
+</set><switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>
+<outcome value='PendingDelete'>
+<block>
+</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="`'Existing contrail-route-allotted-resource with order status of ' + $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><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></outcome></switch></block></outcome><outcome value='Other'>
+<block atomic="true">
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></block></outcome></execute><set>
+<parameter name='ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+<parameter name='ar.allotted-resource-status.action' value="`$contrail-route-topology-operation-input.request-information.request-action` " />
+<parameter name='ar.allotted-resource-status.rpc-name' value="contrail-route-topology-operation" />
+<parameter name='ar.allotted-resource-status.rpc-action' value="`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$contrail-route-topology-operation-input.request-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$contrail-route-topology-operation-input.sdnc-request-header.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$contrail-route-topology-operation-input.service-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$contrail-route-topology-operation-input.allotted-resource-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.` " />
+</set><set>
+<parameter name='ar-assignments.' value="`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`" />
+
+
+
+</set><switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>
+
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error assigning contrail route. Source network not found" />
+</return></outcome><outcome value='Other'><block>
+<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="Error assigning contrail route. Source network not found" />
+</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 == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`">
+
+<outcome value='true'>
+<block>
+<set>
+<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />
+<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />
+
+
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tenant"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
+ tenant.tenant-id = $tmp.ar.tenant-id"
+ pfx='aai.tenant' local-only='false' >
+
+<outcome value='success'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />
+
+
+</set></block></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="Tenant not found in AAI" />
+
+</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="Tenant not found in AAI" />
+
+</return></outcome></get-resource></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 assigning contrail route. Source network not found" />
+</return></outcome></switch></for></block></outcome></switch></block></outcome></switch><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='delete' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />
+<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />
+
+<outcome value='success'>
+<block>
+</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="Failed to create policy in Contrail" />
+</return></outcome></execute><call module='GENERIC-RESOURCE-API' rpc='policy-manager-delete-policy' mode='sync' >
+<outcome value='failure'>
+<block atomic="true">
+</block></outcome><outcome value='success'>
+<block atomic="true"></block></outcome></call><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-policy"
+ key="network-policy.network-policy-id = $ar-assignments.contrail-id" >
+
+
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to save network policy in AAI" />
+</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="Failed to save network policy in AAI" />
+</return></outcome></delete><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="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.core.slipluginutils.SliPluginUtils' method='setTime' >
+ <parameter name="outputPath" value="tmp.current-time" />
+
+</execute><set>
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
+</set><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.cr.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>
+</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 contrail-route-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 contrail-route-allotted-resource" />
+</return></outcome></execute><set>
+<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+<parameter name='contrail-route-object-path' value="`$tmp.ar.self-link`"/>
+<parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $contrail-route-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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.xml
new file mode 100755
index 00000000..d52b2582
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.xml
@@ -0,0 +1,121 @@
+<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='contrail-route-topology-operation-unassign' mode='sync'>
+<block atomic="true"><set>
+<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-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:contrail-route-allotted-resources/contrail-route-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/contrail-route-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.cr-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.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">
+<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>
+<outcome value='1'>
+<block atomic='true'>
+<set>
+<parameter name='bk-cr-ar' value='$mdsal-ar.' />
+</set><set>
+<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />
+</set><switch test='`$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 contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`" />
+</return></outcome><outcome value='Other'>
+<block>
+</block></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><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></outcome></switch></block></outcome><outcome value='Other'>
+<block atomic="true">
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: Contrail Route not found" />
+
+</return></block></outcome></execute><set>
+<parameter name='ar.allotted-resource-id' value="`$tmp.ar.allotted-resource-id` " />
+<parameter name='ar.allotted-resource-status.action' value="`$contrail-route-topology-operation-input.request-information.request-action` " />
+<parameter name='ar.allotted-resource-status.rpc-name' value="contrail-route-topology-operation" />
+<parameter name='ar.allotted-resource-status.rpc-action' value="`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value="`$contrail-route-topology-operation-input.request-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value="`$contrail-route-topology-operation-input.sdnc-request-header.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value="`$contrail-route-topology-operation-input.service-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value="`$contrail-route-topology-operation-input.allotted-resource-information.` " />
+<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value="`$contrail-route-topology-operation-input.contrail-route-request-input.` " />
+</set><set>
+<parameter name='contrail-api-output.contrail-id' value="dummycid" />
+</set><set>
+<parameter name='ar-assignments.contrail-id' value="`$contrail-api-output.contrail-id`" />
+
+
+
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >
+ <parameter name="outputPath" value="tmp.current-time" />
+
+</execute><set>
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />
+<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />
+</set><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='DELETE' />
+ <parameter name="responsePrefix" value="mdsal-ar" />
+
+<outcome value='success'>
+<block>
+</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 contrail-route-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 contrail-route-allotted-resource" />
+</return></outcome></execute><set>
+<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+<parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $contrail-route-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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation.xml
new file mode 100755
index 00000000..478b8509
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation.xml
@@ -0,0 +1,26 @@
+<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='contrail-route-topology-operation' mode='sync'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-contrail-route-input' mode='sync' >
+</call><switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-assign' mode='sync' >
+</call></block></outcome><outcome value='create'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-create' mode='sync' >
+</call></block></outcome><outcome value='activate'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-activate' mode='sync' >
+</call></block></outcome><outcome value='deactivate'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-deactivate' mode='sync' >
+</call></block></outcome><outcome value='delete'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-delete' mode='sync' >
+</call></block></outcome><outcome value='unassign'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-unassign' 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></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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml
new file mode 100755
index 00000000..5000dfdd
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml
@@ -0,0 +1,123 @@
+<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='create-l3-subnet' mode='sync'>
+<block atomic="true"><set>
+<parameter name='subnet-idx' value='0' />
+</set><switch test='`$tmp.l3-network.level2.v4.entity-id`'>
+<outcome value=''>
+<block atomic="true"><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.create-l3-subnet:REQID"/>
+<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="tmp.l3-network.level2.v4.entity-id"/>
+<parameter name="field5" value="null"/>
+
+
+
+</record></block></outcome><outcome value='Other'>
+<block atomic="true"><execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getSubnetAddresses">
+ <parameter name="ipAddress" value="`$tmp.l3-network.level2.v4.ip-prefix`" />
+ <parameter name="ipVersion" value="4" />
+ <parameter name="subnet" value="`$tmp.l3-network.level2.v4.mask`" />
+ <parameter name="ctxGateway" value="tmp.return.generate.gateway-address" />
+ <parameter name="ctxDhcpStart" value="tmp.return.generate.dhcp-start-address" />
+ <parameter name="ctxDhcpEnd" value="tmp.return.generate.dhcp-end-address" />
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to generate ipv4 addresses using IpAddressTools" /></return></outcome></execute><set>
+<parameter name='tmp.l3-network.subnet[$subnet-idx].orchestration-status' value='PendingCreate' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-id' value='`$tmp.l3-network.level2.v4.entity-id`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-name' value="`$tmp.l3-network.network-name + '_S' + $subnet-idx`" />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].gateway-address' value='`$tmp.return.generate.gateway-address`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].network-start-address' value='`$tmp.l3-network.level2.v4.ip-prefix`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$tmp.l3-network.level2.v4.mask`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].ip-version' value='`$network-model.ipv4-ip-version`' />
+</set><switch test='`$network-model.ipv4-dhcp-enabled`'>
+<outcome value='Y'>
+<block atomic="true"><set>
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='true' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />
+
+
+</set></block></outcome><outcome value='N'>
+<block atomic="true"><set>
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='false' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='' />
+
+
+</set></block></outcome></switch><set>
+<parameter name='subnet-idx' value='`$subnet-idx+1`' />
+
+</set><set>
+<parameter name='tmp.l3-network.subnet_length' value='`$subnet-idx`' />
+</set></block></outcome></switch><switch test='`$tmp.l3-network.level2.v6.entity-id`'>
+<outcome value=''>
+<block atomic="true"><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.create-l3-subnet:REQID"/>
+<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="tmp.l3-network.level2.v6.entity-id"/>
+<parameter name="field5" value="null"/>
+
+
+
+</record></block></outcome><outcome value='Other'>
+<block atomic="true"><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.create-l3-subnet:REQID"/>
+<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="tmp.l3-network.level2.v6.entity-id"/>
+<parameter name="field5" value="`$tmp.l3-network.level2.v6.entity-id`"/>
+
+
+
+</record><execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getSubnetAddresses">
+ <parameter name="ipAddress" value="`$tmp.l3-network.level2.v6.ip-prefix`" />
+ <parameter name="ipVersion" value="6" />
+ <parameter name="subnet" value="`$tmp.l3-network.level2.v6.mask`" />
+ <parameter name="ctxGateway" value="tmp.return.generate.gateway-address" />
+ <parameter name="ctxDhcpStart" value="tmp.return.generate.dhcp-start-address" />
+ <parameter name="ctxDhcpEnd" value="tmp.return.generate.dhcp-end-address" />
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to generate ipv6 addresses using IpAddressTools" /></return></outcome></execute><set>
+<parameter name='tmp.l3-network.subnet[$subnet-idx].orchestration-status' value='PendingCreate' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-id' value='`$tmp.l3-network.level2.v6.entity-id`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-name' value="`$tmp.l3-network.network-name + '_S' + $subnet-idx`" />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].gateway-address' value='`$tmp.return.generate.gateway-address`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].network-start-address' value='`$tmp.l3-network.level2.v6.ip-prefix`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$tmp.l3-network.level2.v6.mask`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].ip-version' value='`$network-model.ipv6-ip-version`' />
+
+
+</set><switch test='`$network-model.ipv6-dhcp-enabled`'>
+<outcome value='Y'>
+<block atomic="true"><set>
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='true' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />
+
+
+</set></block></outcome><outcome value='N'>
+<block atomic="true"><set>
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='false' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='' />
+
+
+</set></block></outcome></switch><set>
+<parameter name='subnet-idx' value='`$subnet-idx+1`' />
+</set><set>
+<parameter name='tmp.l3-network.subnet_length' value='`$subnet-idx`' />
+</set></block></outcome></switch><return status='success'>
+<parameter name='' value='' />
+</return></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.xml
new file mode 100755
index 00000000..0b34e574
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.xml
@@ -0,0 +1,376 @@
+<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='eipam-allocate-network-role-subnet' mode='sync'>
+<block atomic='true'><set>
+ <parameter name="tmp.eipam-error" value="false" />
+ <parameter name="eipam-ip-block.ip-prefix" value='' />
+ <parameter name="eipam-ip-block.mask" value='' />
+ <parameter name="pfx.eipam-pool-row" value='' />
+ <parameter name="tmp.level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.level2-key-name" value="NETWORK_ROLE:NETWORK_ID" /></set><!--Need to know which ipv version to get the plan name from the network-model.--><switch test="`$eipam-ip-block.allocate-version`"><outcome value='ipv4'><block atomic='true'><switch test="`$eipam-ip-block.level`"><outcome value='1'><block atomic='true'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plan-name" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="eipam-ip-block.activate-subnet-flag" value="Y"/>
+ <parameter name="eipam-ip-block.leaf-level-indicator" value="N"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.pools_length" value="1"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.pools[0].key-name" value="`$tmp.level1-key-name`"/>
+ <parameter name="eipam-ip-block.pools[0].key-value" value="`$tmp.level1-key-value`"/></set><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="allocateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating V4 subnet in EIPAM." />
+ </return></outcome></execute><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS WHERE plan_name = $network-model.eipam-v4-address-plan and level = 1 and key_value = $tmp.level1-key-value ; "
+ pfx='pfx.eipam-pool-row'>
+
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V4 subnet in EIPAM." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V4 subnet in EIPAM." />
+ </return></outcome></get-resource><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-allocate-network-role-subnet"/>
+<parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+<parameter name="field5" value="`$tmp.level1-key-value`"/>
+<parameter name="field6" value="`$tmp.eipam-pool-row.pool-id`"/>
+<parameter name="field7" value="Level 1 subnet saved to DB."/></record><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNETS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ service_type = $tmp.service-type ,
+ ip_address = $eipam-ip-block.ip-prefix ,
+ prefix_length = $eipam-ip-block.mask ,
+ plan_name = $network-model.eipam-v4-address-plan ,
+ status = 'ACTIVE' ,
+ pool_id = $pfx.eipam-pool-row.pool-id ,
+ address_family = $network-model.ipv4-ip-version ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v4subnet-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ; "
+ force='true'
+ pfx='pfx.eipam-v4subnet-key-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save></block></outcome><outcome value='2'><block atomic='true'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plan-name" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="eipam-ip-block.activate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.leaf-level-indicator" value="Y"/>
+
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.pools_length" value="2"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.pools[0].key-name" value="`$tmp.level1-key-name`"/>
+ <parameter name="eipam-ip-block.pools[0].key-value" value="`$tmp.level1-key-value`"/>
+
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.pools[1].key-name" value="`$tmp.level2-key-name`"/>
+ <parameter name="eipam-ip-block.pools[1].key-value" value="`$tmp.level2-key-value`"/></set><switch test="`$eipam-ip-block.subnet-size-override`"><outcome value=''>
+<block atomic='true'><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-allocate-network-role-subnet"/>
+<parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+<parameter name="field5" value="`$tmp.level2-key-value`"/>
+<parameter name="field6" value="Level 2 subnet override not set, default to network model value."/>
+
+</record><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.subnet-size-override" value="`$network-model.ipv4-cidr-mask`" />
+</set></block></outcome></switch><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="allocateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating V4 subnet in EIPAM." />
+ </return></outcome></execute><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS WHERE plan_name = $network-model.eipam-v4-address-plan and level = 2 and parent_pool = $tmp.level1-key-value AND key_value = $tmp.level2-key-value ; "
+ pfx='pfx.eipam-pool-row'>
+
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V4 subnet in EIPAM." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V4 subnet in EIPAM." />
+ </return></outcome></get-resource><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNETS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ service_type = $tmp.service-type ,
+ ip_address = $eipam-ip-block.ip-prefix ,
+ prefix_length = $eipam-ip-block.mask ,
+ plan_name = $network-model.eipam-v4-address-plan ,
+ status = 'ALLOCATED' ,
+ pool_id = $pfx.eipam-pool-row.pool-id ,
+ address_family = $network-model.ipv4-ip-version ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ; "
+ force='true'
+ pfx='pfx.eipam-v4subnet-key-row'>
+<outcome value='success'>
+</outcome><outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />
+</return></outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level2-key-name ,
+ key_value = $tmp.level2-key-value ,
+ level = 2 ; "
+ force='true'
+ pfx='pfx.eipam-v4subnet-key-row'>
+<outcome value='success'>
+</outcome><outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />
+</return></outcome></save><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-allocate-network-role-subnet"/>
+<parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+<parameter name="field5" value="`$tmp.level1-key-value`"/>
+
+<!-- Level 2 -->
+ <parameter name="field6" value="NETWORK_ROLE_NETWORK_ID"/>
+ <parameter name="field7" value="`$tmp.level2-key-value`"/>
+<parameter name="field8" value="Level 2 subnet saved to DB."/></record></block></outcome><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome></switch></block></outcome><outcome value='ipv6'><block atomic='true'><switch test="`$eipam-ip-block.level`"><outcome value='1'><block atomic='true'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plan-name" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="eipam-ip-block.activate-subnet-flag" value="Y"/>
+ <parameter name="eipam-ip-block.leaf-level-indicator" value="N"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.pools_length" value="1"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.pools[0].key-name" value="`$tmp.level1-key-name`"/>
+ <parameter name="eipam-ip-block.pools[0].key-value" value="`$tmp.level1-key-value`"/></set><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="allocateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating V4 subnet in EIPAM." />
+ </return></outcome></execute><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS WHERE plan_name = $network-model.eipam-v6-address-plan and level = 1 and key_value = $tmp.level1-key-value ; "
+ pfx='pfx.eipam-pool-row'>
+
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V6 subnet in EIPAM." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V6 subnet in EIPAM." />
+ </return></outcome></get-resource><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNETS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ service_type = $tmp.service-type ,
+ ip_address = $eipam-ip-block.ip-prefix ,
+ prefix_length = $eipam-ip-block.mask ,
+ plan_name = $network-model.eipam-v6-address-plan ,
+ status = 'ACTIVE' ,
+ pool_id = $pfx.eipam-pool-row.pool-id ,
+ address_family = $network-model.ipv6-ip-version ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v6subnet-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ; "
+ force='true'
+ pfx='pfx.eipam-v6subnet-key-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-allocate-network-role-subnet"/>
+<parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+<parameter name="field5" value="`$tmp.level1-key-value`"/>
+<parameter name="field6" value="`$tmp.eipam-pool-row.pool-id`"/>
+<parameter name="field7" value="Level 1 subnet saved to DB."/></record></block></outcome><outcome value='2'><block atomic='true'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plan-name" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="eipam-ip-block.activate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.leaf-level-indicator" value="Y"/>
+
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.pools_length" value="2"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.pools[0].key-name" value="`$tmp.level1-key-name`"/>
+ <parameter name="eipam-ip-block.pools[0].key-value" value="`$tmp.level1-key-value`"/>
+
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.pools[1].key-name" value="`$tmp.level2-key-name`"/>
+ <parameter name="eipam-ip-block.pools[1].key-value" value="`$tmp.level2-key-value`"/></set><switch test="`$eipam-ip-block.subnet-size-override`"><outcome value=''>
+<block atomic='true'><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-allocate-network-role-subnet"/>
+<parameter name="field4" value="`$network-model.eipam-v6-address-plan`"/>
+<parameter name="field5" value="`$tmp.level2-key-value`"/>
+<parameter name="field6" value="Level 2 subnet override not set, default to network model value."/>
+
+</record><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.subnet-size-override" value="`$network-model.ipv6-cidr-mask`" />
+</set></block></outcome></switch><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="allocateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating V4 subnet in EIPAM." />
+ </return></outcome></execute><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS WHERE plan_name = $network-model.eipam-v6-address-plan and level = 2 and parent_pool = $tmp.level1-key-value AND key_value = $tmp.level2-key-value ; "
+ pfx='pfx.eipam-pool-row'>
+
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V6 subnet in EIPAM." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while looking for entry in EIPAM_IP_POOLS for V6 subnet in EIPAM." />
+ </return></outcome></get-resource><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNETS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ service_type = $tmp.service-type ,
+ ip_address = $eipam-ip-block.ip-prefix ,
+ prefix_length = $eipam-ip-block.mask ,
+ plan_name = $network-model.eipam-v6-address-plan ,
+ status = 'ALLOCATED' ,
+ pool_id = $pfx.eipam-pool-row.pool-id ,
+ address_family = $network-model.ipv6-ip-version ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v6subnet-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ; "
+ force='true'
+ pfx='pfx.eipam-v6subnet-key-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level2-key-name ,
+ key_value = $tmp.level2-key-value ,
+ level = 2 ; "
+ force='true'
+ pfx='pfx.eipam-v6subnet-key-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />
+</return></outcome><outcome value='success'>
+</outcome></save><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-allocate-network-role-subnet"/>
+<parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+<parameter name="field5" value="`$tmp.level1-key-value`"/>
+
+<!-- Level 2 -->
+ <parameter name="field6" value="NETWORK_ROLE_NETWORK_ID"/>
+ <parameter name="field7" value="`$tmp.level2-key-value`"/>
+<parameter name="field8" value="Level 2 subnet saved to DB."/></record></block></outcome><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome></switch></block></outcome><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.allocate-version for appropriate EIPAM request." />
+ </return></outcome></switch><return status='success'>
+ <parameter name="error-code" value="200" />
+</return></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml
new file mode 100755
index 00000000..fd63eb91
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml
@@ -0,0 +1,397 @@
+<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='eipam-create-network-role-pool' mode='sync'>
+<block atomic='true'><set>
+ <parameter name="tmp.eipam-error" value="false" />
+ <parameter name="tmp.create-v4-pool-flag" value="N" />
+ <parameter name="tmp.create-v6-pool-flag" value="N" />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ <parameter name="eipam-pool.v4.pre-existing" value="false"/>
+ <parameter name="eipam-pool.v6.pre-existing" value="false"/>
+ <parameter name="tmp.v4-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v4-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+ <parameter name="tmp.v6-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" /></set><switch test="`$tmp.region`"><outcome value="USA"><set>
+ <parameter name="tmp.region" value="US" />
+</set></outcome></switch><switch test="`$network-model.use-ipv4`"><outcome value='Y'><block atomic='true'><switch test="`$eipam-ip-block.level`"><outcome value='1'><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * FROM EIPAM_IP_POOLS where plan_name = $network-model.eipam-v4-address-plan and level = 1 and key_value = $tmp.level1-key-value ;"
+ pfx='tmp.eipam-pool-row'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_POOLS failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+<parameter name="field5" value="`$tmp.level1-key-value`"/>
+<parameter name="field6" value="Level 1 already exists, SKIP."/>
+<parameter name="field7" value="`$tmp.eipam-pool-row.pool-id`"/>
+</record><set>
+ <parameter name="eipam-pool.v4.pre-existing" value="true"/>
+</set></block></outcome><outcome value="not-found"><block atomic='true'><switch test="`$network-model.eipam-v4-address-plan`"><outcome value="AIC_ATM_UNPROTECTED_V4"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_UNPROTECTED_V4"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="tmp.qip-pool" value="`'DP-U ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_PRIVATE_V4"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="tmp.qip-pool" value="`'DP-Private ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_ATM_PROTECTED_V4"><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_PROTECTED_V4"><set>
+ <parameter name="tmp.qip-pool" value="`'DP-P ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_AIM_LANDING_NETWORK_V4"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V4 ' + $tmp.region`"/>
+ <parameter name="tmp.v4-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v4-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value='Other'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return></outcome></switch><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v4-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v4-pool-flag" value="Y" />
+ <parameter name="tmp.v4-qip-pool" value="`$tmp.qip-pool`" /></set><switch test="`$eipam-ip-block.level`"><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome><outcome value='2'><set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v4-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/></set></outcome><outcome value='Other'></outcome></switch><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+<parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+<parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+<parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+<parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+</record><set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" /></set></block></outcome></get-resource></outcome><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome><outcome value='2'><block atomic='true'><switch test="`$network-model.eipam-v4-address-plan`"><outcome value="AIC_ATM_UNPROTECTED_V4"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_UNPROTECTED_V4"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="tmp.qip-pool" value="`'DP-U ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_PRIVATE_V4"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="tmp.qip-pool" value="`'DP-Private ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_ATM_PROTECTED_V4"><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_PROTECTED_V4"><set>
+ <parameter name="tmp.qip-pool" value="`'DP-P ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_AIM_LANDING_NETWORK_V4"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V4 ' + $tmp.region`"/>
+ <parameter name="tmp.v4-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v4-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value='Other'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return></outcome></switch><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v4-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v4-pool-flag" value="Y" />
+ <parameter name="tmp.v4-qip-pool" value="`$tmp.qip-pool`" /></set><switch test="`$eipam-ip-block.level`"><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome><outcome value='2'><set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v4-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/></set></outcome><outcome value='Other'></outcome></switch><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+<parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+<parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+<parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+<parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+</record><set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" /></set></block></outcome></switch></block></outcome><outcome value=""></outcome><outcome value='N'></outcome></switch><switch test="`$network-model.use-ipv6`"><outcome value='Y'><block atomic='true'><switch test="`$eipam-ip-block.level`"><outcome value='1'><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * FROM EIPAM_IP_POOLS where plan_name = $network-model.eipam-v6-address-plan and level = 1 and key_value = $tmp.level1-key-value ;"
+ pfx='tmp.eipam-pool-row'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_POOLS failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$network-model.eipam-v6-address-plan`"/>
+<parameter name="field5" value="`$tmp.level1-key-value`"/>
+<parameter name="field6" value="Level 1 already exists, SKIP."/>
+<parameter name="field7" value="`$tmp.eipam-pool-row.pool-id`"/></record><set>
+ <parameter name="eipam-pool.v6.pre-existing" value="true"/>
+</set></block></outcome><outcome value="not-found"><block atomic='true'><switch test="`$network-model.eipam-v6-address-plan`"><outcome value="AIC_ATM_UNPROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U-V6 ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_AIM_LANDING_NETWORK_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V6 ' + $tmp.region`"/>
+
+</set></outcome><outcome value="AIC_ATM_PROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P-V6 ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_UNPROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-U-V6 ' + $tmp.region`"/>
+ <parameter name="tmp.v6-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value="AIC_DATA_PLANE_PRIVATE_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-PRIVATE-V6 ' + $tmp.region`"/>
+ <parameter name="tmp.v6-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value="AIC_DATA_PLANE_PROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-P-V6 ' + $tmp.region`"/>
+ <parameter name="tmp.v6-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value='Other'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return></outcome></switch><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v6-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v6-pool-flag" value="Y" />
+ <parameter name="tmp.v6-qip-pool" value="`$tmp.qip-pool`" /></set><switch test="`$eipam-ip-block.level`"><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome><outcome value='2'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v6-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/></set></outcome><outcome value='Other'></outcome></switch><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+<parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+<parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+<parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+<parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+</record><set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" /></set></block></outcome></get-resource></outcome><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome><outcome value='2'><block atomic='true'><switch test="`$network-model.eipam-v6-address-plan`"><outcome value="AIC_ATM_UNPROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U-V6 ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_AIM_LANDING_NETWORK_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V6 ' + $tmp.region`"/>
+
+</set></outcome><outcome value="AIC_ATM_PROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P-V6 ' + $tmp.region`"/>
+</set></outcome><outcome value="AIC_DATA_PLANE_UNPROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-U-V6 ' + $tmp.region`"/>
+ <parameter name="tmp.v6-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value="AIC_DATA_PLANE_PRIVATE_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-PRIVATE-V6 ' + $tmp.region`"/>
+ <parameter name="tmp.v6-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value="AIC_DATA_PLANE_PROTECTED_V6"><set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-P-V6 ' + $tmp.region`"/>
+ <parameter name="tmp.v6-level1-key-name" value="CLLI:CLOUD_REGION" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+</set></outcome><outcome value='Other'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return></outcome></switch><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v6-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v6-pool-flag" value="Y" />
+ <parameter name="tmp.v6-qip-pool" value="`$tmp.qip-pool`" /></set><switch test="`$eipam-ip-block.level`"><outcome value=''><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return></outcome><outcome value='2'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v6-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/></set></outcome><outcome value='Other'></outcome></switch><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+<parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+<parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+<parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+<parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+</record><set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" /></set></block></outcome></switch></block></outcome><outcome value=""></outcome><outcome value='N'></outcome></switch><switch test="`$tmp.create-v4-pool-flag`"><outcome value='Y'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="createPool">
+<outcome value='success'>
+</outcome><outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while creating pool in EIPAM." />
+ </return></outcome></execute></outcome><outcome value='N'><switch test="`$tmp.create-v6-pool-flag`"><outcome value='Y'><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="createPool">
+<outcome value='success'>
+</outcome><outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while creating pool in EIPAM." />
+ </return></outcome></execute></outcome><outcome value='N'></outcome></switch></outcome></switch><switch test="`$network-model.use-ipv4`"><outcome value='Y'><block atomic='true'><switch test="`$tmp.create-v4-pool-flag`"><outcome value='Y'><block atomic='true'><switch test="`$eipam-ip-block.level`"><outcome value='1'><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v4-level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ,
+ plan_name = $network-model.eipam-v4-address-plan ,
+ address_family = $network-model.ipv4-ip-version ,
+ parent_pool = $tmp.v4-qip-pool ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v4pool-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+</return></outcome><outcome value='Other'></outcome><outcome value='Other'></outcome></save></outcome><outcome value='2'><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v4-level2-key-name ,
+ key_value = $tmp.level2-key-value ,
+ level = 2 ,
+ plan_name = $network-model.eipam-v4-address-plan ,
+ address_family = $network-model.ipv4-ip-version ,
+ parent_pool = $tmp.level1-key-value ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v4pool-row'>
+<outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+</return></outcome><outcome value='Other'></outcome><outcome value='Other'></outcome></save></outcome></switch><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+<parameter name="field5" value="`$tmp.v4-level1-key-name`"/>
+<parameter name="field6" value="`$tmp.level1-key-value`"/>
+<parameter name="field7" value="`$tmp.v4-level2-key-name`"/>
+<parameter name="field8" value="`$tmp.level2-key-value`"/>
+<parameter name="field9" value="`$network-model.network-role`"/>
+<parameter name="field10" value="`$tmp.network-id`"/>
+<parameter name="field11" value="Saving to EIPAM_IP_POOLS table."/>
+</record></block></outcome><outcome value='N'></outcome></switch></block></outcome><outcome value=""></outcome><outcome value='N'></outcome></switch><switch test="`$network-model.use-ipv6`"><outcome value='Y'><block atomic='true'><switch test="`$tmp.create-v6-pool-flag`"><outcome value='Y'><block atomic='true'><switch test="`$eipam-ip-block.level`"><outcome value='1'><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v6-level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ,
+ plan_name = $network-model.eipam-v6-address-plan ,
+ address_family = $network-model.ipv6-ip-version ,
+ parent_pool = $tmp.v6-qip-pool ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v6pool-row'>
+<outcome value='Other'></outcome><outcome value='Other'></outcome><outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+</return></outcome></save></outcome><outcome value='2'><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v6-level2-key-name ,
+ key_value = $tmp.level2-key-value ,
+ level = 2 ,
+ plan_name = $network-model.eipam-v6-address-plan ,
+ address_family = $network-model.ipv6-ip-version ,
+ parent_pool = $tmp.level1-key-value ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v6pool-row'>
+<outcome value='Other'></outcome><outcome value='Other'></outcome><outcome value='failure'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+</return></outcome></save></outcome></switch><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="eipam-create-network-role-pool"/>
+<parameter name="field4" value="`$network-model.eipam-v6-address-plan`"/>
+<parameter name="field5" value="`$tmp.v6-level1-key-name`"/>
+<parameter name="field6" value="`$tmp.level1-key-value`"/>
+<parameter name="field7" value="`$tmp.v6-level2-key-name`"/>
+<parameter name="field8" value="`$tmp.level2-key-value`"/>
+<parameter name="field9" value="`$network-model.network-role`"/>
+<parameter name="field10" value="`$tmp.network-id`"/>
+<parameter name="field11" value="Saving to EIPAM_IP_POOLS table."/>
+</record></block></outcome><outcome value='N'></outcome></switch></block></outcome><outcome value=""></outcome><outcome value='N'></outcome></switch><return status='success'>
+ <parameter name="error-code" value="200" />
+</return></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-l3network-network-id.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-l3network-network-id.xml
new file mode 100755
index 00000000..fbf20b2c
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-l3network-network-id.xml
@@ -0,0 +1,27 @@
+<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="generate-l3network-network-id" mode="sync"><block atomic="true"><set>
+ <parameter name="tmp.local-variables.generate-l3network-network-id." value="" />
+ <parameter name="tmp.return.generate-l3network-network-id." value="" /></set><execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-l3network-network-id.uuid" /><outcome value='failure'>
+<return status='failure'>
+ <!-- Used to work around execute node bug -->
+ <parameter name="execute_failure" value="false" />
+
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="An error occured while generating a UUID for L3-NETWORK." /></return></outcome></execute><for atomic="true" index="n" start="0" end="1" ><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
+ local-only="false"
+ pfx="tmp.local-variables.generate-l3network-network-id.L3NETWORK" ><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="tmp.local-variables.generate-l3network-network-id.is-unique" value="0" /></set><execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-l3network-network-id.uuid" /><outcome value='failure'>
+<return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="An error occured while generating a UUID for L3-NETWORK." /></return></outcome></execute></block></outcome><outcome value='not-found'>
+<block></block></outcome><outcome value='failure'>
+<return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="`'An error occured while checking if a generated l3network-network-id was unique. network-id = ' + $tmp.local-variables.generate-l3network-network-id.uuid`" /></return></outcome><outcome value="Other"><return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-l3network-network-id" value="`'An error occured while checking if a generated l3network-network-id was unique. network-id = ' + $tmp.local-variables.generate-l3network-network-id.uuid`" /></return></outcome></get-resource></for><set>
+ <parameter name="tmp.local-variables.generate-l3network-network-id." value="" /></set></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-panorama-name.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-panorama-name.xml
new file mode 100755
index 00000000..dde17098
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-panorama-name.xml
@@ -0,0 +1,97 @@
+<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='generate-panorama-name' mode='sync'>
+<block atomic="true"><set>
+<parameter name='tmp.trust-sz' value='$TenantOAMNetworkRole_$LandingNetworkRole_T' />
+<parameter name='tmp.untrust-sz' value='$TenantOAMNetworkRole_$LandingNetworkRole_U' />
+</set><set>
+<parameter name='original-name' value='`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value="`$original-name`" />
+ <parameter name="regex" value="\."/>
+ <parameter name="limit" value="2" />
+ <parameter name="ctx_memory_result_key" value="splits" />
+
+</execute><switch test='`$splits_length`'>
+<outcome value='1'>
+<set>
+<parameter name='new-name' value='`$splits[0]`' />
+</set></outcome><outcome value='2'>
+<set>
+<parameter name='new-name' value='`$splits[1]`' />
+</set></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Unexpected network role used for panorama naming' />
+</return></outcome></switch><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='getLength' >
+ <parameter name="source" value="`$new-name`" />
+ <parameter name="outputPath" value="tmp.strlen"/>
+
+</execute><switch test='`$tmp.strlen > 14`'>
+<outcome value='true'>
+<block atomic="true"><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring' >
+ <parameter name="string" value="`$new-name`" />
+ <parameter name="result" value="new-name"/>
+ <parameter name="begin-index" value="0" />
+ <parameter name="end-index" value="14" />
+
+</execute></block></outcome><outcome value='false'>
+<block atomic="true"><set>
+<parameter name='new-name' value='`$new-name`' />
+</set></block></outcome></switch><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.trust-sz`"/>
+ <parameter name="outputPath" value="tmp.trust-sz"/>
+ <parameter name="target" value="$TenantOAMNetworkRole"/>
+ <parameter name="replacement" value="`$new-name`"/>
+
+</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.untrust-sz`"/>
+ <parameter name="outputPath" value="tmp.untrust-sz"/>
+ <parameter name="target" value="$TenantOAMNetworkRole"/>
+ <parameter name="replacement" value="`$new-name`"/>
+
+</execute><set>
+<parameter name='original-name' value='`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value="`$original-name`" />
+ <parameter name="regex" value="\."/>
+ <parameter name="limit" value="2" />
+ <parameter name="ctx_memory_result_key" value="splits" />
+
+</execute><switch test='`$splits_length`'>
+<outcome value='1'>
+<set>
+<parameter name='new-name' value='`$splits[0]`' />
+</set></outcome><outcome value='2'>
+<set>
+<parameter name='new-name' value='`$splits[1]`' />
+</set></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Unexpected network role used for panorama naming' />
+</return></outcome></switch><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='getLength' >
+ <parameter name="source" value="`$new-name`" />
+ <parameter name="outputPath" value="tmp.strlen"/>
+
+</execute><switch test='`$tmp.strlen > 14`'>
+<outcome value='true'>
+<block atomic="true"><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring' >
+ <parameter name="string" value="`$new-name`" />
+ <parameter name="result" value="new-name"/>
+ <parameter name="begin-index" value="0" />
+ <parameter name="end-index" value="14" />
+
+</execute></block></outcome><outcome value='false'>
+<block atomic="true"><set>
+<parameter name='new-name' value='`$new-name`' />
+</set></block></outcome></switch><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.trust-sz`"/>
+ <parameter name="outputPath" value="tmp.trust-sz"/>
+ <parameter name="target" value="$LandingNetworkRole"/>
+ <parameter name="replacement" value="`$new-name`"/>
+
+</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.untrust-sz`"/>
+ <parameter name="outputPath" value="tmp.untrust-sz"/>
+ <parameter name="target" value="$LandingNetworkRole"/>
+ <parameter name="replacement" value="`$new-name`"/>
+
+</execute></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-unique-name.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-unique-name.xml
new file mode 100755
index 00000000..b00bc79a
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_generate-unique-name.xml
@@ -0,0 +1,268 @@
+<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='generate-unique-name' mode='sync'>
+<block atomic="true"><set>
+<parameter name='generate-unique-name-output.error-message' value='' />
+<parameter name='generate-unique-name-output.generated-name' value='' />
+</set><switch test='`$generate-unique-name-input.supplied-name`'>
+<outcome value='Other'>
+<block atomic="true"><switch test='`$generate-unique-name-input.name-table-type`'>
+<outcome value=''><return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.name-table-type not supplied' />
+</return></outcome></switch><set>
+<parameter name='tmp.gun.sql' value="`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'
++ ' AND name = $generate-unique-name-input.supplied-name'`" />
+</set><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='tmp.gun.namedb'>
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value="`'Error reading the ' + $generate-unique-name-input.name-table-index + ' table'`" />
+
+</return></outcome><outcome value='not-found'>
+<block atomic="true"><set>
+<parameter name='tmp.gun.sql' value="`'insert into GENERIC_RESOURCE_NAME values ( '
++ ' $generate-unique-name-input.name-table-type , $generate-unique-name-input.supplied-name )'`" />
+
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+<parameter name="generate-unique-name-output.error-message" value="Failed insert into GENERIC_RESOURCE_NAME table" />
+</return></outcome></save></block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value="`'The name ' + $generate-unique-name-input.supplied-name + ' has already been used'`" />
+
+</return></outcome></get-resource></block></outcome><outcome value=''><block atomic="true"><switch test='`$generate-unique-name-input.index-table-name`'>
+<outcome value=''><return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.index-table-name not supplied' />
+</return></outcome></switch><switch test='`$generate-unique-name-input.index-table-prefix-column`'>
+<outcome value=''><return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.index-table-prefix-column not supplied' />
+</return></outcome></switch><switch test='`$generate-unique-name-input.name-table-type`'>
+<outcome value=''><return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.name-table-type not supplied' />
+</return></outcome></switch><switch test='`$generate-unique-name-input.prefix`'>
+<outcome value=''><return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.prefix not supplied' />
+</return></outcome></switch><switch test='`$generate-unique-name-input.index-length`'>
+<outcome value=''><set>
+<parameter name='tmp.gun.list-end' value='10000' />
+</set></outcome><outcome value='1'>
+<set>
+<parameter name='tmp.gun.list-end' value='10' />
+</set></outcome><outcome value='2'>
+<set>
+<parameter name='tmp.gun.list-end' value='100' />
+</set></outcome><outcome value='3'>
+<set>
+<parameter name='tmp.gun.list-end' value='1000' />
+</set></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.prefix not supplied' />
+</return></outcome></switch><set>
+<parameter name='tmp.gun.sql' value="`'SELECT * from ' + $generate-unique-name-input.index-table-name
++ ' WHERE ' + $generate-unique-name-input.index-table-prefix-column + ' = '
++ '$generate-unique-name-input.prefix'`" />
+</set><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='tmp.gun.prefixdb'>
+
+<outcome value='success'>
+<block>
+<set>
+<parameter name='tmp.gun.index-exists' value='true' />
+</set><set>
+<parameter name='tmp.gun.index-number' value='`$tmp.gun.prefixdb.index-number + 1`' />
+</set></block></outcome><outcome value='not-found'>
+<block>
+<set>
+<parameter name='tmp.gun.index-exists' value='false' />
+</set><set>
+<parameter name='tmp.gun.index-number' value='1' />
+</set></block></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="`'Error reading the ' + $generate-unique-name-input.index-table-name + ' table'`" />
+</return></outcome></get-resource><set>
+<parameter name='tmp.gun.found-flag' value='false' />
+</set><block>
+<for index='tmp.gun.idx' start='`$tmp.gun.index-number`' end='`$tmp.gun.list-end`' >
+<block atomic="true"><switch test='`$generate-unique-name-input.index-length`'>
+<outcome value=''><set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome><outcome value='1'>
+<set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome><outcome value='2'>
+<switch test='`$tmp.gun.idx &lt; 10`'>
+<outcome value='true'>
+<set>
+<parameter name='tmp.gun.index-string' value="`'' + '0' + $tmp.gun.idx`" />
+</set></outcome><outcome value='false'>
+<set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome></switch></outcome><outcome value='3'>
+<switch test='`$tmp.gun.idx &lt; 10`'>
+<outcome value='true'>
+<set>
+<parameter name='tmp.gun.index-string' value="`'' + '00' + $tmp.gun.idx`" />
+</set></outcome><outcome value='false'>
+<switch test='`$tmp.gun.idx &lt; 100`'>
+<outcome value='true'>
+<set>
+<parameter name='tmp.gun.index-string' value="`'' + '0' + $tmp.gun.idx`" />
+</set></outcome><outcome value='false'>
+<set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome></switch></outcome></switch></outcome></switch><set>
+<parameter name='tmp.gun.generated-name' value='`$generate-unique-name-input.prefix + $tmp.gun.index-string`' />
+</set><set>
+<parameter name='tmp.gun.sql' value="`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'
++ ' AND name = $tmp.gun.generated-name'`" />
+</set><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='tmp.gun.namedb'>
+
+<outcome value='failure'>
+<block atomic="true"><set>
+<parameter name='generate-unique-name-output.error-message' value="`'Error reading the GENERIC_RESOURCE_NAME table'`" />
+</set><return status='failure'>
+</return></block></outcome><outcome value='not-found'>
+<block atomic="true"><set>
+<parameter name='tmp.gun.found-flag' value='true' />
+</set><return status='failure'>
+</return></block></outcome></get-resource></block></for><return status='success'>
+
+</return></block><switch test='`$generate-unique-name-output.error-message`'>
+<outcome value=''><block>
+</block></outcome><outcome value='Other'>
+<return status='failure'>
+</return></outcome></switch><switch test='`$tmp.gun.found-flag`'>
+<outcome value='true'><block atomic="true"><set>
+<parameter name='generate-unique-name-output.generated-name' value='`$tmp.gun.generated-name`' />
+</set><switch test='`$tmp.gun.index-exists`'>
+<outcome value='true'>
+<block atomic="true"><set>
+<parameter name='tmp.gun.sql' value="`'update ' + $generate-unique-name-input.index-table-name
++ ' set index_number = ' + $tmp.gun.index-string + ' where '
++ $generate-unique-name-input.index-table-prefix-column
++ ' = $generate-unique-name-input.prefix'`" />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="`'Failed to update ' + $generate-unique-name-input.index-table-name + ' table'`" />
+</return></outcome></save></block></outcome><outcome value='false'>
+<block atomic="true"><set>
+<parameter name='tmp.gun.sql' value="`'insert into ' + $generate-unique-name-input.index-table-name
++ '(' + $generate-unique-name-input.index-table-prefix-column + ', index_number) values ('
++ ' $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ')'`" />
+
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="`'Failed to insert record into ' + $generate-unique-name-input.index-table-name + ' table'`" />
+</return></outcome></save></block></outcome></switch><set>
+<parameter name='tmp.gun.sql' value="`'insert into GENERIC_RESOURCE_NAME values ( '
++ ' $generate-unique-name-input.name-table-type , $tmp.gun.generated-name )'`" />
+
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="Failed insert into GENERIC_RESOURCE_NAME table" />
+</return></outcome></save><return status='success'>
+</return></block></outcome><outcome value='false'>
+<block atomic="true"><switch test='`$generate-unique-name-input.index-length`'>
+<outcome value=''><return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="We have exhausted the naming index count" />
+</return></outcome></switch><block>
+<for index='tmp.gun.idx' start='1' end='`$tmp.gun.index-number`' >
+<block atomic="true"><switch test='`$generate-unique-name-input.index-length`'>
+<outcome value=''><set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome><outcome value='1'>
+<set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome><outcome value='2'>
+<switch test='`$tmp.gun.idx &lt; 10`'>
+<outcome value='true'>
+<set>
+<parameter name='tmp.gun.index-string' value="`'' + '0' + $tmp.gun.idx`" />
+</set></outcome><outcome value='false'>
+<set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome></switch></outcome><outcome value='3'>
+<switch test='`$tmp.gun.idx &lt; 10`'>
+<outcome value='true'>
+<set>
+<parameter name='tmp.gun.index-string' value="`'' + '00' + $tmp.gun.idx`" />
+</set></outcome><outcome value='false'>
+<switch test='`$tmp.gun.idx &lt; 100`'>
+<outcome value='true'>
+<set>
+<parameter name='tmp.gun.index-string' value="`'' + '0' + $tmp.gun.idx`" />
+</set></outcome><outcome value='false'>
+<set>
+<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />
+</set></outcome></switch></outcome></switch></outcome></switch><set>
+<parameter name='tmp.gun.generated-name' value='`$generate-unique-name-input.prefix + $tmp.gun.index-string`' />
+</set><set>
+<parameter name='tmp.gun.namedb.name' value='' />
+</set><set>
+<parameter name='tmp.gun.sql' value="`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'
++ ' AND name = $tmp.gun.generated-name'`" />
+</set><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='tmp.gun.namedb'>
+
+<outcome value='failure'>
+<block atomic="true"><set>
+<parameter name='generate-unique-name-output.error-message' value="Error reading the GENERIC_RESOURCE_NAME table" />
+</set><return status='failure'>
+</return></block></outcome><outcome value='not-found'>
+<block atomic="true"><set>
+<parameter name='tmp.gun.found-flag' value='true' />
+</set><return status='failure'>
+</return></block></outcome></get-resource></block></for><return status='success'>
+
+</return></block><switch test='`$generate-unique-name-output.error-message`'>
+<outcome value=''><block>
+</block></outcome><outcome value='Other'>
+<return status='failure'>
+</return></outcome></switch><switch test='`$tmp.gun.found-flag`'>
+<outcome value='true'><block atomic="true"><set>
+<parameter name='generate-unique-name-output.generated-name' value='`$tmp.gun.generated-name`' />
+</set><switch test='`$tmp.gun.index-exists`'>
+<outcome value='true'>
+<block atomic="true"><set>
+<parameter name='tmp.gun.sql' value="`'update ' + $generate-unique-name-input.index-table-name
++ ' set index_number = ' + $tmp.gun.index-string + ' where '
++ $generate-unique-name-input.index-table-prefix-column
++ ' = $generate-unique-name-input.prefix'`" />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="`'Failed to update ' + $generate-unique-name-input.index-table-name + ' table'`" />
+</return></outcome></save></block></outcome><outcome value='false'>
+<block atomic="true"><set>
+<parameter name='tmp.gun.sql' value="`'insert into ' + $generate-unique-name-input.index-table-name
++ '(' + $generate-unique-name-input.index-table-prefix-column + ', index_number) values ('
++ ' $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ')'`" />
+
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="`'Failed to insert record into ' + $generate-unique-name-input.index-table-name + ' table'`" />
+</return></outcome></save></block></outcome></switch><set>
+<parameter name='tmp.gun.sql' value="`'insert into GENERIC_RESOURCE_NAME values ( '
++ ' $generate-unique-name-input.name-table-type , $tmp.gun.generated-name )'`" />
+
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.gun.sql`" pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="Failed insert into GENERIC_RESOURCE_NAME table" />
+</return></outcome></save><return status='success'>
+
+</return></block></outcome></switch><return status='failure'>
+ <parameter name="generate-unique-name-output.error-message" value="We have exhausted the naming index count" />
+</return></block></outcome></switch></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-activate.xml
new file mode 100755
index 00000000..9bef4ee9
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-activate.xml
@@ -0,0 +1,100 @@
+<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='network-topology-operation-activate' mode='sync'>
+<block atomic="true"><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-information.network-id"
+ local-only="false"
+ pfx="aai.l3-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="network-id not found in AAI" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + 'from AnAI'" /></return></outcome></get-resource><switch test='`$aai.l3-network.subnets.subnet_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="no networks found" />
+</return></outcome><outcome value='Other'>
+<for index='sidx' start='0' end='`$aai.l3-network.subnets.subnet_length`' >
+<block atomic="true"><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS where entity_id = $aai.l3-network.subnets.subnet[$sidx].subnet-id ; "
+ pfx='tmp.eipam-subnet-row'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNETS failed to find subnet matching aai subnet." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Subnet not found in EIPAM_IP_SUBNETS - activate failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="eipam-ip-block.entity-id" value="`$aai.l3-network.subnets.subnet[$sidx].subnet-id`"/>
+ <parameter name="eipam-ip-block.plans[0].plan-name" value="`$tmp.eipam-subnet-row.plan-name`"/>
+</set><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="activateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while activating subnet in EIPAM." />
+ </return></outcome></execute><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="UPDATE EIPAM_IP_SUBNETS
+ SET status = 'ACTIVE'
+ WHERE entity_id = $eipam-ip-block.entity-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to active in mysql." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to active in mysql." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $aai.l3-network.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id" >
+<parameter name="orchestration-status" value="Created" />
+ <outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for subnet." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for subnet. Subnet not found." />
+ </return></outcome></update></block></outcome></save></block></outcome></get-resource></block></for></outcome></switch><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $aai.l3-network.network-id" >
+<parameter name="orchestration-status" value="Active" /> <outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for l3-network" />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for l3-network. Network not found." />
+ </return></outcome></update><set>
+<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />
+<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />
+</set><set>
+<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />
+</set><set>
+<parameter name='network-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $network-topology-operation-input.service-information.service-instance-id
+ + '/service-data/networks/network/'
+ + $networkId
+ + '/network-data/network-topology/'` " />
+
+</set><set>
+<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status' value='Created' />
+<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml
new file mode 100755
index 00000000..2fd8e9f4
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml
@@ -0,0 +1,779 @@
+<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-assign' mode='sync'>
+<block atomic="true"><switch test='`$network-model.is-bound-to-vpn`'>
+<outcome value='Y'>
+<block atomic="true">
+<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VPN_BINDINGS WHERE network_customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid'
+ pfx='vpn-bindings[]'>
+
+<outcome value='success'>
+<block atomic="true"><set>
+<parameter name='hasVpnBindings' value='true' />
+</set><for index='vidx' start='0' end='`$vpn-bindings_length`' >
+<block atomic="true"><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.vpn-id = $vpn-bindings[$vidx].binding-uuid"
+ pfx='aai.vpnBinding' local-only='false' >
+
+<outcome value='success'>
+<block>
+</block></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="`'No vpn binding found for network-model.vpn-binding='
+ + $vpn-bindings[$vidx].binding-uuid`" />
+
+</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="`'No vpn binding found for network-model.vpn-binding='
+ + $vpn-bindings[$vidx].binding-uuid`" />
+
+</return></outcome></get-resource></block></for></block></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="Network model is_bound_to_vpn=true but no vpn_binding is present" />
+
+</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="Unexpected error retrieving vpn binding" />
+
+</return></outcome></get-resource></block></outcome></switch><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tenant"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND
+ tenant.tenant-id = $network-topology-operation-input.network-request-input.tenant"
+ pfx='aai.tenant' local-only='false' >
+
+<outcome value='success'>
+<block atomic="true"></block></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="Tenant not found in AAI" />
+
+</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="Tenant not found in AAI" />
+
+</return></outcome></get-resource><switch test='`$network-topology-operation-input.network-request-input.network-name`'>
+<outcome value=''>
+<block atomic="true"><switch test='`$network-model.ecomp-generated-naming`'>
+<outcome value='Y'>
+<block atomic="true">
+<switch test='`$network-model.naming-policy`'>
+<outcome value='org.openecomp.policy.naming.ViprProtectedOam.ViprOamProtectedNetwork'>
+<block atomic="true"><set>
+<parameter name='tmp.network-name-prefix' value='$TenantName_int_$role_net' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$TenantName"/>
+ <parameter name="replacement" value="`$aai.tenant.tenant-name`"/>
+
+</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$role"/>
+ <parameter name="replacement" value="`$network-model.network-role`"/>
+
+</execute><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix
+ = $tmp.network-name-prefix'
+ pfx='db.network-name-prefix'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading the NETWORK_INSTANCE_NAME_INDEX table" />
+</return></outcome></get-resource><switch test='`$db.network-name-prefix.index-number`'>
+<outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="update NETWORK_INSTANCE_NAME_INDEX
+ set index_number = $tmp.index-number
+ where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix "
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to update SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome><outcome value=''><block atomic="true"><set>
+<parameter name='tmp.index-number' value='1' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)"
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome></switch><set>
+<parameter name='tmp.network-instance-name' value="`$tmp.network-name-prefix + '_' + $tmp.index-number`" />
+</set></block></outcome><outcome value='oam_vipr_protected_network'>
+<block atomic="true"><set>
+<parameter name='tmp.network-name-prefix' value='$TenantName_int_$role_net' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$TenantName"/>
+ <parameter name="replacement" value="`$aai.tenant.tenant-name`"/>
+
+</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$role"/>
+ <parameter name="replacement" value="`$network-model.network-role`"/>
+
+</execute><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix
+ = $tmp.network-name-prefix'
+ pfx='db.network-name-prefix'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading the NETWORK_INSTANCE_NAME_INDEX table" />
+</return></outcome></get-resource><switch test='`$db.network-name-prefix.index-number`'>
+<outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="update NETWORK_INSTANCE_NAME_INDEX
+ set index_number = $tmp.index-number
+ where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix "
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to update SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome><outcome value=''><block atomic="true"><set>
+<parameter name='tmp.index-number' value='1' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)"
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome></switch><set>
+<parameter name='tmp.network-instance-name' value="`$tmp.network-name-prefix + '_' + $tmp.index-number`" />
+</set></block></outcome><outcome value='network_without_route_tags_naming_default'>
+<block atomic="true"><set>
+<parameter name='tmp.network-name-prefix' value='$TenantName_int_$role_net' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$TenantName"/>
+ <parameter name="replacement" value="`$aai.tenant.tenant-name`"/>
+
+</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$role"/>
+ <parameter name="replacement" value="`$network-model.network-role`"/>
+
+</execute><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix
+ = $tmp.network-name-prefix'
+ pfx='db.network-name-prefix'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading the NETWORK_INSTANCE_NAME_INDEX table" />
+</return></outcome></get-resource><switch test='`$db.network-name-prefix.index-number`'>
+<outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="update NETWORK_INSTANCE_NAME_INDEX
+ set index_number = $tmp.index-number
+ where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix "
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to update SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome><outcome value=''><block atomic="true"><set>
+<parameter name='tmp.index-number' value='1' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)"
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome></switch><set>
+<parameter name='tmp.network-instance-name' value="`$tmp.network-name-prefix + '_' + $tmp.index-number`" />
+</set></block></outcome><outcome value='org.openecomp.policy.naming.SriovProvider.SriovProviderNetwork'>
+<block atomic="true"><set>
+<parameter name='tmp.network-name-prefix' value='$TenantName_$role_net' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$TenantName"/>
+ <parameter name="replacement" value="`$aai.tenant.tenant-name`"/>
+
+</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$role"/>
+ <parameter name="replacement" value="`$network-model.network-role`"/>
+
+</execute><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix
+ = $tmp.network-name-prefix'
+ pfx='db.network-name-prefix'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading the NETWORK_INSTANCE_NAME_INDEX table" />
+</return></outcome></get-resource><switch test='`$db.network-name-prefix.index-number`'>
+<outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="update NETWORK_INSTANCE_NAME_INDEX
+ set index_number = $tmp.index-number
+ where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix "
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to update SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome><outcome value=''><block atomic="true"><set>
+<parameter name='tmp.index-number' value='1' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)"
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome></switch><set>
+<parameter name='tmp.network-instance-name' value="`$tmp.network-name-prefix + '_' + $tmp.index-number`" />
+</set></block></outcome><outcome value='sriov_provider_network'>
+<block atomic="true"><set>
+<parameter name='tmp.network-name-prefix' value='$TenantName_$role_net' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$TenantName"/>
+ <parameter name="replacement" value="`$aai.tenant.tenant-name`"/>
+
+</execute><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.network-name-prefix`"/>
+ <parameter name="outputPath" value="tmp.network-name-prefix"/>
+ <parameter name="target" value="$role"/>
+ <parameter name="replacement" value="`$network-model.network-role`"/>
+
+</execute><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix
+ = $tmp.network-name-prefix'
+ pfx='db.network-name-prefix'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading the NETWORK_INSTANCE_NAME_INDEX table" />
+</return></outcome></get-resource><switch test='`$db.network-name-prefix.index-number`'>
+<outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="update NETWORK_INSTANCE_NAME_INDEX
+ set index_number = $tmp.index-number
+ where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix "
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to update SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome><outcome value=''><block atomic="true"><set>
+<parameter name='tmp.index-number' value='1' />
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)"
+ force='false' pfx='pfx'>
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table" />
+</return></outcome></save></block></outcome></switch><set>
+<parameter name='tmp.network-instance-name' value="`$tmp.network-name-prefix + '_' + $tmp.index-number`" />
+</set></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="`'Unknown naming policy = '
+ + $network-model.naming-policy`" />
+
+</return></outcome></switch></block></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Network name is required if ecomp naming is false" />
+
+</return></outcome></switch></block></outcome><outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='tmp.network-instance-name' value="`$network-topology-operation-input.network-request-input.network-name`" />
+</set></block></outcome></switch><call module='GENERIC-RESOURCE-API' rpc='generate-l3network-network-id' mode='sync' >
+</call><set>
+<parameter name='tmp.l3-network.network-id' value="`$tmp.return.generate-l3network-network-id.uuid`" />
+<parameter name='tmp.l3-network.network-name' value="`$tmp.network-instance-name`" />
+<parameter name='tmp.l3-network.network-type' value="`$network-model.network-type`" />
+<parameter name='tmp.l3-network.network-role' value="`$network-model.network-role`" />
+<parameter name='tmp.l3-network.network-technology' value="`$network-model.network-technology`" />
+<parameter name='tmp.l3-network.is-bound-to-vpn' value="`$network-model.is-bound-to-vpn`" />
+<parameter name='tmp.l3-network.orchestration-status' value="PendingCreate" />
+<parameter name='tmp.l3-network.model-invariant-id' value="`$network-topology-operation-input.network-information.ecomp-model-information.model-invariant-uuid`" />
+<parameter name='tmp.l3-network.model-version-id' value="`$network-topology-operation-input.network-information.ecomp-model-information.model-version`" />
+<parameter name='tmp.l3-network.model-customization-id' value="`$network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid`" />
+<parameter name='tmp.l3-network.is-provider-network' value="`$network-model.is-provider-network`" />
+<parameter name='tmp.l3-network.is-shared-network' value="`$network-model.is-shared-network`" />
+<parameter name='tmp.l3-network.is-external-network' value="`$network-model.is-external-network`" />
+<parameter name='tmp.l3-network.eipam-v6-address-plan' value="`$network-model.eipam-v6-address-plan`" />
+<parameter name='tmp.l3-network.eipam-v4-address-plan' value="`$network-model.eipam-v4-address-plan`" />
+<parameter name='tmp.l3-network.service-id' value="`$service-data.service-information.service-id`" />
+<parameter name='tmp.l3-network.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $network-topology-operation-input.service-information.service-instance-id
+ + '/service-data/networks/network/'
+ + $tmp.l3-network.network-id
+ + '/network-data/network-topology/'` " />
+</set><switch test='`$network-model.is-provider-network`'>
+<outcome value='Y'>
+<set>
+<parameter name='tmp.l3-network.physical-network-name' value="`$network-model.physical-network-name`" />
+<parameter name='tmp.l3-network.is-provider-network-boolean' value='true' /></set></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.l3-network.physical-network-name' value="" />
+<parameter name='tmp.l3-network.is-provider-network-boolean' value='false' /></set></outcome></switch><switch test='`$network-model.is-shared-network`'>
+<outcome value='Y'>
+<set>
+<parameter name='tmp.l3-network.is-shared-network-boolean' value='true' /></set></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.l3-network.is-shared-network-boolean' value='false' /></set></outcome></switch><switch test='`$network-model.is-external-network`'>
+<outcome value='Y'>
+<set>
+<parameter name='tmp.l3-network.is-external-network-boolean' value='true' /></set></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.l3-network.is-external-network-boolean' value='false' /></set></outcome></switch><set>
+<parameter name='tmp.complex-found' value='false' />
+
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cloud-region"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND
+ depth = '0'"
+ pfx='aai.cloud-region' local-only='false' >
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region not found in AAI" />
+</return></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 retrieving cloud region from AAI" />
+</return></outcome></get-resource><switch test='`$aai.cloud-region.relationship-list.relationship_length`'>
+<outcome value='0'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region missing relationships in AAI" />
+</return></outcome><outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region missing relationships in AAI" />
+</return></outcome></switch><for silentFailure='false' index='ridx' start='0' end="`$aai.cloud-region.relationship-list.relationship_length`" >
+<for silentFailure='false' index='rdidx' start='0' end="`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data_length`" >
+<switch test='`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>
+<outcome value='complex.physical-location-id'>
+<block atomic="true"><set>
+<parameter name='tmp.complex-found' value='true' />
+
+</set><set>
+<parameter name='service-data.network-request-input.aic-clli' value='`$aai.complex.physical-location-id`' />
+
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="complex"
+ key="complex.physical-location-id = $aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value"
+ pfx='aai.complex' local-only='false' >
+
+
+
+<outcome value='success'>
+<block atomic="true"><switch test='`$aai.complex.region`'>
+<outcome value='USA'>
+<block>
+</block></outcome><outcome value='US'>
+<block>
+</block></outcome><outcome value='CALA'>
+<block>
+</block></outcome><outcome value='EMEA'>
+<block>
+</block></outcome><outcome value='AP'>
+<block>
+</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="Complex.region unknown" />
+</return></outcome></switch></block></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="Complex not found in AAI" />
+</return></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 retrieving complex from AAI" />
+</return></outcome></get-resource></block></outcome></switch></for></for><switch test='`$tmp.complex-found`'>
+<outcome value='false'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Complex not found in AAI" />
+</return></outcome></switch><switch test='`$network-model.network-technology`'>
+<outcome value='Contrail'>
+<block atomic="true"><switch test="`$network-model.use-ipv4`"><outcome value='Y'><block atomic='true'><switch test='`$network-model.eipam-v4-address-plan`'>
+<outcome value='AIC_ATM_UNPROTECTED_V4'><block>
+</block></outcome><outcome value='AIC_ATM_PROTECTED_V4'><block>
+</block></outcome><outcome value='AIC_AIM_LANDING_NETWORK_V4'><block>
+</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="Invalid address plan for VIPR" />
+</return></outcome></switch></block></outcome></switch><switch test="`$network-model.use-ipv6`"><outcome value='Y'><block atomic='true'><switch test='`$network-model.eipam-v6-address-plan`'>
+<outcome value='AIC_ATM_UNPROTECTED_V6'><block>
+</block></outcome><outcome value='AIC_ATM_PROTECTED_V6'><block>
+</block></outcome><outcome value='AIC_AIM_LANDING_NETWORK_V6'><block>
+</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="EIPAM V6 Address plan should be null" />
+</return></outcome></switch></block></outcome></switch></block></outcome><outcome value='AIC_SR_IOV'>
+<block atomic="true"><switch test="`$network-model.use-ipv4`"><outcome value='Y'><block atomic='true'><switch test='`$network-model.eipam-v4-address-plan`'>
+<outcome value='AIC_DATA_PLANE_UNPROTECTED_V4'><block>
+</block></outcome><outcome value='AIC_DATA_PLANE_PROTECTED_V4'><block>
+</block></outcome><outcome value='AIC_DATA_PLANE_PRIVATE_V4'><block>
+</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="Invalid address plan for SRIOV" />
+</return></outcome></switch></block></outcome></switch><switch test="`$network-model.use-ipv6`"><outcome value='Y'><block atomic='true'><switch test='`$network-model.eipam-v6-address-plan`'>
+<outcome value="AIC_ATM_UNPROTECTED_V6"><block>
+</block></outcome><outcome value="AIC_ATM_PROTECTED_V6"><block>
+</block></outcome><outcome value="AIC_DATA_PLANE_UNPROTECTED_V6"><block>
+</block></outcome><outcome value="AIC_DATA_PLANE_PRIVATE_V6"><block>
+</block></outcome><outcome value="AIC_DATA_PLANE_PROTECTED_V6"><block>
+</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="Invalid ipv6 address plan for SRIOV" />
+</return></outcome></switch></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="Invalid network-technology. Only AIC_SR_IOV and Contrail are supported" />
+</return></outcome></switch><set>
+<parameter name='tmp.process-eipam-action' value='assign' />
+</set><!--tmp.level should be set to 1--><call module='GENERIC-RESOURCE-API' rpc='process-eipam-pools' mode='sync' >
+</call><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="Values after process-eipam"/>
+<parameter name="field5" value="`level1-v4-mask`"/>
+<parameter name="field6" value="`$tmp.l3-network.level1.v4.mask`"/>
+<parameter name="field7" value="`level1-v4-ipprefix`"/>
+<parameter name="field8" value="`$tmp.l3-network.level1.v4.ip-prefix`"/>
+<parameter name="field9" value="`level1-v4-entity-id`"/>
+<parameter name="field10" value="`$tmp.l3-network.level1.v4.entity-id`"/>
+<parameter name="field11" value="`level2-v4-mask`"/>
+<parameter name="field12" value="`$tmp.l3-network.level2.v4.mask`"/>
+<parameter name="field13" value="`level2-v4-ipprefix`"/>
+<parameter name="field14" value="`$tmp.l3-network.level2.v4.ip-prefix`"/>
+<parameter name="field15" value="`level2-v4-entity-id`"/>
+<parameter name="field16" value="`$tmp.l3-network.level2.v4.entity-id`"/>
+
+
+</record><!--tmp.level should be set to 1--><call module='GENERIC-RESOURCE-API' rpc='create-l3-subnet' mode='sync' >
+</call><set>
+<parameter name='tmp.network-topology.network-topology-identifier-structure.network-id' value="`$tmp.l3-network.network-name`" />
+<parameter name='tmp.network-topology.network-topology-identifier-structure.network-name' value="`$tmp.l3-network.network-name`" />
+<parameter name='tmp.network-topology.network-topology-identifier-structure.network-type' value="`$tmp.l3-network.network-type`" />
+<parameter name='tmp.network-topology.network-topology-identifier-structure.network-role' value="`$tmp.l3-network.network-role`" />
+<parameter name='tmp.network-topology.network-topology-identifier-structure.network-technology' value="`$tmp.l3-network.network-technology`" />
+<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v4-address-plan' value="`$network-model.eipam-v4-address-plan`" />
+<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v6-address-plan' value="`$network-model.eipam-v6-address-plan`" />
+<parameter name='tmp.network-topology.region-identifier.tenant' value="`$network-topology-operation-input.network-request-input.tenant`" />
+<parameter name='tmp.network-topology.region-identifier.aic-cloud-region' value="`$network-topology-operation-input.network-request-input.aic-cloud-region`" />
+<parameter name='tmp.network-topology.region-identifier.aic-clli' value="`$network-topology-operation-input.network-request-input.aic-clli`" />
+<parameter name='tmp.network-topology.ecomp-model-information.' value="`$network-topology-operation-input.network-information.ecomp-model-information.`" />
+<parameter name='tmp.network-topology.network-parameters.' value="`$network-topology-operation-input.network-request-input.network-input-parameters.`" />
+</set><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$tmp.l3-network.network-id`" />
+<parameter name="network-name" value="`$tmp.l3-network.network-name`" />
+<parameter name="network-type" value="`$tmp.l3-network.network-type`" />
+<parameter name="network-role" value="`$tmp.l3-network.network-role`" />
+<parameter name="network-technology" value="`$tmp.l3-network.network-technology`" />
+<parameter name="is-bound-to-vpn" value="`$tmp.l3-network.is-bound-to-vpn`" />
+<parameter name="service-id" value="`$tmp.l3-network.service-id`" />
+<parameter name="tenant-id" value="`$network-topology-operation-input.network-request-information.tenant`" />
+<parameter name="orchestration-status" value="PendingCreate" />
+<parameter name="persona-model-id" value="`$tmp.l3-network.persona-model-id`" />
+<parameter name="persona-model-version" value="`$tmp.l3-network.persona-model-version`" />
+<parameter name="persona-model-customization-id" value="`$tmp.l3-network.persona-model-customization-id`" />
+<parameter name="physical-network-name" value="`$tmp.l3-network.physical-network-name`" />
+<parameter name="is-provider-network" value="`$tmp.l3-network.is-provider-network-boolean`" />
+<parameter name="is-shared-network" value="`$tmp.l3-network.is-shared-network-boolean`" />
+<parameter name="is-external-network" value="`$tmp.l3-network.is-external-network-boolean`" />
+<parameter name="selflink" value="`$tmp.l3-network.self-link`" />
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to save l3-network in AAI for network-id = ' + $tmp.l3-network.network-id`" />
+</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="`'Failed to save l3-network in AAI for network-id = ' + $tmp.l3-network.network-id`" />
+</return></outcome></save><for index='sidx' start='0' end='`$tmp.l3-network.subnet_length`' >
+<block atomic="true"><set>
+<parameter name="tmp.subnet-id" value="`$tmp.l3-network.subnet[$sidx].subnet-id`"/>
+ </set><switch test='`$tmp.l3-network.subnet[$sidx].dhcp-enabled`'>
+<outcome value='true'>
+<block atomic="true"><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.l3-network.network-id
+ AND subnet.subnet-id = $tmp.subnet-id" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$tmp.l3-network.network-id`" />
+<parameter name="subnet-id" value="`$tmp.l3-network.subnet[$sidx].subnet-id`" />
+<parameter name="subnet-name" value="`$tmp.l3-network.subnet[$sidx].subnet-name`" />
+<parameter name="gateway-address" value="`$tmp.l3-network.subnet[$sidx].gateway-address`" />
+<parameter name="network-start-address" value="`$tmp.l3-network.subnet[$sidx].network-start-address`" />
+<parameter name="cidr-mask" value="`$tmp.l3-network.subnet[$sidx].cidr-mask`" />
+<parameter name="ip-version" value="`$tmp.l3-network.subnet[$sidx].ip-version`" />
+<parameter name="dhcp-start" value="`$tmp.l3-network.subnet[$sidx].dhcp-start`" />
+<parameter name="dhcp-end" value="`$tmp.l3-network.subnet[$sidx].dhcp-end`" />
+<parameter name="dhcp-enabled" value="`$tmp.l3-network.subnet[$sidx].dhcp-enabled`" />
+<parameter name="orchestration-status" value="PendingCreate" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving subnet relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving subnet relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome></save></block></outcome><outcome value='false'>
+<block atomic="true"><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.l3-network.network-id
+ AND subnet.subnet-id = $tmp.subnet-id" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$tmp.l3-network.network-id`" />
+<parameter name="subnet-id" value="`$tmp.l3-network.subnet[$sidx].subnet-id`" />
+<parameter name="subnet-name" value="`$tmp.l3-network.subnet[$sidx].subnet-name`" />
+<parameter name="gateway-address" value="`$tmp.l3-network.subnet[$sidx].gateway-address`" />
+<parameter name="network-start-address" value="`$tmp.l3-network.subnet[$sidx].network-start-address`" />
+<parameter name="cidr-mask" value="`$tmp.l3-network.subnet[$sidx].cidr-mask`" />
+<parameter name="ip-version" value="`$tmp.l3-network.subnet[$sidx].ip-version`" />
+<parameter name="dhcp-enabled" value="`$tmp.l3-network.subnet[$sidx].dhcp-enabled`" />
+<parameter name="orchestration-status" value="PendingCreate" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving subnet relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving subnet relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome></save></block></outcome></switch></block></for><switch test='`$hasVpnBindings`'>
+<outcome value='true'>
+<block atomic="true"><for index='vidx' start='0' end='`$vpn-bindings_length`' >
+<block atomic='true'><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.l3-network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="vpn-binding" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="vpn-binding.vpn-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$vpn-bindings[$vidx].binding-uuid`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving vpn binding relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving vpn binding relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome></save></block></for></block></outcome></switch><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.l3-network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="service-instance" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="customer.global-customer-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.service-information.global-customer-id`" />
+<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="service-subscription.service-type" />
+<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$service-data.service-information.subscription-service-type`" />
+<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="service-instance.service-instance-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$service-data.service-information.service-instance-id`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving service instance relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving service instance relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome></save><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.l3-network.network-id"
+ force="true"
+ local-only="false">
+ <!-- create relationship-list -->
+ <parameter name="relationship-list.relationship[0].related-to" value="tenant" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-input.aic-cloud-region`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="tenant.tenant-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$network-topology-operation-input.network-request-input.tenant`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="cloud-region" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[1].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
+ <parameter name="relationship-list.relationship[1].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-input.aic-cloud-region`" />
+
+ <outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving tenant and cloud-region relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving tenant and cloud-region relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome></save><switch test='`$network-model.network-technology`'>
+<outcome value='AIC_SR_IOV'>
+<block atomic="true"><set>
+ <parameter name="tmp.l3-network.segmentation-id" value="1"/></set><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="segmentation-assignment"
+ key="l3-network.network-id = $tmp.l3-network.network-id
+ AND segmentation-assignment.segmentation-id = $tmp.l3-network.segmentation-id" >
+<!-- Create segmentation-assignment object -->
+<parameter name="network-id" value="`$tmp.l3-network.network-id`" />
+<parameter name="segmentation-id" value="`$tmp.l3-network.segmentation-id`" />
+<outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving segmentation-assignment for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving segmentation-assignment for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.l3-network.network-id"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-network - ' + $tmp.error-message`"/></return></block></block></outcome></save></block></outcome></switch><set>
+<parameter name='network-topology.network-topology-identifier-structure.' value='`$tmp.l3-network.`' />
+<parameter name='network-topology.tenant' value='`$network-topology-operation-input.network-request-input.tenant`' />
+<parameter name='network-topology.ecomp-model-information.' value='`$network-topology-operation-input.network-information.ecomp-model-information.`' />
+<parameter name='network-topology.network-parameters.' value='`$network-topology-operation-input.network-request-input.network-parameters.`' />
+<parameter name='network-topology.aic-cloud-region' value='`$network-topology-operation-input.network-request-input.aic-cloud-region`' /></set><switch test='`$service-data.networks.network_length`'>
+<outcome value=''>
+<set>
+<parameter name='nidx' value='0' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='nidx' value='`$service-data.networks.network_length`' />
+</set></outcome></switch><set>
+<parameter name="service-data.networks.network[$nidx].network-id" value='`$tmp.l3-network.network-id`' />
+<parameter name="service-data.networks.network[$nidx].network-data.network-topology." value='$network-topology.' />
+<parameter name="service-data.networks.network_length" value='`$nidx+1`' />
+
+</set><set>
+<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />
+<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />
+<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />
+<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />
+<parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />
+</set><set>
+<parameter name='networkId' value='`$tmp.l3-network.network-id`' />
+</set><set>
+<parameter name='network-object-path'
+ value="`$tmp.l3-network.self-link`"/>
+
+</set><set>
+<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='PendingCreate' />
+<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-deactivate.xml
new file mode 100644
index 00000000..cc4291ca
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-deactivate.xml
@@ -0,0 +1,81 @@
+<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-deactivate' mode='sync'>
+<block atomic="true"><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-information.network-id"
+ local-only="false"
+ pfx="aai.l3-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="network-id not found in AAI" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + 'from AnAI'" /></return></outcome></get-resource><switch test='`$aai.l3-network.subnets.subnet_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="no networks found" />
+</return></outcome><outcome value='Other'>
+<for index='sidx' start='0' end='`$aai.l3-network.subnets.subnet_length`' >
+<block atomic="true"><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS where entity_id = $aai.l3-network.subnets.subnet[$sidx].subnet-id ; "
+ pfx='tmp.eipam-subnet-row'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNETS failed to find subnet matching aai subnet." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Subnet not found in EIPAM_IP_SUBNETS - deactivate failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="eipam-ip-block.entity-id" value="`$aai.l3-network.subnets.subnet[$sidx].subnet-id`"/>
+ <parameter name="eipam-ip-block.plans[0].plan-name" value="$tmp.eipam-subnet-row.plan-name"/>
+</set></block></outcome></get-resource><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $aai.l3-network.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id" >
+<parameter name="orchestration-status" value="PendingDelete" />
+ <outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for subnet." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for subnet. Subnet not found." />
+ </return></outcome></update></block></for></outcome></switch><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $aai.l3-network.network-id" >
+<parameter name="orchestration-status" value="PendingDelete" />
+ <outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for l3-network" />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for l3-network. Network not found." />
+ </return></outcome></update><set>
+<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />
+<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />
+</set><set>
+<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />
+</set><set>
+<parameter name='network-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $network-topology-operation-input.service-information.service-instance-id
+ + '/service-data/networks/network/'
+ + $networkId
+ + '/network-data/network-topology/'` " />
+
+</set><set>
+<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status' value='PendingDelete' />
+<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-unassign.xml
new file mode 100755
index 00000000..25ba878f
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-unassign.xml
@@ -0,0 +1,229 @@
+<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-unassign' mode='sync'>
+<block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $service-data.networks.network[$nidx].network-data.network-information.ecomp-model-information.model-customization-uuid
+ and service_uuid = $service-data.networks.network[$nidx].network-data.service-information.ecomp-model-information.model-uuid'
+ pfx='network-model'>
+
+</get-resource><set>
+ <parameter name="tmp.level1-key-value" value=""/>
+ <parameter name="tmp.level1inuse" value="false" />
+ <parameter name="pidx" value="0" />
+ <parameter name="pidx-len" value="0" />
+
+</set><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.network_id = $network-topology-operation-input.network-information.network-id and s.entity_id = k.entity_id ; "
+ pfx='tmp.eipam-subnet-row[]'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><for silentFailure='true' index='esidx' start='0' end='`$tmp.eipam-subnet-row_length`' >
+<block atomic="true"><switch test='`$tmp.eipam-subnet-row[$esidx].level`'>
+<outcome value='1'>
+<block atomic="true"><set>
+ <parameter name="tmp.level1-key-value[$pidx]" value="`$tmp.eipam-subnet-row[$esidx].key-value`"/>
+
+
+</set><set>
+ <parameter name="tmp.plan-name[$pidx]" value="`$tmp.eipam-subnet-row[$esidx].plan-name`"/>
+
+
+</set><set>
+ <parameter name="pidx" value="`$pidx + 1`"/>
+
+
+</set><set>
+ <parameter name="pidx-len" value="`$pidx`"/>
+
+
+</set></block></outcome><outcome value='Other'>
+<block atomic="true"></block></outcome></switch></block></for></block></outcome><outcome value="not-found"><block atomic='true'></block></outcome></get-resource><set>
+ <parameter name="eipam-ip-block.network-id" value="`$network-topology-operation-input.network-information.network-id`" />
+ <parameter name="eipam-ip-block.level" value='2' />
+ <parameter name="eipam-ip-block.entity-id" value='' /></set><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deallocateAllSubnets">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while deallocating subnets in EIPAM." />
+ </return></outcome></execute><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while deleting level 2 plans in EIPAM." />
+ </return></outcome></execute><for silentFailure='true' index='npidx' start='0' end='`$pidx-len`' >
+<block atomic="true"><set>
+ <parameter name="tmp.level1-key-value" value="`$tmp.level1-key-value[$npidx]`" />
+ <parameter name="tmp.plan-name" value="`$tmp.plan-name[$npidx]`" />
+
+</set><switch test='`$tmp.level1-key-value`'>
+<outcome value=''>
+<block atomic='true'></block></outcome><outcome value='Other'>
+<block atomic='true'><switch test='`$network-model`'>
+<outcome value=''></outcome><outcome value='Other'>
+<block atomic='true'><switch test="`$network-model.use-ipv4`"><outcome value='Y'><block atomic="true"><set>
+<parameter name='tmp.plan-name' value='`$network-model.eipam-v4-address-plan`' />
+
+</set><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k
+ WHERE p.level = 2
+ and p.plan_name = $tmp.plan-name
+ and k.level = 1
+ and p.pool_id = s.pool_id and s.entity_id = k.entity_id
+ and k.key_value = $tmp.level1-key-value ; "
+ pfx='tmp.level2pool[]'>
+
+
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="tmp.level1inuse" value="true" />
+
+</set></block></outcome><outcome value="not-found"><block atomic='true'><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k
+ WHERE p.level = 1
+ and p.plan_name = $tmp.plan-name
+ and k.level = 1
+ and p.pool_id = s.pool_id and s.entity_id = k.entity_id
+ and k.key_value = $tmp.level1-key-value ; "
+ pfx='tmp.level1pool[]'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><for silentFailure='true' index='lidx' start='0' end='`$tmp.level1pool_length`' >
+<block atomic='true'><set>
+<parameter name='eipam-ip-block.entity-id' value='`$tmp.level1pool[$lidx].entity-id`' />
+<parameter name='eipam-ip-block.ip-address' value='`$tmp.level1pool[$lidx].ip-address`' />
+<parameter name='eipam-ip-block.mask' value='`$tmp.level1pool[$lidx].prefix-length`' />
+<parameter name="eipam-ip-block.network-id" value="`$tmp.level1pool[$lidx].network-id`" />
+<parameter name="eipam-ip-block.pool-id" value="`$tmp.level1pool[$lidx].pool-id`" />
+<parameter name="eipam-ip-block.level" value='1' />
+
+</set><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deallocateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while deallocating subnet in EIPAM." />
+ </return></outcome></execute><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByPoolId">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while deleting pool in EIPAM." />
+ </return></outcome></execute></block></for></block></outcome><outcome value="not-found"><block atomic='true'></block></outcome></get-resource></block></outcome></get-resource></block></outcome></switch><switch test="`$network-model.use-ipv6`"><outcome value='Y'><block atomic="true"><set>
+<parameter name='tmp.plan-name' value='`$network-model.eipam-v6-address-plan`' />
+
+</set><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k
+ WHERE p.level = 2
+ and p.plan_name = $tmp.plan-name
+ and k.level = 1
+ and p.pool_id = s.pool_id and s.entity_id = k.entity_id
+ and k.key_value = $tmp.level1-key-value ; "
+ pfx='tmp.level2pool[]'>
+
+
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="tmp.level1inuse" value="true" />
+
+</set></block></outcome><outcome value="not-found"><block atomic='true'><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k
+ WHERE p.level = 1
+ and p.plan_name = $tmp.plan-name
+ and k.level = 1
+ and p.pool_id = s.pool_id and s.entity_id = k.entity_id
+ and k.key_value = $tmp.level1-key-value ; "
+ pfx='tmp.level1pool[]'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value='success'>
+<block atomic='true'><for silentFailure='true' index='lidx' start='0' end='`$tmp.level1pool_length`' >
+<block atomic='true'><set>
+<parameter name='eipam-ip-block.entity-id' value='`$tmp.level1pool[$lidx].entity-id`' />
+<parameter name='eipam-ip-block.ip-address' value='`$tmp.level1pool[$lidx].ip-address`' />
+<parameter name='eipam-ip-block.mask' value='`$tmp.level1pool[$lidx].prefix-length`' />
+<parameter name="eipam-ip-block.network-id" value="`$tmp.level1pool[$lidx].network-id`" />
+<parameter name="eipam-ip-block.pool-id" value="`$tmp.level1pool[$lidx].pool-id`" />
+<parameter name="eipam-ip-block.level" value='1' />
+
+</set><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deallocateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while deallocating subnet in EIPAM." />
+ </return></outcome></execute><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByPoolId">
+<outcome value='failure'><return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while deleting pool in EIPAM." />
+ </return></outcome></execute></block></for></block></outcome><outcome value="not-found"><block atomic='true'></block></outcome></get-resource></block></outcome></get-resource></block></outcome></switch></block></outcome></switch></block></outcome></switch></block></for><switch test='`$service-data.networks.network_length`'>
+<outcome value='1'>
+<block atomic="true"><set>
+ <parameter name="service-data.networks." value=""/>
+
+</set><set>
+ <parameter name="service-data.networks.network_length" value="0"/>
+
+
+</set></block></outcome><outcome value='Other'>
+<block atomic="true"><set>
+ <parameter name="tmp.new_length" value="`$service-data.networks.network_length - 1`"/>
+
+
+</set><for silentFailure='true' index='snidx' start='`$tmp.nidx + 1`' end='`$service-data.networks.network_length`' >
+<block atomic="true"><set>
+ <parameter name="tmp.newidx" value="`$snidx - 1`"/>
+
+
+</set><set>
+ <parameter name="service-data.networks.network[$tmp.newidx]." value="$service-data.networks.network[$snidx]." />
+
+</set></block></for><set>
+ <parameter name="service-data.networks.network_length" value="`$service-data.networks.network_length - 1`"/>
+
+
+</set><set>
+ <parameter name="service-data.networks.network[$tmp.new_length]." value=""/>
+
+</set></block></outcome></switch><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-information.network-id"><outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while deleting network from AAI" />
+ </return></outcome></delete><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>
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
new file mode 100755
index 00000000..ab398ce3
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation.xml
@@ -0,0 +1,105 @@
+<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='network-topology-operation' mode='sync'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-network-input' mode='sync' >
+</call><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign' mode='sync' >
+</call></block></outcome><outcome value='activate'>
+<block atomic="true"><switch test='`$service-data.networks.network_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+</return></outcome><outcome value='Other'>
+<block atomic="true"><for index='nidx' start='0' end='`$service-data.networks.network_length`' >
+<switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+
+<outcome value='true'>
+<set>
+<parameter name='tmp.nidx' value='`$nidx`' />
+<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />
+</set></outcome></switch></for><switch test="`$tmp.nidx`">
+
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+</return></outcome></switch></block></outcome></switch><switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>
+<outcome value='PendingCreate'>
+<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-activate' mode='sync' >
+</call></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for activate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" /></return></outcome></switch></block></outcome><outcome value='deactivate'>
+<block atomic="true"><switch test='`$service-data.networks.network_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+</return></outcome><outcome value='Other'>
+<block atomic="true"><for index='nidx' start='0' end='`$service-data.networks.network_length`' >
+<switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+
+<outcome value='true'>
+<set>
+<parameter name='tmp.nidx' value='`$nidx`' />
+<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />
+</set></outcome></switch></for><switch test="`$tmp.nidx`">
+
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+</return></outcome></switch></block></outcome></switch><switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>
+<outcome value='Created'>
+<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-deactivate' mode='sync' >
+</call></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for deactivate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" /></return></outcome></switch></block></outcome><outcome value='unassign'>
+<block atomic="true"><switch test='`$service-data.networks.network_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+</return></outcome><outcome value='Other'>
+<block atomic="true"><for index='nidx' start='0' end='`$service-data.networks.network_length`' >
+<switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+
+<outcome value='true'>
+<set>
+<parameter name='tmp.nidx' value='`$nidx`' />
+<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />
+</set></outcome></switch></for><switch test="`$tmp.nidx`">
+
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+</return></outcome></switch></block></outcome></switch><switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>
+<outcome value='PendingCreate'>
+<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-unassign' mode='sync' >
+</call></outcome><outcome value='PendingDelete'>
+<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-unassign' mode='sync' >
+</call></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Network is not in appropriate state for unassign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`" /></return></outcome></switch></block></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-action is a required input" />
+</return></outcome></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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml
new file mode 100755
index 00000000..50b71864
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml
@@ -0,0 +1,31 @@
+<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='policy-manager-create-policy' mode='sync'>
+<block atomic="true"><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.pm.createpolicy.templatefile`" />
+ <parameter name='restapiUrl' value="`$prop.policy-manager.url + '/pdp/api/createPolicy'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name='convertResponse' value="false" />
+ <parameter name='customHttpHeaders'
+ value="`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `" />
+<outcome value='success'>
+<block atomic="true">
+<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.pm.pushpolicy.templatefile`" />
+ <parameter name='restapiUrl' value="`$prop.policy-manager.url + '/pdp/api/pushPolicy'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name='convertResponse' value="false" />
+ <parameter name='customHttpHeaders'
+ value="`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `" />
+<outcome value='success'>
+<block atomic="true">
+</block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to push policy in Policy Manager' />
+</return></outcome></execute></block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to create policy in Policy Manager' />
+</return></outcome></execute><return status='success'>
+</return></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-delete-policy.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-delete-policy.xml
new file mode 100755
index 00000000..9b859332
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-delete-policy.xml
@@ -0,0 +1,31 @@
+<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='policy-manager-delete-policy' mode='sync'>
+<block atomic="true"><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.pm.deletepolicypdp.templatefile`" />
+ <parameter name='restapiUrl' value="`$prop.policy-manager.url + '/pdp/api/deletePolicy'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='DELETE' />
+ <parameter name='convertResponse' value="false" />
+ <parameter name='customHttpHeaders'
+ value="`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `" />
+<outcome value='success'>
+<block atomic="true">
+<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.pm.deletepolicypap.templatefile`" />
+ <parameter name='restapiUrl' value="`$prop.policy-manager.url + '/pdp/api/deletePolicy'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='DELETE' />
+ <parameter name='convertResponse' value="false" />
+ <parameter name='customHttpHeaders'
+ value="`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `" />
+<outcome value='success'>
+<block atomic="true">
+</block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to delete policy from Policy Manager (PAP)' />
+</return></outcome></execute></block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to delete policy from Policy Manager (PDP)' />
+</return></outcome></execute><return status='success'>
+</return></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-update-notify-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-update-notify-operation.xml
new file mode 100755
index 00000000..8fdcad08
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-update-notify-operation.xml
@@ -0,0 +1,42 @@
+<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='policy-update-notify-operation' mode='sync'>
+<block atomic="true"><switch test='`$policy-update-notify-operation-input.update-type`'>
+<outcome value='Update'>
+<block atomic="true"><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><set>
+<parameter name='tmp.sql' value="`'insert into POLICY_UPDATE_NOTIFICATION (policy_name,version_id,update_type) values ( '
++ ' $policy-update-notify-operation-input.policy-name , $policy-update-notify-operation-input.version-id , $policy-update-notify-operation-input.update-type )'`" />
+
+</set><save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key="`$tmp.sql`" pfx='pfx'>
+</save><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.pm.getpolicy.templatefile`" />
+ <parameter name='restapiUrl' value="`$prop.policy-manager.url + '/pdp/api/getConfig'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='responsePrefix' value="policy" />
+ <parameter name='customHttpHeaders'
+ value="`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `" />
+<outcome value='success'>
+<block atomic="true">
+</block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to get policy from Policy Manager' />
+</return></outcome></execute><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='network-policy' />
+<parameter name='api-action' value='update' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='cloud-region-id' value='`$cloud-region-id`' />
+<parameter name='update-network-policy-json' value='`$policy.config`' /><outcome value='success'>
+<block atomic="true">
+</block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to get policy from Policy Manager' />
+</return></outcome></execute></block></outcome></switch><return status='success'>
+<parameter name="ack-final-indicator" value="Y" />
+<parameter name="error-code" value="200" />
+<parameter name="error-message" value="success" />
+</return></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_process-eipam-pools.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_process-eipam-pools.xml
new file mode 100755
index 00000000..42d14127
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_process-eipam-pools.xml
@@ -0,0 +1,941 @@
+<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="process-eipam-pools" mode="sync">
+ <switch test='`$tmp.process-eipam-action`'>
+ <outcome value='assign'>
+ <block atomic="true">
+ <set>
+ <parameter name='eipam-ip-block.entity-id' value='' />
+ <parameter name='eipam-ip-block.ip-prefix' value='' />
+ <parameter name='eipam-ip-block.mask' value='' />
+ <parameter name='tmp.l3-network.level1.v4.entity-id' value='' />
+ <parameter name='tmp.l3-network.level1.v4.ip-prefix' value='' />
+ <parameter name='tmp.l3-network.level1.v4.mask' value='' />
+ <parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='false' />
+ <parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='false' />
+ <parameter name='tmp.l3-network.level1.v6.entity-id' value='' />
+ <parameter name='tmp.l3-network.level1.v6.ip-prefix' value='' />
+ <parameter name='tmp.l3-network.level1.v6.mask' value='' />
+ <parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='false' />
+ <parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='false' />
+ <parameter name='tmp.l3-network.level2.v4.entity-id' value='' />
+ <parameter name='tmp.l3-network.level2.v4.ip-prefix' value='' />
+ <parameter name='tmp.l3-network.level2.v4.mask' value='' />
+ <parameter name='tmp.l3-network.level2.v4.pool.pre-existing' value='false' />
+ <parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='false' />
+ <parameter name='tmp.l3-network.level2.v6.entity-id' value='' />
+ <parameter name='tmp.l3-network.level2.v6.ip-prefix' value='' />
+ <parameter name='tmp.l3-network.level2.v6.mask' value='' />
+ <parameter name='tmp.l3-network.level2.v6.pool.pre-existing' value='false' />
+ <parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='false' />
+ </set>
+ <set>
+ <parameter name='tmp.region' value='`$aai.complex.region`' />
+ <parameter name='tmp.cloud-region-id' value="`$aai.cloud-region.cloud-region-id`" />
+ <parameter name='tmp.physical-location-id' value="`$aai.complex.physical-location-id`" />
+ <parameter name="tmp.clli" value="`$aai.complex.physical-location-id`" />
+ <parameter name="tmp.zone" value="`$aai.cloud-region.cloud-zone`" />
+ <parameter name="tmp.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="tmp.service-type" value="`$network-topology-operation-input.service-information.subscription-service-type`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ <parameter name='eipam-pool.v4.pre-existing' value='false' />
+ <parameter name='eipam-pool.v6.pre-existing' value='false' />
+ <parameter name="tmp.level1-key-value" value="`$aai.complex.physical-location-id + ':' + $aai.cloud-region.cloud-region-id`" />
+ <parameter name="tmp.level2-key-value" value="`$network-model.network-role + ':' + $tmp.l3-network.network-id`" />
+ <parameter name="tmp.ipv4-cidr-mask" value="`$network-model.ipv4-cidr-mask`" />
+ <parameter name="tmp.ipv6-cidr-mask" value="`$network-model.ipv6-cidr-mask`" />
+ </set>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`">
+ <outcome value=''>
+ <block>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="eipam-ip-block.subnet-size-override-v4" value="`$network-model.ipv4-cidr-mask`" />
+ <parameter name="eipam-ip-block.subnet-size-override-v6" value="`$network-model.ipv6-cidr-mask`" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <for index='pidx' start='0' end='`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`' >
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`" />
+ <parameter name="target" value="network_assignments_ipv4_subnet_default_assignment_cidr_mask"/>
+ <outcome value='true'>
+ <set>
+ <parameter name='eipam-ip-block.subnet-size-override-v4' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="eipam-ip-block.subnet-size-override-v4" value="`$network-model.ipv4-cidr-mask`" />
+ </set>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`" />
+ <parameter name="target" value="network_assignments_ipv6_subnet_default_assignment_cidr_mask"/>
+ <outcome value='true'>
+ <set>
+ <parameter name='eipam-ip-block.subnet-size-override-v6' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="eipam-ip-block.subnet-size-override-v6" value="`$network-model.ipv6-cidr-mask`" />
+ </set>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ <!--tmp.level should be set to 1-->
+ <call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'An error occured while allocating subnet in EIPAM. Error creating level 1 pool. ' + $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="eipam-pool.v4.pre-existing"/>
+ <parameter name="field5" value="`$eipam-pool.v4.pre-existing`"/>
+ <parameter name="field6" value="eipam-pool.v4.pre-existing"/>
+ <parameter name="field7" value="`$eipam-pool.v6.pre-existing`"/>
+ <parameter name="field8" value="tmp.create-v4-pool-flag" />
+ <parameter name="field9" value="`$tmp.create-v4-pool-flag`" />
+ <parameter name="field10" value="tmp.create-v6-pool-flag" />
+ <parameter name="field11" value="`$tmp.create-v6-pool-flag`" />
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>
+ <parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>
+ </set>
+ </block>
+ </outcome>
+ </call>
+ <switch test="`$network-model.use-ipv4`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.plan_name = $network-model.eipam-v4-address-plan and s.entity_id = k.entity_id and k.level = 1 and k.key_value = $tmp.level1-key-value ; "
+ pfx='tmp.eipam-subnet-row'>
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Existing eipam-ip-block.ip-prefix for level1"/>
+ <parameter name="field5" value="`$tmp.eipam-subnet-row.ip-address`"/>
+ <parameter name="field6" value="Existing eipam-ip-block.mask for level1"/>
+ <parameter name="field7" value="`$tmp.eipam-subnet-row.prefix-length`"/>
+ <parameter name="field8" value="ipv4"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='true' />
+ <parameter name='tmp.l3-network.level1.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />
+ <parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />
+ <parameter name='tmp.l3-network.level1.v4.mask' value='`$tmp.eipam-row.prefix-length`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value="not-found">
+ <block atomic='true'>
+ <set>
+ <parameter name='eipam-ip-block.entity-id' value='' />
+ <parameter name='eipam-ip-block.ip-prefix' value='' />
+ <parameter name='eipam-ip-block.mask' value='' />
+ <parameter name="eipam-ip-block.allocate-version" value='ipv4' />
+ <parameter name="eipam-ip-block.level" value='1' />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="eipam-ip-block.ip-prefix for level1"/>
+ <parameter name="field5" value="`$eipam-ip-block.ip-prefix`"/>
+ <parameter name="field6" value="eipam-ip-block.mask for level1"/>
+ <parameter name="field7" value="`$eipam-ip-block.mask`"/>
+ <parameter name="field8" value="ipv4"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='' />
+ <parameter name='tmp.l3-network.level1.v4.entity-id' value='`$eipam-ip-block.entity-id`' />
+ <parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />
+ <parameter name='tmp.l3-network.level1.v4.mask' value='`$eipam-ip-block.mask`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to allocate level1 ipv4 subnet - failure from eipam-allocate-network-role-subnet"/>
+ </record>
+ <switch test="`$tmp.l3-network.level1.v4.pool.pre-existing`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$network-model.use-ipv6`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.plan_name = $network-model.eipam-v6-address-plan and s.entity_id = k.entity_id and k.level = 1 and k.key_value = $tmp.level1-key-value ; "
+ pfx='tmp.eipam-subnet-row'>
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Existing eipam-ip-block.ip-prefix for level1"/>
+ <parameter name="field5" value="`$tmp.eipam-subnet-row.ip-address`"/>
+ <parameter name="field6" value="Existing eipam-ip-block.mask for level1"/>
+ <parameter name="field7" value="`$tmp.eipam-subnet-row.prefix-length`"/>
+ <parameter name="field8" value="ipv6"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='true' />
+ <parameter name='tmp.l3-network.level1.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />
+ <parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />
+ <parameter name='tmp.l3-network.level1.v6.mask' value='`$tmp.eipam-row.prefix-length`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value="not-found">
+ <block atomic='true'>
+ <set>
+ <parameter name='eipam-ip-block.entity-id' value='' />
+ <parameter name='eipam-ip-block.ip-prefix' value='' />
+ <parameter name='eipam-ip-block.mask' value='' />
+ <parameter name="eipam-ip-block.allocate-version" value='ipv6' />
+ <parameter name="eipam-ip-block.level" value='1' />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="eipam-ip-block.ip-prefix for level1"/>
+ <parameter name="field5" value="`$eipam-ip-block.ip-prefix`"/>
+ <parameter name="field6" value="eipam-ip-block.mask for level1"/>
+ <parameter name="field7" value="`$eipam-ip-block.mask`"/>
+ <parameter name="field8" value="ipv6"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='' />
+ <parameter name='tmp.l3-network.level1.v6.entity-id' value='`$eipam-ip-block.entity-id`' />
+ <parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />
+ <parameter name='tmp.l3-network.level1.v6.mask' value='`$eipam-ip-block.mask`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to allocate level1 ipv6 subnet - failure from eipam-allocate-network-role-subnet"/>
+ </record>
+ <switch test="`$tmp.l3-network.level1.v6.pool.pre-existing`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='eipam-ip-block.entity-id' value='' />
+ <parameter name='eipam-ip-block.ip-prefix' value='' />
+ <parameter name='eipam-ip-block.mask' value='' />
+ <parameter name="eipam-ip-block.level" value='2' />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ <parameter name='eipam-pool.v4.pre-existing' value='false' />
+ <parameter name='eipam-pool.v6.pre-existing' value='false' />
+ </set>
+ <!--tmp.level should be set to 1-->
+ <call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Error creating level 2 pool, need to attempt rollback"/>
+ </record>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Error creating level 2 pool" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="eipam-pool.v4.pre-existing"/>
+ <parameter name="field5" value="`$eipam-pool.v4.pre-existing`"/>
+ <parameter name="field6" value="eipam-pool.v4.pre-existing"/>
+ <parameter name="field7" value="`$eipam-pool.v6.pre-existing`"/>
+ <parameter name="field8" value="tmp.create-v4-pool-flag" />
+ <parameter name="field9" value="`$tmp.create-v4-pool-flag`" />
+ <parameter name="field10" value="tmp.create-v6-pool-flag" />
+ <parameter name="field11" value="`$tmp.create-v6-pool-flag`" />
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level2.v4.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>
+ <parameter name='tmp.l3-network.level2.v6.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>
+ </set>
+ </block>
+ </outcome>
+ </call>
+ <switch test="`$network-model.use-ipv4`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.plan_name = $network-model.eipam-v4-address-plan and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value ; "
+ pfx='tmp.eipam-subnet-row'>
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Existing eipam-ip-block.ip-prefix for level2"/>
+ <parameter name="field5" value="`$tmp.eipam-subnet-row.ip-address`"/>
+ <parameter name="field6" value="Existing eipam-ip-block.mask for level2"/>
+ <parameter name="field7" value="`$tmp.eipam-subnet-row.prefix-length`"/>
+ <parameter name="field8" value="ipv4"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='true' />
+ <parameter name='tmp.l3-network.level2.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />
+ <parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />
+ <parameter name='tmp.l3-network.level2.v4.mask' value='`$tmp.eipam-row.prefix-length`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value="not-found">
+ <block atomic='true'>
+ <set>
+ <parameter name='eipam-ip-block.entity-id' value='' />
+ <parameter name='eipam-ip-block.ip-prefix' value='' />
+ <parameter name='eipam-ip-block.mask' value='' />
+ <parameter name="eipam-ip-block.allocate-version" value='ipv4' />
+ <parameter name="eipam-ip-block.level" value='2' />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ <parameter name="eipam-ip-block.subnet-size-override" value="`$eipam-ip-block.subnet-size-override-v4`" />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="eipam-ip-block.ip-prefix for level2"/>
+ <parameter name="field5" value="`$eipam-ip-block.ip-prefix`"/>
+ <parameter name="field6" value="eipam-ip-block.mask for level2"/>
+ <parameter name="field7" value="`$eipam-ip-block.mask`"/>
+ <parameter name="field8" value="ipv4"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='' />
+ <parameter name='tmp.l3-network.level2.v4.entity-id' value='`$eipam-ip-block.entity-id`' />
+ <parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />
+ <parameter name='tmp.l3-network.level2.v4.mask' value='`$eipam-ip-block.mask`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to allocate level2 ipv4 subnet - failure from eipam-allocate-network-role-subnet"/>
+ </record>
+ <switch test="`$tmp.l3-network.level2.v4.pool.pre-existing`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='2' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='failure'></outcome>
+ <outcome value='Other'></outcome>
+ </execute>
+ <switch test="`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='2' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='failure'></outcome>
+ <outcome value='Other'></outcome>
+ </execute>
+ <switch test="`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv4 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$network-model.use-ipv6`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.plan_name = $network-model.eipam-v6-address-plan and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value ; "
+ pfx='tmp.eipam-subnet-row'>
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Existing eipam-ip-block.ip-prefix for level1"/>
+ <parameter name="field5" value="`$tmp.eipam-subnet-row.ip-address`"/>
+ <parameter name="field6" value="Existing eipam-ip-block.mask for level1"/>
+ <parameter name="field7" value="`$tmp.eipam-subnet-row.prefix-length`"/>
+ <parameter name="field8" value="ipv6"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='true' />
+ <parameter name='tmp.l3-network.level2.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />
+ <parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />
+ <parameter name='tmp.l3-network.level2.v6.mask' value='`$tmp.eipam-row.prefix-length`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value="not-found">
+ <block atomic='true'>
+ <set>
+ <parameter name='eipam-ip-block.entity-id' value='' />
+ <parameter name='eipam-ip-block.ip-prefix' value='' />
+ <parameter name='eipam-ip-block.mask' value='' />
+ <parameter name="eipam-ip-block.allocate-version" value='ipv6' />
+ <parameter name="eipam-ip-block.level" value='2' />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ <parameter name="eipam-ip-block.subnet-size-override" value="`$eipam-ip-block.subnet-size-override-v6`" />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >
+ <outcome value='success'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="eipam-ip-block.ip-prefix for level1"/>
+ <parameter name="field5" value="`$eipam-ip-block.ip-prefix`"/>
+ <parameter name="field6" value="eipam-ip-block.mask for level1"/>
+ <parameter name="field7" value="`$eipam-ip-block.mask`"/>
+ <parameter name="field8" value="ipv6"/>
+ </record>
+ <set>
+ <parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='' />
+ <parameter name='tmp.l3-network.level2.v6.entity-id' value='`$eipam-ip-block.entity-id`' />
+ <parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />
+ <parameter name='tmp.l3-network.level2.v6.mask' value='`$eipam-ip-block.mask`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.process-eipam-pools:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to allocate level2 ipv6 subnet - failure from eipam-allocate-network-role-subnet"/>
+ </record>
+ <switch test="`$tmp.l3-network.level2.v6.pool.pre-existing`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='2' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='failure'></outcome>
+ <outcome value='Other'></outcome>
+ </execute>
+ <switch test="`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='2' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='failure'></outcome>
+ <outcome value='Other'></outcome>
+ </execute>
+ <switch test="`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`">
+ <outcome value='true'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback." />
+ </return>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name="eipam-ip-block.network-id" value="`$tmp.l3-network.network-id`" />
+ <parameter name="eipam-ip-block.level" value='1' />
+ </set>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePoolByNetworkLevel">
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Rollback complete." />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while allocating level 2 ipv6 subnet in EIPAM. Error rolling back EIPAM level 1 pool." />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='delete'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Invalid option to process-eipam" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Invalid option to process-eipam" />
+ </return>
+ </outcome>
+ </switch>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.xml
new file mode 100755
index 00000000..82f6efaf
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.xml
@@ -0,0 +1,118 @@
+<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-activate' 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.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'>
+<block>
+</block></outcome><outcome value='Other'>
+<block>
+</block></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><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='Active' />
+<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="operational-status" value="in-service-path" />
+<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>
+</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>
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
new file mode 100755
index 00000000..2ef4a691
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.xml
@@ -0,0 +1,280 @@
+<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.ecomp-model-information.'
+value="`$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.`" />
+
+
+</set><switch test='$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-invariant-uuid'>
+<outcome value=''>
+<set>
+<parameter name='sz-ar.allotted-resource-data.security-zone-topology.ecomp-model-information.model-invariant-uuid'
+value="`$ar-model.invariant-uuid`" />
+
+
+</set></outcome></switch><switch test='$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-uuid'>
+<outcome value=''>
+<set>
+<parameter name='sz-ar.allotted-resource-data.security-zone-topology.ecomp-model-information.model-uuid'
+value="`$ar-model.uuid`" />
+
+
+</set></outcome></switch><switch test='$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-version'>
+<outcome value=''>
+<set>
+<parameter name='sz-ar.allotted-resource-data.security-zone-topology.ecomp-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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-create.xml
new file mode 100755
index 00000000..a0f09c99
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-create.xml
@@ -0,0 +1,100 @@
+<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-create' 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.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='PendingCreate'>
+<block>
+</block></outcome><outcome value='Other'>
+<block>
+</block></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><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='Created' />
+<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><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>
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.xml
new file mode 100755
index 00000000..8fc45ac6
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.xml
@@ -0,0 +1,118 @@
+<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-deactivate' 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.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'>
+<block>
+</block></outcome><outcome value='Other'>
+<block>
+</block></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><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='PendingDelete' />
+<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="operational-status" value="out-of-service-path" />
+<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>
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.xml
new file mode 100755
index 00000000..4b78a629
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.xml
@@ -0,0 +1,105 @@
+<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-delete' 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.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'>
+<block>
+</block></outcome><outcome value='Other'>
+<block>
+</block></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><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='PendingDelete' />
+<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><set>
+<parameter name='sz-ar-assignments.' value="" />
+
+
+
+</set><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>
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.xml
new file mode 100755
index 00000000..872ddbdb
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.xml
@@ -0,0 +1,81 @@
+<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-unassign' 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.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'>
+<block>
+</block></outcome><outcome value='Other'>
+<block>
+</block></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><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='DELETE' />
+ <parameter name="responsePrefix" value="mdsal-ar" />
+
+<outcome value='success'>
+<block>
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation.xml
new file mode 100755
index 00000000..41f84c51
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_security-zone-topology-operation.xml
@@ -0,0 +1,26 @@
+<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' mode='sync'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-security-zone-input' mode='sync' >
+</call><switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-assign' mode='sync' >
+</call></block></outcome><outcome value='create'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-create' mode='sync' >
+</call></block></outcome><outcome value='activate'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-activate' mode='sync' >
+</call></block></outcome><outcome value='deactivate'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-deactivate' mode='sync' >
+</call></block></outcome><outcome value='delete'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-delete' mode='sync' >
+</call></block></outcome><outcome value='unassign'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-unassign' 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></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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-assign.xml
new file mode 100755
index 00000000..bdd730ab
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-assign.xml
@@ -0,0 +1,123 @@
+<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='service-topology-operation-assign' mode='sync'>
+<block atomic="true"><switch test='`$service-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateServiceInstance'>
+<block>
+</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="If svc-action is 'assign' then request-action must be 'CreateServiceInstance'" />
+</return></outcome></switch><switch test='`$service-data.service-level-oper-status.order-status`'>
+<outcome value=''><block>
+</block></outcome><outcome value='Created'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="The requested service already exists" />
+</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="The requested service is pending deletion" />
+</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-topology-operation-input.service-information.ecomp-model-information.model-uuid'
+ pfx='db.service-model'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading SERVICE_MODEL table" />
+</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="`'No model found for service UUID ' + $service-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource><switch test='`$service-topology-operation-input.service-request-input.service-instance-name`'>
+<outcome value=''><block atomic="true"><switch test='`$db.service-model.ecomp-naming`'>
+<outcome value='Y'><block>
+</block></outcome><outcome value='N'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="No service-instance-name was received but ecomp-naming is not Y" />
+</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="No service-instance-name was received but ecomp-naming is not Y" />
+</return></outcome></switch><set>
+<parameter name='generate-unique-name-input.index-table-name' value='SERVICE_INSTANCE_NAME_INDEX' />
+<parameter name='generate-unique-name-input.index-table-prefix-column' value='service_instance_name_prefix' />
+<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />
+<parameter name='generate-unique-name-input.prefix' value="`$db.service-model.service-instance-name-prefix + '_'`" />
+</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+</return></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.service-instance-name' value='`$generate-unique-name-output.generated-name`' />
+</set></outcome></call></block></outcome><outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />
+<parameter name='generate-unique-name-input.supplied-name' value='`$service-topology-operation-input.service-request-input.service-instance-name`' />
+</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+</return></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.service-instance-name' value="`$service-topology-operation-input.service-request-input.service-instance-name`" />
+</set></outcome></call></block></outcome></switch><set>
+<parameter name='service-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $service-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'`"/>
+</set><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="service-instance"
+ key="customer.global-customer-id = $service-topology-operation-input.service-information.global-customer-id AND
+ service-subscription.service-type = $service-topology-operation-input.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $service-topology-operation-input.service-information.service-instance-id"
+ pfx='pfx' local-only='false' force='false'>
+ <parameter name="service-instance-name" value="`$tmp.service-instance-name`" />
+ <parameter name="selflink" value="`$service-object-path`" />
+<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="The service instance does not exist in AAI" />
+</return></outcome></update><set>
+<parameter name='service-data.service-topology.service-topology-identifier.service-instance-id'
+ value='`$service-topology-operation-input.service-information.service-instance-id`' />
+<parameter name='service-data.service-topology.service-topology-identifier.service-type'
+ value='`$service-topology-operation-input.service-information.subscription-service-type`' />
+<parameter name='service-data.service-topology.service-topology-identifier.service-instance-name'
+ value='`$tmp.service-instance-name`' />
+<parameter name='service-data.service-topology.service-topology-identifier.global-customer-id'
+ value='`$service-topology-operation-input.service-information.global-customer-id`' />
+</set><set>
+<parameter name='service-data.service-topology.ecomp-model-information.'
+ value='`$service-topology-operation-input.service-information.ecomp-model-information.`' />
+</set><switch test='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`'>
+<outcome value=''><block>
+</block></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`' >
+<set>
+<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-name'
+ value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].name`' />
+<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-value'
+ value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].value`' />
+</set></for></outcome></switch><set>
+<parameter name='service-data.service-level-oper-status.order-status' value='Created' />
+<parameter name='service-data.service-level-oper-status.last-rpc-action' value='assign' />
+<parameter name='service-data.service-level-oper-status.last-action' value='CreateServiceInstance' />
+</set></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-deactivate.xml
new file mode 100755
index 00000000..ca82647e
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-deactivate.xml
@@ -0,0 +1,42 @@
+<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='service-topology-operation-deactivate' mode='sync'>
+<block atomic="true"><switch test='`$service-data.service-topology.service-topology-identifier.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'Service ' + $service-topology-operation-input.service-information.service-instance-id + ' is not found'`" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteServiceInstance'>
+<block>
+</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="If svc-action is 'deactivate' then request-action must be 'DeleteServiceInstance'" />
+</return></outcome></switch><switch test='`$service-data.provided-allotted-resources.provided-allotted-resource_length`'>
+<outcome value='0'>
+<block>
+</block></outcome><outcome value=''><block>
+</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="Cannot deactivate this service because there are provided allotted resources" />
+</return></outcome></switch><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="service-instance"
+ key="customer.global-customer-id = $service-data.service-topology.service-topology-identifier.global-customer-id AND
+ service-subscription.service-type = $service-data.service-topology.service-topology-identifier.service-type AND
+ service-instance.service-instance-id = $service-topology-operation-input.service-information.service-instance-id"
+ pfx='pfx' local-only='false' force='false'>
+ <parameter name="orchestration-status" value="PendingDelete" />
+<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'>
+<block>
+</block></outcome></update><set>
+<parameter name='service-data.service-level-oper-status.order-status' value='PendingDelete' />
+<parameter name='service-data.service-level-oper-status.last-rpc-action' value='deactivate' />
+<parameter name='service-data.service-level-oper-status.last-action' value='DeleteServiceInstance' />
+</set></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-delete.xml
new file mode 100755
index 00000000..88ae84bc
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation-delete.xml
@@ -0,0 +1,62 @@
+<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='service-topology-operation-delete' mode='sync'>
+<block atomic="true"><switch test='`$service-data.service-topology.service-topology-identifier.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'Service ' + $service-topology-operation-input.service-information.service-instance-id + ' is not found'`" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteServiceInstance'>
+<block>
+</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="If svc-action is 'delete' then request-action must be 'DeleteServiceInstance'" />
+</return></outcome></switch><switch test='`$service-data.service-level-oper-status.order-status`'>
+<outcome value='PendingDelete'>
+<block atomic="true"></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="`'Order status is ' + $service-data.service-level-oper-status.order-status
+ + ' but must be PendingDelete'`" />
+</return></outcome></switch><switch test='`$service-data.networks.network_length`'>
+<outcome value='0'>
+<block>
+</block></outcome><outcome value=''><block>
+</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="Cannot delete the service because there are networks defined" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value='0'>
+<block>
+</block></outcome><outcome value=''><block>
+</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="Cannot delete the service because there are VNFs defined" />
+</return></outcome></switch><switch test='`$service-data.provided-allotted-resources.provided-allotted-resource_length`'>
+<outcome value='0'>
+<block>
+</block></outcome><outcome value=''><block>
+</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="Cannot deactivate this service because there are provided allotted resources" />
+</return></outcome></switch><switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>
+<outcome value='0'>
+<block>
+</block></outcome><outcome value=''><block>
+</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="Cannot deactivate this service because there are consumed allotted resources" />
+</return></outcome></switch><set>
+<parameter name='service-data.' value='' />
+<parameter name='service-status.' value='' />
+</set></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation.xml
new file mode 100755
index 00000000..33672709
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_service-topology-operation.xml
@@ -0,0 +1,24 @@
+<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='service-topology-operation' mode='sync'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-service-input' mode='sync' >
+</call><set>
+<parameter name='service-data.sdnc-request-header.' value='`$service-topology-operation-input.sdnc-request-header.`' />
+<parameter name='service-data.request-information.' value='`$service-topology-operation-input.request-information.`' />
+<parameter name='service-data.service-information.' value='`$service-topology-operation-input.service-information.`' />
+<parameter name='service-data.service-request-input.' value='`$service-topology-operation-input.service-request-input.`' />
+</set><switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-assign' mode='sync' >
+</call></outcome><outcome value='deactivate'>
+<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-deactivate' mode='sync' >
+</call></outcome><outcome value='delete'>
+<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-delete' 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="`$service-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+</return></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-contrail-route-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-contrail-route-input.xml
new file mode 100755
index 00000000..11b6802d
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-contrail-route-input.xml
@@ -0,0 +1,162 @@
+<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='validate-contrail-route-input' mode='sync'>
+<block atomic="true"><switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value=''><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><switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateContrailRouteInstance'><block>
+</block></outcome><outcome value='DeleteContrailRouteInstance'><block>
+</block></outcome><outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+</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="Invalid request-information.request-action " />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.service-information.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-instance-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateContrailRouteInstance'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-type is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="contrail-route-information.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-role`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-role is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-role`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="contrail-topology-operation-input.contrail-route-request-input.dest-network.network-role is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.service-instance-id is a required input" />
+</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from ALLOTTED_RESOURCE_MODEL WHERE customization_uuid = $contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid'
+ pfx='ar-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No alloted resource model found for model customization UUID ' + $contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No alloted resource model found for model customization UUID ' + $contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`" />
+</return></outcome></get-resource></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="request-information.request-action is a required to be CreateContrailRouteInstance for svc-action=assign" />
+</return></outcome></switch></block></outcome><outcome value='create'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateContrailRouteInstance'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be CreateNetworkInstance for svc-action=create" />
+</return></outcome></switch></block></outcome><outcome value='activate'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateContrailRouteInstance'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be CreateContrailRouteInstance for svc-action=activate" />
+</return></outcome></switch></block></outcome><outcome value='deactivate'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteContrailRouteInstance'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be DeleteContrailRouteInstance for svc-action=deactivate" />
+</return></outcome></switch></block></outcome><outcome value='delete'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteContrailRouteInstance'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be DeleteContrailRouteInstance for svc-action=delete" />
+</return></outcome></switch></block></outcome><outcome value='unassign'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteContrailRouteInstance'><block atomic="true"><switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be DeleteContrailRouteInstance for svc-action=unassign" />
+</return></outcome></switch></block></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml
new file mode 100755
index 00000000..49735fdc
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml
@@ -0,0 +1,274 @@
+<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='validate-network-input' mode='sync'>
+<block atomic="true"><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value=''><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><switch test='`$network-topology-operation-input.sdnc-request-header.svc-request-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.request-information.request-action`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-instance-id is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
+
+<outcome value=''><return status='success'>
+<parameter name='' value='' />
+</return></outcome><outcome value='Other'><block>
+<switch test='`$service-data.networks.network_length`'>
+<outcome value=''>
+<record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.validate-network-input"/>
+<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="Network id proveded but no network exists that matches"/>
+<parameter name="field5" value="`$network-topology-operation-input.network-information.network-id`"/>
+
+
+
+</record></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'>
+<block atomic="true"><set>
+<parameter name='tmp.nidx' value='`$nidx`' />
+<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />
+</set></block></outcome></switch></for><switch test="`$tmp.nidx`">
+
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+</return></outcome></switch></block></outcome></switch></block></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-invariant-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.ecomp-model-information.model-invariant-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.ecomp-model-information.model-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.tenant`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.tenant is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.aic-cloud-region`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>
+<outcome value=''><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
+ pfx='service-model'><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
+ and service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
+ pfx='network-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource></block></outcome><outcome value='Other'><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
+ pfx='service-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
+ and service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
+ pfx='network-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource></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="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
+</return></outcome></switch></block></outcome><outcome value='activate'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-invariant-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.ecomp-model-information.model-invariant-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.ecomp-model-information.model-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.tenant`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.tenant is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.aic-cloud-region`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>
+<outcome value=''><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
+ pfx='service-model'><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
+ and service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
+ pfx='network-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource></block></outcome><outcome value='Other'><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
+ pfx='service-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
+ and service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
+ pfx='network-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID '
+ + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
+</return></outcome></get-resource></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="request-information.request-action is required to be CreateNetworkInstance for svc-action=activate" />
+</return></outcome></switch></block></outcome><outcome value='deactivate'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be DeleteNetworkInstance for svc-action=deactivate" />
+</return></outcome></switch></block></outcome><outcome value='unassign'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be DeleteNetworkInstance for svc-action=unassign" />
+</return></outcome></switch></block></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-security-zone-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-security-zone-input.xml
new file mode 100755
index 00000000..d7f096da
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-security-zone-input.xml
@@ -0,0 +1,157 @@
+<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='validate-security-zone-input' mode='sync'>
+<block atomic="true"><switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value=''><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><switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-request-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateSecurityZoneInstance'><block>
+</block></outcome><outcome value='DeleteSecurityZoneInstance'><block>
+</block></outcome><outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+</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="Invalid request-information.request-action " />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.service-information.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-instance-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'><block atomic="true"><switch test='`$security-zone-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateSecurityZoneInstance'><block atomic="true"><switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-type is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="security-zone-information.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.security-zone-request-input.vlan-tag`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="security-zone-topology-operation-input.security-zone-request-input.vlan-tag is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="security-zone-topology-operation-input.security-zone-request-input.trusted-network-role is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="security-zone-operation-input.security-zone-request-input.untrusted-network-role is a required input" />
+</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from ALLOTTED_RESOURCE_MODEL WHERE customization_uuid = $security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid'
+ pfx='ar-model'>
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No alloted resource model found for model customization UUID ' + $security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No alloted resource model found for model customization UUID ' + $security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`" />
+</return></outcome></get-resource></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="request-information.request-action is a required to be CreateSecurityZoneInstance for svc-action=assign" />
+</return></outcome></switch></block></outcome><outcome value='create'><block atomic="true"><switch test='`$security-zone-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateSecurityZoneInstance'><block atomic="true"><switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be CreateSecurityZoneInstance for svc-action=create" />
+</return></outcome></switch></block></outcome><outcome value='activate'><block atomic="true"><switch test='`$security-zone-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateSecurityZoneInstance'><block atomic="true"><switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be CreateSecurityZoneInstance for svc-action=activate" />
+</return></outcome></switch></block></outcome><outcome value='deactivate'><block atomic="true"><switch test='`$security-zone-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteSecurityZoneInstance'><block atomic="true"><switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be DeleteSecurityZoneInstance for svc-action=deactivate" />
+</return></outcome></switch></block></outcome><outcome value='delete'><block atomic="true"><switch test='`$security-zone-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteSecurityZoneInstance'><block atomic="true"><switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch><switch test='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.parent-service-instance-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be DeleteSecurityZoneInstance for svc-action=delete" />
+</return></outcome></switch></block></outcome><outcome value='unassign'><block atomic="true"><switch test='`$security-zone-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteSecurityZoneInstance'><block atomic="true"><switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="allotted-resource-information.allotted-resource-id is a required input" />
+</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required to be DeleteSecurityZoneInstance for svc-action=unassign" />
+</return></outcome></switch></block></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-service-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-service-input.xml
new file mode 100755
index 00000000..36dfdee2
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-service-input.xml
@@ -0,0 +1,49 @@
+<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='validate-service-input' mode='sync'>
+<block atomic="true"><switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value=''><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><switch test='`$service-topology-operation-input.sdnc-request-header.svc-request-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.request-information.request-action`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<block atomic="true"><switch test='`$service-topology-operation-input.service-information.service-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-id is a required input" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.service-information.subscription-service-type`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.subscription-service-type is a required input" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.service-information.global-customer-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.global-customer-id is a required input" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-invariant-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.ecomp-model-information.model-invariant-uuid is a required input" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.ecomp-model-information.model-uuid is a required input" />
+</return></outcome></switch><switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-name`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.ecomp-model-information.model-name is a required input" />
+</return></outcome></switch></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml
new file mode 100755
index 00000000..5dda1f97
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml
@@ -0,0 +1,54 @@
+<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='validate-vf-module-input' mode='sync'>
+<block atomic="true"><switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value=''><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><switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.request-information.request-action`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.service-information.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-instance-id is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-information.vnf-id is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vf-module-information.vf-module-id is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<block atomic="true"><switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vf-module-information.vf-module-request-input.vf-module-name is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vf-module-information.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-request-input.tenant`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vf-module-information.vf-module-request-input.tenant is a required input" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vf-module-request-input.aic-cloud-region is a required input" />
+</return></outcome></switch></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml
new file mode 100755
index 00000000..ea3caedf
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml
@@ -0,0 +1,44 @@
+<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='validate-vnf-input' mode='sync'>
+<block atomic="true"><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value=''><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><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+</return></outcome></switch><switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+</return></outcome></switch><switch test='`$vnf-topology-operation-input.service-information.service-instance-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-instance-id is a required input" />
+</return></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-information.vnf-id is a required input" />
+</return></outcome></switch><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<block atomic="true"><switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-information.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-request-input.tenant`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-information.vnf-request-input.tenant is a required input" />
+</return></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-request-input.aic-cloud-region is a required input" />
+</return></outcome></switch></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.xml
new file mode 100755
index 00000000..5d967079
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.xml
@@ -0,0 +1,108 @@
+<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='vf-module-topology-operation-activate' mode='sync'>
+<block atomic="true"><switch test='`$vf-module-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateVfModuleInstance'>
+<block>
+</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="If svc-action is 'activate' then request-action must be 'CreateVfModuleInstance'" />
+</return></outcome></switch><set>
+<parameter name='vnf-index' value='-1' />
+</set><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="There are no VNFs defined in MD-SAL" />
+</return></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='vnf-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vnf-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`" />
+</return></outcome></switch><set>
+<parameter name='vf-module-index' value='-1' />
+</set><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`" />
+</return></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='vf-module-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vf-module-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status`'>
+<outcome value='PendingCreate'>
+<block>
+</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="`'Order status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status + ' instead of PendingCreate'`" />
+</return></outcome></switch><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+<parameter name="orchestration-status" value="Active" />
+<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 vf-module in AAI" />
+</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="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+</return></outcome></update><update resource='SQL' force='true' plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ key='UPDATE EIPAM_IP_ASSIGNMENTS SET status = "ACTIVE" WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'>
+<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 EIPAM_IP_ASSIGNMENTS table" />
+</return></outcome></update><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
+ value='$vf-module-topology-operation-input.sdnc-request-header.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
+ value='$vf-module-topology-operation-input.request-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
+ value='$vf-module-topology-operation-input.service-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
+ value='$vf-module-topology-operation-input.vnf-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
+ value='$vf-module-topology-operation-input.vf-module-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
+ value='$vf-module-topology-operation-input.vf-module-request-input.' />
+
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ value='Created' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
new file mode 100755
index 00000000..a17fea69
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
@@ -0,0 +1,573 @@
+<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='vf-module-topology-operation-assign' mode='sync'>
+<block atomic="true"><switch test='`$vf-module-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateVfModuleInstance'>
+<block>
+</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="If svc-action is 'assign' then request-action must be 'CreateVfModuleInstance'" />
+</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid'
+ pfx='db.vf-module-model'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODULE_MODEL table" />
+</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="`'No model found for VF module customization UUID ' + $vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid`" />
+</return></outcome></get-resource><set>
+<parameter name='vnf-index' value='-1' />
+</set><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="There are no VNFs defined in MD-SAL" />
+</return></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='vnf-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vnf-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`'>
+<outcome value='Created'>
+<block>
+</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="`'VNF order status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status + ' but should be Created'`" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+<outcome value=''>
+<set>
+<parameter name='vf-module-index' value='0' />
+</set></outcome><outcome value='Other'>
+<block>
+<set>
+<parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+</set><for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+<switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
+<outcome value='true'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
+ + ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`" />
+</return></outcome></switch></for></block></outcome></switch><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
+ value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+</set><set>
+<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
+<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
+<parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
+<parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cloud-region"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region"
+ pfx='aai.cloud-region' local-only='false' >
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region not found in AAI" />
+</return></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 retrieving cloud region from AAI" />
+</return></outcome></get-resource><for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
+<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
+<outcome value='complex'>
+<block atomic="true"><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='aai-uid-split' />
+ <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
+ <parameter name='regex' value='/' />
+</execute><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
+ value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
+</set><break/></block></outcome></switch></for><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
+</return></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-invariant-uuid`'>
+<outcome value=''><set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-invariant-uuid'
+ value='`$db.vf-module-model.invariant-uuid`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-invariant-uuid'
+ value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-invariant-uuid`' />
+</set></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-uuid`'>
+<outcome value=''><set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-uuid'
+ value='`$db.vf-module-model.uuid`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-uuid'
+ value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-uuid`' />
+</set></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-version`'>
+<outcome value=''><set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-version'
+ value='`$db.vf-module-model.version`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-version'
+ value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-version`' />
+</set></outcome></switch><switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-name`'>
+<outcome value=''><set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-name'
+ value='`$db.vf-module-model.name`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-name'
+ value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-name`' />
+</set></outcome></switch><set>
+<parameter name='tmp.vf-module-topology.ecomp-model-information.model-customization-uuid'
+ value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid`' />
+</set><set>
+<parameter name='tmp.vf-module-topology.vf-module-parameters.'
+ value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />
+</set><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_MODULE_TO_VFC_MAPPING WHERE vf_module_customization_uuid = $vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid'
+ pfx='db.vf-module-to-vfc-mapping[]'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODULE_TO_VFC_MAPPING table" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='db.vf-module-to-vfc-mapping_length' value='0' />
+</set></outcome></get-resource><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm_length'
+ value='`$db.vf-module-to-vfc-mapping_length`' />
+</set><for index='vm-type-index' start='0' end='`$db.vf-module-to-vfc-mapping_length`' >
+<block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VFC_MODEL WHERE customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'
+ pfx='db.vfc-model'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VFC_MODEL table" />
+</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="`'No entries found in VFC_MODEL table for customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`" />
+</return></outcome></get-resource><switch test="$db.vfc-model.ecomp-generated-naming == 'Y'">
+<outcome value='false'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'ECOMP generated naming is not Y for VFC customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`" />
+</return></outcome></switch><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type'
+ value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-type`' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code'
+ value='`$db.vfc-model.nfc-naming-code`' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type-tag'
+ value='`$db.vfc-model.vm-type-tag`' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count'
+ value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />
+</set><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length'
+ value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />
+</set><for index='vm-index' start='0' end='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' >
+<block atomic="true"><set>
+<parameter name='generate-unique-name-input.index-table-name' value='VM_NAME_INDEX' />
+<parameter name='generate-unique-name-input.index-table-prefix-column' value='vm_name_prefix' />
+<parameter name='generate-unique-name-input.name-table-type' value='VM_INSTANCE' />
+<parameter name='generate-unique-name-input.prefix' value="`$service-data.vnfs.vnf[$vnf-index].vnf-name + $db.vfc-model.nfc-naming-code`" />
+<parameter name='generate-unique-name-input.index-length' value='3' />
+</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+</return></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' value='`$generate-unique-name-output.generated-name`' />
+</set></outcome></call></block></for><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VFC_TO_NETWORK_ROLE_MAPPING WHERE vfc_customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'
+ pfx='db.vfc-to-network-role-mapping[]'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VFC_TO_NETWORK_ROLE_MAPPING table" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='db.vfc-to-network-role-mapping_length' value='0' />
+</set></outcome></get-resource><for index='network-role-index' start='0' end='`$db.vfc-to-network-role-mapping_length`' >
+<block atomic="true"><set>
+<parameter name='network-index' value='-1' />
+</set><for silentFailure='true' index='idx' start='0' end='`$service-data.networks.network_length`' >
+<switch test='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-role == $db.vfc-to-network-role-mapping[$network-role-index].network-role`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='network-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for><switch test='`$network-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network found in MD-SAL with network-role ' + $db.vfc-to-network-role-mapping[$network-role-index].network-role`" />
+</return></outcome></switch><!--This isn't a node in MD-SAL, but we need to save this for later when we are doing EIPAM processing--><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id'
+ value='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-id`' />
+</set><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'
+ value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role`' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role-tag'
+ value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role-tag`' />
+</set><switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-ip-version`'>
+<outcome value=''><set>
+<parameter name='network-information-index' value='-1' />
+
+</set></outcome><outcome value='4'>
+<block atomic="true"><set>
+<parameter name='network-information-index' value='0' />
+</set><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'
+ value='4' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'
+ value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-use-dhcp`' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'
+ value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-count`' />
+</set></block></outcome></switch><switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-ip-version`'>
+<outcome value=''><block>
+</block></outcome><outcome value='6'>
+<block atomic="true"><set>
+<parameter name='network-information-index' value='`$network-information-index + 1`' />
+</set><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'
+ value='6' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'
+ value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-use-dhcp`' />
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'
+ value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-count`' />
+</set></block></outcome></switch><switch test='`$network-information-index`'>
+<outcome value='-1'><block>
+</block></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length'
+ value='`$network-information-index + 1`' />
+</set></outcome></switch></block></for><set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length'
+ value='`$db.vfc-to-network-role-mapping_length`' />
+</set></block></for><set>
+<parameter name='plans-index' value='0' />
+</set><for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+<block atomic="true"><for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+<block atomic="true"><for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >
+<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>
+<outcome value='N'>
+<block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from EIPAM_IP_SUBNETS WHERE network_id = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id
+ AND address_family = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version'
+ pfx='db.eipam-ip-subnets[]'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading EIPAM_IP_SUBNETS table" />
+</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="`'No entries found in EIPAM_IP_SUBNETS table for network ID '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id
+ + ' and address family ' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`" />
+</return></outcome></get-resource><set>
+<parameter name='max-level' value='-1' />
+</set><for index='subnets-index' start='0' end='`$db.eipam-ip-subnets_length`' >
+<block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $db.eipam-ip-subnets[$subnets-index].entity-id'
+ pfx='db.eipam-ip-subnet-keys[]'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading EIPAM_IP_SUBNET_KEYS table" />
+</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="`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '
+ + $db.eipam-ip-subnets[$subnets-index].entity-id`" /></return></outcome></get-resource><for index='keys-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >
+<block atomic="true"><switch test='`$db.eipam-ip-subnet-keys[$keys-index].level &gt; $max-level`'>
+<outcome value='true'>
+<set>
+<parameter name='max-level' value='`$db.eipam-ip-subnet-keys[$keys-index].level`' />
+<parameter name='selected-entity-id' value='`$db.eipam-ip-subnet-keys[$keys-index].entity-id`' />
+<parameter name='selected-plan-name' value='`$db.eipam-ip-subnets[$subnets-index].plan-name`' />
+</set></outcome></switch></block></for><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $selected-entity-id order by level'
+ pfx='db.eipam-ip-subnet-keys[]'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading EIPAM_IP_SUBNET_KEYS table" />
+</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="`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '
+ + $selected-entity-id`" /></return></outcome></get-resource><for index='request-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' >
+<block atomic="true"><for index='level-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >
+<set>
+<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-name'
+ value='`$db.eipam-ip-subnet-keys[$level-index].key-name`' />
+<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-value'
+ value='`$db.eipam-ip-subnet-keys[$level-index].key-value`' />
+</set></for><set>
+<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools_length'
+ value='`$db.eipam-ip-subnet-keys_length`' />
+</set><set>
+<parameter name='generate-unique-name-input.index-table-name' value='EIPAM_CLIENT_KEY_INDEX' />
+<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />
+<parameter name='generate-unique-name-input.name-table-type' value='CLIENT_KEY' />
+<parameter name='generate-unique-name-input.prefix' value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version + ':'`" />
+<parameter name='generate-unique-name-input.index-length' value='' />
+</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+</return></outcome></call><set>
+<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].client-key'
+ value='`$generate-unique-name-output.generated-name`' />
+<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].info'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />
+<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].mask'
+ value='32' />
+</set></block></for><set>
+<parameter name='eipam-ip-block.plans[$plans-index].requests_length'
+ value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' />
+</set></block></for><set>
+<parameter name='eipam-ip-block.plans[$plans-index].plan-name' value='`$selected-plan-name`' />
+<parameter name='eipam-ip-block.plans[$plans-index].address-family'
+ value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`' />
+</set><set>
+<parameter name='plans-index' value='`$plans-index + 1`' />
+</set></block></outcome></switch></for></block></for></block></for><set>
+<parameter name='eipam-ip-block.plans_length' value='`$plans-index`' />
+</set><!--EIPAM plug-in needs this attribute set with this name--><set>
+<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />
+</set><switch test='`$plans-index &gt; 0`'>
+<outcome value='true'>
+<execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="assignIPAddress"><outcome value='failure'><return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while obtaining new address blocks from EIPAM." />
+</return></outcome></execute></outcome></switch><set>
+<parameter name='plans-index' value='0' />
+</set><for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+<for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >
+<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>
+<outcome value='N'>
+<block atomic="true"><for index='ip-index' start='0' end='`$eipam-ip-block.plans[$plans-index].requests_length`' >
+<set>
+<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].network-ips.network-ip[$ip-index]'
+ value='`$eipam-ip-block.plans[$plans-index].requests[$ip-index].ip-prefix`' />
+</set></for><set>
+<parameter name='plans-index' value='`$plans-index + 1`' />
+</set></block></outcome></switch></for></for></for><set>
+<parameter name='vf-module-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $service-data.service-topology.service-topology-identifier.service-instance-id
+ + '/service-data/vnfs/vnf/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-id
+ + '/vnf-data/vf-modules/vf-module/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ + '/vf-module-data/vf-module-topology/'`"/>
+
+</set><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+<parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
+<parameter name="model-invariant-id" value="`$tmp.vf-module-topology.ecomp-model-information.model-invariant-uuid`" />
+<parameter name="model-version-id" value="`$tmp.vf-module-topology.ecomp-model-information.model-uuid`" />
+<parameter name="model-customization-id" value="`$tmp.vf-module-topology.ecomp-model-information.model-customization-uuid`" />
+<parameter name="selflink" value="`$vf-module-object-path`" />
+<outcome value='failure'>
+<block atomic="true"><switch test='`$plans-index &gt; 0`'>
+<outcome value='true'>
+<block atomic="true"><set>
+<parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
+</set><update plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL"
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" ><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 EIPAM_IP_ASSIGNMENTS table on rollback" />
+</return></outcome></update><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+<parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in EIPAM unassign IP address on rollback" />
+</return></outcome></execute></block></outcome></switch><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module in AAI" />
+</return></block></outcome><outcome value='not-found'>
+<block atomic="true"><switch test='`$plans-index &gt; 0`'>
+<outcome value='true'>
+<block atomic="true"><set>
+<parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
+</set><update plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL"
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" ><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 EIPAM_IP_ASSIGNMENTS table on rollback" />
+</return></outcome></update><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+<parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in EIPAM unassign IP address on rollback" />
+</return></outcome></execute></block></outcome></switch><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+</return></block></outcome></update><for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
+<outcome value='failure'>
+<block atomic="true"><switch test='`$plans-index &gt; 0`'>
+<outcome value='true'>
+<block atomic="true"><set>
+<parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
+</set><update plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL"
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" ><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 EIPAM_IP_ASSIGNMENTS table on rollback" />
+</return></outcome></update><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+<parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in EIPAM unassign IP address on rollback" />
+</return></outcome></execute></block></outcome></switch><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
+</return></block></outcome><outcome value='not-found'>
+<block atomic="true"><switch test='`$plans-index &gt; 0`'>
+<outcome value='true'>
+<block atomic="true"><set>
+<parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
+</set><update plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL"
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" ><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 EIPAM_IP_ASSIGNMENTS table on rollback" />
+</return></outcome></update><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+<parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in EIPAM unassign IP address on rollback" />
+</return></outcome></execute></block></outcome></switch><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+</return></block></outcome></save></for></for><for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+<for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+<block atomic="true"><delete plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
+ AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
+ AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' ><outcome value='failure'>
+<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+<parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+</record></outcome></delete><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL"
+key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , 'att-aic')" ><outcome value='failure'>
+<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+<parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+</record></outcome></save></block></for></for><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
+ value='$vf-module-topology-operation-input.sdnc-request-header.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
+ value='$vf-module-topology-operation-input.request-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
+ value='$vf-module-topology-operation-input.service-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
+ value='$vf-module-topology-operation-input.vnf-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
+ value='$vf-module-topology-operation-input.vf-module-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
+ value='$vf-module-topology-operation-input.vf-module-request-input.' />
+
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ value='PendingCreate' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+<parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
+</execute><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.xml
new file mode 100755
index 00000000..260f622b
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.xml
@@ -0,0 +1,95 @@
+<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='vf-module-topology-operation-deactivate' mode='sync'>
+<block atomic="true"><switch test='`$vf-module-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteVfModuleInstance'>
+<block>
+</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="If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'" />
+</return></outcome></switch><set>
+<parameter name='vnf-index' value='-1' />
+</set><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="There are no VNFs defined in MD-SAL" />
+</return></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='vnf-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vnf-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`" />
+</return></outcome></switch><set>
+<parameter name='vf-module-index' value='-1' />
+</set><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`" />
+</return></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='vf-module-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vf-module-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`" />
+</return></outcome></switch><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-topology.vf-module-assignments.vf-module-status' value='PendingDelete' />
+</set><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+<parameter name="orchestration-status" value="PendingDelete" />
+<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 vf-module in AAI" />
+</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="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+</return></outcome></update><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
+ value='$vf-module-topology-operation-input.sdnc-request-header.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
+ value='$vf-module-topology-operation-input.request-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
+ value='$vf-module-topology-operation-input.service-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
+ value='$vf-module-topology-operation-input.vnf-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
+ value='$vf-module-topology-operation-input.vf-module-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
+ value='$vf-module-topology-operation-input.vf-module-request-input.' />
+
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ value='PendingDelete' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ value='`$vf-module-topology-operation-input.request-information.request-action`' />
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
new file mode 100755
index 00000000..79351b24
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
@@ -0,0 +1,111 @@
+<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='vf-module-topology-operation-unassign' mode='sync'>
+<block atomic="true"><switch test='`$vf-module-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteVfModuleInstance'>
+<block>
+</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="If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'" />
+</return></outcome></switch><set>
+<parameter name='vnf-index' value='-1' />
+</set><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="There are no VNFs defined in MD-SAL" />
+</return></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='vnf-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vnf-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`" />
+</return></outcome></switch><set>
+<parameter name='vf-module-index' value='-1' />
+</set><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`" />
+</return></outcome><outcome value='Other'>
+<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>
+<outcome value='true'>
+<block>
+<set>
+<parameter name='vf-module-index' value='`$idx`' />
+</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vf-module-index`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-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="Order status must not be Created" />
+</return></outcome><outcome value='Other'>
+<block atomic="true"></block></outcome></switch><set>
+<parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
+</set><update plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL"
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" ><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 EIPAM_IP_ASSIGNMENTS table" />
+</return></outcome></update><!--EIPAM plug-in needs this attribute set with this name--><set>
+<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />
+</set><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+<parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in EIPAM unassign IP address" />
+</return></outcome></execute><for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+<for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+<block atomic="true"><delete plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
+ AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
+ AND vm_name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' ><outcome value='failure'>
+<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+<parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+</record></outcome></delete></block></for></for><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+<outcome value='1'>
+<set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
+
+</set></outcome><outcome value='Other'>
+<block atomic="true"><for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+<set>
+ <parameter name="tmpidx" value="`$idx - 1`"/>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
+
+</set></for><!--EIPAM plug-in needs this attribute set with this name--><set>
+<parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
+</set><set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
+</set><set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
+
+
+</set></block></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation.xml
new file mode 100755
index 00000000..e1179056
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation.xml
@@ -0,0 +1,21 @@
+<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='vf-module-topology-operation' mode='sync'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-vf-module-input' mode='sync' >
+</call><switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign' mode='sync' >
+</call></outcome><outcome value='activate'>
+<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-activate' mode='sync' >
+</call></outcome><outcome value='deactivate'>
+<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-deactivate' mode='sync' >
+</call></outcome><outcome value='unassign'>
+<call module='GENERIC-RESOURCE-API' rpc='vf-module-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="`$vnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+</return></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-activate.xml
new file mode 100755
index 00000000..2b88a648
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-activate.xml
@@ -0,0 +1,64 @@
+<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='vnf-topology-operation-activate' mode='sync'>
+<block atomic="true"><switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateVnfInstance'>
+<block>
+</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="If svc-action is 'activate' then request-action must be 'CreateVnfInstance'" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="There are no VNFs in MD-SAL" />
+</return></outcome></switch><for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value='true'>
+<set>
+<parameter name='vnf-index' value='`$idx`' />
+</set></outcome></switch></for><switch test='`$vnf-index`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'" />
+</return></outcome></switch><switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'PendingCreate'`">
+<outcome value='false'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Order status must be PendingCreate, but is currently '
+ + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`" />
+</return></outcome></switch><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+<parameter name="prov-status" value="NVTPROV" />
+<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 generic-vnf in AAI" />
+</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+</return></outcome></update><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />
+
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
new file mode 100755
index 00000000..0b1f2d49
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
@@ -0,0 +1,383 @@
+<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='vnf-topology-operation-assign' mode='sync'>
+<block atomic="true"><switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+<outcome value='CreateVnfInstance'>
+<block>
+</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="If svc-action is 'assign' then request-action must be 'CreateVnfInstance'" />
+</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_MODEL WHERE customization_uuid = $vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid'
+ pfx='db.vf-model'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODEL table" />
+</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="`'No model found for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid`" />
+</return></outcome></get-resource><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<set>
+<parameter name='vnf-index' value='0' />
+</set></outcome><outcome value='Other'>
+<block>
+<set>
+<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
+</set><for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>
+<outcome value='true'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id
+ + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`" />
+</return></outcome></switch></for></block></outcome></switch><set>
+<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id'
+ value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type'
+ value='`$vnf-topology-operation-input.vnf-information.vnf-type`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type'
+ value='`$db.vf-model.nf-type`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role'
+ value='`$db.vf-model.nf-role`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function'
+ value='`$db.vf-model.nf-function`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code'
+ value='`$db.vf-model.nf-code`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.tenant'
+ value='`$vnf-topology-operation-input.vnf-request-input.tenant`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-cloud-region'
+ value='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`' />
+
+</set><switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>
+<outcome value=''><block atomic="true"><switch test='`$db.vf-model.ecomp-generated-naming`'>
+<outcome value='Y'><block>
+</block></outcome><outcome value='N'><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="No vnf-name was received but ecomp-generated-naming is not Y" />
+</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="No vnf-name was received but ecomp-generated-naming is not Y" />
+</return></outcome></switch><set>
+<parameter name='generate-unique-name-input.index-table-name' value='VNF_NAME_INDEX' />
+<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />
+<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />
+<parameter name='generate-unique-name-input.prefix' value="`'z' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + $db.vf-model.nf-code`" />
+<parameter name='generate-unique-name-input.index-length' value='2' />
+</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+</return></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.vnf-name' value='`$generate-unique-name-output.generated-name`' />
+</set></outcome></call></block></outcome><outcome value='Other'>
+<block atomic="true"><set>
+<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />
+<parameter name='generate-unique-name-input.supplied-name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-name`' />
+</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
+</return></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.vnf-name' value="`$vnf-topology-operation-input.vnf-request-input.vnf-name`" />
+</set></outcome></call></block></outcome></switch><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'
+ value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name'
+ value='`$tmp.vnf-name`' />
+</set><switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-invariant-uuid`'>
+<outcome value=''><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-invariant-uuid'
+ value='`$db.vf-model.invariant-uuid`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-invariant-uuid'
+ value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-invariant-uuid`' />
+</set></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-uuid`'>
+<outcome value=''><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-uuid'
+ value='`$db.vf-model.uuid`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-uuid'
+ value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-uuid`' />
+</set></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-version`'>
+<outcome value=''><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-version'
+ value='`$db.vf-model.version`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-version'
+ value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-version`' />
+</set></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-name`'>
+<outcome value=''><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-name'
+ value='`$db.vf-model.name`' />
+</set></outcome><outcome value='Other'>
+<set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-name'
+ value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-name`' />
+</set></outcome></switch><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-customization-uuid'
+ value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid`' />
+</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cloud-region"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND
+ depth='0'"
+ pfx='aai.cloud-region' local-only='false' >
+
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region not found in AAI" />
+</return></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 retrieving cloud region from AAI" />
+</return></outcome></get-resource><for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
+<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
+<outcome value='complex'>
+<block atomic="true"><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='aai-uid-split' />
+ <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
+ <parameter name='regex' value='/' />
+</execute><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli'
+ value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
+</set><break/></block></outcome></switch></for><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="availability-zones"
+ key="cloud-region.cloud-owner = 'att-aic' AND
+ cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND
+ depth='0'"
+ pfx='aai.az' local-only='false' >
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving availability zones from AAI" />
+</return></outcome></get-resource><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli`'>
+<outcome value=''><return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
+</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_TO_NETWORK_ROLE_MAPPING WHERE vf_customization_uuid = $vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid'
+ pfx='db.vf-network-role-mapping[]'>
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_TO_NETWORK_ROLE_MAPPING table" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='db.vf-network-role-mapping_length' value='0' />
+</set></outcome></get-resource><set>
+<parameter name='network-index' value='0' />
+</set><for index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'><block atomic="true"><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-networks"
+ key="l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role"
+ pfx='aai.l3-network' local-only='false'
+>
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No active l3-network found in AAI with cloud_region_id '
+ + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '
+ + $db.vf-network-role-mapping[$network-index].network-role`" />
+</return></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 retrieving l3-network from AAI" />
+</return></outcome></get-resource><set>
+<parameter name='l3-network-id' value='-1' />
+</set><block>
+<for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >
+<switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>
+<outcome value='PendingCreate'>
+<block>
+</block></outcome><outcome value='Pending Create'>
+<block>
+</block></outcome><outcome value='PendingDelete'>
+<block>
+</block></outcome><outcome value='Pending Delete'>
+<block>
+</block></outcome><outcome value='Other'>
+<for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >
+<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>
+<outcome value='cloud-region'>
+<for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
+<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
+<outcome value='cloud-region.cloud-region-id'>
+<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value == $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>
+<outcome value='true'>
+<block atomic="true"><set>
+<parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
+</set><return status='failure'>
+</return></block></outcome></switch></outcome></switch></for></outcome></switch></for></outcome></switch></for><return status='success'>
+
+</return></block><switch test='`$l3-network-id`'>
+<outcome value='-1'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`" />
+</return></outcome></switch><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'
+ value='`$db.vf-network-role-mapping[$role-index].network-role`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'
+ value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'
+ value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />
+</set><for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >
+<set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].ip-version'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />
+</set></for><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
+ value='`$aai.l3-network.l3-network[0].subnets.subnet_length`' />
+</set><set>
+<parameter name='network-index' value='`$network-index + 1`' />
+</set></block></for><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'
+ value='`$network-index`' />
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.'
+ value='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.' />
+</set><switch test='`$aai.az.availability-zone_length`'>
+<outcome value=''><switch test='`$db.vf-model.avail-zone-max-count &gt; 0`'>
+<outcome value='true'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No availability zones found in AAI for cloud region '
+ + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
+</return></outcome><outcome value='false'>
+<set>
+<parameter name='aai.az.availability-zone_length' value='0' />
+</set></outcome></switch></outcome></switch><for index='idx' start='0' end='`$aai.az.availability-zone_length`' >
+<block atomic="true"><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[$idx]'
+ value='`$aai.az.availability-zone[$idx].availability-zone-name`' />
+</set><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="availability-zone" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="availability-zone.availability-zone-name" />
+ <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$aai.az.availability-zone[$idx].availability-zone-name`" />
+<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 generic-vnf in AAI" />
+</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+</return></outcome></save></block></for><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.max-count'
+ value='`$db.vf-model.avail-zone-max-count`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length'
+ value='`$aai.az.availability-zone_length`' />
+</set><for index='vnf-nw-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+<block atomic="true"><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-nw-index].network-id`" />
+<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 generic-vnf in AAI" />
+</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+</return></outcome></save></block></for><set>
+<parameter name='vnf-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vnf-topology-operation-input.service-information.service-instance-id
+ + '/service-data/vnfs/vnf/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-id
+ + '/vnf-data/vnf-topology'`"/>
+
+</set><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+<parameter name="vnf-name" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name`" />
+<parameter name="prov-status" value="PREPROV" />
+<parameter name="operational-status" value="out-of-service-path" />
+<parameter name="equipment-role" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`" />
+<parameter name="model-invariant-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-invariant-uuid`" />
+<parameter name="model-version-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-uuid`" />
+<parameter name="model-customization-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-customization-uuid`" />
+<parameter name="selflink" value="`$vnf-object-path`" />
+<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 selflink in generic-vnf in AAI" />
+</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+</return></outcome></update><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />
+
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+</set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+<parameter name='filename' value='/var/tmp/bgb-viprend.log' />
+</execute><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.xml
new file mode 100755
index 00000000..5d5bde09
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.xml
@@ -0,0 +1,57 @@
+<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='vnf-topology-operation-deactivate' mode='sync'>
+<block atomic="true"><switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteVnfInstance'>
+<block>
+</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="If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="There are no VNFs in MD-SAL" />
+</return></outcome></switch><for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`'>
+<outcome value='true'>
+<set>
+<parameter name='vnf-index' value='`$idx`' />
+</set></outcome></switch></for><switch test='`$vnf-index`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'" />
+</return></outcome></switch><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+<parameter name="orchestration-status" value="PendingDelete" />
+<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 generic-vnf in AAI" />
+</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+</return></outcome></update><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />
+
+</set><set>
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+</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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
new file mode 100755
index 00000000..4cf91569
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
@@ -0,0 +1,64 @@
+<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='vnf-topology-operation-unassign' mode='sync'>
+<block atomic="true"><switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+<outcome value='DeleteVnfInstance'>
+<block>
+</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="If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="There are no VNFs in MD-SAL" />
+</return></outcome></switch><for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >
+<outcome value='true'>
+<set>
+<parameter name='vnf-index' value='`$idx`' />
+</set></outcome></switch></for><switch test='`$vnf-index`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'" />
+</return></outcome></switch><switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'Created'`">
+<outcome value='true'>
+<return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cannot delete a VNF in a Created state" />
+</return></outcome></switch><switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`">
+<outcome value='0'>
+<block>
+</block></outcome><outcome value=''><block>
+</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="Cannot delete the VNF because there are VFs defined" />
+</return></outcome></switch><switch test='`$service-data.vnfs.vnf_length`'>
+<outcome value='1'>
+<set>
+ <parameter name="service-data.vnfs." value=""/>
+
+</set></outcome><outcome value='Other'>
+<block atomic="true"><for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
+<set>
+ <parameter name="$tmpidx" value="`$idx - 1`"/>
+ <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
+
+</set></for><set>
+ <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1]." value=""/>
+
+</set><set>
+ <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
+
+
+</set></block></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
new file mode 100755
index 00000000..9f4ee0e6
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
@@ -0,0 +1,21 @@
+<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='vnf-topology-operation' mode='sync'>
+<block atomic="true"><call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' >
+</call><switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
+<outcome value='assign'>
+<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' >
+</call></outcome><outcome value='activate'>
+<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' >
+</call></outcome><outcome value='deactivate'>
+<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' >
+</call></outcome><outcome value='unassign'>
+<call module='GENERIC-RESOURCE-API' rpc='vnf-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="`$vnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+</return></outcome></switch><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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/SUBNET-API_managed-network-notification.xml b/platform-logic/generic-resource-api/src/main/xml/SUBNET-API_managed-network-notification.xml
new file mode 100755
index 00000000..a28aa0cc
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/SUBNET-API_managed-network-notification.xml
@@ -0,0 +1,92 @@
+<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='SUBNET-API' version='${project.version}'><method rpc='managed-network-notification' mode='sync'>
+<block><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="managed-network-notification"/>
+<parameter name="field3" value="`$managed-network-notification-input.request-id`"/>
+<parameter name="field4" value="`$managed-network-notification-input.managed-network-status.status.code`"/>
+<parameter name="field5" value="`$managed-network-notification-input.managed-network-status.status.description`"/>
+<parameter name="field6" value="`$managed-network-notification-input.managed-network-status.final-notification-indicator`"/>
+
+</record><switch test="`$managed-network-notification-input.managed-network-status.status.code`">
+
+<outcome value="Success"><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="activateSubnet">
+
+<outcome value="success"><block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
+ key="entity-id = $eipam-ip-block.entity-id" force="true">
+ <parameter name="status" value="ACTIVE" />
+
+</save><set>
+ <parameter name="eipam-ip-block.status" value="ACTIVE" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
+ <parameter name="eipam-ip-block.status" value="ACTIVE" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
+<parameter name="key1" value="SUCCESS: eipam-ip-block.status is ACTIVE."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe" key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
+ <parameter name="operational-state" value="SDNC_COMPLETED" />
+ <parameter name="summary-status" value="`$aai-summary-status-message`" />
+</update> <return status="success">
+
+</return></block></outcome><outcome value="Other">
+
+<block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
+ key="entity-id = $eipam-ip-block.entity-id" force="true">
+ <parameter name="status" value="ERROR" />
+
+</save><set>
+ <parameter name="eipam-ip-block.status" value="ERROR" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
+ <parameter name="eipam-ip-block.status" value="ERROR" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
+<parameter name="key1" value="ActivateSubnet failure, need to manually activate in EIPAM."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe"
+ key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
+ <parameter name="operational-state" value="EIPAM_ERROR" />
+ <parameter name="summary-status" value="`$aai-summary-status-message`" />
+ <parameter name="prov-status" value="PREPROV" />
+ </update> <return status="failure">
+ <parameter name="error-code" value="3000" />
+ <parameter name="error-message" value="ActivateSubnet failure, need to manually activate in EIPAM" />
+</return></block></outcome></execute></outcome><outcome value="Other"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deallocateSubnet">
+
+<outcome value="success"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePool">
+
+<outcome value="success"><block><set>
+ <parameter name="eipam-ip-block.status" value="DELETED" /></set><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
+<parameter name="key1" value="Failure from NCS and deleted pool/subnet in EIPAM."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe" key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
+ <parameter name="operational-state" value="SDN_C_BACKOUT_ERROR" />
+ <parameter name="summary-status" value="`$aai-summary-status-message`" />
+ <parameter name="prov-status" value="PREPROV" />
+</update> <return status="failure">
+ <parameter name="error-code" value="2000" />
+ <parameter name="error-message" value="Failure from NCS and deleted pool/subnet in EIPAM"/>
+
+</return></block></outcome><outcome value="Other">
+
+<block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
+ key="entity-id = $eipam-ip-block.entity-id" force="true">
+ <parameter name="status" value="DEALLOCATED" />
+
+</save><set>
+ <parameter name="eipam-ip-block.status" value="ERROR" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
+ <parameter name="eipam-ip-block.status" value="ERROR" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
+<parameter name="key1" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe"
+ key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
+ <parameter name="operational-state" value="SDN_C_BACKOUT_ERROR" />
+ <parameter name="summary-status" value="`$aai-summary-status-message`" />
+ <parameter name="prov-status" value="PREPROV" />
+ </update> <return status="failure">
+ <parameter name="error-code" value="1000" />
+ <parameter name="error-message" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete." />
+</return></block></outcome></execute></outcome><outcome value="Other">
+
+<block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
+ key="entity-id = $eipam-ip-block.entity-id" force="true">
+ <parameter name="status" value="ERROR" />
+
+</save><set>
+ <parameter name="eipam-ip-block.status" value="ERROR" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
+ <parameter name="eipam-ip-block.status" value="ERROR" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
+<parameter name="key1" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe"
+ key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
+ <parameter name="operational-state" value="SDN_C_BACKOUT_ERROR" />
+ <parameter name="summary-status" value="`$aai-summary-status-message`" />
+ <parameter name="prov-status" value="PREPROV" />
+ </update> <return status="failure">
+ <parameter name="error-code" value="1000" />
+ <parameter name="error-message" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete." />
+</return></block></outcome></execute></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/SUBNET-API_subnet-allocated-notification.xml b/platform-logic/generic-resource-api/src/main/xml/SUBNET-API_subnet-allocated-notification.xml
new file mode 100755
index 00000000..984d4edf
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/SUBNET-API_subnet-allocated-notification.xml
@@ -0,0 +1,455 @@
+<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='SUBNET-API' version='${project.version}'><method rpc='subnet-allocated-notification' mode='sync'>
+<block><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="subnet-allocated-notification"/>
+<parameter name="field3" value="`$eipam-ip-block.request-id`"/>
+<parameter name="field4" value="`$eipam-ip-block.entity-id`"/>
+<parameter name="field5" value="`$eipam-ip-block.ptnii-name`"/>
+<parameter name="field6" value="`$eipam-ip-block.ip-address`"/>
+<parameter name="field7" value="`$eipam-ip-block.prefix-length`"/>
+<parameter name="field8" value="`$eipam-ip-block.status`"/>
+<parameter name="field9" value="`$tmp.key-value`"/></record><!--Need to know which ipv version to get the plan name from the network-model.--><switch test="`$eipam-ip-block.ptnii-name`"><!--If there's ptnii-name, then it's Gamma service--><outcome value='Other'><configure adaptor="com.att.sdnctl.sli.adaptor.ncs.ncsAdaptor" key="SNIIR" activate="true">
+ <parameter name="input.request-id" value="`$eipam-ip-block.request-id`" />
+ <parameter name="input.source" value="SDNC" />
+ <parameter name="input.ptnii-name" value="`$eipam-ip-block.ptnii-name`" />
+ <parameter name="input.ip-address" value="`$eipam-ip-block.ip-address`" />
+ <parameter name="input.mask" value="`$eipam-ip-block.prefix-length`" /><outcome value="success">
+<block><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="UPDATE EIPAM_IP_SUBNETS
+ SET status = 'PENDING-ACTIVE'
+ WHERE entity_id = $eipam-ip-block.entity-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+</save><set>
+ <parameter name="eipam-ip-block.status" value="PENDING-ACTIVE" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
+ <parameter name="eipam-ip-block.status" value="PENDING-ACTIVE" /></save> <return status="success">
+
+</return></block></outcome><outcome value="Other">
+
+<!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePool">
+
+<outcome value="success">
+<block><set>
+ <parameter name="eipam-ip-block.status" value="DELETED" /></set><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
+<parameter name="key1" value="IpBlockInstall failure and pool deleted in EIPAM."/>
+</execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe" key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
+ <parameter name="operational-state" value="NCS_IP_SUBNET_INSTALL_ERROR" />
+ <parameter name="summary-status" value="`$aai-summary-status-message`" />
+ <parameter name="prov-status" value="PREPROV" />
+</update> <return status="failure">
+ <parameter name="error-code" value="1000" />
+ <parameter name="error-message" value="IpBlockInstall failure and deletePool deleted in EIPAM" />
+</return></block></outcome><outcome value="Other">
+
+<block><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="UPDATE EIPAM_IP_SUBNETS
+ SET status = 'ERROR'
+ WHERE entity_id = $eipam-ip-block.entity-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+</save><set>
+ <parameter name="eipam-ip-block.status" value="ERROR" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
+ <parameter name="eipam-ip-block.status" value="ERROR" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
+<parameter name="key1" value="IpBlockInstall failure and pool deletion failed in EIPAM, need to manually delete."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe" key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
+ <parameter name="operational-state" value="NCS_IP_SUBNET_INSTALL_ERROR" />
+ <parameter name="summary-status" value="`$aai-summary-status-message`" />
+ <parameter name="prov-status" value="PREPROV" />
+</update> <return status="failure">
+ <parameter name="error-code" value="1000" />
+ <parameter name="error-message" value="IpBlockInstall failure and deletePool failed in EIPAM, need to manually delete" />
+</return></block></outcome></execute></outcome></configure></outcome><!--If no ptnii-name, check if VIPR or SRIOV--><outcome value=''><execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="startsWith" emitsOutcome='true' >
+<parameter name="source" value="`toUpperCase($eipam-ip-block.plan-name)`" />
+<parameter name="target" value="AIC_" />
+
+<outcome value='false'>
+ <return status="failure">
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Unknown Address Plan - not supported!" />
+</return></outcome><outcome value='true'>
+<block atomic='true'><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * FROM EIPAM_IP_POOLS where plan_name = $eipam-ip-block.plan-name and level = 2 and key_value = $tmp.level2-key-value ;"
+ pfx='tmp.eipam-pool-row'>
+
+<outcome value='failure'>
+<block atomic='true'><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="subnet-allocated-notification"/>
+<parameter name="field3" value="`$eipam-ip-block.request-id`"/>
+<parameter name="field4" value="`$eipam-ip-block.entity-id`"/>
+<parameter name="field5" value="`$eipam-ip-block.ptnii-name`"/>
+<parameter name="field6" value="`$eipam-ip-block.ip-address`"/>
+<parameter name="field7" value="`$eipam-ip-block.prefix-length`"/>
+<parameter name="field8" value="`$eipam-ip-block.status`"/>
+<parameter name="field9" value="Failed to find this record in DB!"/>
+
+</record> <return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Unknown EIPAM pool - not found in DB!" />
+</return></block></outcome><outcome value="not-found"><block atomic='true'><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="subnet-allocated-notification"/>
+<parameter name="field3" value="`$eipam-ip-block.request-id`"/>
+<parameter name="field4" value="`$eipam-ip-block.entity-id`"/>
+<parameter name="field5" value="`$eipam-ip-block.ptnii-name`"/>
+<parameter name="field6" value="`$eipam-ip-block.ip-address`"/>
+<parameter name="field7" value="`$eipam-ip-block.prefix-length`"/>
+<parameter name="field8" value="`$eipam-ip-block.status`"/>
+<parameter name="field9" value="This record is not found in DB!"/></record> <return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Unknown EIPAM pool - not found in DB!" />
+</return></block></outcome></get-resource><!--initial subnet should exists--><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.plan_name = $eipam-ip-block.plan-name and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value and s.address_family = $tmp.version ; "
+ pfx='pfx.eipam-initial-subnet'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Initial subnet not found, cannot auto extend." />
+ </return></outcome></get-resource><!--check if new subnet already exists, possibly from previous attempt.--><get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * from EIPAM_IP_SUBNETS s WHERE s.plan_name = $eipam-ip-block.plan-name and s.entity_id = $eipam-ip-block.entity-id and s.ip_address = $eipam-ip-block.ip-address ; "
+ pfx='pfx.eipam-subnet-with-same-ip'>
+
+<outcome value='failure'>
+<return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value="not-found"></outcome></get-resource><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $pfx.eipam-initial-subnet.network-id"
+ local-only="false"
+ pfx="aai.l3-network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="'l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'Not found in AnAI'" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="'Error retrieving l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'from AnAI'" /></return></outcome></get-resource><set>
+<parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+</set><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNETS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ service_type = $pfx.eipam-initial-subnet.service-type ,
+ ip_address = $eipam-ip-block.ip-prefix ,
+ prefix_length = $eipam-ip-block.mask ,
+ plan_name = $eipam-ip-block.plan-name ,
+ status = 'PENDING_ACTIVE' ,
+ pool_id = $pfx.eipam-initial-subnet.pool-id ,
+ address_family = $pfx.eipam-initial-subnet.address-family ,
+ network_id = $pfx.eipam-initial-subnet.network-id ; "
+ force='true'
+ pfx='pfx.eipam-new-subnet'>
+<outcome value='failure'><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Insert to DB table EIPAM_IP_SUBNETS failed." />
+ </return></outcome><outcome value='success'>
+</outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ; "
+ force='true'
+ pfx='pfx.eipam-subnet-level1'>
+<outcome value='success'>
+</outcome><outcome value='failure'><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Insert to DB table EIPAM_IP_SUBNET_KEYS failed." />
+ </return></outcome></save><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_SUBNET_KEYS
+ SET
+ entity_id = $eipam-ip-block.entity-id ,
+ key_name = $tmp.level2-key-name ,
+ key_value = $tmp.level2-key-value ,
+ level = 2 ; "
+ force='true'
+ pfx='pfx.eipam-subnet-level2'>
+<outcome value='success'>
+</outcome><outcome value='failure'><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Insert to DB table EIPAM_IP_SUBNET_KEYS failed." />
+ </return></outcome></save><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="Added an entry for subnet-allocated-notification in EIPAM_IP_SUBNETS and EIPAM_IP_SUBNET_KEYS"/>
+<parameter name="field3" value="`$eipam-ip-block.request-id`"/>
+<parameter name="field4" value="`$eipam-ip-block.entity-id`"/>
+<parameter name="field5" value="`$pfx.eipam-initial-subnet.network-id`"/>
+<parameter name="field6" value="`$eipam-ip-block.ip-address`"/>
+<parameter name="field7" value="`$eipam-ip-block.prefix-length`"/>
+<parameter name="field8" value="`$eipam-ip-block.status`"/>
+<parameter name="field9" value="`$tmp.key-value`"/></record><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $pfx.eipam-initial-subnet.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id"
+ local-only="false"
+ pfx="tmp.aai-initial-subnet">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="'l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id + ' is Not found in AnAI'" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="'Error retrieving l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id + ' from AnAI'" /></return></outcome></get-resource><switch test='`$aai.l3-network.subnets.subnet_length`'>
+<outcome value=''>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="'No subnets found in AAI for network-id=' + $pfx.eipam-initial-subnet.network-id" /></return></outcome><outcome value='Other'>
+<set>
+<parameter name='tmp.l3-network.subnet.subnet-name' value="`$aai.l3-network.network-name + '_S' + $aai.l3-network.subnets.subnet_length`" />
+</set></outcome></switch><execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getSubnetAddresses">
+ <parameter name="ipAddress" value="`$eipam-ip-block.ip-prefix`" />
+ <parameter name="ipVersion" value="`tmp.version`" />
+ <parameter name="subnet" value="`$eipam-ip-block.prefix-length`" />
+ <parameter name="ctxGateway" value="tmp.return.generate.gateway-address" />
+ <parameter name="ctxDhcpStart" value="tmp.return.generate.dhcp-start-address" />
+ <parameter name="ctxDhcpEnd" value="tmp.return.generate.dhcp-end-address" />
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to generate gateway addresses using IpAddressTools" /></return></outcome></execute><switch test='`$tmp.aai-initial-subnet.dhcp-enabled`'>
+<outcome value='Y'>
+<block atomic="true"><set>
+<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='true' />
+<parameter name='tmp.l3-network.subnet.dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />
+<parameter name='tmp.l3-network.subnet.dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />
+
+
+</set></block></outcome><outcome value='N'>
+<block atomic="true"><set>
+<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='false' />
+<parameter name='tmp.l3-network.subnet.dhcp-start' value='' />
+<parameter name='tmp.l3-network.subnet.dhcp-end' value='' />
+
+
+</set></block></outcome></switch><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $pfx.eipam-initial-subnet.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$pfx.eipam-initial-subnet.network-id`" />
+<parameter name="subnet-id" value="`$eipam-ip-block.entity-id`" />
+<parameter name="subnet-name" value="`$tmp.l3-network.subnet.subnet-name`" />
+<parameter name="gateway-address" value="`$tmp.return.generate.gateway-address`" />
+<parameter name="network-start-address" value="`$eipam-ip-block.ip-prefix`" />
+<parameter name="cidr-mask" value="`$eipam-ip-block.prefix-length`" />
+<parameter name="ip-version" value="`$tmp.version`" />
+<parameter name="dhcp-start" value="`$tmp.l3-network.subnet.dhcp-start`" />
+<parameter name="dhcp-end" value="`$tmp.l3-network.subnet.dhcp-end`" />
+<parameter name="dhcp-enabled" value="`$tmp.l3-network.subnet.dhcp-enabled`" />
+<parameter name="orchestration-status" value="PendingCreate" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="'Cannot save subnet with l3 network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id + ' in AnAI'" /></return></outcome><outcome value='not-found'>
+</outcome></save><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="Added a subnetin AAI"/>
+<parameter name="field3" value="`$eipam-ip-block.request-id`"/>
+<parameter name="field4" value="`$eipam-ip-block.entity-id`"/>
+<parameter name="field5" value="`$pfx.eipam-initial-subnet.network-id`"/>
+<parameter name="field6" value="`$eipam-ip-block.ip-address`"/>
+<parameter name="field7" value="`$eipam-ip-block.prefix-length`"/>
+<parameter name="field8" value="`$eipam-ip-block.status`"/>
+<parameter name="field9" value="`$tmp.key-value`"/></record><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='subnet' />
+<parameter name='api-action' value='add' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />
+<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />
+<parameter name='ip-prefix-len' value='`$eipam-ip-block.prefix-length`' />
+<parameter name='dns-server-address' value='0.0.0.0' />
+<parameter name='enable-dhcp' value='`$tmp.l3-network.subnet.dhcp-enabled`' />
+<parameter name='default-gateway' value='`$tmp.return.generate.gateway-address`' />
+<parameter name='subnet-name' value='`$tmp.l3-network.subnet.subnet-name`' />
+<parameter name='start' value='`$tmp.l3-network.subnet.dhcp-start`' />
+<parameter name='end' value='`$tmp.l3-network.subnet.dhcp-end`' />
+<outcome value='success'>
+<block>
+</block></outcome><outcome value='failure'>
+<block>
+<set>
+ <parameter name="eipam-ip-block.status" value="ERROR" /></set><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="UPDATE EIPAM_IP_SUBNETS
+ SET status = 'ERROR'
+ WHERE entity_id = $eipam-ip-block.entity-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+<outcome value='failure'>
+<return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to ERROR in mysql." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to ERROR in mysql." />
+ </return></outcome></save><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $pfx.eipam-initial-subnet.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id"></delete><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
+ <parameter name="eipam-ip-block.status" value="ERROR" /></save><return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to create subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `" />
+</return></block></outcome></execute><record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="Added a subnet in Contrail"/>
+<parameter name="field3" value="`$eipam-ip-block.request-id`"/>
+<parameter name="field4" value="`$eipam-ip-block.entity-id`"/>
+<parameter name="field5" value="`$pfx.eipam-initial-subnet.network-id`"/>
+<parameter name="field6" value="`$eipam-ip-block.ip-address`"/>
+<parameter name="field7" value="`$eipam-ip-block.prefix-length`"/>
+<parameter name="field8" value="`$eipam-ip-block.status`"/>
+<parameter name="field9" value="`$tmp.key-value`"/></record><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $pfx.eipam-initial-subnet.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id" >
+ <parameter name="orchestration-status" value="Created" />
+ <outcome value='not-found'>
+</outcome><outcome value='failure'>
+<block>
+<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+<parameter name="logger" value="message-log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="Update status to Created failed in AAI"/>
+<parameter name="field3" value="`$eipam-ip-block.request-id`"/>
+<parameter name="field4" value="`$eipam-ip-block.entity-id`"/>
+<parameter name="field5" value="`$pfx.eipam-initial-subnet.network-id`"/>
+<parameter name="field6" value="`$eipam-ip-block.ip-address`"/>
+<parameter name="field7" value="`$eipam-ip-block.prefix-length`"/>
+<parameter name="field8" value="`$eipam-ip-block.status`"/>
+<parameter name="field9" value="`$tmp.key-value`"/></record><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="UPDATE EIPAM_IP_SUBNETS
+ SET status = 'ERROR'
+ WHERE entity_id = $eipam-ip-block.entity-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+<outcome value='failure'>
+<return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to ERROR in mysql." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to ERROR in mysql." />
+ </return></outcome></save><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $pfx.eipam-initial-subnet.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id"></delete><execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >
+<parameter name='api-name' value='subnet' />
+<parameter name='api-action' value='delete' />
+<parameter name='resp-prefix' value='contrailResp' />
+<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />
+<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to delete subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `" />
+</return></outcome></execute><set>
+ <parameter name="eipam-ip-block.status" value="ERROR" /></set><return status='failure'>
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="'Cannot save subnet status to Created with l3 network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id + ' in AnAI'" /></return></block></outcome></update><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="UPDATE EIPAM_IP_SUBNETS
+ SET status = 'CREATED'
+ WHERE entity_id = $eipam-ip-block.entity-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+<outcome value='failure'>
+<return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to CREATED in mysql." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to CREATED in mysql." />
+ </return></outcome></save><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="activateSubnet">
+<outcome value='failure'><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while activating subnet in EIPAM." />
+ </return></outcome></execute><save
+ plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'
+ resource='SQL'
+ key="UPDATE EIPAM_IP_SUBNETS
+ SET status = 'ACTIVE'
+ WHERE entity_id = $eipam-ip-block.entity-id ; "
+ force='true'
+ pfx='pfx.eipam-subnet-row'>
+<outcome value='failure'>
+<return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to active in mysql." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while updating subnet to active in mysql." />
+ </return></outcome><outcome value='success'>
+</outcome></save><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $aai.l3-network.network-id
+ AND subnet.subnet-id = $eipam-ip-block.entity-id" >
+<parameter name="orchestration-status" value="Created" />
+ <outcome value='failure'>
+<return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for subnet." />
+ </return></outcome><outcome value="not-found"><return status="failure">
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure updating orchestration-status in AAI for subnet. Subnet not found." />
+ </return></outcome></update> <return status="success">
+ <parameter name='eipam-ip-block.request-id' value="`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`" />
+</return></block></outcome></execute></outcome></switch></block></method></service-logic>