aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic
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
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')
-rw-r--r--platform-logic/generic-resource-api/pom.xml54
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_create-l3-subnet.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-create-network-role-pool.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-l3network-network-id.json398
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-panorama-name.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-unique-name.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-activate.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-deactivate.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-unassign.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation.json748
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-create-policy.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-delete-policy.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-update-notify-operation.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_process-eipam-pools.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-create.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-assign.json881
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-deactivate.json388
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-delete.json655
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation.json252
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-contrail-route-input.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-network-input.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-security-zone-input.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-service-input.json531
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vf-module-input.json575
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json487
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.json790
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.json682
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation.json271
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-activate.json452
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.json408
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json588
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json271
-rw-r--r--platform-logic/generic-resource-api/src/main/json/SUBNET-API_managed-network-notification.json1
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/SUBNET-API_subnet-allocated-notification.json1
-rw-r--r--platform-logic/generic-resource-api/src/main/resources/graph.versions51
-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
-rw-r--r--platform-logic/pom.xml1
105 files changed, 18229 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/pom.xml b/platform-logic/generic-resource-api/pom.xml
new file mode 100644
index 00000000..e3ac7b1f
--- /dev/null
+++ b/platform-logic/generic-resource-api/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.sdnc.oam</groupId>
+ <artifactId>platform-logic</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>platform-logic-generic-resource-api</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Platform Logic : Generic Resource API</name>
+ <description>Contains platform-level service logic for the Generic Resource API</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>../target/svclogic/graphs/generic-resource-api</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/xml</directory>
+ <includes>
+ <include>*.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>graph.versions</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json
new file mode 100755
index 00000000..1d4451a0
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json
@@ -0,0 +1 @@
+[{"id":"44e2a591.0adfcc","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":65,"z":"64165859.65c218","wires":[["9d11986f.fe6c88"]]},{"id":"9d11986f.fe6c88","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":276.2380828857422,"y":139.95239353179932,"z":"64165859.65c218","wires":[["25a64b97.aaff84"]]},{"id":"25a64b97.aaff84","type":"method","name":"contrail-route-topology-operation-activate","xml":"<method rpc='contrail-route-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":356.1548500061035,"y":209.1904420852661,"z":"64165859.65c218","wires":[["e75d32c1.7f5e3"]]},{"id":"e75d32c1.7f5e3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":264.4761848449707,"y":352.523784160614,"z":"64165859.65c218","wires":[["3c3c6bb5.b74fe4","748de0e2.cf35d","5d6b0eae.8b9ab","7e74e9f3.a6ed98","dd3b156a.4c09b8","a48e302.6f113d","bacf284d.e94b18","e41c133b.c89b1","b10213e8.7105b","6f67eab4.30b314","c4b97b0e.a9a448","82a00528.729748","3396a245.5af4be","4afec706.648e68","6e8ca02f.7313","54889c95.317884","c2672028.9a192","bc559c11.5308","a6675806.e2dc08","f8a3e8b0.ff98a8","f2b08893.418cf8","f43488c4.18e4b8"]]},{"id":"748de0e2.cf35d","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":526.7380561828613,"y":326.3333215713501,"z":"64165859.65c218","wires":[]},{"id":"3c3c6bb5.b74fe4","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n\n","comments":"","x":573.9973182678223,"y":292.5925874710083,"z":"64165859.65c218","wires":[]},{"id":"5d6b0eae.8b9ab","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":595.8505554199219,"y":358.23155403137207,"z":"64165859.65c218","wires":[[]]},{"id":"dd3b156a.4c09b8","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":600.6616058349609,"y":500.45952796936035,"z":"64165859.65c218","wires":[["2d1118d7.ca9798","1d99ce09.530022"]]},{"id":"7e74e9f3.a6ed98","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":561.0648460388184,"y":422.01722526550293,"z":"64165859.65c218","wires":[[]]},{"id":"2d1118d7.ca9798","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":845.9577102661133,"y":501.26734161376953,"z":"64165859.65c218","wires":[["ea375293.82727"]]},{"id":"ea375293.82727","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1014.9577140808105,"y":499.7672424316406,"z":"64165859.65c218","wires":[["d774b31f.c823"]]},{"id":"d774b31f.c823","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1225.814956665039,"y":499.3863716125488,"z":"64165859.65c218","wires":[["3663a4b3.12200c","5fbd0011.d76a1"]]},{"id":"3663a4b3.12200c","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1415.1482620239258,"y":499.3863296508789,"z":"64165859.65c218","wires":[["ef8b2c8f.54ea4"]]},{"id":"5800ba19.309e44","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1891.1962203979492,"y":492.62452602386475,"z":"64165859.65c218","wires":[]},{"id":"ef8b2c8f.54ea4","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1599.6721515655518,"y":496.29116344451904,"z":"64165859.65c218","wires":[["5800ba19.309e44","16951cf9.185633","5548694b.3db0b8","73094ec5.b6eab"]]},{"id":"16951cf9.185633","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1899.1961479187012,"y":556.719669342041,"z":"64165859.65c218","wires":[]},{"id":"4cd61be.86e0ce4","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":616.8148498535156,"y":466.3386821746826,"z":"64165859.65c218","wires":[]},{"id":"5548694b.3db0b8","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1907.196002960205,"y":523.6244812011719,"z":"64165859.65c218","wires":[["3a1379d8.d399a6","b6f3ab65.fc2188"]]},{"id":"3a1379d8.d399a6","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2129.0339584350586,"y":507.7197847366333,"z":"64165859.65c218","wires":[["84ee09a1.dc5b98"]]},{"id":"b6f3ab65.fc2188","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2142.8436737060547,"y":538.0531902313232,"z":"64165859.65c218","wires":[["fcf09d0b.021fd"]]},{"id":"fcf09d0b.021fd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + ', expecting Created.'`\" />\n","comments":"","x":2383.462423324585,"y":540.9577798843384,"z":"64165859.65c218","wires":[]},{"id":"73094ec5.b6eab","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1979.0532722473145,"y":459.4340181350708,"z":"64165859.65c218","wires":[]},{"id":"d9e02c4.1b7dcd","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":531.9576530456543,"y":391.62435245513916,"z":"64165859.65c218","wires":[]},{"id":"d9fc2f4b.0e8a1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1601.666997909546,"y":642.3333854675293,"z":"64165859.65c218","wires":[]},{"id":"1d99ce09.530022","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":837.809513092041,"y":536.3334264755249,"z":"64165859.65c218","wires":[["a5703b2e.575d28"]]},{"id":"a5703b2e.575d28","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1017.8094635009766,"y":536.9999771118164,"z":"64165859.65c218","wires":[["d9fc2f4b.0e8a1"]]},{"id":"a48e302.6f113d","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":510.66661071777344,"y":537.5237884521484,"z":"64165859.65c218","wires":[]},{"id":"5fbd0011.d76a1","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1403.4762153625488,"y":536.6666898727417,"z":"64165859.65c218","wires":[["d9fc2f4b.0e8a1"]]},{"id":"84ee09a1.dc5b98","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2367.333469390869,"y":506.66669750213623,"z":"64165859.65c218","wires":[[]]},{"id":"6b294610.d0fca8","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":855.2856597900391,"y":795.7143956422806,"z":"64165859.65c218","wires":[["8bf366e0.30e6f8"]]},{"id":"a68172da.f1ef3","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":578.484001159668,"y":806.9609127044678,"z":"64165859.65c218","wires":[["5f9b62c9.68560c","6b294610.d0fca8","e4999668.493168"]]},{"id":"5f9b62c9.68560c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.0077667236328,"y":830.1989995241165,"z":"64165859.65c218","wires":[["8bf366e0.30e6f8"]]},{"id":"8bf366e0.30e6f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'`\" />","comments":"","x":1000.1187286376953,"y":826.4212285280228,"z":"64165859.65c218","wires":[]},{"id":"e4999668.493168","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2857208251953,"y":861.7143956422806,"z":"64165859.65c218","wires":[["b98ab8b5.b478e8"]]},{"id":"b98ab8b5.b478e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1005.9522857666016,"y":860.0477238893509,"z":"64165859.65c218","wires":[[]]},{"id":"ff8773cb.3c81e","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":556.7142181396484,"y":775.7143898010254,"z":"64165859.65c218","wires":[]},{"id":"14eb9a5f.2b7306","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":873,"y":1059.4287095069885,"z":"64165859.65c218","wires":[["805cd670.1362a8"]]},{"id":"bacf284d.e94b18","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":601.6269226074219,"y":1066.960970401764,"z":"64165859.65c218","wires":[["89010b42.75b1b8","14eb9a5f.2b7306","e2f3ea25.4379d8"]]},{"id":"89010b42.75b1b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":865.7221069335938,"y":1093.9133133888245,"z":"64165859.65c218","wires":[["805cd670.1362a8"]]},{"id":"805cd670.1362a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'`\" />","comments":"","x":1017.8330688476562,"y":1090.1355423927307,"z":"64165859.65c218","wires":[]},{"id":"e2f3ea25.4379d8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":875.5715103149414,"y":1128.2857780456543,"z":"64165859.65c218","wires":[["ae8077d1.7e13b8"]]},{"id":"ae8077d1.7e13b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1028.2380752563477,"y":1126.6191062927246,"z":"64165859.65c218","wires":[[]]},{"id":"369a7d5c.fb1bf2","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":574.4285430908203,"y":1035.1429624557495,"z":"64165859.65c218","wires":[]},{"id":"e41c133b.c89b1","type":"set","name":"set policy fq-name","xml":"<set>\n<parameter name='tmp.fq-name' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` \" />\n","comments":"","x":527.4286270141602,"y":852.8571510314941,"z":"64165859.65c218","wires":[]},{"id":"b10213e8.7105b","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":589.4233093261719,"y":886.9469985961914,"z":"64165859.65c218","wires":[]},{"id":"82a00528.729748","type":"execute","name":"execute Contrail API apply network policy to source network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":665.6138305664062,"y":959.9471964836121,"z":"64165859.65c218","wires":[["bf44764e.6b5a08","d0dde1cb.d90ed"]]},{"id":"bf44764e.6b5a08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1021.2803268432617,"y":960.3754234313965,"z":"64165859.65c218","wires":[["12a9c022.986f1"]]},{"id":"d0dde1cb.d90ed","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1019.3756484985352,"y":993.3753631971776,"z":"64165859.65c218","wires":[["84f2d70e.48c6a8"]]},{"id":"84f2d70e.48c6a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1179.280418395996,"y":992.7087297439575,"z":"64165859.65c218","wires":[]},{"id":"12a9c022.986f1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1173.4708099365234,"y":961.042148437351,"z":"64165859.65c218","wires":[[]]},{"id":"6f67eab4.30b314","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":538,"y":572,"z":"64165859.65c218","wires":[]},{"id":"c4b97b0e.a9a448","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":582,"y":732,"z":"64165859.65c218","wires":[["5e9aa570.67bd9c","3c95f25.131720e"]]},{"id":"5e9aa570.67bd9c","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":938.0002174377441,"y":730.6663794517517,"z":"64165859.65c218","wires":[["15e26772.92ed49"]]},{"id":"3c95f25.131720e","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":933.6670341491699,"y":693.6661796569824,"z":"64165859.65c218","wires":[["e75d9c15.8524a"]]},{"id":"c94aaa39.361bb8","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1329.8256530761719,"y":730.6822066307068,"z":"64165859.65c218","wires":[["31d38ee0.d6f1c2","91dd3bf.a1bacc8"]]},{"id":"31d38ee0.d6f1c2","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1618.8256530761719,"y":732.682267665863,"z":"64165859.65c218","wires":[["499747c7.a55a48"]]},{"id":"91dd3bf.a1bacc8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1598.8256530761719,"y":767.682267665863,"z":"64165859.65c218","wires":[["af14b3c3.48097"]]},{"id":"15e26772.92ed49","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1072.111473083496,"y":731.1107840538025,"z":"64165859.65c218","wires":[["c94aaa39.361bb8"]]},{"id":"e75d9c15.8524a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1087.8004989624023,"y":694.3330821990967,"z":"64165859.65c218","wires":[]},{"id":"d046e6f6.0e2458","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":619.4003219604492,"y":698.6663160324097,"z":"64165859.65c218","wires":[]},{"id":"46dda770.da6c38","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2062.0000610351562,"y":768.0000228881836,"z":"64165859.65c218","wires":[["309cdf1e.a7927"]]},{"id":"af14b3c3.48097","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1787.9841003417969,"y":768.1260228157043,"z":"64165859.65c218","wires":[["46dda770.da6c38"]]},{"id":"499747c7.a55a48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1800.4888000488281,"y":732.5555934906006,"z":"64165859.65c218","wires":[]},{"id":"309cdf1e.a7927","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2354.5548706054688,"y":764.8891496658325,"z":"64165859.65c218","wires":[["849d5f32.c0a1d","8e8c972.e2a3368"]]},{"id":"ea225ffd.8fd5c","type":"set","name":"set tenantid and cloud region id","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2942.2214736938477,"y":754.8891334533691,"z":"64165859.65c218","wires":[]},{"id":"d4059f44.0d602","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2704.2879848480225,"y":767.8891382217407,"z":"64165859.65c218","wires":[["ea225ffd.8fd5c","22a21cd1.407344"]]},{"id":"849d5f32.c0a1d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2548.821361541748,"y":767.8890008926392,"z":"64165859.65c218","wires":[["d4059f44.0d602"]]},{"id":"8e8c972.e2a3368","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2549.6209716796875,"y":805.8890037536621,"z":"64165859.65c218","wires":[["866adc09.2f017"]]},{"id":"866adc09.2f017","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":2727.6211280822754,"y":805.8890695571899,"z":"64165859.65c218","wires":[]},{"id":"22a21cd1.407344","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2916.688087463379,"y":790.888822555542,"z":"64165859.65c218","wires":[["9e49f002.0fb2d","9fd3ada.9523b5","38a0e1a6.0275de"]]},{"id":"9e49f002.0fb2d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3153.549415588379,"y":805.4999141693115,"z":"64165859.65c218","wires":[["e5c370f8.6038"]]},{"id":"9fd3ada.9523b5","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3148.8824424743652,"y":838.8332281112671,"z":"64165859.65c218","wires":[["e5c370f8.6038"]]},{"id":"e5c370f8.6038","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3323.058364868164,"y":826.8887872695923,"z":"64165859.65c218","wires":[]},{"id":"38a0e1a6.0275de","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3149.058448791504,"y":773.9258785247803,"z":"64165859.65c218","wires":[["3e857a0c.1c9ed6"]]},{"id":"3e857a0c.1c9ed6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3329.058448791504,"y":771.9258785247803,"z":"64165859.65c218","wires":[["4c618c54.2a14d4"]]},{"id":"4c618c54.2a14d4","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3516.021553039551,"y":769.5556201934814,"z":"64165859.65c218","wires":[]},{"id":"5cf76218.ae346c","type":"comment","name":"Apply the policy to source network","info":"","comments":"","x":584.0000152587891,"y":928.0000286102295,"z":"64165859.65c218","wires":[]},{"id":"3396a245.5af4be","type":"execute","name":"execute Contrail API apply network policy to destination network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":690.0000610351562,"y":1212.000036239624,"z":"64165859.65c218","wires":[["e17d1029.116eb","5a9c42ae.afc9ac"]]},{"id":"e17d1029.116eb","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1025.6664962768555,"y":1212.4282269477844,"z":"64165859.65c218","wires":[["b46738dd.eae108"]]},{"id":"5a9c42ae.afc9ac","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1023.7618179321289,"y":1245.4281667135656,"z":"64165859.65c218","wires":[["7d2e0a11.918714"]]},{"id":"7d2e0a11.918714","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1183.6665878295898,"y":1244.7615332603455,"z":"64165859.65c218","wires":[]},{"id":"b46738dd.eae108","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1177.8569793701172,"y":1213.094951953739,"z":"64165859.65c218","wires":[[]]},{"id":"b29978f4.4fd1e8","type":"comment","name":"Apply the policy to dest network","info":"","comments":"","x":588.3861846923828,"y":1180.0528321266174,"z":"64165859.65c218","wires":[]},{"id":"4afec706.648e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":499.0001792907715,"y":2087.9766874313354,"z":"64165859.65c218","wires":[]},{"id":"6e8ca02f.7313","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":527.7540855407715,"y":2050.4324808120728,"z":"64165859.65c218","wires":[]},{"id":"54889c95.317884","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<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`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":559.4209213256836,"y":1909.4800510406494,"z":"64165859.65c218","wires":[]},{"id":"c2672028.9a192","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":587.5293960571289,"y":1983.529543876648,"z":"64165859.65c218","wires":[["e8a6a664.d79298","eabef186.2a8a8","879fe46c.3b2498"]]},{"id":"e8a6a664.d79298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":857.8374137878418,"y":2036.5277446731925,"z":"64165859.65c218","wires":[["a31c2d71.a08e1"]]},{"id":"eabef186.2a8a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.8374633789062,"y":2005.027770422399,"z":"64165859.65c218","wires":[["a31c2d71.a08e1"]]},{"id":"879fe46c.3b2498","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":852.5875015258789,"y":1975.3848752975464,"z":"64165859.65c218","wires":[["bb8e21b5.4f02e"]]},{"id":"a31c2d71.a08e1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1018.5875015258789,"y":2005.777794264257,"z":"64165859.65c218","wires":[]},{"id":"bb8e21b5.4f02e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":994.2434692382812,"y":1971.5770444869995,"z":"64165859.65c218","wires":[[]]},{"id":"bc559c11.5308","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":510.24351501464844,"y":1875.9101829528809,"z":"64165859.65c218","wires":[[]]},{"id":"922d2ffc.4476e","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1244.6667633056638,"y":2005.0953893661497,"z":"64165859.65c218","wires":[]},{"id":"876eb57a.485618","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":544.0000381469727,"y":1825.0952768325806,"z":"64165859.65c218","wires":[]},{"id":"a6675806.e2dc08","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"in-service-path\" />\n","comments":"","outputs":1,"x":548.6191101074219,"y":1787.0478992462158,"z":"64165859.65c218","wires":[["b7633a81.cf12d8","475a5176.80fc4"]]},{"id":"b7633a81.cf12d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":816.3810272216797,"y":1764.2859525680542,"z":"64165859.65c218","wires":[["7dabdf24.12b19"]]},{"id":"475a5176.80fc4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":821.6904563903809,"y":1799.857370376587,"z":"64165859.65c218","wires":[["7dabdf24.12b19"]]},{"id":"7dabdf24.12b19","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1031.4762420654297,"y":1765.9049968719482,"z":"64165859.65c218","wires":[]},{"id":"c82b30e7.1d586","type":"comment","name":"Update AAI AR","info":"","comments":"","x":501.96195220947266,"y":1746.476222038269,"z":"64165859.65c218","wires":[]},{"id":"3de8fec.d2ae202","type":"comment","name":"Update network policy in AAI - relationship to networks","info":"","comments":"","x":652.0001220703125,"y":1452.0000410079956,"z":"64165859.65c218","wires":[]},{"id":"f8a3e8b0.ff98a8","type":"save","name":"save AnAI - network-policy relationship to source and destination network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`tmp.AnAI-src.related-link`\" />\n<parameter name=\"relationship-list.relationship[1].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[1].related-link\" value=\"`tmp.AnAI-dest.related-link`\" />\n\n\n","comments":"","outputs":1,"x":713.3770179748535,"y":1489.0675249099731,"z":"64165859.65c218","wires":[["f4eee49b.3eb418","96306b55.89f5d8"]]},{"id":"930748bb.7c87d8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1357.7225036621094,"y":1485.3494877815247,"z":"64165859.65c218","wires":[]},{"id":"f4eee49b.3eb418","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1129.1511116027832,"y":1488.365225315094,"z":"64165859.65c218","wires":[["930748bb.7c87d8"]]},{"id":"96306b55.89f5d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1132.9606094360352,"y":1516.8416419029236,"z":"64165859.65c218","wires":[["930748bb.7c87d8"]]},{"id":"f2b08893.418cf8","type":"save","name":"get related-link data for source network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-src\">\n\n\n\n","comments":"","outputs":1,"x":618.0000152587891,"y":1286.0000371932983,"z":"64165859.65c218","wires":[["1752b575.8c8cbb","cdbec68d.a55978"]]},{"id":"1398e1ba.93427e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1262,"y":1292,"z":"64165859.65c218","wires":[]},{"id":"1752b575.8c8cbb","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1033.4286079406738,"y":1291.0157375335693,"z":"64165859.65c218","wires":[["1398e1ba.93427e"]]},{"id":"cdbec68d.a55978","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1037.2381057739258,"y":1320.492154121399,"z":"64165859.65c218","wires":[["1398e1ba.93427e"]]},{"id":"f43488c4.18e4b8","type":"save","name":"get related-link data for dest network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-dest\">\n\n\n\n","comments":"","outputs":1,"x":614,"y":1360,"z":"64165859.65c218","wires":[["91989618.fd4e18","fa09c5bd.ae5068"]]},{"id":"7b92823a.91cf8c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1056.0000381469727,"y":1370.0000410079956,"z":"64165859.65c218","wires":[]},{"id":"91989618.fd4e18","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":873.4286422729492,"y":1357.0157642364502,"z":"64165859.65c218","wires":[["7b92823a.91cf8c"]]},{"id":"fa09c5bd.ae5068","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":879.2381210327148,"y":1386.4922285079956,"z":"64165859.65c218","wires":[["7b92823a.91cf8c"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json
new file mode 100755
index 00000000..87eb7b5a
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json
@@ -0,0 +1 @@
+[{"id":"4c9f1270.94615c","type":"dgstart","name":"DGSTART","outputs":1,"x":150,"y":88,"z":"4d1b2427.607d4c","wires":[["9e2ac2f1.e6e2"]]},{"id":"9e2ac2f1.e6e2","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":256.23807525634766,"y":162.95240020751953,"z":"4d1b2427.607d4c","wires":[["3916a67.a589d5a"]]},{"id":"3916a67.a589d5a","type":"method","name":"contrail-route-topology-operation-assign","xml":"<method rpc='contrail-route-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":257.82152557373047,"y":262.1904363632202,"z":"4d1b2427.607d4c","wires":[["9cfe2b9e.d58558"]]},{"id":"9cfe2b9e.d58558","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":284.4761848449707,"y":375.523784160614,"z":"4d1b2427.607d4c","wires":[["779e03bd.004a6c","b7d6a7d6.406e68","fb26a2b7.6969f","142b08a1.6d8de7","87a2a4c4.087d48","f3613a51.1c26f8","625eb8ab.21f038","6c13aed7.4f039","1836ca82.75ebe5","9f72a1ac.015ab","d634d1d1.89bbb","69c9d3c4.e9707c","bec92482.90ee38","bbe3aaad.4a5568","6bcbfec7.4a61d","62c0d784.f7e3d8","b6d077f3.00bc38","892a2973.dace48","ac3303.d63e3d","866ca1ea.ff3bc","ea795139.b531a","6a318934.66ddc8","783e64a0.ae3edc","cd01ba46.1664d8","1420897.e40c477","1fa15432.96f97c","af7a877d.eb2d78","843930fc.abe98","fac7c328.21b71","6959d8ae.04d098","b5119828.1d53c8","e6eeaa3.150a058","8211864b.caed98","571268e5.730638","96b047c4.679ec8","5e25bd11.a21d44","e2e2a185.95801","5790ccca.f5ea54","c643b552.15d5b8","e9e426fe.b64fd8","be0b4c28.f1b79"]]},{"id":"b7d6a7d6.406e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":519.0002326965332,"y":3227.2144536972046,"z":"4d1b2427.607d4c","wires":[]},{"id":"779e03bd.004a6c","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":547.7541580200195,"y":3199.051257133484,"z":"4d1b2427.607d4c","wires":[]},{"id":"b6d077f3.00bc38","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<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`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":584.7542457580566,"y":2376.0512704849243,"z":"4d1b2427.607d4c","wires":[]},{"id":"142b08a1.6d8de7","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":556.7381706237793,"y":325.33333587646484,"z":"4d1b2427.607d4c","wires":[]},{"id":"fb26a2b7.6969f","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n<parameter name='tmp.ar.allotted-resource-type' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\n\n","comments":"","x":603.9974327087402,"y":291.59260177612305,"z":"4d1b2427.607d4c","wires":[]},{"id":"87a2a4c4.087d48","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":618.9935836791992,"y":357.2315893173218,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"625eb8ab.21f038","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":619.5189018249512,"y":737.4595794677734,"z":"4d1b2427.607d4c","wires":[["b8ba7075.92c81","408b9489.78624c"]]},{"id":"f3613a51.1c26f8","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":591.0649604797363,"y":421.0172395706177,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"b8ba7075.92c81","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":866.8149909973145,"y":732.2673687934875,"z":"4d1b2427.607d4c","wires":[["3a69737a.dd4c0c"]]},{"id":"6bcbfec7.4a61d","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":612.958122253418,"y":2994.291175842285,"z":"4d1b2427.607d4c","wires":[["69575477.9eb00c","215247c4.dbf588"]]},{"id":"69575477.9eb00c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":879.9328575134277,"y":3023.9561338424683,"z":"4d1b2427.607d4c","wires":[["2a4bd3e4.dd179c"]]},{"id":"215247c4.dbf588","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":874.2662467956543,"y":2992.455969810486,"z":"4d1b2427.607d4c","wires":[["2a4bd3e4.dd179c"]]},{"id":"1a4098bb.aead37","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource. Parent provided resource rolled back\" />\n","comments":"","x":1216.3495788574219,"y":3038.5395822525024,"z":"4d1b2427.607d4c","wires":[]},{"id":"3a69737a.dd4c0c","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1035.8149948120117,"y":730.7672696113586,"z":"4d1b2427.607d4c","wires":[["9399d0e2.ddd51"]]},{"id":"9399d0e2.ddd51","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1246.6722373962402,"y":730.3863987922668,"z":"4d1b2427.607d4c","wires":[["4041d430.f6846c"]]},{"id":"4041d430.f6846c","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1436.005542755127,"y":730.3863568305969,"z":"4d1b2427.607d4c","wires":[["e842b5e7.c19358"]]},{"id":"f17d1c78.92f5f","type":"comment","name":"Save consumed-allotted-resources to mdsal","info":"","comments":"","x":619.2436676025391,"y":2185.3863854408264,"z":"4d1b2427.607d4c","wires":[]},{"id":"efe5ed7c.3b0ae","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":638.8148880004883,"y":704.7672181129456,"z":"4d1b2427.607d4c","wires":[]},{"id":"6c13aed7.4f039","type":"set","name":"set ar-identifiers","xml":"<set>\n<parameter name='ar-identifiers.consuming-service-instance-id' value=\"`$contrail-route-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='ar-identifiers.parent-service-instance-id' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='ar-identifiers.allotted-resource-type' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n","comments":"","x":545.0531158447266,"y":846.2912406921387,"z":"4d1b2427.607d4c","wires":[]},{"id":"306f9e61.b62042","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":585.6721267700195,"y":816.6720333099365,"z":"4d1b2427.607d4c","wires":[]},{"id":"892a2973.dace48","type":"set","name":"set identifiers in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.' \nvalue=\"`$ar-identifiers.`\" />\n\n\n","comments":"","x":605.0529861450195,"y":1362.9103206694126,"z":"4d1b2427.607d4c","wires":[]},{"id":"1836ca82.75ebe5","type":"set","name":"set ecomp model information from input","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.ecomp-model-information.' \nvalue=\"`$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.`\" />\n\n\n","comments":"","x":606.7196884155273,"y":930.2436923980713,"z":"4d1b2427.607d4c","wires":[]},{"id":"9f72a1ac.015ab","type":"switchNode","name":"switch model-invariant-uuid is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-invariant-uuid'>\n","comments":"","outputs":1,"x":592.9101486206055,"y":965.9578294754028,"z":"4d1b2427.607d4c","wires":[["a386a341.6a5dc"]]},{"id":"a386a341.6a5dc","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":820.0530281066895,"y":967.3863468170166,"z":"4d1b2427.607d4c","wires":[["f68746c1.bc30f8"]]},{"id":"f68746c1.bc30f8","type":"set","name":"set model-invariant-uuid","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.ecomp-model-information.model-invariant-uuid' \nvalue=\"`$ar-model.invariant-uuid`\" />\n\n\n","comments":"","x":1021.4816017150879,"y":966.8148994445801,"z":"4d1b2427.607d4c","wires":[]},{"id":"d634d1d1.89bbb","type":"switchNode","name":"switch model-uuid is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-uuid'>\n","comments":"","outputs":1,"x":564.3387451171875,"y":1000.2435302734375,"z":"4d1b2427.607d4c","wires":[["41ad333e.6ea4ec"]]},{"id":"41ad333e.6ea4ec","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":765.7673110961914,"y":1000.8149518966675,"z":"4d1b2427.607d4c","wires":[["8577b5de.034978"]]},{"id":"8577b5de.034978","type":"set","name":"set model-uuid","xml":"<set>\n<parameter name='sar.allotted-resource-data.contrail-route-topology.ecomp-model-information.model-uuid' \nvalue=\"`$ar-model.uuid`\" />\n\n\n","comments":"","x":958.6244697570801,"y":1000.8148736953735,"z":"4d1b2427.607d4c","wires":[]},{"id":"69c9d3c4.e9707c","type":"switchNode","name":"switch model-version is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-version'>\n","comments":"","outputs":1,"x":572.9101486206055,"y":1033.1006574630737,"z":"4d1b2427.607d4c","wires":[["a2183382.79fd3"]]},{"id":"a2183382.79fd3","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":822.9101295471191,"y":1033.1006422042847,"z":"4d1b2427.607d4c","wires":[["32b5229d.0cab2e"]]},{"id":"32b5229d.0cab2e","type":"set","name":"set model-version","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.ecomp-model-information.model-version' \nvalue=\"`$ar-model.version`\" />\n\n\n","comments":"","x":1015.767276763916,"y":1033.1006317138672,"z":"4d1b2427.607d4c","wires":[]},{"id":"866ca1ea.ff3bc","type":"switchNode","name":"switch ar-model.ecomp-generated-naming","xml":"<switch test='`$ar-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":633.7196960449219,"y":1279.7672176361084,"z":"4d1b2427.607d4c","wires":[["3948bc2f.f77b54","e707f9ff.d5a678"]]},{"id":"3948bc2f.f77b54","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":910.7197341918945,"y":1275.8624358177185,"z":"4d1b2427.607d4c","wires":[["20908a4f.bf6266"]]},{"id":"20908a4f.bf6266","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1079.4697761535645,"y":1276.3624243736267,"z":"4d1b2427.607d4c","wires":[["7b9d654d.5be03c"]]},{"id":"e707f9ff.d5a678","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":901.942024230957,"y":1308.8624358177185,"z":"4d1b2427.607d4c","wires":[["29eade88.e64712"]]},{"id":"29eade88.e64712","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in allotted-resource-model data. Ecomp-generated-naming should be true\" />\n\n","comments":"","x":1079.942024230957,"y":1307.8624358177185,"z":"4d1b2427.607d4c","wires":[]},{"id":"7b9d654d.5be03c","type":"switchNode","name":"switch ar-model.ecomp-generated-naming","xml":"<switch test='`$ar-model.naming-policy`'>\n","comments":"","outputs":1,"x":1380.7196807861328,"y":1276.433897972107,"z":"4d1b2427.607d4c","wires":[["cef027f.91fdfd8","38b91d73.c94a62"]]},{"id":"cef027f.91fdfd8","type":"other","name":"outcome oam_network_policy","xml":"<outcome value='oam_network_policy'>\n","comments":"","outputs":1,"x":1751.5775146484375,"y":1268.0119352340698,"z":"4d1b2427.607d4c","wires":[["8431f8ba.f08668"]]},{"id":"38b91d73.c94a62","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1676.338981628418,"y":1300.529139995575,"z":"4d1b2427.607d4c","wires":[["8431f8ba.f08668"]]},{"id":"9b97c321.adf0f","type":"set","name":"set ar_name","xml":"<set>\n<parameter name='tmp.ar-name' value='$TenantName_$CloudRegionID_$TenantNetworkRole_$LandingNetworkRole_policy_' />\n","comments":"","x":2194.100845336914,"y":1256.1009072959423,"z":"4d1b2427.607d4c","wires":[]},{"id":"b38296e4.3c0ea8","type":"execute","name":"execute SliStringUtils - replace $TenantName","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantName\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":2294.244155883789,"y":1294.6247834861279,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"52fb7e92.2cea6","type":"execute","name":"execute SliStringUtils - replace LandingNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$LandingNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-role`\"/>\n\n","comments":"","outputs":1,"x":2302.577407836914,"y":1398.7676134109497,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"8431f8ba.f08668","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1981.8626976013184,"y":1302.0053367614746,"z":"4d1b2427.607d4c","wires":[["9b97c321.adf0f","b38296e4.3c0ea8","52fb7e92.2cea6","33d9a65.b86135a","70595e41.23774","d7151a9c.c5a358","b85f95cf.56c518","e6c914ff.bbbeb8","a21ede43.fc3e7"]]},{"id":"33d9a65.b86135a","type":"set","name":"set identifiers.allotted-resource-name","xml":"<set>\n<parameter name='ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />\n","comments":"","x":2258.767318725586,"y":1545.3865489661694,"z":"4d1b2427.607d4c","wires":[]},{"id":"ac3303.d63e3d","type":"set","name":"set assignments in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' \nvalue=\"`$ar-assignments.`\" />\n\n\n","comments":"","x":593.1960144042969,"y":2152.624861717224,"z":"4d1b2427.607d4c","wires":[]},{"id":"6a318934.66ddc8","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.source-network.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.` \" />\n<parameter name='ar-assignments.dest-network.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.` \" />\n<parameter name='ar-assignments.contrail-applied-service.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.` \" />\n\n\n","comments":"","x":564.529167175293,"y":1399.3863624632359,"z":"4d1b2427.607d4c","wires":[]},{"id":"e9829904.2e77e8","type":"for","name":"for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":1498.8155517578125,"y":2260.291075229645,"z":"4d1b2427.607d4c","wires":[["76e1246.58bf5dc"]]},{"id":"bec92482.90ee38","type":"switchNode","name":"switch service-data.consumed-allotted-resources_length","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n","comments":"","outputs":1,"x":656.8150024414062,"y":2218.0051369667053,"z":"4d1b2427.607d4c","wires":[["4dce9f0e.197ca","75705eae.125bb"]]},{"id":"4dce9f0e.197ca","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":978.9578857421875,"y":2220.8625588417053,"z":"4d1b2427.607d4c","wires":[["f9d4ed78.b618a"]]},{"id":"75705eae.125bb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":966.9578895568848,"y":2263.862560272217,"z":"4d1b2427.607d4c","wires":[["c55c83ec.31bb6"]]},{"id":"76e1246.58bf5dc","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":1928.9107818603516,"y":2262.3508410453796,"z":"4d1b2427.607d4c","wires":[["d664ab8f.6994a8"]]},{"id":"d664ab8f.6994a8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2133.720748901367,"y":2262.81529378891,"z":"4d1b2427.607d4c","wires":[["67045931.262a78"]]},{"id":"c55c83ec.31bb6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1127.0849800109863,"y":2261.988536834717,"z":"4d1b2427.607d4c","wires":[["e9829904.2e77e8","1d1bc1f0.a72b7e"]]},{"id":"67045931.262a78","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2305.481700897217,"y":2262.6725223064423,"z":"4d1b2427.607d4c","wires":[["354eaed.bcc7f52","3ad061dc.d44dfe"]]},{"id":"f9d4ed78.b618a","type":"set","name":"set cidx","xml":"<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n","comments":"","x":1137.8148574829102,"y":2220.57662153244,"z":"4d1b2427.607d4c","wires":[]},{"id":"354eaed.bcc7f52","type":"set","name":"set tmp.cidx and ctx.consumed-ar","xml":"<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />\n<parameter name='tmp.found-cidx' value='true' />","comments":"","x":2551.339029312134,"y":2263.2439963817596,"z":"4d1b2427.607d4c","wires":[]},{"id":"bbe3aaad.4a5568","type":"set","name":"set consumed allotted resources","xml":"<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<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` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n","comments":"","x":580.6723365783691,"y":2308.5766229629517,"z":"4d1b2427.607d4c","wires":[]},{"id":"8d887169.2ecf8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":561.9577674865723,"y":390.6243667602539,"z":"4d1b2427.607d4c","wires":[]},{"id":"6959d8ae.04d098","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.fq-name' value=\"`$tmp.fq-name` \" />\n\n\n\n","comments":"","x":548.6722793579102,"y":2118.196542739868,"z":"4d1b2427.607d4c","wires":[]},{"id":"8665234a.8510b","type":"comment","name":"Add AR to md-sal","info":"","comments":"","x":534.2437210083008,"y":2965.481409072876,"z":"4d1b2427.607d4c","wires":[]},{"id":"62c0d784.f7e3d8","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":535.2434692382812,"y":2343.4815063476562,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e842b5e7.c19358","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: Existing contrail route allotted resource\" />\n \n","comments":"","x":1616.33349609375,"y":728.3334121704102,"z":"4d1b2427.607d4c","wires":[]},{"id":"408b9489.78624c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":858.6667938232422,"y":767.3334536552429,"z":"4d1b2427.607d4c","wires":[["94a2f0be.5376d"]]},{"id":"94a2f0be.5376d","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1038.6667442321777,"y":768.0000042915344,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"ea795139.b531a","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":530.6667594909668,"y":771.666675567627,"z":"4d1b2427.607d4c","wires":[]},{"id":"70595e41.23774","type":"execute","name":"execute SliStringUtils - replace $CloudRegionID","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$CloudRegionID\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.cloud-region-id`\"/>\n\n","comments":"","outputs":1,"x":2303.333267211914,"y":1328.6671237945557,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"d7151a9c.c5a358","type":"execute","name":"execute SliStringUtils - replace $TenantNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-role`\"/>\n\n","comments":"","outputs":1,"x":2312.6664657592773,"y":1362.6670274734497,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e6c914ff.bbbeb8","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":2317.3332595825195,"y":1503.333630681038,"z":"4d1b2427.607d4c","wires":[["be6042e3.12db","9ef8ef75.f00ad"]]},{"id":"be6042e3.12db","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2627.047782897949,"y":1506.1907633244991,"z":"4d1b2427.607d4c","wires":[["d59007c0.f67198"]]},{"id":"9ef8ef75.f00ad","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2632.3810272216797,"y":1537.85746383667,"z":"4d1b2427.607d4c","wires":[["b0a81ae7.4dfba8"]]},{"id":"b85f95cf.56c518","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='CONTRAIL_ROUTE_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='contrail_route_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CONTRAIL_ROUTE_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$tmp.ar-name`\" />\n<parameter name='generate-unique-name-input.index-length' value='2' />\n","comments":"","x":2279.000259399414,"y":1433.0003308951855,"z":"4d1b2427.607d4c","wires":[]},{"id":"b0a81ae7.4dfba8","type":"set","name":"set tmp.ar-name to generated name","xml":"<set>\n<parameter name='tmp.ar-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":2879.571189880371,"y":1538.3335467875004,"z":"4d1b2427.607d4c","wires":[]},{"id":"d59007c0.f67198","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":2800.9047050476074,"y":1505.6192770004272,"z":"4d1b2427.607d4c","wires":[]},{"id":"783e64a0.ae3edc","type":"set","name":"set fq_name","xml":"<set>\n<parameter name='tmp.fq-name' value='$defaultDomain.$defaultProject.$sdncNetworkPolicy' />\n","comments":"","x":548.3332748413086,"y":1478.6666288375854,"z":"4d1b2427.607d4c","wires":[]},{"id":"cd01ba46.1664d8","type":"execute","name":"execute SliStringUtils - replace $defaultDomain","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$defaultDomain\"/>\n <parameter name=\"replacement\" value=\"default-domain\"/>\n\n","comments":"","outputs":1,"x":655.6666259765625,"y":1508.6666717529297,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"1420897.e40c477","type":"execute","name":"execute SliStringUtils - replace $defaultProject","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$defaultProject\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":655.6666564941406,"y":1542.0001125335693,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"467969e2.ea3918","type":"comment","name":"generate fqname","info":"","comments":"","x":557.3333206176758,"y":1451.9999351501465,"z":"4d1b2427.607d4c","wires":[]},{"id":"1fa15432.96f97c","type":"execute","name":"execute SliStringUtils - replace $sdncNetworkPolicy","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$sdncNetworkPolicy\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar-name`\"/>\n\n","comments":"","outputs":1,"x":668.9999618530273,"y":1575.333267211914,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"bb5388b.9a34478","type":"comment","name":"Set ecomp-model-info","info":"","comments":"","x":554.1429672241211,"y":896.5714740753174,"z":"4d1b2427.607d4c","wires":[]},{"id":"af7a877d.eb2d78","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$ar-model.invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$ar-model.uuid`\" />\n\t<parameter name=\"operational-status\" value=\"null\" />\n","comments":"","outputs":1,"x":568.8571891784668,"y":2474.5715532302856,"z":"4d1b2427.607d4c","wires":[["f49edd24.7f19d","22aa6a43.558c86"]]},{"id":"f49edd24.7f19d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":824.6191215515137,"y":2451.809727668762,"z":"4d1b2427.607d4c","wires":[["a2554f1f.b50de"]]},{"id":"22aa6a43.558c86","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":829.9285507202148,"y":2487.381145477295,"z":"4d1b2427.607d4c","wires":[["a2554f1f.b50de"]]},{"id":"a2554f1f.b50de","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1039.7143363952637,"y":2453.4287719726562,"z":"4d1b2427.607d4c","wires":[]},{"id":"a21ede43.fc3e7","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.ar-name=\"/>\n<parameter name=\"field3\" value=\"`$tmp.ar-name`\"/>\n<parameter name=\"field4\" value=\"generate-unique-name-input.prefix\" />\n<parameter name=\"field5\" value=\"`$generate-unique-name-input.prefix`\" />","comments":"","outputs":1,"x":2170.2000579833984,"y":1468.0004276931286,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"843930fc.abe98","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":601.5997695922852,"y":1155.3336191177368,"z":"4d1b2427.607d4c","wires":[["f66777d8.98ad18","6a87e5bf.61d96c"]]},{"id":"f66777d8.98ad18","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":952.6000289916992,"y":1153.0001316070557,"z":"4d1b2427.607d4c","wires":[["cde00633.b18cb8"]]},{"id":"6a87e5bf.61d96c","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":945.2668228149414,"y":1114.9999265670776,"z":"4d1b2427.607d4c","wires":[["44011184.bdb35"]]},{"id":"b7184182.4959f","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2105.7113876342773,"y":1151.444565474987,"z":"4d1b2427.607d4c","wires":[["1c4a61f3.c2849e"]]},{"id":"fbab815c.672c4","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1341.425392150879,"y":1152.0159158706665,"z":"4d1b2427.607d4c","wires":[["140ca41e.1dac4c","97892501.9ff8f8"]]},{"id":"140ca41e.1dac4c","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1630.425392150879,"y":1154.0159769058228,"z":"4d1b2427.607d4c","wires":[["662569df.4978f8"]]},{"id":"97892501.9ff8f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1610.425392150879,"y":1189.0159769058228,"z":"4d1b2427.607d4c","wires":[["c55a8bab.54c1e8"]]},{"id":"cb1b209a.0c898","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2550.1400508880615,"y":1113.6947317123413,"z":"4d1b2427.607d4c","wires":[["6f669f36.77ecf"]]},{"id":"c55a8bab.54c1e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1811.695411682129,"y":1190.5705423355103,"z":"4d1b2427.607d4c","wires":[["b7184182.4959f","74060662.5164e8","4f6aa7ae.9611b8"]]},{"id":"cde00633.b18cb8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1083.7112121582031,"y":1152.4444932937622,"z":"4d1b2427.607d4c","wires":[["fbab815c.672c4"]]},{"id":"44011184.bdb35","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1099.4002304077148,"y":1114.000121831894,"z":"4d1b2427.607d4c","wires":[]},{"id":"662569df.4978f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1820.2001876831055,"y":1152.0001287460327,"z":"4d1b2427.607d4c","wires":[]},{"id":"74a5cd24.86b7f4","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n<parameter name='source-network-found' value='true' />\n\n","comments":"","x":3059.2002391815186,"y":1093.0001211166382,"z":"4d1b2427.607d4c","wires":[]},{"id":"7a4f9f18.b1ca8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2869.2666816711426,"y":1106.00013256073,"z":"4d1b2427.607d4c","wires":[["74a5cd24.86b7f4","d9c31b5a.6a4cd8"]]},{"id":"6f669f36.77ecf","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2719.8002071380615,"y":1112.0000047683716,"z":"4d1b2427.607d4c","wires":[["7a4f9f18.b1ca8"]]},{"id":"465f3356.89525c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2434.5999183654785,"y":1186.0001649856567,"z":"4d1b2427.607d4c","wires":[]},{"id":"23fb5fa1.57992","type":"execute","name":"execute RestApiCallNode - Get Parent service network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-parentnetwork-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"parent-net\" />\n\n","comments":"","outputs":1,"x":1549.0000228881836,"y":1704.000186920166,"z":"4d1b2427.607d4c","wires":[["a3fb960c.d85758","fc9d9601.9e18b8"]]},{"id":"a3fb960c.d85758","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1858.2960777282715,"y":1704.8080496788025,"z":"4d1b2427.607d4c","wires":[["ac20b661.d93d88"]]},{"id":"ac20b661.d93d88","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":2027.2960815429688,"y":1703.3079504966736,"z":"4d1b2427.607d4c","wires":[["55142221.a74b4c"]]},{"id":"55142221.a74b4c","type":"switchNode","name":"switch network length","xml":"<switch test='`$parent-net.networks.network_length`'>\n","comments":"","outputs":1,"x":2238.1533241271973,"y":1702.9270796775818,"z":"4d1b2427.607d4c","wires":[["66c12173.13d7","d9862bb8.9cb708"]]},{"id":"66c12173.13d7","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":2447.4865951538086,"y":1702.9269948005676,"z":"4d1b2427.607d4c","wires":[["a8318bf.731e378"]]},{"id":"68b4c2ed.00f22c","type":"comment","name":"GET dest network from mdsal","info":"","comments":"","x":1494.295997619629,"y":1645.3078532218933,"z":"4d1b2427.607d4c","wires":[]},{"id":"fc9d9601.9e18b8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1850.1478805541992,"y":1739.8741345405579,"z":"4d1b2427.607d4c","wires":[["8ccfa208.0193"]]},{"id":"8ccfa208.0193","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":2030.1478309631348,"y":1740.5406851768494,"z":"4d1b2427.607d4c","wires":[["fa75851f.39e8f8"]]},{"id":"fac7c328.21b71","type":"execute","name":"generate parent-network url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.network`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-parentnetwork-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":585.0001220703125,"y":450.0000238418579,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"fa75851f.39e8f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No existing parent netorks\" />\n \n","comments":"","x":2214.999954223633,"y":1742.0001639127731,"z":"4d1b2427.607d4c","wires":[]},{"id":"d9862bb8.9cb708","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2448.999828338623,"y":1738.0000948905945,"z":"4d1b2427.607d4c","wires":[["462e905c.7055"]]},{"id":"462e905c.7055","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: Network id not found. Parent Service should only have one network\" />\n \n","comments":"","x":2615.3278045654297,"y":1737.9472098350525,"z":"4d1b2427.607d4c","wires":[]},{"id":"a8318bf.731e378","type":"set","name":"set dest network id","xml":"<set>\n<parameter name='ar-assignments.dest-network.network-id' value=\"`$parent-net.networks.network[0].network-id` \" />\n\n\n\n","comments":"","x":2626.5996856689453,"y":1704.000138759613,"z":"4d1b2427.607d4c","wires":[]},{"id":"d30b861c.434bf8","type":"comment","name":"Find tenant/cloud region from source network","info":"","comments":"","x":631.0000610351562,"y":1120.0000252723694,"z":"4d1b2427.607d4c","wires":[]},{"id":"b5119828.1d53c8","type":"execute","name":"generate contrail-applied-service url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.vnf`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-contrailappliedsvc-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.contrail-applied-service-instance-id`\"/>\n","comments":"","outputs":1,"x":612.200122833252,"y":480.00002574920654,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e6eeaa3.150a058","type":"execute","name":"execute RestApiCallNode - Get vnf","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-contrailappliedsvc-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"vnf\" />\n\n","comments":"","outputs":1,"x":598.2000503540039,"y":1835.6668615341187,"z":"4d1b2427.607d4c","wires":[["1fcbedaf.3a00e2","f42d5962.ac9958"]]},{"id":"1fcbedaf.3a00e2","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":977.4961700439453,"y":1828.8080359697342,"z":"4d1b2427.607d4c","wires":[["81eaf91d.91f988"]]},{"id":"81eaf91d.91f988","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1146.4961738586426,"y":1827.3079367876053,"z":"4d1b2427.607d4c","wires":[["2ab7fe69.be87a2"]]},{"id":"2ab7fe69.be87a2","type":"switchNode","name":"switch vnf length","xml":"<switch test='`$vnf.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":1357.353416442871,"y":1826.9270659685135,"z":"4d1b2427.607d4c","wires":[["6ae0da83.aaa4f4","f324301e.0d32b"]]},{"id":"6ae0da83.aaa4f4","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1548.6869087219238,"y":1820.9270491600037,"z":"4d1b2427.607d4c","wires":[["b98f6f34.959f"]]},{"id":"be2cb9a.2505e48","type":"comment","name":"GET contrail vnf for contrail applied service from mdsal","info":"","comments":"","x":660.8294906616211,"y":1797.6413383483887,"z":"4d1b2427.607d4c","wires":[]},{"id":"f42d5962.ac9958","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":969.347972869873,"y":1863.8741208314896,"z":"4d1b2427.607d4c","wires":[["e17a2bcb.e52fb8"]]},{"id":"e17a2bcb.e52fb8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1149.3479232788086,"y":1864.540671467781,"z":"4d1b2427.607d4c","wires":[["a25cc221.aaa89"]]},{"id":"a25cc221.aaa89","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No existing contrail applied service vnfs\" />\n \n","comments":"","x":1334.2000465393066,"y":1866.0001502037048,"z":"4d1b2427.607d4c","wires":[]},{"id":"f324301e.0d32b","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1550.2001419067383,"y":1856.0001492500305,"z":"4d1b2427.607d4c","wires":[["55da27e9.1a2d18"]]},{"id":"55da27e9.1a2d18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: vnf id not found. Contrail applied service should only have one vnf\" />\n \n","comments":"","x":1714.5280456542969,"y":1855.9473118782043,"z":"4d1b2427.607d4c","wires":[]},{"id":"b98f6f34.959f","type":"set","name":"set applied service vnf id","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.vnf-id' value=\"`$vnf.vnfs.vnf[0].vnf-id` \" />\n\n\n\n","comments":"","x":1759.8001136779785,"y":1820.0002398490906,"z":"4d1b2427.607d4c","wires":[]},{"id":"c6c2334d.98278","type":"comment","name":"Generate contrail route name","info":"","comments":"","x":583.0000457763672,"y":1244.0000286102295,"z":"4d1b2427.607d4c","wires":[]},{"id":"6add4fcf.7d2a3","type":"comment","name":"GET contrail fqdn from vnf/vf-module","info":"","comments":"","x":613.3333969116211,"y":1938.6669101715088,"z":"4d1b2427.607d4c","wires":[]},{"id":"8211864b.caed98","type":"switchNode","name":"switch contrail-route-request-input.constrail-applied-service-info.contrail-fqdn","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`'>\n","comments":"","outputs":1,"x":719.0000991821289,"y":1980.0002436637878,"z":"4d1b2427.607d4c","wires":[["4525a9a8.0b4468","841c4f89.afe5f"]]},{"id":"4525a9a8.0b4468","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1111.0000648498535,"y":1970.0000656843185,"z":"4d1b2427.607d4c","wires":[["68cb2b70.90a404"]]},{"id":"841c4f89.afe5f","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1093.9999923706055,"y":2007.0000529289246,"z":"4d1b2427.607d4c","wires":[["36215833.3a7f48"]]},{"id":"36215833.3a7f48","type":"set","name":"set applied service fqdn","xml":"<set>\n<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` \" />\n\n\n\n","comments":"","x":1285.0000076293945,"y":2007.000086903572,"z":"4d1b2427.607d4c","wires":[]},{"id":"68cb2b70.90a404","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1297.0000686645508,"y":1970.0000647306442,"z":"4d1b2427.607d4c","wires":[["bf2bb366.b639d","c7b161a8.2d59d"]]},{"id":"54037341.49dacc","type":"comment","name":"GET dest network from parent service","info":"","comments":"","x":603.666618347168,"y":1676.000069618225,"z":"4d1b2427.607d4c","wires":[]},{"id":"571268e5.730638","type":"switchNode","name":"switch contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-id`'>\n","comments":"","outputs":1,"x":795.0000686645508,"y":1704.0000405311584,"z":"4d1b2427.607d4c","wires":[["8bb9d911.861198","a62ad6dd.907908"]]},{"id":"8bb9d911.861198","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1236.9999771118164,"y":1704.0000402927399,"z":"4d1b2427.607d4c","wires":[["23fb5fa1.57992"]]},{"id":"a62ad6dd.907908","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1218.9999809265137,"y":1737.0000410079956,"z":"4d1b2427.607d4c","wires":[["cddb9071.a0335"]]},{"id":"cddb9071.a0335","type":"set","name":"set dest network id","xml":"<set>\n<parameter name='ar-assignments.dest-network.network-id' value=\"`$contrail-route-request-input.dest-network.network-id` \" />\n\n\n\n","comments":"","x":1410.999942779541,"y":1739.9999961853027,"z":"4d1b2427.607d4c","wires":[]},{"id":"bfe89f13.37b26","type":"comment","name":"GET contrail fqdn via AAI","info":"","comments":"","x":1550.2000579833984,"y":1933.9999685287476,"z":"4d1b2427.607d4c","wires":[]},{"id":"bf2bb366.b639d","type":"get-resource","name":"get-resource generic-vnf","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $ar-assignments.contrail-applied-service.vnf-id\"\n pfx='aai.vnf' local-only='false' >\n \n\n\n","comments":"","outputs":1,"x":1560.2000579833984,"y":1969.9999694824219,"z":"4d1b2427.607d4c","wires":[["358e578d.2fd368","1096a3e1.ecde4c"]]},{"id":"1096a3e1.ecde4c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1762.8396644592285,"y":1998.805338382721,"z":"4d1b2427.607d4c","wires":[["1005d67c.37828a"]]},{"id":"1005d67c.37828a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving vnf from AAI\" />\n","comments":"","x":1938.7918891906738,"y":2002.1386723518372,"z":"4d1b2427.607d4c","wires":[]},{"id":"358e578d.2fd368","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1765.3394889831543,"y":1968.8054161071777,"z":"4d1b2427.607d4c","wires":[["e73bb580.fac7b8"]]},{"id":"e73bb580.fac7b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Vnf not found in AAI\" />\n","comments":"","x":1933.117374420166,"y":1968.110846042633,"z":"4d1b2427.607d4c","wires":[]},{"id":"6ad7fa83.050644","type":"comment","name":"Loop through vf modeuls looking for contrail fqdn","info":"","comments":"","x":1633.8667068481445,"y":2038.333501815796,"z":"4d1b2427.607d4c","wires":[]},{"id":"57a1c09e.69c79","type":"comment","name":"Update AAI AR","info":"","comments":"","x":532.2000465393066,"y":2437.999997138977,"z":"4d1b2427.607d4c","wires":[]},{"id":"96b047c4.679ec8","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":674.2001609802246,"y":2570.0002641677856,"z":"4d1b2427.607d4c","wires":[["c1fb6c5e.e721a","e74826b3.4d8b38","d137df8f.0037a"]]},{"id":"c1fb6c5e.e721a","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":996.5081787109375,"y":2614.9984817504883,"z":"4d1b2427.607d4c","wires":[["dd5d09e6.0f8e48"]]},{"id":"e74826b3.4d8b38","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":987.508228302002,"y":2583.498507499695,"z":"4d1b2427.607d4c","wires":[["dd5d09e6.0f8e48"]]},{"id":"d137df8f.0037a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":991.2582664489746,"y":2553.855612374842,"z":"4d1b2427.607d4c","wires":[["a297dd7b.aa05c"]]},{"id":"dd5d09e6.0f8e48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1157.2582664489746,"y":2584.2485313415527,"z":"4d1b2427.607d4c","wires":[]},{"id":"a297dd7b.aa05c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1132.914234161377,"y":2550.0477815642953,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"c332fe05.c3ade","type":"comment","name":"Put the parent allotted resource in mdsal","info":"","comments":"","x":601.2001266479492,"y":2538.0000896453857,"z":"4d1b2427.607d4c","wires":[]},{"id":"1d1bc1f0.a72b7e","type":"switchNode","name":"switch tmp.found-cidx","xml":"<switch test='`$tmp.found-cidx`'>\n","comments":"","outputs":1,"x":1316.2000274658203,"y":2294.000059604645,"z":"4d1b2427.607d4c","wires":[["65d66863.2a8258"]]},{"id":"65d66863.2a8258","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1506.1999816894531,"y":2293.99999666214,"z":"4d1b2427.607d4c","wires":[["762eafdc.0bdf2"]]},{"id":"762eafdc.0bdf2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1672.1999816894531,"y":2293.99999666214,"z":"4d1b2427.607d4c","wires":[["63da8f53.b089c"]]},{"id":"63da8f53.b089c","type":"set","name":"set tmp.cidx ","xml":"<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n","comments":"","x":1918.0573101043701,"y":2294.5714707374573,"z":"4d1b2427.607d4c","wires":[]},{"id":"3ad061dc.d44dfe","type":"break","name":"break","xml":"<break>\n","comments":"","x":2468.199981689453,"y":2291.99999666214,"z":"4d1b2427.607d4c","wires":[]},{"id":"5e25bd11.a21d44","type":"execute","name":"generate parent-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.parent-provided-resource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":656.2001876831055,"y":512.0000591278076,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e2e2a185.95801","type":"execute","name":"generate parent-ar url - replace allotted-resource-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.parent-ar-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":661.2000579833984,"y":547.0000600814819,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"3111d761.5e06d8","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":1373.333595275879,"y":3004.3333768844604,"z":"4d1b2427.607d4c","wires":[["7e416b6f.40fa64","cdcc7917.56abb8","8bd6f68b.5ef6b8"]]},{"id":"521d8bd0.fa7014","type":"comment","name":"Rollback parent","info":"","comments":"","x":1217.3335227966309,"y":2974.000007390976,"z":"4d1b2427.607d4c","wires":[]},{"id":"2a4bd3e4.dd179c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1026.0001258850098,"y":3003.6666803359985,"z":"4d1b2427.607d4c","wires":[["3111d761.5e06d8","1a4098bb.aead37"]]},{"id":"7e416b6f.40fa64","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1744.64164352417,"y":3064.998343229294,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"cdcc7917.56abb8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1735.6416931152344,"y":3033.4983689785004,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"8bd6f68b.5ef6b8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1739.391731262207,"y":3003.8554738536477,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"3c400d0a.33bc62","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1881.0476989746094,"y":3000.047643043101,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"5790ccca.f5ea54","type":"execute","name":"generate network-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.network-provided-resource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-ar-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":663.0000228881836,"y":581.9999942779541,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"c643b552.15d5b8","type":"execute","name":"generate network-ar url - replace network-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-ar-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-ar-url\"/>\n <parameter name=\"target\" value=\"{network-id}\"/>\n <parameter name=\"replacement\" value=\"`$ar-assignments.dest-network.network-id`\"/>\n","comments":"","outputs":1,"x":608.3334274291992,"y":2757.333106994629,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e9e426fe.b64fd8","type":"execute","name":"execute RestApiCallNode - Update parent network provided AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"net-ar\" />\n\n","comments":"","outputs":1,"x":669.0000686645508,"y":2789.332983970642,"z":"4d1b2427.607d4c","wires":[["5fedcca8.21af14","b88ee5a.8fd2218","945ef6e1.dc3458"]]},{"id":"b88ee5a.8fd2218","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1076.3081321716309,"y":2790.9985933303833,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"945ef6e1.dc3458","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1068.9748420715332,"y":2826.165051460266,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"5fedcca8.21af14","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1071.0581665039062,"y":2756.5221377387643,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"758f2d97.6a46a4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1242.7140617370605,"y":2761.047921180725,"z":"4d1b2427.607d4c","wires":[["47bc6f66.279f","aed7c269.f7e95"]]},{"id":"5b0d4b89.fa37f4","type":"comment","name":"Add AR to parent network allotted resource from mdsal","info":"","comments":"","x":636.9999618530273,"y":2717.6666049957275,"z":"4d1b2427.607d4c","wires":[]},{"id":"aed7c269.f7e95","type":"switchNode","name":"switch net-ar_length","xml":"<switch test='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`'>\n","comments":"","outputs":1,"x":1469.3332176208496,"y":2800.3330936431885,"z":"4d1b2427.607d4c","wires":[["28ec3cfa.5c9964","d62a83f8.5e709"]]},{"id":"561e5c25.cb8074","type":"for","name":"for nidx..net-ar[]","xml":"<for index='nidx' start='0' end='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' >\n","comments":"","outputs":1,"x":2187.6666717529297,"y":2821.3331003189087,"z":"4d1b2427.607d4c","wires":[["a35b9203.161d8"]]},{"id":"28ec3cfa.5c9964","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1752.1422843933105,"y":2755.9044466018677,"z":"4d1b2427.607d4c","wires":[["e0cae091.f6ab5"]]},{"id":"d62a83f8.5e709","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1733.8089332580566,"y":2829.571165084839,"z":"4d1b2427.607d4c","wires":[["8d766915.255368"]]},{"id":"a35b9203.161d8","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$net-ar.network-provided-allotted-resources.network-provided-ar-id[$nidx] == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":2412.761730194092,"y":2828.3930258750916,"z":"4d1b2427.607d4c","wires":[["bc858023.6898d"]]},{"id":"bc858023.6898d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2595.905242919922,"y":2823.857072353363,"z":"4d1b2427.607d4c","wires":[["f4a2c79.aa6a338"]]},{"id":"8d766915.255368","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1936.2693977355957,"y":2832.36363363266,"z":"4d1b2427.607d4c","wires":[["561e5c25.cb8074","3cebc33.7bab73c"]]},{"id":"f4a2c79.aa6a338","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2762.6662063598633,"y":2825.3809678554535,"z":"4d1b2427.607d4c","wires":[["e9b23d6.001eac","c26f5049.d1dee"]]},{"id":"a0f4304a.2addd","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2366.7178077697754,"y":2865.041989326477,"z":"4d1b2427.607d4c","wires":[["907c3bfc.fa31a8"]]},{"id":"907c3bfc.fa31a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2536.0509071350098,"y":2863.3752422332764,"z":"4d1b2427.607d4c","wires":[["f4d721f4.46f46","fe096059.4ee75","3c945468.bd2a2c"]]},{"id":"f4d721f4.46f46","type":"set","name":"set tmp.nidx ","xml":"<set>\n<parameter name='tmp.nidx' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' />\n","comments":"","x":2741.9081535339355,"y":2868.946853160858,"z":"4d1b2427.607d4c","wires":[]},{"id":"6922d49.4d4892c","type":"comment","name":"allotted resource already exists- no op","info":"","comments":"","x":2457.999900817871,"y":2679.333148956299,"z":"4d1b2427.607d4c","wires":[]},{"id":"3cebc33.7bab73c","type":"switchNode","name":"switch tmp.found-nidx","xml":"<switch test='`$tmp.found-nidx`'>\n","comments":"","outputs":1,"x":2196.717716217041,"y":2863.375160217285,"z":"4d1b2427.607d4c","wires":[["a0f4304a.2addd"]]},{"id":"e9b23d6.001eac","type":"set","name":"set tmp.nidx ","xml":"<set>\n<parameter name='tmp.found-nidx' value='true' />","comments":"","x":2974.6665992736816,"y":2816.6662435531616,"z":"4d1b2427.607d4c","wires":[]},{"id":"c26f5049.d1dee","type":"break","name":"break","xml":"<break>\n","comments":"","x":2961.860704421997,"y":2850.0894327163696,"z":"4d1b2427.607d4c","wires":[]},{"id":"fe096059.4ee75","type":"execute","name":"execute RestApiCallNode - Update parent network provided AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"p-network-ar\" />\n\n","comments":"","outputs":1,"x":2909.0000190734863,"y":2934.6661834716797,"z":"4d1b2427.607d4c","wires":[["409657f3.cf5e98","c70db172.aebc4","8859496f.d9d998"]]},{"id":"8859496f.d9d998","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3251.9999656677246,"y":2980.999610900879,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"c70db172.aebc4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3243.000015258789,"y":2949.4996366500854,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"409657f3.cf5e98","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3246.7500534057617,"y":2919.856741525233,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"34c49998.798456","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":3431.739345550537,"y":2916.0488624572754,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"47bc6f66.279f","type":"set","name":"set tmp.found-nidx = false","xml":"<set>\n<parameter name='tmp.found-nidx' value='false' />","comments":"","x":1485.9999809265137,"y":2730.6669635772705,"z":"4d1b2427.607d4c","wires":[]},{"id":"3c945468.bd2a2c","type":"set","name":"set length","xml":"<set>\n<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`' />\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[$tmp.nidx]' value=\"`$tmp.ar.allotted-resource-id`\" />\n","comments":"","x":2736.666305541992,"y":2903.000112056732,"z":"4d1b2427.607d4c","wires":[]},{"id":"e917600f.4f7d7","type":"set","name":"set new network-provided-ar","xml":"<set>\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value=\"1\" />\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[0]' value=\"`$tmp.ar.allotted-resource-id`\" />\n\n\n\n\n","comments":"","x":2252.999351501465,"y":2759.285076737404,"z":"4d1b2427.607d4c","wires":[]},{"id":"e0cae091.f6ab5","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1949.6670188903809,"y":2755.9993057250977,"z":"4d1b2427.607d4c","wires":[["e917600f.4f7d7","fe096059.4ee75"]]},{"id":"ed6517f4.b8f3b8","type":"comment","name":"Other Rollbacks? ","info":"","comments":"","x":1222.999870300293,"y":3065.9997520446777,"z":"4d1b2427.607d4c","wires":[]},{"id":"5b89889f.eedaf8","type":"for","name":"for each vf-module","xml":"<for index='idx' start='0' end='`$aai.vnf.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1975.1585693359375,"y":2104.26904296875,"z":"4d1b2427.607d4c","wires":[["c9284eeb.d1eb5"]]},{"id":"471bc9f6.bff138","type":"break","name":"break","xml":"<break>\n","comments":"","x":2854.730155944824,"y":2168.507378578186,"z":"4d1b2427.607d4c","wires":[]},{"id":"c9284eeb.d1eb5","type":"switchNode","name":"switch contrail-service-instance-fqdn","xml":"<switch test='`$aai-vf-module.contrail-service-instance-fqdn`'>\n","comments":"","outputs":1,"x":2258.66650390625,"y":2104.999755859375,"z":"4d1b2427.607d4c","wires":[["b136ca44.5724a8","ed24b238.48ffb"]]},{"id":"eedd883d.4f3368","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"VF Module not found in AAI\" />\n","comments":"","x":1956.61083984375,"y":2071.97216796875,"z":"4d1b2427.607d4c","wires":[]},{"id":"b136ca44.5724a8","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2538.66650390625,"y":2106.3330078125,"z":"4d1b2427.607d4c","wires":[["b5e70f0a.b42d"]]},{"id":"ed24b238.48ffb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2520.6665077209473,"y":2139.3330085277557,"z":"4d1b2427.607d4c","wires":[["322afc54.4f0194"]]},{"id":"b5e70f0a.b42d","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2695.3334197998047,"y":2104.666417121887,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"322afc54.4f0194","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2701.9997482299805,"y":2136.333013534546,"z":"4d1b2427.607d4c","wires":[["471bc9f6.bff138","caad7e17.7d471"]]},{"id":"caad7e17.7d471","type":"set","name":"set applied service fqdn","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.contrail-fqdn' value=\"`$aai-vf-module.contrail-service-instance-fqdn` \" />\n\n\n\n","comments":"","x":2913.3330078125,"y":2135.6666259765625,"z":"4d1b2427.607d4c","wires":[]},{"id":"be0b4c28.f1b79","type":"switchNode","name":"switch ar-assignments.contrail-applied-service.contrail-fqdn","xml":"<switch test='`$ar-assignments.contrail-applied-service.contrail-fqdn`'>\n","comments":"","outputs":1,"x":672.0000610351562,"y":2053.6666259765625,"z":"4d1b2427.607d4c","wires":[["214426a4.7d2d2a"]]},{"id":"214426a4.7d2d2a","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1000.6667442321777,"y":2054.333152294159,"z":"4d1b2427.607d4c","wires":[["9fbe5884.aaa628"]]},{"id":"9fbe5884.aaa628","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No vf-module with contrail-service-instance-fqdn found in AAI\" />\n \n","comments":"","x":1176.6666259765625,"y":2052.66650390625,"z":"4d1b2427.607d4c","wires":[]},{"id":"68ea4ba9.f086b4","type":"comment","name":"MDSal adaptor only saves consuming service so parent service and AR are done by Rest api calls","info":"","comments":"","x":650.666618347168,"y":90.99999618530273,"z":"4d1b2427.607d4c","wires":[]},{"id":"d9c31b5a.6a4cd8","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":3081.666784286499,"y":1128.9998168945312,"z":"4d1b2427.607d4c","wires":[["a1818b66.74b108","7a2bb1ac.b1704","d7af6553.4f9528"]]},{"id":"a1818b66.74b108","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3302.5281734466553,"y":1121.6109313964844,"z":"4d1b2427.607d4c","wires":[["e5f97be8.5172e8"]]},{"id":"7a2bb1ac.b1704","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3297.8612003326416,"y":1154.94424533844,"z":"4d1b2427.607d4c","wires":[["e5f97be8.5172e8"]]},{"id":"e5f97be8.5172e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3472.0371227264404,"y":1142.9998044967651,"z":"4d1b2427.607d4c","wires":[]},{"id":"d7af6553.4f9528","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3298.0372066497803,"y":1090.0368957519531,"z":"4d1b2427.607d4c","wires":[["d4ad82c0.f23a2"]]},{"id":"d4ad82c0.f23a2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3478.0372066497803,"y":1088.0368957519531,"z":"4d1b2427.607d4c","wires":[["e5841bea.414a18"]]},{"id":"e5841bea.414a18","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3665.000310897827,"y":1085.6666374206543,"z":"4d1b2427.607d4c","wires":[]},{"id":"1c4a61f3.c2849e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2344.39990234375,"y":1116,"z":"4d1b2427.607d4c","wires":[["cb1b209a.0c898","3cf67218.fc2b9e"]]},{"id":"3cf67218.fc2b9e","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.ar-name=\"/>\n<parameter name=\"field3\" value=\"`$tmp.ar-name`\"/>\n<parameter name=\"field4\" value=\"service-data-network-id\" />\n<parameter name=\"field5\" value=\"`$service-data.networks.network[$nidx].network-id`\" />\n<parameter name=\"field6\" value=\"contrail-route-input-network-id\" />\n<parameter name=\"field7\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`\" />\n<parameter name=\"field8\" value=\"`$nidx`\" />","comments":"","outputs":1,"x":2509.0000762939453,"y":1079.0001277923584,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"74060662.5164e8","type":"set","name":"set source-network-found","xml":"<set>\n<parameter name='source-network-found' value='false' />\n\n","comments":"","x":2067.000198364258,"y":1120.0000407099724,"z":"4d1b2427.607d4c","wires":[]},{"id":"4f6aa7ae.9611b8","type":"switchNode","name":"switch source-network-found","xml":"<switch test=\"`$source-network-found`\">\n\n","comments":"","outputs":1,"x":2071.000072479248,"y":1186.000033378601,"z":"4d1b2427.607d4c","wires":[["ef194605.ce8898"]]},{"id":"ef194605.ce8898","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2283.000030517578,"y":1186.0000343322754,"z":"4d1b2427.607d4c","wires":[["465f3356.89525c"]]},{"id":"c7b161a8.2d59d","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$aai.vnf.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":1558,"y":2071,"z":"4d1b2427.607d4c","wires":[["883be9e.f5d5a18","130ed066.b1002"]]},{"id":"883be9e.f5d5a18","type":"other","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1763,"y":2072,"z":"4d1b2427.607d4c","wires":[["eedd883d.4f3368"]]},{"id":"130ed066.b1002","type":"other","name":"outcome other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1763,"y":2103,"z":"4d1b2427.607d4c","wires":[["5b89889f.eedaf8"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json
new file mode 100755
index 00000000..ec1de4ea
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json
@@ -0,0 +1 @@
+[{"id":"977f53d.3ee9fb","type":"dgstart","name":"DGSTART","outputs":1,"x":107,"y":51,"z":"5f90649b.a6618c","wires":[["f60ed586.79f2e8"]]},{"id":"f60ed586.79f2e8","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":253.2380828857422,"y":125.95239353179932,"z":"5f90649b.a6618c","wires":[["7ed7da9d.6e2b64"]]},{"id":"7ed7da9d.6e2b64","type":"method","name":"contrail-route-topology-operation-create","xml":"<method rpc='contrail-route-topology-operation-create' mode='sync'>\n","comments":"","outputs":1,"x":333.1548500061035,"y":195.1904420852661,"z":"5f90649b.a6618c","wires":[["56f7100c.36c0c"]]},{"id":"56f7100c.36c0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":241.4761848449707,"y":338.523784160614,"z":"5f90649b.a6618c","wires":[["9e479a64.54c188","e3448fe7.bd93a","8da0a386.68f65","9aff23ea.c5706","14b94fc4.c4f09","98b3a116.8663e","15a1d923.552617","d9a64061.5a09f","8dd7a6c4.f97498","4c8c7d6c.390284","2f8ea3d3.25d61c","df03f36f.1c4a","c6e8d07f.0b15c","21f56f54.bd659","c191a157.b6674","f0fa32bd.ad602","9525be20.92483","63945192.1184c","dcc82b6d.bd0448","3fc1cd7b.ce8842","7ce279cd.dfcc18","84f94150.403b","674f14d2.772d8c","fa1647e6.8bb8f8"]]},{"id":"e3448fe7.bd93a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":439.7144775390625,"y":2006.7268590070307,"z":"5f90649b.a6618c","wires":[]},{"id":"9e479a64.54c188","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":468.4683837890625,"y":1969.182652387768,"z":"5f90649b.a6618c","wires":[]},{"id":"4c8c7d6c.390284","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<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`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":501.8017692565918,"y":1841.563532743603,"z":"5f90649b.a6618c","wires":[]},{"id":"9aff23ea.c5706","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":503.7380561828613,"y":312.3333215713501,"z":"5f90649b.a6618c","wires":[]},{"id":"8da0a386.68f65","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n\n","comments":"","x":550.9973297119141,"y":278.5925884246826,"z":"5f90649b.a6618c","wires":[]},{"id":"14b94fc4.c4f09","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":565.4219818115234,"y":348.23153495788574,"z":"5f90649b.a6618c","wires":[[]]},{"id":"15a1d923.552617","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":583.8520965576172,"y":519.7928762435913,"z":"5f90649b.a6618c","wires":[["a2f6a7ce.665958","f3b38cd6.2e6e6"]]},{"id":"98b3a116.8663e","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":538.0648651123047,"y":404.01720237731934,"z":"5f90649b.a6618c","wires":[[]]},{"id":"a2f6a7ce.665958","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":825.8148498535156,"y":517.2673225402832,"z":"5f90649b.a6618c","wires":[["20f015d.23979ea"]]},{"id":"d9a64061.5a09f","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":519.0769958496094,"y":1926.0893211364746,"z":"5f90649b.a6618c","wires":[["c10dc6ee.696618","805abac4.a6c908","3cb9e4ff.c3e14c"]]},{"id":"c10dc6ee.696618","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":801.8849945068359,"y":1961.9445136152208,"z":"5f90649b.a6618c","wires":[["950a7649.40f1f8"]]},{"id":"805abac4.a6c908","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":792.8850440979004,"y":1930.4445393644273,"z":"5f90649b.a6618c","wires":[["950a7649.40f1f8"]]},{"id":"3cb9e4ff.c3e14c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":796.635082244873,"y":1900.8016442395747,"z":"5f90649b.a6618c","wires":[["993aa5dc.bb4718"]]},{"id":"950a7649.40f1f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":962.635082244873,"y":1931.1945632062852,"z":"5f90649b.a6618c","wires":[]},{"id":"20f015d.23979ea","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":994.8148536682129,"y":515.7672233581543,"z":"5f90649b.a6618c","wires":[["729d2c16.7a05d4"]]},{"id":"729d2c16.7a05d4","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1205.6720962524414,"y":515.3863525390625,"z":"5f90649b.a6618c","wires":[["2012dd5e.936ac2","ea94432e.31d92"]]},{"id":"2012dd5e.936ac2","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1395.0054016113281,"y":515.3863105773926,"z":"5f90649b.a6618c","wires":[["976ad675.132198"]]},{"id":"f33b796d.cb9ac8","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1868.1962203979492,"y":478.62452602386475,"z":"5f90649b.a6618c","wires":[]},{"id":"976ad675.132198","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1579.529291152954,"y":512.2911443710327,"z":"5f90649b.a6618c","wires":[["f33b796d.cb9ac8","20c37c8e.57cb74"]]},{"id":"26a328fb.e4fd48","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":593.8147926330566,"y":483.7672119140625,"z":"5f90649b.a6618c","wires":[]},{"id":"f0fa32bd.ad602","type":"set","name":"set ar-assignments.contrail-id","xml":"<set>\n<parameter name='ar-assignments.contrail-id' value=\"`$contrailResp.network-policy.uuid`\" />\n\n\n\n","comments":"","x":523.6721115112305,"y":1402.565318107605,"z":"5f90649b.a6618c","wires":[]},{"id":"20c37c8e.57cb74","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1956.0532722473145,"y":445.4340181350708,"z":"5f90649b.a6618c","wires":[]},{"id":"aa784c84.13ef8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":508.9576530456543,"y":377.62435245513916,"z":"5f90649b.a6618c","wires":[]},{"id":"993aa5dc.bb4718","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":938.2910499572754,"y":1896.9938134290278,"z":"5f90649b.a6618c","wires":[[]]},{"id":"8dd7a6c4.f97498","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":450.95776748657227,"y":1874.6602372266352,"z":"5f90649b.a6618c","wires":[[]]},{"id":"19d401c8.5d312e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1545.3337326049805,"y":600.0000534057617,"z":"5f90649b.a6618c","wires":[]},{"id":"f3b38cd6.2e6e6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":817.6666526794434,"y":552.3334074020386,"z":"5f90649b.a6618c","wires":[["2dce5d4a.489092"]]},{"id":"2dce5d4a.489092","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":997.6666030883789,"y":552.9999580383301,"z":"5f90649b.a6618c","wires":[["19d401c8.5d312e"]]},{"id":"2f8ea3d3.25d61c","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":490.5238265991211,"y":557.8095149993896,"z":"5f90649b.a6618c","wires":[]},{"id":"ea94432e.31d92","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1383.3333549499512,"y":552.6666707992554,"z":"5f90649b.a6618c","wires":[["19d401c8.5d312e"]]},{"id":"63945192.1184c","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":547.3810729980469,"y":1208.9765033721924,"z":"5f90649b.a6618c","wires":[]},{"id":"ea06c71e.efa318","type":"comment","name":"Call contrail api here","info":"","comments":"","x":491.0477752685547,"y":1175.643006324768,"z":"5f90649b.a6618c","wires":[]},{"id":"228d2ac3.140ba6","type":"comment","name":"Rollback - rollback contrail/AAI","info":"","comments":"","x":1175.8573608398438,"y":1136.0477056503296,"z":"5f90649b.a6618c","wires":[]},{"id":"eb7db965.cffa68","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":497.76202392578125,"y":1611.2262735366821,"z":"5f90649b.a6618c","wires":[]},{"id":"21f56f54.bd659","type":"save","name":"save AnAI - network-policy","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-policy-id\" value=\"`$ar-assignments.contrail-id`\" />\n<parameter name=\"network-policy-fqdn\" value=\"`$ar-assignments.fq-name`\" />\n\n\n","comments":"","outputs":1,"x":513.1389083862305,"y":1648.2938385009766,"z":"5f90649b.a6618c","wires":[["52e636d7.8ebb58","ed317c2.86ca38"]]},{"id":"244a6c17.3e21d4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":985.4844169616699,"y":1638.575451850891,"z":"5f90649b.a6618c","wires":[]},{"id":"52e636d7.8ebb58","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":756.9130249023438,"y":1637.5911893844604,"z":"5f90649b.a6618c","wires":[["244a6c17.3e21d4"]]},{"id":"ed317c2.86ca38","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":760.7225227355957,"y":1667.06760597229,"z":"5f90649b.a6618c","wires":[["244a6c17.3e21d4"]]},{"id":"801bff7e.fbad5","type":"comment","name":"MDSal adaptor only saves consuming service so parent service and AR are done by Rest api calls","info":"","comments":"","x":613.6666259765625,"y":49.33332824707031,"z":"5f90649b.a6618c","wires":[]},{"id":"c191a157.b6674","type":"execute","name":"execute Contrail API create network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='create' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='default-domain' value='default-domain' />\n<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='default-project' value='`$tmp.ar.tenant-name`' /> \n<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->\n<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />\n<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />\n<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />\n<parameter name='direction' value='&lt;&gt;' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n\n","comments":"","outputs":1,"x":552.0000915527344,"y":1291.8338508605957,"z":"5f90649b.a6618c","wires":[["7a90fc8f.31cf84","1476872f.65dcf9"]]},{"id":"7a90fc8f.31cf84","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":833.380973815918,"y":1259.976146850735,"z":"5f90649b.a6618c","wires":[["e7e4be16.a7a45"]]},{"id":"1476872f.65dcf9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":831.4762954711914,"y":1292.976086616516,"z":"5f90649b.a6618c","wires":[["44b885c3.5934bc"]]},{"id":"df03f36f.1c4a","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":554.0000457763672,"y":764.0001230239868,"z":"5f90649b.a6618c","wires":[["69c55b4f.8054f4","6060b3b1.b4008c"]]},{"id":"69c55b4f.8054f4","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":910.0002632141113,"y":762.6665024757385,"z":"5f90649b.a6618c","wires":[["74dfd12.49de63"]]},{"id":"6060b3b1.b4008c","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":905.6670799255371,"y":725.6663026809692,"z":"5f90649b.a6618c","wires":[["1ff80c0f.023764"]]},{"id":"7a681aef.92f704","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2045.4450378417969,"y":802.4442802667618,"z":"5f90649b.a6618c","wires":[["ddb4759b.c74ba8"]]},{"id":"58522d88.a159a4","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1301.825698852539,"y":762.6823296546936,"z":"5f90649b.a6618c","wires":[["a0f9f28f.3a11d","62f8d43d.6ff0ac"]]},{"id":"a0f9f28f.3a11d","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1590.825698852539,"y":764.6823906898499,"z":"5f90649b.a6618c","wires":[["6eb4b765.2bcfe8"]]},{"id":"62f8d43d.6ff0ac","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1570.825698852539,"y":799.6823906898499,"z":"5f90649b.a6618c","wires":[["e7594b36.af86f8"]]},{"id":"e7594b36.af86f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1775.4290008544922,"y":803.5702644586563,"z":"5f90649b.a6618c","wires":[["7a681aef.92f704"]]},{"id":"74dfd12.49de63","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1044.1115188598633,"y":763.1109070777893,"z":"5f90649b.a6618c","wires":[["58522d88.a159a4"]]},{"id":"1ff80c0f.023764","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1059.8005447387695,"y":726.3332052230835,"z":"5f90649b.a6618c","wires":[]},{"id":"6eb4b765.2bcfe8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1783.9337768554688,"y":764.9998508691788,"z":"5f90649b.a6618c","wires":[]},{"id":"7cbfe81d.55cd18","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":591.4003677368164,"y":730.6664390563965,"z":"5f90649b.a6618c","wires":[]},{"id":"ddb4759b.c74ba8","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2337.9998474121094,"y":799.3334070444107,"z":"5f90649b.a6618c","wires":[["f4eec0e2.b336a","e74ffe1b.ee527"]]},{"id":"831dcdf8.8c4d9","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2877.666519165039,"y":789.3333841562271,"z":"5f90649b.a6618c","wires":[]},{"id":"1f3c5039.cf476","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2687.732961654663,"y":802.3333956003189,"z":"5f90649b.a6618c","wires":[["831dcdf8.8c4d9","3e513116.e80b7e"]]},{"id":"f4eec0e2.b336a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2532.2663383483887,"y":802.3332582712173,"z":"5f90649b.a6618c","wires":[["1f3c5039.cf476"]]},{"id":"e74ffe1b.ee527","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2533.065948486328,"y":840.3332611322403,"z":"5f90649b.a6618c","wires":[["cce762b8.5727a"]]},{"id":"cce762b8.5727a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2711.066104888916,"y":840.3333269357681,"z":"5f90649b.a6618c","wires":[]},{"id":"3e513116.e80b7e","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2900.1330642700195,"y":825.3330799341202,"z":"5f90649b.a6618c","wires":[["dfe3bd23.975b8","7f907bb.cc18a84","324872c7.f43eee"]]},{"id":"dfe3bd23.975b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3120.994453430176,"y":817.9441944360733,"z":"5f90649b.a6618c","wires":[["ddb43474.5e2fc8"]]},{"id":"7f907bb.cc18a84","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3116.327480316162,"y":851.2775083780289,"z":"5f90649b.a6618c","wires":[["ddb43474.5e2fc8"]]},{"id":"ddb43474.5e2fc8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3290.503402709961,"y":839.3330675363541,"z":"5f90649b.a6618c","wires":[]},{"id":"324872c7.f43eee","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3116.503486633301,"y":786.370158791542,"z":"5f90649b.a6618c","wires":[["19595da5.86cf22"]]},{"id":"19595da5.86cf22","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3296.503486633301,"y":784.370158791542,"z":"5f90649b.a6618c","wires":[["9bf595b1.bf70f8"]]},{"id":"9bf595b1.bf70f8","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3483.4665908813477,"y":781.9999004602432,"z":"5f90649b.a6618c","wires":[]},{"id":"c6e8d07f.0b15c","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n","comments":"","outputs":1,"x":500.4287109375,"y":1747.6073377132416,"z":"5f90649b.a6618c","wires":[["4c9be32.4622c1c","58211de1.fa28b4"]]},{"id":"4c9be32.4622c1c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":756.1906051635742,"y":1724.8455572128296,"z":"5f90649b.a6618c","wires":[["3ee10ac5.6c52d6"]]},{"id":"58211de1.fa28b4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":761.5000343322754,"y":1760.4169750213623,"z":"5f90649b.a6618c","wires":[["3ee10ac5.6c52d6"]]},{"id":"3ee10ac5.6c52d6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":971.2858200073242,"y":1726.4646015167236,"z":"5f90649b.a6618c","wires":[]},{"id":"a5f87574.e494f8","type":"comment","name":"Update AAI AR","info":"","comments":"","x":456.62871170043945,"y":1716.7500885389745,"z":"5f90649b.a6618c","wires":[]},{"id":"44b885c3.5934bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":991.381103515625,"y":1292.309534072876,"z":"5f90649b.a6618c","wires":[]},{"id":"9525be20.92483","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.contrail-route-topology-operation-create\"/>\n<parameter name='field3' value='network-policy' />\n<parameter name='field4' value='create' />\n<parameter name='field5' value='contrailResp' />\n<parameter name='field6' value='default-domain' />\n<parameter name='field7' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='field8' value='`$tmp.ar.tenant-name`' />\n<parameter name='field9' value='`$ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`' />\n<parameter name='field10' value='$aai.dest-network.contrail-network-fqdn' />\n<parameter name='field11' value='$aai.src-network.contrail-network-fqdn' />\n<parameter name='field12' value='&lt;&gt;' />\n<parameter name='field13' value='$tmp.ar.cloud-region-id' />\n\n\n","comments":"","outputs":1,"x":440.09527587890625,"y":1261.595251083374,"z":"5f90649b.a6618c","wires":[[]]},{"id":"c2b56ee4.19d0f","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":836.2857666015625,"y":841.9288463592529,"z":"5f90649b.a6618c","wires":[["a3daa790.c8f578"]]},{"id":"84f94150.403b","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":564.9126892089844,"y":849.4611072540283,"z":"5f90649b.a6618c","wires":[["d00661cb.d83c8","c2b56ee4.19d0f","bf39102b.a9daa"]]},{"id":"d00661cb.d83c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":829.0078735351562,"y":876.4134502410889,"z":"5f90649b.a6618c","wires":[["a3daa790.c8f578"]]},{"id":"a3daa790.c8f578","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'`\" />","comments":"","x":981.1188354492188,"y":872.6356792449951,"z":"5f90649b.a6618c","wires":[]},{"id":"bf39102b.a9daa","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":834.2858276367188,"y":907.9288463592529,"z":"5f90649b.a6618c","wires":[["35e7e6d8.9c02fa"]]},{"id":"35e7e6d8.9c02fa","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":986.952392578125,"y":906.2621746063232,"z":"5f90649b.a6618c","wires":[[]]},{"id":"b5a6ae1.293715","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":537.7143249511719,"y":817.6430835723877,"z":"5f90649b.a6618c","wires":[]},{"id":"4c2c7cf4.617bb4","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":840.5714721679688,"y":949.0716209411621,"z":"5f90649b.a6618c","wires":[["9036f2cc.f4b7d"]]},{"id":"674f14d2.772d8c","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":569.1983947753906,"y":956.6038818359375,"z":"5f90649b.a6618c","wires":[["946c94f2.2a45a8","4c2c7cf4.617bb4","e5db03f9.2fafe"]]},{"id":"946c94f2.2a45a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":833.2935791015625,"y":983.556224822998,"z":"5f90649b.a6618c","wires":[["9036f2cc.f4b7d"]]},{"id":"9036f2cc.f4b7d","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'`\" />","comments":"","x":985.404541015625,"y":979.7784538269043,"z":"5f90649b.a6618c","wires":[]},{"id":"e5db03f9.2fafe","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":833.571533203125,"y":1020.0715923309326,"z":"5f90649b.a6618c","wires":[["854d69a8.a38398"]]},{"id":"854d69a8.a38398","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":986.2380981445312,"y":1018.4049205780029,"z":"5f90649b.a6618c","wires":[[]]},{"id":"3714bcdd.1c2684","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":542.0000305175781,"y":924.7858581542969,"z":"5f90649b.a6618c","wires":[]},{"id":"14b73b46.6d9fb5","type":"set","name":"set temp contrail fqdn for input to contrail","xml":"<set>\n<parameter name='aai.src-network.contrail-network-fqdn' value='`tmpsourcecontrailfqdn`' />\n<parameter name='aai.dest-network.contrail-network-fqdn' value='`tmpdestinationcontrailfqdn`' />","comments":"","x":575.0000648498535,"y":1106.928747177124,"z":"5f90649b.a6618c","wires":[]},{"id":"e7e4be16.a7a45","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":985.5714569091797,"y":1260.6428718566895,"z":"5f90649b.a6618c","wires":[[]]},{"id":"dcc82b6d.bd0448","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":516.2857627868652,"y":588.5714883804321,"z":"5f90649b.a6618c","wires":[]},{"id":"3fc1cd7b.ce8842","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' value='`$ar-assignments.`' />\n\n\n\n","comments":"","x":463.42869567871094,"y":1807.607406616211,"z":"5f90649b.a6618c","wires":[]},{"id":"7ce279cd.dfcc18","type":"switchNode","name":"switch contrailResp.resp-code","xml":"<switch test='`$contrailResp.resp-code`'>\n\n","comments":"","outputs":1,"x":518.607177734375,"y":1357.2500972747803,"z":"5f90649b.a6618c","wires":[["d4c93b29.23d048","dcc6b0f9.993d7"]]},{"id":"d4c93b29.23d048","type":"outcome","name":"outcome 0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":795.7501801252365,"y":1357.2502279281616,"z":"5f90649b.a6618c","wires":[["43219c8b.d04894"]]},{"id":"dcc6b0f9.993d7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":775.7500915527344,"y":1384.7501316070557,"z":"5f90649b.a6618c","wires":[["62b65f6a.fbc85"]]},{"id":"62b65f6a.fbc85","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":948.2501907348633,"y":1387.2502298355103,"z":"5f90649b.a6618c","wires":[]},{"id":"43219c8b.d04894","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":940.7500915527344,"y":1357.250129699707,"z":"5f90649b.a6618c","wires":[[]]},{"id":"b1b62e5b.66cdc","type":"comment","name":"Dummy values for dev/dev","info":"","comments":"","x":522.0000114440918,"y":1070.0002274513245,"z":"5f90649b.a6618c","wires":[]},{"id":"fa1647e6.8bb8f8","type":"call","name":"call policy-manager-create-policy","xml":"<call module='GENERIC-RESOURCE-API' rpc='policy-manager-create-policy' mode='sync' >\n","comments":"","outputs":1,"x":537.1427841186523,"y":1491.4284505844116,"z":"5f90649b.a6618c","wires":[["4134066.d0e53f8","cfa986c.9649d78"]]},{"id":"4134066.d0e53f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":772.7221450805664,"y":1488.7704181671143,"z":"5f90649b.a6618c","wires":[["6336a3da.11edec"]]},{"id":"cfa986c.9649d78","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":778.714412689209,"y":1529.5714936256409,"z":"5f90649b.a6618c","wires":[["f41f6acc.efb3a8"]]},{"id":"f41f6acc.efb3a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":931.3809776306152,"y":1527.9048218727112,"z":"5f90649b.a6618c","wires":[[]]},{"id":"2d6f6d8d.fcc1b2","type":"execute","name":"execute Contrail API delete network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='default-domain' value='default-domain' />\n<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='default-project' value='`$tmp.ar.tenant-name`' /> \n<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->\n<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />\n<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />\n<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />\n<parameter name='direction' value='&lt;&gt;' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n\n","comments":"","outputs":1,"x":1225.7143249511719,"y":1487.1428270339966,"z":"5f90649b.a6618c","wires":[["cd2ace54.7c12e","4fd4dcde.514ad4"]]},{"id":"cd2ace54.7c12e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1502.809471130371,"y":1456.7137071229517,"z":"5f90649b.a6618c","wires":[["c111c6b8.837068"]]},{"id":"4fd4dcde.514ad4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1500.9047927856445,"y":1489.713646888733,"z":"5f90649b.a6618c","wires":[["704a5361.3555ec"]]},{"id":"704a5361.3555ec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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 `\" />\n","comments":"","x":1660.8096008300781,"y":1487.0470943450928,"z":"5f90649b.a6618c","wires":[]},{"id":"c111c6b8.837068","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1654.9999542236328,"y":1457.3804321289062,"z":"5f90649b.a6618c","wires":[[]]},{"id":"6336a3da.11edec","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":931.4285888671875,"y":1482.857177734375,"z":"5f90649b.a6618c","wires":[["2d6f6d8d.fcc1b2","15d27925.63edf7"]]},{"id":"15d27925.63edf7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in PolicyMgr. '+ $error-message + 'Contrail network policy rolled back.'`\" />\n","comments":"","x":1129.9999771118164,"y":1527.142939567566,"z":"5f90649b.a6618c","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json
new file mode 100755
index 00000000..71d1caca
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json
@@ -0,0 +1 @@
+[{"id":"6f42193e.7fcb18","type":"dgstart","name":"DGSTART","outputs":1,"x":182,"y":96,"z":"9d85256.794bfd8","wires":[["3a9d923a.4687de"]]},{"id":"3a9d923a.4687de","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":328.2380828857422,"y":170.95239353179932,"z":"9d85256.794bfd8","wires":[["1dd7e766.22b889"]]},{"id":"1dd7e766.22b889","type":"method","name":"contrail-route-topology-operation-deactivate","xml":"<method rpc='contrail-route-topology-operation-deactivate' mode='sync'>\n","comments":"","outputs":1,"x":408.1548500061035,"y":240.1904420852661,"z":"9d85256.794bfd8","wires":[["5b6f8915.4550d8"]]},{"id":"5b6f8915.4550d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":316.4761848449707,"y":383.523784160614,"z":"9d85256.794bfd8","wires":[["38d86f0b.67968","122583d8.1d260c","feae2ef.c5154d","cc085949.e3c218","9d38854d.1bb8b8","2829196a.eaaa76","8d33f3ff.44af3","c5fcedfe.366e1","a2b2b115.328ef","6975ce5b.c1d44","dca3aceb.03885","6578d3d4.5476dc","9376585b.91de78","98d3d9af.b219d8","b42adb13.7a13e8","d0cfc654.944c28","cbccf77c.4013d8","e468068e.f8fd78","3eceb01b.795e6","4fb1ccbe.de9264","8edbb4f5.1da278","4619cd3d.096d04"]]},{"id":"122583d8.1d260c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":579.000072479248,"y":2309.548008918762,"z":"9d85256.794bfd8","wires":[]},{"id":"38d86f0b.67968","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":607.753978729248,"y":2272.0038022994995,"z":"9d85256.794bfd8","wires":[]},{"id":"6975ce5b.c1d44","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<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`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":642.7541427612305,"y":2132.7179613113403,"z":"9d85256.794bfd8","wires":[]},{"id":"cc085949.e3c218","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":578.7380561828613,"y":357.3333215713501,"z":"9d85256.794bfd8","wires":[]},{"id":"feae2ef.c5154d","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":625.9973182678223,"y":323.5925874710083,"z":"9d85256.794bfd8","wires":[]},{"id":"9d38854d.1bb8b8","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":648.9934158325195,"y":393.2315502166748,"z":"9d85256.794bfd8","wires":[[]]},{"id":"8d33f3ff.44af3","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":655.5187454223633,"y":561.459508895874,"z":"9d85256.794bfd8","wires":[["ef8e221b.d195c","c49c58ea.301828"]]},{"id":"2829196a.eaaa76","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":613.0648460388184,"y":453.01722526550293,"z":"9d85256.794bfd8","wires":[[]]},{"id":"ef8e221b.d195c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":900.8148498535156,"y":562.2673225402832,"z":"9d85256.794bfd8","wires":[["70fd0b18.96fdf4"]]},{"id":"c5fcedfe.366e1","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":670.8626098632812,"y":2206.7674808502197,"z":"9d85256.794bfd8","wires":[["4700a122.f4dac","36986bb9.23cbc4","460b74b4.c2c05c"]]},{"id":"4700a122.f4dac","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":941.1706275939941,"y":2259.7656816467643,"z":"9d85256.794bfd8","wires":[["36e7add1.93abd2"]]},{"id":"36986bb9.23cbc4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":932.1706771850586,"y":2228.265707395971,"z":"9d85256.794bfd8","wires":[["36e7add1.93abd2"]]},{"id":"460b74b4.c2c05c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":935.9207153320312,"y":2198.622812271118,"z":"9d85256.794bfd8","wires":[["5404b4c7.e2032c"]]},{"id":"36e7add1.93abd2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1101.9207153320312,"y":2229.0157312378287,"z":"9d85256.794bfd8","wires":[]},{"id":"70fd0b18.96fdf4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1069.814853668213,"y":560.7672233581543,"z":"9d85256.794bfd8","wires":[["b8f11906.dba3b8"]]},{"id":"b8f11906.dba3b8","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1280.6720962524414,"y":560.3863525390625,"z":"9d85256.794bfd8","wires":[["9b410254.194e9","33e90ef6.f223c2"]]},{"id":"9b410254.194e9","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1470.0054016113281,"y":560.3863105773926,"z":"9d85256.794bfd8","wires":[["15bf006b.a87d5"]]},{"id":"f9f3fdcd.0ab34","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1943.1962203979492,"y":523.6245260238647,"z":"9d85256.794bfd8","wires":[]},{"id":"15bf006b.a87d5","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1654.529291152954,"y":557.2911443710327,"z":"9d85256.794bfd8","wires":[["f9f3fdcd.0ab34","e7cd0298.e8dcc","bba9d10e.349f9"]]},{"id":"e7cd0298.e8dcc","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1951.1961479187012,"y":587.719669342041,"z":"9d85256.794bfd8","wires":[]},{"id":"2bf64ead.e3bc32","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":668.8147926330566,"y":528.7672119140625,"z":"9d85256.794bfd8","wires":[]},{"id":"93e5a3ab.9544a","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1959.196002960205,"y":554.6244812011719,"z":"9d85256.794bfd8","wires":[["9b9adb79.d81988","d559dc4.b4c922"]]},{"id":"9b9adb79.d81988","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2194.8436737060547,"y":569.0531902313232,"z":"9d85256.794bfd8","wires":[["d622bf5.875044"]]},{"id":"d622bf5.875044","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2435.462423324585,"y":571.9577798843384,"z":"9d85256.794bfd8","wires":[]},{"id":"6578d3d4.5476dc","type":"set","name":"unset ar-assignments.vlan-tag","xml":"<set>\n<parameter name='ar-assignments.vlan-tag' value=\"\" />\n\n\n\n","comments":"","x":616.862419128418,"y":1670.0531845092773,"z":"9d85256.794bfd8","wires":[]},{"id":"bba9d10e.349f9","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":2031.0532722473145,"y":490.4340181350708,"z":"9d85256.794bfd8","wires":[]},{"id":"7d4ef2a7.fd27ec","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":583.9576530456543,"y":422.62435245513916,"z":"9d85256.794bfd8","wires":[]},{"id":"5404b4c7.e2032c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1077.5766830444336,"y":2194.8149814605713,"z":"9d85256.794bfd8","wires":[[]]},{"id":"a2b2b115.328ef","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":593.5767288208008,"y":2099.1481199264526,"z":"9d85256.794bfd8","wires":[[]]},{"id":"ba60bed0.88369","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1653.666997909546,"y":673.3333854675293,"z":"9d85256.794bfd8","wires":[]},{"id":"c49c58ea.301828","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":892.6666526794434,"y":597.3334074020386,"z":"9d85256.794bfd8","wires":[["25ba4dc1.5132b2"]]},{"id":"25ba4dc1.5132b2","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1072.666603088379,"y":597.9999580383301,"z":"9d85256.794bfd8","wires":[["ba60bed0.88369"]]},{"id":"dca3aceb.03885","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":564.666618347168,"y":593.6666221618652,"z":"9d85256.794bfd8","wires":[]},{"id":"33e90ef6.f223c2","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1458.3333549499512,"y":597.6666707992554,"z":"9d85256.794bfd8","wires":[["ba60bed0.88369"]]},{"id":"41d0055a.f5d40c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2419.333469390869,"y":537.6666975021362,"z":"9d85256.794bfd8","wires":[[]]},{"id":"1e0333e0.bb844c","type":"comment","name":"Call contrail api here","info":"","comments":"","x":594.8571243286133,"y":660.2857151031494,"z":"9d85256.794bfd8","wires":[]},{"id":"5db846ef.38ec08","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1327.9999771118164,"y":2228.3333263397217,"z":"9d85256.794bfd8","wires":[]},{"id":"48ad7bf5.74a014","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":627.333251953125,"y":2048.3332138061523,"z":"9d85256.794bfd8","wires":[]},{"id":"d559dc4.b4c922","type":"outcome","name":"outcome Active","xml":"<outcome value='Active'>\n","comments":"","outputs":1,"x":2209.6053161621094,"y":537.2912015914917,"z":"9d85256.794bfd8","wires":[["41d0055a.f5d40c"]]},{"id":"9376585b.91de78","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n","comments":"","outputs":1,"x":615.3333129882812,"y":1826.6666622161865,"z":"9d85256.794bfd8","wires":[["5f9fa013.45a14","1dfd3b63.382635"]]},{"id":"5f9fa013.45a14","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":871.0952453613281,"y":1803.904836654663,"z":"9d85256.794bfd8","wires":[["e7c07e31.eaec"]]},{"id":"1dfd3b63.382635","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":876.4046745300293,"y":1839.4762544631958,"z":"9d85256.794bfd8","wires":[["e7c07e31.eaec"]]},{"id":"e7c07e31.eaec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1086.1904602050781,"y":1805.5238809585571,"z":"9d85256.794bfd8","wires":[]},{"id":"a91079be.620158","type":"comment","name":"Update AAI AR","info":"","comments":"","x":578.6761703491211,"y":1790.095106124878,"z":"9d85256.794bfd8","wires":[]},{"id":"98d3d9af.b219d8","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":593,"y":626,"z":"9d85256.794bfd8","wires":[]},{"id":"d67ce795.d438a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1639.571683883667,"y":772.6666259765625,"z":"9d85256.794bfd8","wires":[]},{"id":"95b2d8a8.b95fe8","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":893.1903457641602,"y":926.0476361513138,"z":"9d85256.794bfd8","wires":[["587d3201.9d2dec"]]},{"id":"d0cfc654.944c28","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":616.3886871337891,"y":937.294153213501,"z":"9d85256.794bfd8","wires":[["27df97d8.1b3568","95b2d8a8.b95fe8","ff40702c.ccb5a"]]},{"id":"27df97d8.1b3568","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":885.9124526977539,"y":960.5322400331497,"z":"9d85256.794bfd8","wires":[["587d3201.9d2dec"]]},{"id":"587d3201.9d2dec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'`\" />","comments":"","x":1038.0234146118164,"y":956.754469037056,"z":"9d85256.794bfd8","wires":[]},{"id":"ff40702c.ccb5a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":891.1904067993164,"y":992.0476361513138,"z":"9d85256.794bfd8","wires":[["71fad46f.afcc4c"]]},{"id":"71fad46f.afcc4c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1043.8569717407227,"y":990.3809643983841,"z":"9d85256.794bfd8","wires":[[]]},{"id":"5c5f3058.c0223","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":594.6189041137695,"y":906.0476303100586,"z":"9d85256.794bfd8","wires":[]},{"id":"4cfc272e.3ba048","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":910.9046859741211,"y":1189.7619500160217,"z":"9d85256.794bfd8","wires":[["a32dd432.848348"]]},{"id":"4fb1ccbe.de9264","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":639.531608581543,"y":1197.2942109107971,"z":"9d85256.794bfd8","wires":[["dc427390.11d98","4cfc272e.3ba048","3deff125.68148e"]]},{"id":"dc427390.11d98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":903.6267929077148,"y":1224.2465538978577,"z":"9d85256.794bfd8","wires":[["a32dd432.848348"]]},{"id":"a32dd432.848348","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'`\" />","comments":"","x":1055.7377548217773,"y":1220.468782901764,"z":"9d85256.794bfd8","wires":[]},{"id":"3deff125.68148e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":913.4761962890625,"y":1258.6190185546875,"z":"9d85256.794bfd8","wires":[["9214480a.91e1e8"]]},{"id":"9214480a.91e1e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1066.1427612304688,"y":1256.9523468017578,"z":"9d85256.794bfd8","wires":[[]]},{"id":"2a49204d.cef83","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":612.3332290649414,"y":1165.4762029647827,"z":"9d85256.794bfd8","wires":[]},{"id":"cbccf77c.4013d8","type":"set","name":"set policy fq-name","xml":"<set>\n<parameter name='tmp.fq-name' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` \" />\n","comments":"","x":565.3333129882812,"y":983.1903915405273,"z":"9d85256.794bfd8","wires":[]},{"id":"e468068e.f8fd78","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":627.327995300293,"y":1017.2802391052246,"z":"9d85256.794bfd8","wires":[]},{"id":"3eceb01b.795e6","type":"execute","name":"execute Contrail API apply network policy to source network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":703.5185165405273,"y":1090.2804369926453,"z":"9d85256.794bfd8","wires":[["701abbd2.7e3b54","94120abf.4d0b08"]]},{"id":"701abbd2.7e3b54","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1059.1850128173828,"y":1090.7086639404297,"z":"9d85256.794bfd8","wires":[["dcb9ff58.45886"]]},{"id":"94120abf.4d0b08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1057.2803344726562,"y":1123.7086037062109,"z":"9d85256.794bfd8","wires":[["a24bc0fc.7cfa4"]]},{"id":"a24bc0fc.7cfa4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to remove policy in Contrail from source network\" />\n","comments":"","x":1217.1851043701172,"y":1123.0419702529907,"z":"9d85256.794bfd8","wires":[]},{"id":"dcb9ff58.45886","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1211.3754959106445,"y":1091.3753889463842,"z":"9d85256.794bfd8","wires":[[]]},{"id":"b42adb13.7a13e8","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":619.9046859741211,"y":862.3332405090332,"z":"9d85256.794bfd8","wires":[["5424210d.1c802","971927f5.16bf58"]]},{"id":"5424210d.1c802","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":975.9049034118652,"y":860.9996199607849,"z":"9d85256.794bfd8","wires":[["e39e1e1a.7ac94"]]},{"id":"971927f5.16bf58","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":971.571720123291,"y":823.9994201660156,"z":"9d85256.794bfd8","wires":[["4f4a92a0.e38f1c"]]},{"id":"b98ee4e8.38eb78","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1367.730339050293,"y":861.01544713974,"z":"9d85256.794bfd8","wires":[["f9657d22.1dd65","c9ebc8c2.c7d948"]]},{"id":"f9657d22.1dd65","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1656.730339050293,"y":863.0155081748962,"z":"9d85256.794bfd8","wires":[["839cc49f.136208"]]},{"id":"c9ebc8c2.c7d948","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1636.730339050293,"y":898.0155081748962,"z":"9d85256.794bfd8","wires":[["16bca9c2.7dc4c6"]]},{"id":"e39e1e1a.7ac94","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1110.0161590576172,"y":861.4440245628357,"z":"9d85256.794bfd8","wires":[["b98ee4e8.38eb78"]]},{"id":"4f4a92a0.e38f1c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1125.7051849365234,"y":824.6663227081299,"z":"9d85256.794bfd8","wires":[]},{"id":"95f9228a.7f106","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":657.3050079345703,"y":828.9995565414429,"z":"9d85256.794bfd8","wires":[]},{"id":"c66b5efd.1ec84","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2099.9047470092773,"y":898.3332633972168,"z":"9d85256.794bfd8","wires":[["f15b62ec.d4784"]]},{"id":"16bca9c2.7dc4c6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1825.888786315918,"y":898.4592633247375,"z":"9d85256.794bfd8","wires":[["c66b5efd.1ec84"]]},{"id":"839cc49f.136208","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1838.3934860229492,"y":862.8888339996338,"z":"9d85256.794bfd8","wires":[]},{"id":"f15b62ec.d4784","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2392.45955657959,"y":895.2223901748657,"z":"9d85256.794bfd8","wires":[["20466326.cc228c","e3af7381.016dd"]]},{"id":"ca02674e.84b438","type":"set","name":"set tenantid and cloud region id","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2980.1261596679688,"y":885.2223739624023,"z":"9d85256.794bfd8","wires":[]},{"id":"8017154b.206ea8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2742.1926708221436,"y":898.2223787307739,"z":"9d85256.794bfd8","wires":[["ca02674e.84b438","b9dd247f.268ab8"]]},{"id":"20466326.cc228c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2586.726047515869,"y":898.2222414016724,"z":"9d85256.794bfd8","wires":[["8017154b.206ea8"]]},{"id":"e3af7381.016dd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2587.5256576538086,"y":936.2222442626953,"z":"9d85256.794bfd8","wires":[["5a94e0ce.bbd29"]]},{"id":"5a94e0ce.bbd29","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":2765.5258140563965,"y":936.2223100662231,"z":"9d85256.794bfd8","wires":[]},{"id":"b9dd247f.268ab8","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2954.5927734375,"y":921.2220630645752,"z":"9d85256.794bfd8","wires":[["dd7ba10c.161b9","cbf42233.390d7","866c3c16.228b3"]]},{"id":"dd7ba10c.161b9","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3191.4541015625,"y":935.8331546783447,"z":"9d85256.794bfd8","wires":[["6068b4e5.0f7b2c"]]},{"id":"cbf42233.390d7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3186.7871284484863,"y":969.1664686203003,"z":"9d85256.794bfd8","wires":[["6068b4e5.0f7b2c"]]},{"id":"6068b4e5.0f7b2c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3360.963050842285,"y":957.2220277786255,"z":"9d85256.794bfd8","wires":[]},{"id":"866c3c16.228b3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3186.963134765625,"y":904.2591190338135,"z":"9d85256.794bfd8","wires":[["f29d601d.cb81d"]]},{"id":"f29d601d.cb81d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3366.963134765625,"y":902.2591190338135,"z":"9d85256.794bfd8","wires":[["2300be73.7c54a2"]]},{"id":"2300be73.7c54a2","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3553.926239013672,"y":899.8888607025146,"z":"9d85256.794bfd8","wires":[]},{"id":"4c6f65c8.0d26bc","type":"comment","name":"Apply the policy to source network","info":"","comments":"","x":621.9047012329102,"y":1058.3332691192627,"z":"9d85256.794bfd8","wires":[]},{"id":"8edbb4f5.1da278","type":"execute","name":"execute Contrail API apply network policy to destination network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":727.9047470092773,"y":1342.3332767486572,"z":"9d85256.794bfd8","wires":[["40503601.fe4738","90fb633f.f3b86"]]},{"id":"40503601.fe4738","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1063.5711822509766,"y":1342.7614674568176,"z":"9d85256.794bfd8","wires":[["a824091b.d45238"]]},{"id":"90fb633f.f3b86","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1061.66650390625,"y":1375.7614072225988,"z":"9d85256.794bfd8","wires":[["a6d7eb4e.7a67a8"]]},{"id":"a6d7eb4e.7a67a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to remove policy in Contrail from dest network\" />\n","comments":"","x":1221.571273803711,"y":1375.0947737693787,"z":"9d85256.794bfd8","wires":[]},{"id":"a824091b.d45238","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1215.7616653442383,"y":1343.4281924627721,"z":"9d85256.794bfd8","wires":[[]]},{"id":"53b61fa1.1416d","type":"comment","name":"Apply the policy to dest network","info":"","comments":"","x":626.2908706665039,"y":1310.3860726356506,"z":"9d85256.794bfd8","wires":[]},{"id":"f68288a2.a88758","type":"comment","name":"Update network policy in AAI - relationship to networks","info":"","comments":"","x":689.9047546386719,"y":1452.3332481384277,"z":"9d85256.794bfd8","wires":[]},{"id":"4619cd3d.096d04","type":"save","name":"delete AnAI - network-policy relationship to source/dest network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id and related-to = 'l3-network' \" >\n\n\n\n","comments":"","outputs":1,"x":727.2816619873047,"y":1485.4009227752686,"z":"9d85256.794bfd8","wires":[["c2ba7845.aba188","9531a4a4.802f48"]]},{"id":"d37f50f9.c5788","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1275.6271018981934,"y":1479.6824353933334,"z":"9d85256.794bfd8","wires":[]},{"id":"c2ba7845.aba188","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1047.0557098388672,"y":1482.6981729269028,"z":"9d85256.794bfd8","wires":[["d37f50f9.c5788"]]},{"id":"9531a4a4.802f48","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1050.8652076721191,"y":1512.1745895147324,"z":"9d85256.794bfd8","wires":[["d37f50f9.c5788"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json
new file mode 100755
index 00000000..c0860334
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json
@@ -0,0 +1 @@
+[{"id":"becd7f46.fe2bf","type":"dgstart","name":"DGSTART","outputs":1,"x":128.75,"y":27.5,"z":"e569e14b.d5e55","wires":[["adc37c50.19098"]]},{"id":"adc37c50.19098","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":274.9880828857422,"y":102.45239353179932,"z":"e569e14b.d5e55","wires":[["88d121bb.cdd29"]]},{"id":"88d121bb.cdd29","type":"method","name":"contrail-route-topology-operation-delete","xml":"<method rpc='contrail-route-topology-operation-delete' mode='sync'>\n","comments":"","outputs":1,"x":354.9048500061035,"y":171.6904420852661,"z":"e569e14b.d5e55","wires":[["60ab3b30.b86e34"]]},{"id":"60ab3b30.b86e34","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":263.2261848449707,"y":315.023784160614,"z":"e569e14b.d5e55","wires":[["22819c80.b5e484","445b52e8.7f835c","4ac8649d.ada16c","62ed76ff.3c67b8","354e0921.5c5ed6","e3e3d9e6.687068","f049140a.554d68","b627ce5a.c2954","d72864d2.c3f998","79f2ba4.25f5344","a4812fb4.cdeec","1bce9c6e.93a654","c7759fb6.6c31d","6689456.39a4cbc","d86a7f33.843fa","4706a986.175c68","9aa992b8.2845a"]]},{"id":"445b52e8.7f835c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":530.4644355773926,"y":1507.0481815338135,"z":"e569e14b.d5e55","wires":[]},{"id":"22819c80.b5e484","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":559.2183418273926,"y":1469.5039749145508,"z":"e569e14b.d5e55","wires":[]},{"id":"79f2ba4.25f5344","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<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`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":594.2184982299805,"y":1348.5514640808105,"z":"e569e14b.d5e55","wires":[]},{"id":"62ed76ff.3c67b8","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":525.4880561828613,"y":288.8333215713501,"z":"e569e14b.d5e55","wires":[]},{"id":"4ac8649d.ada16c","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":572.7473182678223,"y":255.0925874710083,"z":"e569e14b.d5e55","wires":[]},{"id":"354e0921.5c5ed6","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":595.7434158325195,"y":324.7315502166748,"z":"e569e14b.d5e55","wires":[[]]},{"id":"f049140a.554d68","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":602.2687454223633,"y":492.959508895874,"z":"e569e14b.d5e55","wires":[["69cfc505.7f3bfc","1595a59f.8ba24a"]]},{"id":"e3e3d9e6.687068","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":559.8148460388184,"y":384.51722526550293,"z":"e569e14b.d5e55","wires":[[]]},{"id":"69cfc505.7f3bfc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":847.5648498535156,"y":493.7673225402832,"z":"e569e14b.d5e55","wires":[["3d3e16bd.d3cd1a"]]},{"id":"b627ce5a.c2954","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":622.3269729614258,"y":1422.600956916809,"z":"e569e14b.d5e55","wires":[["bb0a2810.ed8a78","c90a1d4a.3f87a","fea853dd.97a09"]]},{"id":"bb0a2810.ed8a78","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":892.6349906921387,"y":1475.5991577133536,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"c90a1d4a.3f87a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":883.6350402832031,"y":1444.0991834625602,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"fea853dd.97a09","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":887.3850784301758,"y":1414.4562883377075,"z":"e569e14b.d5e55","wires":[["2d2d87e.03f6078"]]},{"id":"d905f0c9.5808e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1053.3850784301758,"y":1444.849207304418,"z":"e569e14b.d5e55","wires":[]},{"id":"3d3e16bd.d3cd1a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1016.5648536682129,"y":492.2672233581543,"z":"e569e14b.d5e55","wires":[["9e65c440.041d18"]]},{"id":"9e65c440.041d18","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1227.4220962524414,"y":491.8863525390625,"z":"e569e14b.d5e55","wires":[["4d39ed9a.01efb4","a3995ce4.1f05c"]]},{"id":"4d39ed9a.01efb4","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1416.7554016113281,"y":491.8863105773926,"z":"e569e14b.d5e55","wires":[["5e4bfa25.12c6e4"]]},{"id":"d59088ab.eae808","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1889.9462203979492,"y":455.12452602386475,"z":"e569e14b.d5e55","wires":[]},{"id":"5e4bfa25.12c6e4","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1601.279291152954,"y":488.7911443710327,"z":"e569e14b.d5e55","wires":[["d59088ab.eae808","43821273.52747c","4a61db6.87e5124","7d01f23a.bec1cc"]]},{"id":"43821273.52747c","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1897.9461479187012,"y":519.219669342041,"z":"e569e14b.d5e55","wires":[]},{"id":"9fb35462.f52a18","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":615.5647926330566,"y":460.2672119140625,"z":"e569e14b.d5e55","wires":[]},{"id":"7d01f23a.bec1cc","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1905.946002960205,"y":486.1244812011719,"z":"e569e14b.d5e55","wires":[["eac06920.e5b678","b310637f.02fbd"]]},{"id":"eac06920.e5b678","type":"outcome","name":"outcome PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":2119.2125549316406,"y":468.7911968231201,"z":"e569e14b.d5e55","wires":[["febe9e04.e9e54"]]},{"id":"b310637f.02fbd","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2141.5936737060547,"y":500.55319023132324,"z":"e569e14b.d5e55","wires":[["7ce0b7e4.ca1208"]]},{"id":"7ce0b7e4.ca1208","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2382.212423324585,"y":503.4577798843384,"z":"e569e14b.d5e55","wires":[]},{"id":"4a61db6.87e5124","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1977.8032722473145,"y":421.9340181350708,"z":"e569e14b.d5e55","wires":[]},{"id":"c977b987.7343b8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":530.7076530456543,"y":354.12435245513916,"z":"e569e14b.d5e55","wires":[]},{"id":"2d2d87e.03f6078","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1029.0410461425781,"y":1410.6484575271606,"z":"e569e14b.d5e55","wires":[[]]},{"id":"d72864d2.c3f998","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":545.0410919189453,"y":1314.981595993042,"z":"e569e14b.d5e55","wires":[[]]},{"id":"9bed6f70.40b63","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1600.416997909546,"y":604.8333854675293,"z":"e569e14b.d5e55","wires":[]},{"id":"1595a59f.8ba24a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":839.4166526794434,"y":528.8334074020386,"z":"e569e14b.d5e55","wires":[["d10e959d.f1af08"]]},{"id":"d10e959d.f1af08","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1019.4166030883789,"y":529.4999580383301,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"a4812fb4.cdeec","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":509.4165802001953,"y":522.8808951377869,"z":"e569e14b.d5e55","wires":[]},{"id":"a3995ce4.1f05c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1405.0833549499512,"y":529.1666707992554,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"febe9e04.e9e54","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2366.083469390869,"y":469.16669750213623,"z":"e569e14b.d5e55","wires":[[]]},{"id":"91ea6f99.223eb","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1279.464340209961,"y":1444.1668024063108,"z":"e569e14b.d5e55","wires":[]},{"id":"6ac1fe37.5f523","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":578.7976150512695,"y":1264.1666898727417,"z":"e569e14b.d5e55","wires":[]},{"id":"1bce9c6e.93a654","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"null\" />\n","comments":"","outputs":1,"x":572.4642715454102,"y":1202.1667737960815,"z":"e569e14b.d5e55","wires":[["67708d06.981c54","b5575696.f84148"]]},{"id":"67708d06.981c54","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":828.226203918457,"y":1179.404948234558,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"b5575696.f84148","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":833.5356330871582,"y":1214.9763660430908,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"d0e7d313.62e1c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1043.321418762207,"y":1181.0239925384521,"z":"e569e14b.d5e55","wires":[]},{"id":"a58ba31a.f94","type":"comment","name":"Update AAI AR","info":"","comments":"","x":535.80712890625,"y":1165.595217704773,"z":"e569e14b.d5e55","wires":[]},{"id":"c7759fb6.6c31d","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":538.2262420654297,"y":553.4048233032227,"z":"e569e14b.d5e55","wires":[]},{"id":"6689456.39a4cbc","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":591.7500228881836,"y":738.0000433921814,"z":"e569e14b.d5e55","wires":[["515c68f.6a6a098","894918d6.e832c8"]]},{"id":"515c68f.6a6a098","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":939.7502098083496,"y":734.666512966156,"z":"e569e14b.d5e55","wires":[["f2deddaa.598f2"]]},{"id":"894918d6.e832c8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":950.4170837402344,"y":682.6663026809692,"z":"e569e14b.d5e55","wires":[["93707edc.f30ee"]]},{"id":"f99240c7.f4772","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2075.194984436035,"y":774.4442907571793,"z":"e569e14b.d5e55","wires":[["da8b3e4d.18624"]]},{"id":"96d519a6.4763b8","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1331.5756454467773,"y":734.6823401451111,"z":"e569e14b.d5e55","wires":[["2e19de27.056642","bcf381b3.c76e"]]},{"id":"2e19de27.056642","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1620.5756454467773,"y":736.6824011802673,"z":"e569e14b.d5e55","wires":[["7c9aa9bb.103b58"]]},{"id":"bcf381b3.c76e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1600.5756454467773,"y":771.6824011802673,"z":"e569e14b.d5e55","wires":[["ed771c46.afda1"]]},{"id":"ed771c46.afda1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1805.1789474487305,"y":775.5702749490738,"z":"e569e14b.d5e55","wires":[["f99240c7.f4772"]]},{"id":"f2deddaa.598f2","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1073.8614654541016,"y":735.1109175682068,"z":"e569e14b.d5e55","wires":[["96d519a6.4763b8"]]},{"id":"93707edc.f30ee","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1104.5504913330078,"y":681.6664979457855,"z":"e569e14b.d5e55","wires":[]},{"id":"7c9aa9bb.103b58","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1813.683723449707,"y":736.9998613595963,"z":"e569e14b.d5e55","wires":[]},{"id":"744200d3.b7b6c","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":621.1503143310547,"y":702.666449546814,"z":"e569e14b.d5e55","wires":[]},{"id":"da8b3e4d.18624","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2367.7497940063477,"y":771.3334175348282,"z":"e569e14b.d5e55","wires":[["2c78c682.af625a","a918ee27.d0f7"]]},{"id":"8003625a.45bf9","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2922.416702270508,"y":758.8333740234375,"z":"e569e14b.d5e55","wires":[]},{"id":"ef7f7f6c.34425","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2732.483144760132,"y":771.8333854675293,"z":"e569e14b.d5e55","wires":[["8003625a.45bf9","5c078955.678798"]]},{"id":"2c78c682.af625a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2577.0165214538574,"y":771.8332481384277,"z":"e569e14b.d5e55","wires":[["ef7f7f6c.34425"]]},{"id":"a918ee27.d0f7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2577.816131591797,"y":809.8332509994507,"z":"e569e14b.d5e55","wires":[["510901ad.81fce"]]},{"id":"510901ad.81fce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2755.8162879943848,"y":809.8333168029785,"z":"e569e14b.d5e55","wires":[]},{"id":"5c078955.678798","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2944.8832473754883,"y":794.8330698013306,"z":"e569e14b.d5e55","wires":[["a025d6e3.0cf328","2b3e07b3.856838","80bbe92b.0ca8c8"]]},{"id":"a025d6e3.0cf328","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3165.7446365356445,"y":787.4441843032837,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"2b3e07b3.856838","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3161.077663421631,"y":820.7774982452393,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"366a9169.e07f0e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3335.2535858154297,"y":808.8330574035645,"z":"e569e14b.d5e55","wires":[]},{"id":"80bbe92b.0ca8c8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3161.2536697387695,"y":755.8701486587524,"z":"e569e14b.d5e55","wires":[["fdc8673.8e4fe98"]]},{"id":"fdc8673.8e4fe98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3341.2536697387695,"y":753.8701486587524,"z":"e569e14b.d5e55","wires":[["dcb00324.4f521"]]},{"id":"dcb00324.4f521","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3528.2167739868164,"y":751.4998903274536,"z":"e569e14b.d5e55","wires":[]},{"id":"17163470.0781cc","type":"comment","name":"Call contrail api here","info":"","comments":"","x":548.0356826782227,"y":794.1667237281799,"z":"e569e14b.d5e55","wires":[]},{"id":"d86a7f33.843fa","type":"execute","name":"execute Contrail API delete network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n\n","comments":"","outputs":1,"x":631.1547546386719,"y":831.8097562789917,"z":"e569e14b.d5e55","wires":[["dbc93224.c778b","d259410.5f4e0c"]]},{"id":"dbc93224.c778b","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":912.5356903076172,"y":799.952121887356,"z":"e569e14b.d5e55","wires":[["30e0725f.31f38e"]]},{"id":"d259410.5f4e0c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":910.6310119628906,"y":832.9520616531372,"z":"e569e14b.d5e55","wires":[["8d871542.3bdde8"]]},{"id":"8d871542.3bdde8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to create policy in Contrail\" />\n","comments":"","x":1070.5357818603516,"y":832.2854281999171,"z":"e569e14b.d5e55","wires":[]},{"id":"30e0725f.31f38e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1064.726173400879,"y":800.6188468933105,"z":"e569e14b.d5e55","wires":[[]]},{"id":"bc9dc5ef.cc95b8","type":"comment","name":"Delete network policy in AAI","info":"","comments":"","x":549.25,"y":1020.5,"z":"e569e14b.d5e55","wires":[]},{"id":"4706a986.175c68","type":"save","name":"delete AnAI - network-policy","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n\n\n\n","comments":"","outputs":1,"x":564.6268844604492,"y":1057.5675649642944,"z":"e569e14b.d5e55","wires":[["40afbc3e.f273b4","b25dd908.c3dfd8"]]},{"id":"89d7c3b.8b4d84","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1036.9723930358887,"y":1047.849178314209,"z":"e569e14b.d5e55","wires":[]},{"id":"40afbc3e.f273b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":808.4010009765625,"y":1046.8649158477783,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"b25dd908.c3dfd8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":812.2104988098145,"y":1076.341332435608,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"9aa992b8.2845a","type":"call","name":"call policy-manager-delete-policy","xml":"<call module='GENERIC-RESOURCE-API' rpc='policy-manager-delete-policy' mode='sync' >\n","comments":"","outputs":1,"x":611.6666259765625,"y":918.3333129882812,"z":"e569e14b.d5e55","wires":[["e6c7cfc1.e9849","9ded72db.4afdc"]]},{"id":"e6c7cfc1.e9849","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":847.2459869384766,"y":915.6752805709839,"z":"e569e14b.d5e55","wires":[["ef5c2a2c.1e98b8"]]},{"id":"9ded72db.4afdc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2382545471191,"y":956.4763560295105,"z":"e569e14b.d5e55","wires":[["f106eb88.3f01a8"]]},{"id":"f106eb88.3f01a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1005.9048194885254,"y":954.8096842765808,"z":"e569e14b.d5e55","wires":[[]]},{"id":"ef5c2a2c.1e98b8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1005.9524307250977,"y":909.7620401382446,"z":"e569e14b.d5e55","wires":[[]]},{"id":"6ced15d1.6e2fdc","type":"comment","name":"Call policy mgr. continue on failure","info":"","comments":"","x":602.3332977294922,"y":886.6666030883789,"z":"e569e14b.d5e55","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.json
new file mode 100755
index 00000000..f1821414
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-unassign.json
@@ -0,0 +1 @@
+[{"id":"6078f16e.94239","type":"dgstart","name":"DGSTART","outputs":1,"x":144,"y":80,"z":"8671a4bd.e74828","wires":[["fdea0245.f423d"]]},{"id":"fdea0245.f423d","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":290.2380828857422,"y":154.95239353179932,"z":"8671a4bd.e74828","wires":[["d039b1a6.c7dd"]]},{"id":"d039b1a6.c7dd","type":"method","name":"contrail-route-topology-operation-unassign","xml":"<method rpc='contrail-route-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":370.1548500061035,"y":224.1904420852661,"z":"8671a4bd.e74828","wires":[["278298dd.a26aa8"]]},{"id":"278298dd.a26aa8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":278.4761848449707,"y":367.523784160614,"z":"8671a4bd.e74828","wires":[["1b5604e4.1c439b","c80598df.46ba08","90c6b844.d26288","1af3eb88.118b54","926dc61b.e662e8","5533a49a.eb94bc","b29dd56e.42e818","36106131.09979e","974a60a8.16f7e","a81908e8.66b878","94075fb2.8885b","50486a0e.128a74","cdd2e6e3.1748e8"]]},{"id":"c80598df.46ba08","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":545.0001029968262,"y":1169.5480337142944,"z":"8671a4bd.e74828","wires":[]},{"id":"1b5604e4.1c439b","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":573.7540092468262,"y":1132.0038270950317,"z":"8671a4bd.e74828","wires":[]},{"id":"a81908e8.66b878","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<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`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":602.0875015258789,"y":899.3847255706787,"z":"8671a4bd.e74828","wires":[]},{"id":"1af3eb88.118b54","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":540.7380561828613,"y":341.3333215713501,"z":"8671a4bd.e74828","wires":[]},{"id":"90c6b844.d26288","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":587.9973182678223,"y":307.5925874710083,"z":"8671a4bd.e74828","wires":[]},{"id":"926dc61b.e662e8","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":610.9934158325195,"y":377.2315502166748,"z":"8671a4bd.e74828","wires":[[]]},{"id":"b29dd56e.42e818","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":617.5187454223633,"y":545.459508895874,"z":"8671a4bd.e74828","wires":[["b380ca61.347388","2ba1e073.32012"]]},{"id":"5533a49a.eb94bc","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":575.0648460388184,"y":437.01722526550293,"z":"8671a4bd.e74828","wires":[[]]},{"id":"b380ca61.347388","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":862.8148498535156,"y":546.2673225402832,"z":"8671a4bd.e74828","wires":[["ec13614c.a7a1d"]]},{"id":"36106131.09979e","type":"execute","name":"execute RestApiCallNode - DELETE AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":630.1959762573242,"y":973.4342184066772,"z":"8671a4bd.e74828","wires":[["3852bf78.0486c","62c7bf4b.768c7","1e995a14.504956"]]},{"id":"3852bf78.0486c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":900.5039939880371,"y":1026.4324192032218,"z":"8671a4bd.e74828","wires":[["acbe5422.ea59e8"]]},{"id":"62c7bf4b.768c7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":891.5040435791016,"y":994.9324449524283,"z":"8671a4bd.e74828","wires":[["acbe5422.ea59e8"]]},{"id":"1e995a14.504956","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":895.2540817260742,"y":965.2895498275757,"z":"8671a4bd.e74828","wires":[["e934c1a7.96fdf"]]},{"id":"acbe5422.ea59e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1061.2540817260742,"y":995.6824687942863,"z":"8671a4bd.e74828","wires":[]},{"id":"ec13614c.a7a1d","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1031.814853668213,"y":544.7672233581543,"z":"8671a4bd.e74828","wires":[["c7645ab6.9eb898"]]},{"id":"c7645ab6.9eb898","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1242.6720962524414,"y":544.3863525390625,"z":"8671a4bd.e74828","wires":[["61c49916.42b6a8","8d424701.1f4b68"]]},{"id":"61c49916.42b6a8","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1432.0054016113281,"y":544.3863105773926,"z":"8671a4bd.e74828","wires":[["36bb8ffe.6efc7"]]},{"id":"98542804.66f4c8","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1905.1962203979492,"y":507.62452602386475,"z":"8671a4bd.e74828","wires":[]},{"id":"36bb8ffe.6efc7","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1616.529291152954,"y":541.2911443710327,"z":"8671a4bd.e74828","wires":[["98542804.66f4c8","ec6a6da.ebd6e9","4947b25a.1aec9c","e970570e.cc3e28"]]},{"id":"ec6a6da.ebd6e9","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1913.1961479187012,"y":571.719669342041,"z":"8671a4bd.e74828","wires":[]},{"id":"76e27cbc.f1e1e4","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":630.8147926330566,"y":512.7672119140625,"z":"8671a4bd.e74828","wires":[]},{"id":"e970570e.cc3e28","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1926.9102401733398,"y":538.6245155334473,"z":"8671a4bd.e74828","wires":[["6c1bbe13.30319","304eb865.e2d648"]]},{"id":"6c1bbe13.30319","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2160.1771850585938,"y":527.0054798126221,"z":"8671a4bd.e74828","wires":[["3b1d14d0.0288dc"]]},{"id":"304eb865.e2d648","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2156.844108581543,"y":565.9103012084961,"z":"8671a4bd.e74828","wires":[["f0543e57.ab39a"]]},{"id":"3b1d14d0.0288dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2383.176887512207,"y":526.243501663208,"z":"8671a4bd.e74828","wires":[]},{"id":"50486a0e.128a74","type":"set","name":"set ar-assignments.contrail-id","xml":"<set>\n<parameter name='ar-assignments.contrail-id' value=\"`$contrail-api-output.contrail-id`\" />\n\n\n\n","comments":"","x":596.8623962402344,"y":738.0530757904053,"z":"8671a4bd.e74828","wires":[]},{"id":"4947b25a.1aec9c","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1993.0532722473145,"y":474.4340181350708,"z":"8671a4bd.e74828","wires":[]},{"id":"4648c12.da07b4","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":545.9576530456543,"y":406.62435245513916,"z":"8671a4bd.e74828","wires":[]},{"id":"e934c1a7.96fdf","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1036.9100494384766,"y":961.4817190170288,"z":"8671a4bd.e74828","wires":[[]]},{"id":"974a60a8.16f7e","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":552.9100952148438,"y":865.8148574829102,"z":"8671a4bd.e74828","wires":[[]]},{"id":"a70e9ffa.b6b9e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1615.666997909546,"y":657.3333854675293,"z":"8671a4bd.e74828","wires":[]},{"id":"2ba1e073.32012","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":854.6666526794434,"y":581.3334074020386,"z":"8671a4bd.e74828","wires":[["8b180a16.53ad58"]]},{"id":"8b180a16.53ad58","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1034.666603088379,"y":581.9999580383301,"z":"8671a4bd.e74828","wires":[["a70e9ffa.b6b9e"]]},{"id":"94075fb2.8885b","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":524.6666412353516,"y":609.6666030883789,"z":"8671a4bd.e74828","wires":[]},{"id":"8d424701.1f4b68","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1420.3333549499512,"y":581.6666707992554,"z":"8671a4bd.e74828","wires":[["a70e9ffa.b6b9e"]]},{"id":"f0543e57.ab39a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2361.3336181640625,"y":566.0953178405762,"z":"8671a4bd.e74828","wires":[[]]},{"id":"cdd2e6e3.1748e8","type":"set","name":"set dummy cid","xml":"<set>\n<parameter name='contrail-api-output.contrail-id' value=\"dummycid\" />\n","comments":"","x":547.3333206176758,"y":709.9999656677246,"z":"8671a4bd.e74828","wires":[]},{"id":"dad675fb.beed78","type":"comment","name":"Call contrail api here","info":"","comments":"","x":523.9999504089355,"y":669.9999895095825,"z":"8671a4bd.e74828","wires":[]},{"id":"40b7c210.a67bcc","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1287.3333435058591,"y":995.000063896179,"z":"8671a4bd.e74828","wires":[]},{"id":"8e046298.84999","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":586.666618347168,"y":814.9999513626099,"z":"8671a4bd.e74828","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation.json
new file mode 100755
index 00000000..482478e2
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation.json
@@ -0,0 +1 @@
+[{"id":"c442b16f.7f882","type":"dgstart","name":"DGSTART","outputs":1,"x":170.2777862548828,"y":139.91365242004395,"z":"e038a3cf.6f74e","wires":[["98f0a1a6.9a93a"]]},{"id":"98f0a1a6.9a93a","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":252.2301483154297,"y":180.15176486968994,"z":"e038a3cf.6f74e","wires":[["c35c8be4.73c8d8"]]},{"id":"c35c8be4.73c8d8","type":"method","name":"contrail-route-topology-operation","xml":"<method rpc='contrail-route-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":248.70641326904297,"y":219.91364669799805,"z":"e038a3cf.6f74e","wires":[["3b0a9ea3.867772"]]},{"id":"ae59e2f7.cffad","type":"comment","name":"CONTRAIL-ROUTE-TOPOLOGY-OPERATION ","info":"","comments":"","x":564.6226425170898,"y":87.49999618530273,"z":"e038a3cf.6f74e","wires":[]},{"id":"3b0a9ea3.867772","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":284.27781677246094,"y":303.3571357727051,"z":"e038a3cf.6f74e","wires":[["b58546a9.769258","e3c64d20.0167","859df5b4.c0b828","596d4aa.d9123b4"]]},{"id":"b58546a9.769258","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":514.3611755371094,"y":927.1997718811035,"z":"e038a3cf.6f74e","wires":[]},{"id":"e3c64d20.0167","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":510.99205017089844,"y":533.770830154419,"z":"e038a3cf.6f74e","wires":[["e264c87c.e335d8","f727c392.45b37","e0f08eed.85bd2","dc2a2461.e96738","8ce006b.19b83f8","4cbcfe02.8cfb9","b62bec75.47383"]]},{"id":"e264c87c.e335d8","type":"other","name":"assign","xml":"<outcome value='assign'>\n","comments":"","outputs":1,"x":731.4682464599609,"y":396.05648040771484,"z":"e038a3cf.6f74e","wires":[["c21b848b.2208b8"]]},{"id":"c21b848b.2208b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912.7064056396484,"y":397.05660247802734,"z":"e038a3cf.6f74e","wires":[["bedb7604.0d31b8"]]},{"id":"859df5b4.c0b828","type":"call","name":"call GENERIC-RESOURCE-API:validate-contrail-route-input","xml":"<call module='GENERIC-RESOURCE-API' rpc='validate-contrail-route-input' mode='sync' >\n","comments":"","outputs":1,"x":642.2777862548828,"y":303.91365242004395,"z":"e038a3cf.6f74e","wires":[[]]},{"id":"bedb7604.0d31b8","type":"call","name":"call GENERIC-RESOURCE-API:contrail-route-topology-operation-assign","xml":"<call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-assign' mode='sync' >\n","comments":"","outputs":1,"x":1284.2777557373047,"y":393.91365814208984,"z":"e038a3cf.6f74e","wires":[[]]},{"id":"f727c392.45b37","type":"other","name":"activate","xml":"<outcome value='activate'>\n","comments":"","outputs":1,"x":733.2777862548828,"y":483.91365242004395,"z":"e038a3cf.6f74e","wires":[["f70dfe77.b10a4"]]},{"id":"f70dfe77.b10a4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":917.5159454345703,"y":484.91377449035645,"z":"e038a3cf.6f74e","wires":[["c4f30d6a.e056c"]]},{"id":"e0f08eed.85bd2","type":"other","name":"deactivate","xml":"<outcome value='deactivate'>\n","comments":"","outputs":1,"x":740.2778091430664,"y":531.913685798645,"z":"e038a3cf.6f74e","wires":[["5e86b7e5.8ae6b8"]]},{"id":"5e86b7e5.8ae6b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":921.5159683227539,"y":532.9138078689575,"z":"e038a3cf.6f74e","wires":[["88cbb733.292b18"]]},{"id":"dc2a2461.e96738","type":"other","name":"unassign","xml":"<outcome value='unassign'>\n","comments":"","outputs":1,"x":738.27783203125,"y":650.2470254898071,"z":"e038a3cf.6f74e","wires":[["8ecf697b.d4a738"]]},{"id":"8ecf697b.d4a738","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":919.5159912109375,"y":651.2471475601196,"z":"e038a3cf.6f74e","wires":[["23da5620.c6cb8a"]]},{"id":"8ce006b.19b83f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":737.611162185669,"y":710.2470083236694,"z":"e038a3cf.6f74e","wires":[["5eae4ec8.4f8b6"]]},{"id":"5eae4ec8.4f8b6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n","comments":"","x":919.6111583709717,"y":709.2470178604126,"z":"e038a3cf.6f74e","wires":[]},{"id":"596d4aa.d9123b4","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":533.3888702392578,"y":886.3581104278564,"z":"e038a3cf.6f74e","wires":[]},{"id":"4cbcfe02.8cfb9","type":"other","name":"create","xml":"<outcome value='create'>\n","comments":"","outputs":1,"x":738.5184936523438,"y":443.51849365234375,"z":"e038a3cf.6f74e","wires":[["3d58b4c3.43262c"]]},{"id":"3d58b4c3.43262c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":919.7566528320312,"y":444.51861572265625,"z":"e038a3cf.6f74e","wires":[["b37f997b.66e918"]]},{"id":"b37f997b.66e918","type":"call","name":"call GENERIC-RESOURCE-API:contrail-route-topology-operation-create","xml":"<call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-create' mode='sync' >\n","comments":"","outputs":1,"x":1267.3279724121094,"y":447.3756694793701,"z":"e038a3cf.6f74e","wires":[[]]},{"id":"b62bec75.47383","type":"other","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":734.8518295288086,"y":593.1851282119751,"z":"e038a3cf.6f74e","wires":[["b9a086c9.ed23a8"]]},{"id":"b9a086c9.ed23a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":916.0899887084961,"y":594.1852502822876,"z":"e038a3cf.6f74e","wires":[["99d04266.2927b"]]},{"id":"c4f30d6a.e056c","type":"call","name":"call GENERIC-RESOURCE-API:contrail-route-topology-operation-activate","xml":"<call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-activate' mode='sync' >\n","comments":"","outputs":1,"x":1262,"y":492,"z":"e038a3cf.6f74e","wires":[[]]},{"id":"88cbb733.292b18","type":"call","name":"call GENERIC-RESOURCE-API:contrail-route-topology-operation-deactivate","xml":"<call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-deactivate' mode='sync' >\n","comments":"","outputs":1,"x":1264,"y":532,"z":"e038a3cf.6f74e","wires":[[]]},{"id":"99d04266.2927b","type":"call","name":"call GENERIC-RESOURCE-API:contrail-route-topology-operation-delete","xml":"<call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-delete' mode='sync' >\n","comments":"","outputs":1,"x":1262,"y":596,"z":"e038a3cf.6f74e","wires":[[]]},{"id":"23da5620.c6cb8a","type":"call","name":"call GENERIC-RESOURCE-API:contrail-route-topology-operation-unassign","xml":"<call module='GENERIC-RESOURCE-API' rpc='contrail-route-topology-operation-unassign' mode='sync' >\n","comments":"","outputs":1,"x":1270,"y":648,"z":"e038a3cf.6f74e","wires":[[]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_create-l3-subnet.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_create-l3-subnet.json
new file mode 100644
index 00000000..36a7b4d9
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_create-l3-subnet.json
@@ -0,0 +1 @@
+[{"id":"f2284f71.6463","type":"dgstart","name":"DGSTART","outputs":1,"x":124.28571319580078,"y":60,"z":"5c1ee14f.35ba3","wires":[["a8ce8342.4bd06"]]},{"id":"a8ce8342.4bd06","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":225.57141876220703,"y":114.23811340332031,"z":"5c1ee14f.35ba3","wires":[["9b3e05cb.d2a0f8"]]},{"id":"9b3e05cb.d2a0f8","type":"method","name":"create-l3-subnet","xml":"<method rpc='create-l3-subnet' mode='sync'>\n","comments":"","outputs":1,"x":240.96434783935547,"y":163.75,"z":"5c1ee14f.35ba3","wires":[["ec2fd40b.a7d928"]]},{"id":"ec2fd40b.a7d928","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":220.7857437133789,"y":296.94350266456604,"z":"5c1ee14f.35ba3","wires":[["1a5998af.a60847","48fddaf1.ceadc4","6e8e044e.88061c","dcfd029c.c25a5"]]},{"id":"1a5998af.a60847","type":"set","name":"set subnet-idx","xml":"<set>\n<parameter name='subnet-idx' value='0' />\n","comments":"","x":415.71427154541016,"y":242.2857151031494,"z":"5c1ee14f.35ba3","wires":[]},{"id":"ee39e288.5fc9c","type":"comment","name":"These should be set from previous eipam call","info":"<parameter name='tmp.l3-network.level2.v4.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='' />\n<parameter name='tmp.l3-network.level2.v4.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='' />\n<parameter name='tmp.l3-network.level2.v6.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='false' />","comments":"","x":508.2857131958008,"y":186,"z":"5c1ee14f.35ba3","wires":[]},{"id":"48fddaf1.ceadc4","type":"switchNode","name":"switch entity-id for ipv4","xml":"<switch test='`$tmp.l3-network.level2.v4.entity-id`'>\n","comments":"","outputs":1,"x":434.2857131958008,"y":284.0000305175781,"z":"5c1ee14f.35ba3","wires":[["5d27d606.b49aa8","b7f40f4e.2f916"]]},{"id":"5d27d606.b49aa8","type":"other","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":654.2857131958008,"y":282.0000305175781,"z":"5c1ee14f.35ba3","wires":[["4c85d764.9d1558"]]},{"id":"b7f40f4e.2f916","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":642.2857131958008,"y":322.0000305175781,"z":"5c1ee14f.35ba3","wires":[["94cc3a80.3cfaa8"]]},{"id":"94cc3a80.3cfaa8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":827.6190719604492,"y":324.00003004074097,"z":"5c1ee14f.35ba3","wires":[["957c4a16.6eaa08","f3ad7d1a.f2d3b","e7109a07.926cf8","30da1918.ab7066","c2c83fd0.8f411"]]},{"id":"24324f8a.bb557","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='true' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />\n\n\n","comments":"","x":1761.142765045166,"y":394.5714521408081,"z":"5c1ee14f.35ba3","wires":[]},{"id":"957c4a16.6eaa08","type":"execute","name":"execute getSubnetAddresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getSubnetAddresses\">\n\t<parameter name=\"ipAddress\" value=\"`$tmp.l3-network.level2.v4.ip-prefix`\" />\n\t<parameter name=\"ipVersion\" value=\"4\" />\n\t<parameter name=\"subnet\" value=\"`$tmp.l3-network.level2.v4.mask`\" />\n\t<parameter name=\"ctxGateway\" value=\"tmp.return.generate.gateway-address\" />\n\t<parameter name=\"ctxDhcpStart\" value=\"tmp.return.generate.dhcp-start-address\" />\n\t<parameter name=\"ctxDhcpEnd\" value=\"tmp.return.generate.dhcp-end-address\" />\n\n","comments":"","outputs":1,"x":1113.9999465942383,"y":322.8571548461914,"z":"5c1ee14f.35ba3","wires":[["8e880aaf.ae6268"]]},{"id":"f3ad7d1a.f2d3b","type":"switchNode","name":"switch network-model.ipv4-dhcp-enabled","xml":"<switch test='`$network-model.ipv4-dhcp-enabled`'>\n","comments":"","outputs":1,"x":1145.6509704589844,"y":385.9365463256836,"z":"5c1ee14f.35ba3","wires":[["736b7433.77e98c","20e8766.5fab28a"]]},{"id":"736b7433.77e98c","type":"other","name":"Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1401.3649997711182,"y":395.93652153015137,"z":"5c1ee14f.35ba3","wires":[["60241dc3.678824"]]},{"id":"60241dc3.678824","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1561.841236114502,"y":395.93650817871094,"z":"5c1ee14f.35ba3","wires":[["24324f8a.bb557"]]},{"id":"e7109a07.926cf8","type":"set","name":"set subnet-idx","xml":"<set>\n<parameter name='subnet-idx' value='`$subnet-idx+1`' />\n\n","comments":"","x":1064.2223052978516,"y":420.22220611572266,"z":"5c1ee14f.35ba3","wires":[]},{"id":"6e8e044e.88061c","type":"switchNode","name":"switch entity-id for ipv6","xml":"<switch test='`$tmp.l3-network.level2.v6.entity-id`'>\n","comments":"","outputs":1,"x":444.4867630004883,"y":491.0105953216553,"z":"5c1ee14f.35ba3","wires":[["533c8c33.2653e4","738eb522.e6358c"]]},{"id":"533c8c33.2653e4","type":"other","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":664.4867630004883,"y":489.0105953216553,"z":"5c1ee14f.35ba3","wires":[["4ba3ce4b.c74c5"]]},{"id":"738eb522.e6358c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":651.0581817626953,"y":543.7248754501343,"z":"5c1ee14f.35ba3","wires":[["f63b20.13edc4e"]]},{"id":"49d9043.c579afc","type":"set","name":"set l3network.subnet","xml":"<set>\n<parameter name='tmp.l3-network.subnet[$subnet-idx].orchestration-status' value='PendingCreate' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-id' value='`$tmp.l3-network.level2.v6.entity-id`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-name' value=\"`$tmp.l3-network.network-name + '_S' + $subnet-idx`\" />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].gateway-address' value='`$tmp.return.generate.gateway-address`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].network-start-address' value='`$tmp.l3-network.level2.v6.ip-prefix`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$tmp.l3-network.level2.v6.mask`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].ip-version' value='`$network-model.ipv6-ip-version`' />\n\n\n","comments":"","x":1096.724983215332,"y":613.2963228225708,"z":"5c1ee14f.35ba3","wires":[]},{"id":"f63b20.13edc4e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":845.9153594970703,"y":543.296329498291,"z":"5c1ee14f.35ba3","wires":[["47206233.63117c","49d9043.c579afc","e1ea2c66.1252d","43c4c344.b2878c","58924f71.5ba41","5dbaa100.b1ff3"]]},{"id":"9cbc98c0.17c928","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='true' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />\n\n\n","comments":"","x":1771.3438987731934,"y":648.7248783111572,"z":"5c1ee14f.35ba3","wires":[]},{"id":"47206233.63117c","type":"execute","name":"execute getSubnetAddresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getSubnetAddresses\">\n\t<parameter name=\"ipAddress\" value=\"`$tmp.l3-network.level2.v6.ip-prefix`\" />\n\t<parameter name=\"ipVersion\" value=\"6\" />\n\t<parameter name=\"subnet\" value=\"`$tmp.l3-network.level2.v6.mask`\" />\n\t<parameter name=\"ctxGateway\" value=\"tmp.return.generate.gateway-address\" />\n\t<parameter name=\"ctxDhcpStart\" value=\"tmp.return.generate.dhcp-start-address\" />\n\t<parameter name=\"ctxDhcpEnd\" value=\"tmp.return.generate.dhcp-end-address\" />\n\n","comments":"","outputs":1,"x":1124.2010803222656,"y":577.0105810165405,"z":"5c1ee14f.35ba3","wires":[["f3773581.8d2148"]]},{"id":"e1ea2c66.1252d","type":"switchNode","name":"switch network-model.ipv6-dhcp-enabled","xml":"<switch test='`$network-model.ipv6-dhcp-enabled`'>\n","comments":"","outputs":1,"x":1150.137710571289,"y":651.5185317993164,"z":"5c1ee14f.35ba3","wires":[["bdf59629.1a7018","a8abca55.2792c8"]]},{"id":"bdf59629.1a7018","type":"other","name":"Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1411.5661334991455,"y":650.0899477005005,"z":"5c1ee14f.35ba3","wires":[["93c67590.4d9238"]]},{"id":"93c67590.4d9238","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1572.0423698425293,"y":650.0899343490601,"z":"5c1ee14f.35ba3","wires":[["9cbc98c0.17c928"]]},{"id":"8e880aaf.ae6268","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1345.9153366088867,"y":322.629638671875,"z":"5c1ee14f.35ba3","wires":[["c309b0ac.778ac"]]},{"id":"c309b0ac.778ac","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to generate ipv4 addresses using IpAddressTools\" />","comments":"","x":1517.581886291504,"y":322.629638671875,"z":"5c1ee14f.35ba3","wires":[]},{"id":"f3773581.8d2148","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1375.9153747558594,"y":578.1058282852173,"z":"5c1ee14f.35ba3","wires":[["fc59de73.53136"]]},{"id":"fc59de73.53136","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to generate ipv6 addresses using IpAddressTools\" />","comments":"","x":1547.5819244384766,"y":578.1058282852173,"z":"5c1ee14f.35ba3","wires":[]},{"id":"dcfd029c.c25a5","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name='' value='' />\n","comments":"","x":392.95237731933594,"y":607.166669845581,"z":"5c1ee14f.35ba3","wires":[]},{"id":"43c4c344.b2878c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.create-l3-subnet:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"tmp.l3-network.level2.v6.entity-id\"/>\n<parameter name=\"field5\" value=\"`$tmp.l3-network.level2.v6.entity-id`\"/>\n\n\n\n","comments":"","outputs":1,"x":1049.9366149902344,"y":543.0793695449829,"z":"5c1ee14f.35ba3","wires":[[]]},{"id":"4ba3ce4b.c74c5","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":842.7936553955078,"y":488.79364109039307,"z":"5c1ee14f.35ba3","wires":[["8ff0f4.8cbfef1"]]},{"id":"8ff0f4.8cbfef1","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.create-l3-subnet:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"tmp.l3-network.level2.v6.entity-id\"/>\n<parameter name=\"field5\" value=\"null\"/>\n\n\n\n","comments":"","outputs":1,"x":1048.243558883667,"y":488.1481246948242,"z":"5c1ee14f.35ba3","wires":[[]]},{"id":"30da1918.ab7066","type":"set","name":"set l3network.subnet","xml":"<set>\n<parameter name='tmp.l3-network.subnet[$subnet-idx].orchestration-status' value='PendingCreate' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-id' value='`$tmp.l3-network.level2.v4.entity-id`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-name' value=\"`$tmp.l3-network.network-name + '_S' + $subnet-idx`\" />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].gateway-address' value='`$tmp.return.generate.gateway-address`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].network-start-address' value='`$tmp.l3-network.level2.v4.ip-prefix`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$tmp.l3-network.level2.v4.mask`' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].ip-version' value='`$network-model.ipv4-ip-version`' />\n","comments":"","x":1082.7937698364258,"y":355.9365348815918,"z":"5c1ee14f.35ba3","wires":[]},{"id":"58924f71.5ba41","type":"set","name":"set subnet-idx","xml":"<set>\n<parameter name='subnet-idx' value='`$subnet-idx+1`' />\n","comments":"","x":1068.507942199707,"y":684.5079498291016,"z":"5c1ee14f.35ba3","wires":[]},{"id":"20e8766.5fab28a","type":"other","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1403.9047927856445,"y":431.6508026123047,"z":"5c1ee14f.35ba3","wires":[["3f11ef0a.6e4de"]]},{"id":"be7775e3.ccf258","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='false' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='' />\n\n\n","comments":"","x":1763.9047927856445,"y":430.2222442626953,"z":"5c1ee14f.35ba3","wires":[]},{"id":"3f11ef0a.6e4de","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1564.6032638549805,"y":431.58730030059814,"z":"5c1ee14f.35ba3","wires":[["be7775e3.ccf258"]]},{"id":"a8abca55.2792c8","type":"other","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1409.619026184082,"y":683.0793609619141,"z":"5c1ee14f.35ba3","wires":[["c57667ca.b81d28"]]},{"id":"c3350a6a.80eef8","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='false' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='' />\n<parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='' />\n\n\n","comments":"","x":1769.619026184082,"y":681.6508026123047,"z":"5c1ee14f.35ba3","wires":[]},{"id":"c57667ca.b81d28","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1570.317497253418,"y":683.0158586502075,"z":"5c1ee14f.35ba3","wires":[["c3350a6a.80eef8"]]},{"id":"4c85d764.9d1558","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":827.1428833007812,"y":277.1428527832031,"z":"5c1ee14f.35ba3","wires":[["e636a1c6.25345"]]},{"id":"e636a1c6.25345","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.create-l3-subnet:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"tmp.l3-network.level2.v4.entity-id\"/>\n<parameter name=\"field5\" value=\"null\"/>\n\n\n\n","comments":"","outputs":1,"x":998.5713863372803,"y":277.142840385437,"z":"5c1ee14f.35ba3","wires":[[]]},{"id":"c2c83fd0.8f411","type":"set","name":"set subnet_length","xml":"<set>\n<parameter name='tmp.l3-network.subnet_length' value='`$subnet-idx`' />\n","comments":"","x":1067.4286041259766,"y":451.42859268188477,"z":"5c1ee14f.35ba3","wires":[]},{"id":"5dbaa100.b1ff3","type":"set","name":"set subnet-len","xml":"<set>\n<parameter name='tmp.l3-network.subnet_length' value='`$subnet-idx`' />\n","comments":"","x":1068.857177734375,"y":717.1428833007812,"z":"5c1ee14f.35ba3","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.json
new file mode 100644
index 00000000..ee1fe13b
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-allocate-network-role-subnet.json
@@ -0,0 +1 @@
+[{"id":"9d78fb25.8da918","type":"dgstart","name":"DGSTART","outputs":1,"x":128,"y":76.81381225585938,"z":"af884d85.e79ff","wires":[["900b6f3d.c1c1"]]},{"id":"d35e37bc.ff7dc8","type":"method","name":"eipam-allocate-network-role-subnet","xml":"<method rpc='eipam-allocate-network-role-subnet' mode='sync'>\n","comments":"","outputs":1,"x":681.8667907714844,"y":79.68048095703125,"z":"af884d85.e79ff","wires":[["ba9acfa1.1a81c"]]},{"id":"900b6f3d.c1c1","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":356.95001220703125,"y":80.13049697875977,"z":"af884d85.e79ff","wires":[["d35e37bc.ff7dc8"]]},{"id":"f80c53d6.792a7","type":"comment","name":"ChangeLog","info":"1.0.0: Release 1702 - EIPAM only allows allocating one address plan request at a time\n1.0.1: Release 1702 - introduced new input, eipam-ip-block.allocate-version to call EIPAM allocateSubnet individually\n - change toplevel block to Atomic, so if subet already exists, then it returns as failure\n - Update error msg\n1.0.2: Release 1702 - Remove check for existing subnet so can be called to create multiple subnet with same CLII_ZONE & NETWORK_ROLE, as \n\t\t\t\t\t\tin the autogrowth scenario\n1.0.3: Release 1702 - Req update to change level 1 & 2 key-name & key-values\n\t\t\t\t\t- update status to ACTIVE for level subnet\n\t\t\t\t\t- update service-type from $network-topology-operation-input.service-information.subscription-service-type to $tmp.service-type\n\t\t\t\t\t(cannot use the input field as not always populated in NTO-assign)\n\t\t\t\t\t- check for error when querying for entry in EIPAM_IP_POOLS before inserting to EIPAM_IP_SUBNETS\n1.0.4: Release 1707 - Add eipam-ip-block.subnet-size-override for level 2\n\n5/10 - 1707 - updated pool key-names for AIC_AIM_LANDING_NETWORK_V4\n6/20 - 1710 - change any underscores _ to colon : for all level 1 and level 2 Pool KeyNames\n6/21 - 1710 - Task 403314 - QIP Parent pool consolidation\n\t\t\t- New V6 plans - \n\t\t\t\tAIC_ATM_UNPROTECTED_V6\n\t\t\t\tAIC_ATM_PROTECTED_V6\n\t\t\t\tAIC_AIM_LANDING_V6\n\t\t\t\t\n","comments":"","x":183.68618774414062,"y":112,"z":"af884d85.e79ff","wires":[]},{"id":"ba9acfa1.1a81c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":150.68618774414062,"y":209.87387084960938,"z":"af884d85.e79ff","wires":[["ee269459.0d29d8","82edc9cf.f072c8","3e573341.752dac"]]},{"id":"ee269459.0d29d8","type":"set","name":"set: data initialization","xml":"<set>\n\t<parameter name=\"tmp.eipam-error\" value=\"false\" />\n\t<parameter name=\"eipam-ip-block.ip-prefix\" value='' />\n\t<parameter name=\"eipam-ip-block.mask\" value='' />\n\t<parameter name=\"pfx.eipam-pool-row\" value='' />\n\t<parameter name=\"tmp.level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />","comments":"","x":365.1201171875,"y":208.81381225585938,"z":"af884d85.e79ff","wires":[]},{"id":"5d98bd32.198a54","type":"set","name":"set EIPAM plan info for Level 2 pool for allocateSubnet","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plan-name\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n\t<parameter name=\"eipam-ip-block.activate-subnet-flag\" value=\"N\"/>\t\n\t<parameter name=\"eipam-ip-block.leaf-level-indicator\" value=\"Y\"/>\n\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.pools_length\" value=\"2\"/>\n\n\t<!-- Level 1 -->\n\t<parameter name=\"eipam-ip-block.pools[0].key-name\" value=\"`$tmp.level1-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.pools[0].key-value\" value=\"`$tmp.level1-key-value`\"/>\n\n\t<!-- Level 2 -->\n\t<parameter name=\"eipam-ip-block.pools[1].key-name\" value=\"`$tmp.level2-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.pools[1].key-value\" value=\"`$tmp.level2-key-value`\"/>","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2131.9706802368164,"y":505.6710214614868,"z":"af884d85.e79ff","wires":[]},{"id":"82edc9cf.f072c8","type":"switchNode","name":"switch: eipam-ip-block.allocate-version","xml":"<switch test=\"`$eipam-ip-block.allocate-version`\">","comments":"Need to know which ipv version to get the plan name from the network-model.","outputs":1,"x":370,"y":551.8138084411621,"z":"af884d85.e79ff","wires":[["f2b84662.2a28c8","73d6dbe6.4a70f4","fd5c5be.70454a8"]]},{"id":"f2b84662.2a28c8","type":"other","name":"ipv4","xml":"<outcome value='ipv4'>","comments":"","outputs":1,"x":610.000114440918,"y":411.8138122558594,"z":"af884d85.e79ff","wires":[["797fa21e.81a99c"]]},{"id":"797fa21e.81a99c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":764.000057220459,"y":410.81381607055664,"z":"af884d85.e79ff","wires":[["db16e381.0a927"]]},{"id":"73d6dbe6.4a70f4","type":"other","name":"Null","xml":"<outcome value=''>","comments":"","outputs":1,"x":552.0000610351562,"y":1213.0541076660156,"z":"af884d85.e79ff","wires":[["f625de69.a30ae"]]},{"id":"b4f8397b.808218","type":"set","name":"set EIPAM plan info for Level 1 pool for allocateSubnet","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plan-name\" value=\"`$network-model.eipam-v6-address-plan`\"/>\n\t<parameter name=\"eipam-ip-block.activate-subnet-flag\" value=\"Y\"/>\t\n\t<parameter name=\"eipam-ip-block.leaf-level-indicator\" value=\"N\"/>\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.pools_length\" value=\"1\"/>\n\n\t<!-- Level 1 -->\n\t<parameter name=\"eipam-ip-block.pools[0].key-name\" value=\"`$tmp.level1-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.pools[0].key-value\" value=\"`$tmp.level1-key-value`\"/>","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2137.736862182617,"y":1018.8138976097107,"z":"af884d85.e79ff","wires":[]},{"id":"cc146f0d.ef15","type":"set","name":"set EIPAM plan info for Level 2 pool for allocateSubnet","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plan-name\" value=\"`$network-model.eipam-v6-address-plan`\"/>\n\t<parameter name=\"eipam-ip-block.activate-subnet-flag\" value=\"N\"/>\t\n\t<parameter name=\"eipam-ip-block.leaf-level-indicator\" value=\"Y\"/>\n\t\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.pools_length\" value=\"2\"/>\n\n\t<!-- Level 1 -->\n\t<parameter name=\"eipam-ip-block.pools[0].key-name\" value=\"`$tmp.level1-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.pools[0].key-value\" value=\"`$tmp.level1-key-value`\"/>\n\n\t<!-- Level 2 -->\n\t<parameter name=\"eipam-ip-block.pools[1].key-name\" value=\"`$tmp.level2-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.pools[1].key-value\" value=\"`$tmp.level2-key-value`\"/>","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2188.564437866211,"y":1464.0996627807617,"z":"af884d85.e79ff","wires":[]},{"id":"65bbfb9e.a49d24","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":766.8799324035645,"y":1097.8138160705566,"z":"af884d85.e79ff","wires":[["4d50f209.31bbec"]]},{"id":"2fafc82a.bc12e8","type":"get-resource","name":"get-resource V4 - validate if level 2 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.plan_name = $network-model.eipam-v4-address-plan and s.network_id = $tmp.network-id and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $network-model.network-role ;\"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":2256.999969482422,"y":469.0000305175781,"z":"af884d85.e79ff","wires":[["2f55848b.f08e5c","de928710.7cb6a8","2a00bb0d.8dc174"]]},{"id":"1875a49c.c38f6b","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":2677.9998626708984,"y":422.0000305175781,"z":"af884d85.e79ff","wires":[]},{"id":"2f55848b.f08e5c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2529.999954223633,"y":460.0000305175781,"z":"af884d85.e79ff","wires":[["ae4526b8.ab5478"]]},{"id":"db16e381.0a927","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":987.0810928344727,"y":410.99999618530273,"z":"af884d85.e79ff","wires":[["ad4bebf.6ec2118","ebec96ad.d0a718","ab9c32c6.9fd19"]]},{"id":"ad4bebf.6ec2118","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1134.0812072753906,"y":523,"z":"af884d85.e79ff","wires":[["e4c14f7a.9980d"]]},{"id":"ebec96ad.d0a718","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1110.0812072753906,"y":653.0000305175781,"z":"af884d85.e79ff","wires":[["305345ea.b1a54a"]]},{"id":"305345ea.b1a54a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Please set the eipam-ip-block.level for appropriate EIPAM request.\" />\n\t","comments":"","x":1270.0811767578125,"y":653.0000610351562,"z":"af884d85.e79ff","wires":[]},{"id":"de928710.7cb6a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2528.8617401123047,"y":424.0000305175781,"z":"af884d85.e79ff","wires":[["1875a49c.c38f6b"]]},{"id":"2a00bb0d.8dc174","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2532.861770629883,"y":496.0000305175781,"z":"af884d85.e79ff","wires":[[]]},{"id":"d0aa2357.d318f","type":"get-resource","name":"get-resource V4 - validate if level 1 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":2050.411331176758,"y":67.99999237060547,"z":"af884d85.e79ff","wires":[["93f2cc3a.b0aa8","9a9a66f7.3a6078","6f91b4fe.93cf2c"]]},{"id":"83766193.dc8cc","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":2471.4113159179688,"y":20,"z":"af884d85.e79ff","wires":[]},{"id":"93f2cc3a.b0aa8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2323.411407470703,"y":58,"z":"af884d85.e79ff","wires":[["fc0f2420.6aefd8"]]},{"id":"ab9c32c6.9fd19","type":"other","name":"1","xml":"<outcome value='1'>","comments":"","outputs":1,"x":1127.4925231933594,"y":216,"z":"af884d85.e79ff","wires":[["6dd579f2.58b018"]]},{"id":"9a9a66f7.3a6078","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2322.273193359375,"y":22,"z":"af884d85.e79ff","wires":[["83766193.dc8cc"]]},{"id":"6f91b4fe.93cf2c","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2326.273223876953,"y":94,"z":"af884d85.e79ff","wires":[[]]},{"id":"a449a4a2.cb78d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"201\" />\n","comments":"","x":2677.1500549316406,"y":88,"z":"af884d85.e79ff","wires":[]},{"id":"61ecde9a.69227","type":"get-resource","name":"get-resource V6 - validate if level 2 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.plan_name = $network-model.eipam-v6-address-plan and s.network_id = $tmp.network-id and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $network-model.network-role ;\"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1408.636459350586,"y":1386.1141357421875,"z":"af884d85.e79ff","wires":[["ae21a219.72b19","9045464c.c34088","8ad23758.1a1c08"]]},{"id":"5bbb3e3d.f153","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1829.636245727539,"y":1337.1141357421875,"z":"af884d85.e79ff","wires":[]},{"id":"ae21a219.72b19","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1681.6364440917969,"y":1375.1141357421875,"z":"af884d85.e79ff","wires":[["64ab1a79.79a634"]]},{"id":"4d50f209.31bbec","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":973.7175750732422,"y":1094.2569961547852,"z":"af884d85.e79ff","wires":[["4591adec.ffb634","ebaca2f.16b246","8a7bbb2b.80f878"]]},{"id":"4591adec.ffb634","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1138.7174987792969,"y":1460.1141357421875,"z":"af884d85.e79ff","wires":[["308b870d.1f9aa8"]]},{"id":"ebaca2f.16b246","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1135.7174987792969,"y":1505.1141357421875,"z":"af884d85.e79ff","wires":[["c041621d.2bed1"]]},{"id":"c041621d.2bed1","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Please set the eipam-ip-block.level for appropriate EIPAM request.\" />\n\t","comments":"","x":1295.7173767089844,"y":1505.1141357421875,"z":"af884d85.e79ff","wires":[]},{"id":"9045464c.c34088","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1680.4982299804688,"y":1339.1141357421875,"z":"af884d85.e79ff","wires":[["5bbb3e3d.f153"]]},{"id":"8ad23758.1a1c08","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1684.4982604980469,"y":1411.1141357421875,"z":"af884d85.e79ff","wires":[[]]},{"id":"4a066f5e.85d33","type":"get-resource","name":"get-resource V6 - validate if level 1 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ;\"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1990.0480270385742,"y":843.1141834259033,"z":"af884d85.e79ff","wires":[["840cadc8.a9cb6","3888df63.597fd","b3d793ce.fda54"]]},{"id":"6901fbcf.b89164","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":2411.0480308532715,"y":794.1142139434814,"z":"af884d85.e79ff","wires":[]},{"id":"840cadc8.a9cb6","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2263.048122406006,"y":832.1142139434814,"z":"af884d85.e79ff","wires":[["61aba367.170f9c"]]},{"id":"8a7bbb2b.80f878","type":"other","name":"1","xml":"<outcome value='1'>","comments":"","outputs":1,"x":1137.1290168762207,"y":988.1141662597656,"z":"af884d85.e79ff","wires":[["ff91e5b0.4d5e38"]]},{"id":"3888df63.597fd","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2261.9099082946777,"y":796.1142139434814,"z":"af884d85.e79ff","wires":[["6901fbcf.b89164"]]},{"id":"b3d793ce.fda54","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2265.909938812256,"y":868.1142139434814,"z":"af884d85.e79ff","wires":[[]]},{"id":"daf71f52.1419","type":"set","name":"set EIPAM plan info for Level 1 pool for allocateSubnet","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plan-name\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n\t<parameter name=\"eipam-ip-block.activate-subnet-flag\" value=\"Y\"/>\t\n\t<parameter name=\"eipam-ip-block.leaf-level-indicator\" value=\"N\"/>\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.pools_length\" value=\"1\"/>\n\n\t<!-- Level 1 -->\n\t<parameter name=\"eipam-ip-block.pools[0].key-name\" value=\"`$tmp.level1-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.pools[0].key-value\" value=\"`$tmp.level1-key-value`\"/>","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2124.534698486328,"y":180.81381225585938,"z":"af884d85.e79ff","wires":[]},{"id":"3fad2aec.a70926","type":"save","name":"insert EIPAM_IP_SUBNETS for level 1 V4","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNETS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n service_type = $tmp.service-type ,\n ip_address = $eipam-ip-block.ip-prefix ,\n prefix_length = $eipam-ip-block.mask ,\n plan_name = $network-model.eipam-v4-address-plan ,\n status = 'ACTIVE' ,\n pool_id = $pfx.eipam-pool-row.pool-id ,\n address_family = $network-model.ipv4-ip-version ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-v4subnet-row'>\n","comments":"","outputs":1,"x":2094.540802001953,"y":325.96417236328125,"z":"af884d85.e79ff","wires":[["61c10117.b9459","1a12c79c.b44ef8"]]},{"id":"6dd579f2.58b018","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1332.4894104003906,"y":213.96395874023438,"z":"af884d85.e79ff","wires":[["daf71f52.1419","8136ada7.7f831","3fad2aec.a70926","950dccde.bc93d","74c5e3f9.66273c","6a5af7e2.3dc6d8"]]},{"id":"8136ada7.7f831","type":"execute","name":"execute EIPAM allocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"allocateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":2055.0812072753906,"y":225.81381225585938,"z":"af884d85.e79ff","wires":[["dcf19076.269d2"]]},{"id":"dcf19076.269d2","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2265.0812377929688,"y":227.2041778564453,"z":"af884d85.e79ff","wires":[["8274ac50.7d1b5"]]},{"id":"8274ac50.7d1b5","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating V4 subnet in EIPAM.\" />\n\t","comments":"","x":2429.081268310547,"y":230.20420837402344,"z":"af884d85.e79ff","wires":[]},{"id":"e4c14f7a.9980d","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1314.5705871582031,"y":524.8138122558594,"z":"af884d85.e79ff","wires":[["5d98bd32.198a54","3ed4edab.9101d2","56faed60.ea7514","c58b39d.02995c8","1180173f.f62099","826cf92.097f708","d6ec4d5a.4fa56","2244b12.dafd04e"]]},{"id":"3ed4edab.9101d2","type":"execute","name":"execute EIPAM allocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"allocateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":2059.6126403808594,"y":571.8138122558594,"z":"af884d85.e79ff","wires":[["2c4f9b60.58a254"]]},{"id":"2c4f9b60.58a254","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2269.6126708984375,"y":573.2041778564453,"z":"af884d85.e79ff","wires":[["12bdf050.06dfd"]]},{"id":"12bdf050.06dfd","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating V4 subnet in EIPAM.\" />\n\t","comments":"","x":2433.6127014160156,"y":576.2042083740234,"z":"af884d85.e79ff","wires":[]},{"id":"56faed60.ea7514","type":"save","name":"insert EIPAM_IP_SUBNETS for level 2 V4","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNETS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n service_type = $tmp.service-type ,\n ip_address = $eipam-ip-block.ip-prefix ,\n prefix_length = $eipam-ip-block.mask ,\n plan_name = $network-model.eipam-v4-address-plan ,\n status = 'ALLOCATED' ,\n pool_id = $pfx.eipam-pool-row.pool-id ,\n address_family = $network-model.ipv4-ip-version ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":2094.612518310547,"y":679.8138732910156,"z":"af884d85.e79ff","wires":[["57363548.9396cc","211c740e.cf417c"]]},{"id":"c58b39d.02995c8","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 1 V4","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level1-key-name ,\n key_value = $tmp.level1-key-value ,\n level = 1 ; \"\n force='true'\n pfx='pfx.eipam-v4subnet-key-row'>\n","comments":"","outputs":1,"x":2109.612335205078,"y":721.8138160705566,"z":"af884d85.e79ff","wires":[["211c740e.cf417c","3f850f8f.72c47"]]},{"id":"1180173f.f62099","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 2 V4","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level2-key-name ,\n key_value = $tmp.level2-key-value ,\n level = 2 ; \"\n force='true'\n pfx='pfx.eipam-v4subnet-key-row'>\n","comments":"","outputs":1,"x":2108.6124572753906,"y":767.8138465881348,"z":"af884d85.e79ff","wires":[["211c740e.cf417c","3f850f8f.72c47"]]},{"id":"950dccde.bc93d","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 1 V4","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level1-key-name ,\n key_value = $tmp.level1-key-value ,\n level = 1 ; \"\n force='true'\n pfx='pfx.eipam-v4subnet-key-row'>\n","comments":"","outputs":1,"x":2112.816864013672,"y":362.9639587402344,"z":"af884d85.e79ff","wires":[["1a12c79c.b44ef8","fc216a73.da41f8"]]},{"id":"74c5e3f9.66273c","type":"get-resource","name":"get-resource V4 - get pool_id","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='pfx.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":2054.189239501953,"y":274.81380462646484,"z":"af884d85.e79ff","wires":[["b7560d4.843d4f","7f808d14.fa37e4"]]},{"id":"826cf92.097f708","type":"get-resource","name":"get-resource V4 - get pool_id","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='pfx.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":2051.188995361328,"y":623.8138732910156,"z":"af884d85.e79ff","wires":[["827b1620.4c4d08","cdde130e.69af4"]]},{"id":"1fd6bf21.0a00b1","type":"save","name":"insert EIPAM_IP_SUBNETS for level 1 V6","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNETS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n service_type = $tmp.service-type ,\n ip_address = $eipam-ip-block.ip-prefix ,\n prefix_length = $eipam-ip-block.mask ,\n plan_name = $network-model.eipam-v6-address-plan ,\n status = 'ACTIVE' ,\n pool_id = $pfx.eipam-pool-row.pool-id ,\n address_family = $network-model.ipv6-ip-version ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-v6subnet-row'>\n","comments":"","outputs":1,"x":2107.3451232910156,"y":1168.4146118164062,"z":"af884d85.e79ff","wires":[["25e2d931.1b6566","82bca903.e58df8"]]},{"id":"b05ae73e.f76a38","type":"execute","name":"execute EIPAM allocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"allocateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":2067.8855895996094,"y":1070.2642517089844,"z":"af884d85.e79ff","wires":[["4693175c.e53f58"]]},{"id":"4693175c.e53f58","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2277.8856201171875,"y":1071.6546173095703,"z":"af884d85.e79ff","wires":[["b82df8d0.875478"]]},{"id":"b82df8d0.875478","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating V4 subnet in EIPAM.\" />\n\t","comments":"","x":2441.8856506347656,"y":1074.6546478271484,"z":"af884d85.e79ff","wires":[]},{"id":"9adb7ede.b6ee6","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 1 V6","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level1-key-name ,\n key_value = $tmp.level1-key-value ,\n level = 1 ; \"\n force='true'\n pfx='pfx.eipam-v6subnet-key-row'>\n","comments":"","outputs":1,"x":2125.6212463378906,"y":1207.4143981933594,"z":"af884d85.e79ff","wires":[["a03e18b9.56ab08","82bca903.e58df8"]]},{"id":"32c22ce1.cfbb64","type":"get-resource","name":"get-resource V6 - get pool_id","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='pfx.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":2066.9935607910156,"y":1116.2642822265625,"z":"af884d85.e79ff","wires":[["3e64d396.04c79c","96a0c906.f7cd38"]]},{"id":"13462f06.ec5931","type":"execute","name":"execute EIPAM allocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"allocateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":2122.2672424316406,"y":1542.7146453857422,"z":"af884d85.e79ff","wires":[["9ded8a81.952bf8"]]},{"id":"9ded8a81.952bf8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2332.2672729492188,"y":1544.1050109863281,"z":"af884d85.e79ff","wires":[["f5bc2f24.a6b84"]]},{"id":"f5bc2f24.a6b84","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating V4 subnet in EIPAM.\" />\n\t","comments":"","x":2496.2672424316406,"y":1547.10498046875,"z":"af884d85.e79ff","wires":[]},{"id":"3e343055.aa6c4","type":"save","name":"insert EIPAM_IP_SUBNETS for level 2 V6","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNETS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n service_type = $tmp.service-type ,\n ip_address = $eipam-ip-block.ip-prefix ,\n prefix_length = $eipam-ip-block.mask ,\n plan_name = $network-model.eipam-v6-address-plan ,\n status = 'ALLOCATED' ,\n pool_id = $pfx.eipam-pool-row.pool-id ,\n address_family = $network-model.ipv6-ip-version ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-v6subnet-row'>\n","comments":"","outputs":1,"x":2154.267120361328,"y":1650.7147216796875,"z":"af884d85.e79ff","wires":[["dc201cfd.44ef1","60365290.cd138c"]]},{"id":"55a6980.64c9068","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 1 V6","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level1-key-name ,\n key_value = $tmp.level1-key-value ,\n level = 1 ; \"\n force='true'\n pfx='pfx.eipam-v6subnet-key-row'>\n","comments":"","outputs":1,"x":2172.2669372558594,"y":1692.7146492004395,"z":"af884d85.e79ff","wires":[["60365290.cd138c","249dd9a9.94ecc6"]]},{"id":"9747e41b.cbfc48","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 2 V6","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level2-key-name ,\n key_value = $tmp.level2-key-value ,\n level = 2 ; \"\n force='true'\n pfx='pfx.eipam-v6subnet-key-row'>\n","comments":"","outputs":1,"x":2171.267059326172,"y":1738.7146797180176,"z":"af884d85.e79ff","wires":[["60365290.cd138c","249dd9a9.94ecc6"]]},{"id":"4fae9372.cdb14c","type":"get-resource","name":"get-resource V6 - get pool_id","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='pfx.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":2118.8436584472656,"y":1596.7147216796875,"z":"af884d85.e79ff","wires":[["c412ff05.61872","8db85c57.32fac"]]},{"id":"ff91e5b0.4d5e38","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1305.9460144042969,"y":985.2643127441406,"z":"af884d85.e79ff","wires":[["b4f8397b.808218","b05ae73e.f76a38","32c22ce1.cfbb64","1fd6bf21.0a00b1","9adb7ede.b6ee6","22f94d7b.eb0dd2"]]},{"id":"308b870d.1f9aa8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1295.6607360839844,"y":1458.7147216796875,"z":"af884d85.e79ff","wires":[["cc146f0d.ef15","13462f06.ec5931","4fae9372.cdb14c","3e343055.aa6c4","55a6980.64c9068","9747e41b.cbfc48","963762f2.b6052","4f4eeaa0.dc8a84"]]},{"id":"fd5c5be.70454a8","type":"other","name":"ipv6","xml":"<outcome value='ipv6'>","comments":"","outputs":1,"x":582.7717437744141,"y":1095.9640197753906,"z":"af884d85.e79ff","wires":[["65bbfb9e.a49d24"]]},{"id":"3e573341.752dac","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />\n","comments":"","x":300,"y":684.1141662597656,"z":"af884d85.e79ff","wires":[]},{"id":"9adfc428.56b8e8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"V4 Level 2 Subnet already exists.\" />\n\t","comments":"","x":2898.2161560058594,"y":511.8138427734375,"z":"af884d85.e79ff","wires":[]},{"id":"2ba67659.6b018a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"V6 Level 1 Subnet already exists.\" />\n\t","comments":"","x":2272.216094970703,"y":966.2643127441406,"z":"af884d85.e79ff","wires":[]},{"id":"e7d56588.f6fc68","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"V6 Level 2 Subnet already exists.\" />\n\t","comments":"","x":2052.216278076172,"y":1413.7147216796875,"z":"af884d85.e79ff","wires":[]},{"id":"f625de69.a30ae","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Please set the eipam-ip-block.allocate-version for appropriate EIPAM request.\" />\n\t","comments":"","x":719.1141052246094,"y":1213.5645751953125,"z":"af884d85.e79ff","wires":[]},{"id":"23c76a06.097e96","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"201\" />\n","comments":"","x":2614.159355163574,"y":864.4145069122314,"z":"af884d85.e79ff","wires":[]},{"id":"c01d1cf.e66dbe","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 1 subnet already exists, SKIP.\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>\n","comments":"","outputs":1,"x":2652.9159240722656,"y":48.813812255859375,"z":"af884d85.e79ff","wires":[[]]},{"id":"fb0abddf.f31a3","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 1 subnet already exists, SKIP.\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>\n","comments":"","outputs":1,"x":2593.366630554199,"y":833.2642993927002,"z":"af884d85.e79ff","wires":[[]]},{"id":"fc0f2420.6aefd8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2474.3663482666016,"y":53.813812255859375,"z":"af884d85.e79ff","wires":[["c01d1cf.e66dbe","a449a4a2.cb78d8"]]},{"id":"ae4526b8.ab5478","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2681.3662719726562,"y":457.96398544311523,"z":"af884d85.e79ff","wires":[["39c4b9ca.7881d6","9adfc428.56b8e8"]]},{"id":"c9e7ed18.fb707","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`\"/>\n","comments":"","outputs":1,"x":2520.366241455078,"y":487.8138084411621,"z":"af884d85.e79ff","wires":[[]]},{"id":"39c4b9ca.7881d6","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 2 subnet already exists, SKIP.\"/>\n\n<!-- Level 2 -->\n\t<parameter name=\"field7\" value=\"NETWORK_ROLE_NETWORK_ID\"/>\n\t<parameter name=\"field8\" value=\"`$tmp.level2-key-value`\"/>\n","comments":"","outputs":1,"x":2877.3663024902344,"y":478.8138427734375,"z":"af884d85.e79ff","wires":[[]]},{"id":"61aba367.170f9c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2409.745048522949,"y":834.2643604278564,"z":"af884d85.e79ff","wires":[["fb0abddf.f31a3","23c76a06.097e96"]]},{"id":"64ab1a79.79a634","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1836.744888305664,"y":1372.7147216796875,"z":"af884d85.e79ff","wires":[["9520eb16.67d2a8","e7d56588.f6fc68"]]},{"id":"9520eb16.67d2a8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 2 subnet already exists, SKIP.\"/>\n\n<!-- Level 2 -->\n\t<parameter name=\"field7\" value=\"NETWORK_ROLE_NETWORK_ID\"/>\n\t<parameter name=\"field8\" value=\"`$tmp.level2-key-value`\"/>\n","comments":"","outputs":1,"x":2038.7447814941406,"y":1374.8648681640625,"z":"af884d85.e79ff","wires":[[]]},{"id":"82b48f60.6d084","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />\n","comments":"","x":2620.8376426696777,"y":321.96395111083984,"z":"af884d85.e79ff","wires":[]},{"id":"61c10117.b9459","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2405.8377990722656,"y":320.8138084411621,"z":"af884d85.e79ff","wires":[["82b48f60.6d084"]]},{"id":"1a12c79c.b44ef8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2401.9305725097656,"y":416.96395111083984,"z":"af884d85.e79ff","wires":[[]]},{"id":"57363548.9396cc","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2428.6458168029785,"y":695.8138465881348,"z":"af884d85.e79ff","wires":[["671fdfa6.ed9b"]]},{"id":"211c740e.cf417c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2430.738800048828,"y":730.9640159606934,"z":"af884d85.e79ff","wires":[[]]},{"id":"25e2d931.1b6566","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2435.6458168029785,"y":1162.4144325256348,"z":"af884d85.e79ff","wires":[["65c7a1dc.26042"]]},{"id":"82bca903.e58df8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2447.738800048828,"y":1252.5645751953125,"z":"af884d85.e79ff","wires":[[]]},{"id":"dc201cfd.44ef1","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2502.645538330078,"y":1664.8648681640625,"z":"af884d85.e79ff","wires":[["41da34b9.6acf9c"]]},{"id":"60365290.cd138c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2509.738800048828,"y":1759.0150146484375,"z":"af884d85.e79ff","wires":[[]]},{"id":"101618fb.c286e7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />\n","comments":"","x":2620.9515686035156,"y":366.8138122558594,"z":"af884d85.e79ff","wires":[]},{"id":"fc216a73.da41f8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2406.9520568847656,"y":367.6636657714844,"z":"af884d85.e79ff","wires":[["101618fb.c286e7"]]},{"id":"10e97b0.9f4c385","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />\n","comments":"","x":2603.951446533203,"y":766.9640159606934,"z":"af884d85.e79ff","wires":[]},{"id":"3f850f8f.72c47","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2428.951934814453,"y":766.8138694763184,"z":"af884d85.e79ff","wires":[["10e97b0.9f4c385"]]},{"id":"671fdfa6.ed9b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />\n","comments":"","x":2596.9518127441406,"y":696.9639892578125,"z":"af884d85.e79ff","wires":[]},{"id":"14c77d95.9716d2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />\n","comments":"","x":2598.951690673828,"y":1203.4144287109375,"z":"af884d85.e79ff","wires":[]},{"id":"65c7a1dc.26042","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />\n","comments":"","x":2597.952178955078,"y":1161.4144020080566,"z":"af884d85.e79ff","wires":[]},{"id":"a03e18b9.56ab08","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2436.951690673828,"y":1203.4144287109375,"z":"af884d85.e79ff","wires":[["14c77d95.9716d2"]]},{"id":"43b98d6f.bc4fd4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNET_KEYS table.' />\n","comments":"","x":2666.257598876953,"y":1713.0150146484375,"z":"af884d85.e79ff","wires":[]},{"id":"41da34b9.6acf9c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_SUBNETS table.' />\n","comments":"","x":2660.258087158203,"y":1663.0150146484375,"z":"af884d85.e79ff","wires":[]},{"id":"249dd9a9.94ecc6","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2504.257598876953,"y":1713.0150146484375,"z":"af884d85.e79ff","wires":[["43b98d6f.bc4fd4"]]},{"id":"22f94d7b.eb0dd2","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>\n<parameter name=\"field7\" value=\"Level 1 subnet saved to DB.\"/>","comments":"","outputs":1,"x":2012.9219055175781,"y":1249.7147216796875,"z":"af884d85.e79ff","wires":[[]]},{"id":"963762f2.b6052","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n\n<!-- Level 2 -->\n\t<parameter name=\"field6\" value=\"NETWORK_ROLE_NETWORK_ID\"/>\n\t<parameter name=\"field7\" value=\"`$tmp.level2-key-value`\"/>\n<parameter name=\"field8\" value=\"Level 2 subnet saved to DB.\"/>","comments":"","outputs":1,"x":2069.951934814453,"y":1802.3153076171875,"z":"af884d85.e79ff","wires":[[]]},{"id":"d6ec4d5a.4fa56","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n\n<!-- Level 2 -->\n\t<parameter name=\"field6\" value=\"NETWORK_ROLE_NETWORK_ID\"/>\n\t<parameter name=\"field7\" value=\"`$tmp.level2-key-value`\"/>\n<parameter name=\"field8\" value=\"Level 2 subnet saved to DB.\"/>","comments":"","outputs":1,"x":1989.9519348144531,"y":804.4144287109375,"z":"af884d85.e79ff","wires":[[]]},{"id":"6a5af7e2.3dc6d8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>\n<parameter name=\"field7\" value=\"Level 1 subnet saved to DB.\"/>","comments":"","outputs":1,"x":1496.9519348144531,"y":299.9639587402344,"z":"af884d85.e79ff","wires":[[]]},{"id":"b7560d4.843d4f","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2257.1861877441406,"y":261.39998626708984,"z":"af884d85.e79ff","wires":[["e89ff97b.78ef88"]]},{"id":"e89ff97b.78ef88","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while looking for entry in EIPAM_IP_POOLS for V4 subnet in EIPAM.\" />\n\t","comments":"","x":2462.1861877441406,"y":275.40001678466797,"z":"af884d85.e79ff","wires":[]},{"id":"7f808d14.fa37e4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2271.1861877441406,"y":296.39998626708984,"z":"af884d85.e79ff","wires":[["e89ff97b.78ef88"]]},{"id":"827b1620.4c4d08","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2249.2911376953125,"y":618.595832824707,"z":"af884d85.e79ff","wires":[["ddcc1433.a96368"]]},{"id":"ddcc1433.a96368","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while looking for entry in EIPAM_IP_POOLS for V4 subnet in EIPAM.\" />\n\t","comments":"","x":2454.2911376953125,"y":632.5958633422852,"z":"af884d85.e79ff","wires":[]},{"id":"cdde130e.69af4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2263.2911376953125,"y":653.595832824707,"z":"af884d85.e79ff","wires":[["ddcc1433.a96368"]]},{"id":"3e64d396.04c79c","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2274.5860900878906,"y":1103.4000244140625,"z":"af884d85.e79ff","wires":[["5f7c6c18.d238a4"]]},{"id":"5f7c6c18.d238a4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while looking for entry in EIPAM_IP_POOLS for V6 subnet in EIPAM.\" />\n\t","comments":"","x":2479.5860900878906,"y":1117.4000549316406,"z":"af884d85.e79ff","wires":[]},{"id":"96a0c906.f7cd38","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2288.5860900878906,"y":1138.4000244140625,"z":"af884d85.e79ff","wires":[["5f7c6c18.d238a4"]]},{"id":"c412ff05.61872","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2330.5860900878906,"y":1581.4000244140625,"z":"af884d85.e79ff","wires":[["8cc59441.64b398"]]},{"id":"8cc59441.64b398","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while looking for entry in EIPAM_IP_POOLS for V6 subnet in EIPAM.\" />\n\t","comments":"","x":2535.585968017578,"y":1595.4000244140625,"z":"af884d85.e79ff","wires":[]},{"id":"8db85c57.32fac","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2344.5860900878906,"y":1616.4000244140625,"z":"af884d85.e79ff","wires":[["8cc59441.64b398"]]},{"id":"4a8b2577.7984dc","type":"switchNode","name":"switch: network-model.eipam-v4-address-plan","xml":"<switch test=\"`$network-model.eipam-v4-address-plan`\">","comments":"","outputs":1,"x":1042.5454330444336,"y":169.84091186523438,"z":"af884d85.e79ff","wires":[["2f687662.53b65a"]]},{"id":"2f687662.53b65a","type":"other","name":"AIC_AIM_LANDING_NETWORK_V4","xml":"<outcome value=\"AIC_AIM_LANDING_NETWORK_V4\">","comments":"","outputs":1,"x":1381.5454177856445,"y":163.84090614318848,"z":"af884d85.e79ff","wires":[["10891762.65bb69"]]},{"id":"10891762.65bb69","type":"set","name":"set key-names","xml":"<set>\n\t<parameter name=\"tmp.level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1687.636215209961,"y":158.7499942779541,"z":"af884d85.e79ff","wires":[]},{"id":"36d2f99d.8a0186","type":"switchNode","name":"switch: network-model.eipam-v6-address-plan","xml":"<switch test=\"`$network-model.eipam-v6-address-plan`\">","comments":"","outputs":1,"x":1033.2366485595703,"y":928.3332672119141,"z":"af884d85.e79ff","wires":[["479f2e45.8de72","83a60962.897ed8","4b7654f6.8b1abc","be62e3d3.32c4"]]},{"id":"479f2e45.8de72","type":"other","name":"AIC_AIM_LANDING_NETWORK_V6","xml":"<outcome value=\"AIC_AIM_LANDING_NETWORK_V6\">","comments":"","outputs":1,"x":1372.2366333007812,"y":922.3332614898682,"z":"af884d85.e79ff","wires":[["13598bf8.358084"]]},{"id":"13598bf8.358084","type":"set","name":"set key-names","xml":"<set>\n\t<parameter name=\"tmp.level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1678.3274307250977,"y":917.2423496246338,"z":"af884d85.e79ff","wires":[]},{"id":"be62e3d3.32c4","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_UNPROTECTED_V6\">","comments":"","outputs":1,"x":1396.2366485595703,"y":808.333309173584,"z":"af884d85.e79ff","wires":[["13598bf8.358084"]]},{"id":"83a60962.897ed8","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PROTECTED_V6\">","comments":"","outputs":1,"x":1382.9033432006836,"y":884.3333358764648,"z":"af884d85.e79ff","wires":[["13598bf8.358084"]]},{"id":"4b7654f6.8b1abc","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PRIVATE_V6\">","comments":"","outputs":1,"x":1371.2367095947266,"y":848.333288192749,"z":"af884d85.e79ff","wires":[["13598bf8.358084"]]},{"id":"2244b12.dafd04e","type":"switchNode","name":"switch: eipam-ip-block.subnet-size-override","xml":"<switch test=\"`$eipam-ip-block.subnet-size-override`\">","comments":"","outputs":1,"x":2093.428695678711,"y":541.428544998169,"z":"af884d85.e79ff","wires":[["b8333eb5.e8961"]]},{"id":"239857e5.61ee78","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$network-model.ipv4-cidr-mask`\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2826.2856979370117,"y":570.0001010894775,"z":"af884d85.e79ff","wires":[]},{"id":"b8333eb5.e8961","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2364.8575019836426,"y":540.0000820159912,"z":"af884d85.e79ff","wires":[["433e270d.669408"]]},{"id":"85152c24.0dd9e","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level2-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 2 subnet override not set, default to network model value.\"/>\n\n","comments":"","outputs":1,"x":2756.28564453125,"y":538.4285888671875,"z":"af884d85.e79ff","wires":[[]]},{"id":"433e270d.669408","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2572.6640625,"y":538.4286499023438,"z":"af884d85.e79ff","wires":[["85152c24.0dd9e","239857e5.61ee78"]]},{"id":"4f4eeaa0.dc8a84","type":"switchNode","name":"switch: eipam-ip-block.subnet-size-override","xml":"<switch test=\"`$eipam-ip-block.subnet-size-override`\">","comments":"","outputs":1,"x":2147.428466796875,"y":1497.142822265625,"z":"af884d85.e79ff","wires":[["c3f5f010.6248"]]},{"id":"c3f5f010.6248","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2418.8572731018066,"y":1495.7143592834473,"z":"af884d85.e79ff","wires":[["56df1329.aeed6c"]]},{"id":"56df1329.aeed6c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2626.663833618164,"y":1494.1429271697998,"z":"af884d85.e79ff","wires":[["b9263db2.c71ae","414d97ea.0ebc88"]]},{"id":"414d97ea.0ebc88","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$network-model.ipv6-cidr-mask`\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2878.0695419311523,"y":1523.9004917144775,"z":"af884d85.e79ff","wires":[]},{"id":"b9263db2.c71ae","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-allocate-network-role-subnet\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v6-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level2-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 2 subnet override not set, default to network model value.\"/>\n\n","comments":"","outputs":1,"x":2808.0694885253906,"y":1492.3289794921875,"z":"af884d85.e79ff","wires":[[]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-create-network-role-pool.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-create-network-role-pool.json
new file mode 100644
index 00000000..783f499d
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_eipam-create-network-role-pool.json
@@ -0,0 +1 @@
+[{"id":"889f3470.50cd18","type":"dgstart","name":"DGSTART","outputs":1,"x":105.31387329101562,"y":29,"z":"6dc3ee07.6f3c9","wires":[["dad41889.054d08"]]},{"id":"dad41889.054d08","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":334.2638969421387,"y":33.74525547027588,"z":"6dc3ee07.6f3c9","wires":[["dc34c18c.fe421"]]},{"id":"e9fff2b2.6dea6","type":"comment","name":"ChangeLog","info":"1.0.1: Release 1702 - add logic for vIPR & SRIOV address plans\n1.0.2: Release 1702 - Req update to change level 1 & 2 key-name & key-values\n1.0.3: Release 1707 - Add CA to map to ATM-U US/CALA or ATM-P CALA for vIPR & SRIOV\n1.0.4: Release 1702/1707 - SRIOV V6 Data Plane QIP Pool names need to be unique per region due to Regional Registry.\n\t\t\t\t\t\t- Add CA to map to ATM-U US/CALA or ATM-P CALA for V4 vIPR & SRIOV\n1.0.5: Release 1707 - Add AIM V4 Landing Network\n5/10 - 1707 - updated pool key-names for AIC_AIM_LANDING_NETWORK_V4\n6/20 - 1710 - change any underscores _ to colon : for all level 1 and level 2 Pool KeyNames\n6/21 - 1710 - Task 403314 - QIP Parent pool consolidation\n\t\t\t- New V6 plans - \n\t\t\t\tAIC_ATM_UNPROTECTED_V6\n\t\t\t\tAIC_ATM_PROTECTED_V6\n\t\t\t\tAIC_AIM_LANDING_V6\n8/27 - 1710 - QIP parent pool fix:\n\t\t\tqip parent pool initial string is specifying 'AIC-ATM-P-V6 US' instead of 'ATM-P-V6 US'\n \t\tand \n \t\t\tqip parent pool initial string is specifying 'AIC-ATM-U-V6 US' instead of 'ATM-U-V6 US'\n","comments":"","x":67,"y":58.186187744140625,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"dc34c18c.fe421","type":"method","name":"eipam-create-network-role-pool","xml":"<method rpc='eipam-create-network-role-pool' mode='sync'>\n","comments":"","outputs":1,"x":680.3625259399414,"y":32.68485069274902,"z":"6dc3ee07.6f3c9","wires":[["101acc97.442dd3"]]},{"id":"f6408602.6c6e38","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`\"/>\n","comments":"","outputs":1,"x":1067.3235168457031,"y":889.4543533325195,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"150e6bd8.81df94","type":"set","name":"set EIPAM plan info for createPool & Level 1 pool","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag\" value=\"N\"/>\t\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool\" value=\"`$tmp.qip-pool`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length\" value=\"1\"/>\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length\" value=\"1\"/>\n\n\t<!-- Level 1 -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name\" value=\"`$tmp.v4-level1-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value\" value=\"`$tmp.level1-key-value`\"/>\n\t<parameter name=\"tmp.create-v4-pool-flag\" value=\"Y\" />\n\t<parameter name=\"tmp.v4-qip-pool\" value=\"`$tmp.qip-pool`\" />","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1177.3140258789062,"y":735.0000381469727,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"dacc275b.c28ca8","type":"execute","name":"execute EIPAM createPool","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"createPool\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":798.313835144043,"y":1851.0602111816406,"z":"6dc3ee07.6f3c9","wires":[["6f29513.87d3db","4a355dc8.b91904"]]},{"id":"101acc97.442dd3","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":115.00006103515625,"y":168.06005859375,"z":"6dc3ee07.6f3c9","wires":[["821b7075.c4a55","83965803.e534d8","b98c82b0.46b8b","d3eb1f70.63b4f","4f20cdc5.ce5d74","81702e48.02ed2","de6d3f5d.9271","9ed33bd1.14ef08"]]},{"id":"821b7075.c4a55","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":380.3138618469238,"y":459.06005859375,"z":"6dc3ee07.6f3c9","wires":[["2cdfd5c1.680e2a","90660bc9.3bdfd8","f7dde4c9.c086c8"]]},{"id":"90660bc9.3bdfd8","type":"other","name":"NULL","xml":"<outcome value=\"\">","comments":"","outputs":1,"x":592.3139228820801,"y":472.06008529663086,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"2cdfd5c1.680e2a","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":591.3139801025391,"y":428.06005859375,"z":"6dc3ee07.6f3c9","wires":[["fd1b4bf2.6e8168"]]},{"id":"beba6de.c13179","type":"set","name":"set EIPAM level 2 pool info for createPool","xml":"<set>\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length\" value=\"`$eipam-ip-block.level`\"/>\n\n\t<!-- Level 2 -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool\" value=\"\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name\" value=\"`$tmp.v4-level2-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value\" value=\"`$tmp.level2-key-value`\"/>","comments":"","x":1520.3141250610352,"y":863.0601110458374,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"a21e5aab.edf9e8","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":1089.3139877319336,"y":815.0600280761719,"z":"6dc3ee07.6f3c9","wires":[["7656dbc4.2063f4","7c2e9c92.c4a764","4e418bcf.7dd274"]]},{"id":"7656dbc4.2063f4","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1289.3140869140625,"y":813.0600357055664,"z":"6dc3ee07.6f3c9","wires":[["7d2cc75f.256b88"]]},{"id":"7c2e9c92.c4a764","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1293.3140869140625,"y":864.0600357055664,"z":"6dc3ee07.6f3c9","wires":[["beba6de.c13179"]]},{"id":"fd1b4bf2.6e8168","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":745.3139228820801,"y":427.06006240844727,"z":"6dc3ee07.6f3c9","wires":[["a76a1da4.57966"]]},{"id":"5be47438.2e9b1c","type":"set","name":"set: eipam-ip-block.plans[]++","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plans_length\" value=\"`$eipam-ip-block.plans_length + 1`\" />","comments":"","x":1090.322998046875,"y":933.2102432250977,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"6f29513.87d3db","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1008.3138809204102,"y":1852.4505767822266,"z":"6dc3ee07.6f3c9","wires":[["86b1f835.a50a48"]]},{"id":"86b1f835.a50a48","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while creating pool in EIPAM.\" />\n\t","comments":"","x":1172.3139114379883,"y":1855.4506072998047,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"83965803.e534d8","type":"set","name":"set: data initialization","xml":"<set>\n\t<parameter name=\"tmp.eipam-error\" value=\"false\" />\n\t<parameter name=\"tmp.create-v4-pool-flag\" value=\"N\" />\n\t<parameter name=\"tmp.create-v6-pool-flag\" value=\"N\" />\n\t<parameter name='eipam-ip-block.plans_length' value='0' />\n\t<parameter name=\"eipam-pool.v4.pre-existing\" value=\"false\"/>\n\t<parameter name=\"eipam-pool.v6.pre-existing\" value=\"false\"/>\n\t<parameter name=\"tmp.v4-level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.v4-level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />\n\t<parameter name=\"tmp.v6-level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.v6-level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />","comments":"","x":372.3430633544922,"y":177.0909013748169,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"8da006d2.7f55a8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`\"/>\n","comments":"","outputs":1,"x":1159.433952331543,"y":1712.0000305175781,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"dd380ea7.76015","type":"set","name":"set EIPAM plan info for createPool & Level 1 pool","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name\" value=\"`$network-model.eipam-v6-address-plan`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag\" value=\"N\"/>\t\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool\" value=\"`$tmp.qip-pool`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length\" value=\"1\"/>\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length\" value=\"1\"/>\n\n\t<!-- Level 1 -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name\" value=\"`$tmp.v6-level1-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value\" value=\"`$tmp.level1-key-value`\"/>\n\t<parameter name=\"tmp.create-v6-pool-flag\" value=\"Y\" />\n\t<parameter name=\"tmp.v6-qip-pool\" value=\"`$tmp.qip-pool`\" />","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1286.424674987793,"y":1557.2453918457031,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"b98c82b0.46b8b","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":358.42444610595703,"y":1127.6057434082031,"z":"6dc3ee07.6f3c9","wires":[["b12ac9c.df0b238","7329292d.e338f8","7d40e359.db691c"]]},{"id":"7329292d.e338f8","type":"other","name":"NULL","xml":"<outcome value=\"\">","comments":"","outputs":1,"x":629.4244766235352,"y":1171.6057434082031,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"b12ac9c.df0b238","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":634.4245834350586,"y":1126.6057434082031,"z":"6dc3ee07.6f3c9","wires":[["48e3eddd.5cf3a4"]]},{"id":"2554e31c.bafd1c","type":"set","name":"set EIPAM level 2 pool info for createPool","xml":"<set>\n\t<!-- Number of Pool Levels -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length\" value=\"`$eipam-ip-block.level`\"/>\n\n\t<!-- Level 2 -->\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool\" value=\"\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name\" value=\"`$tmp.v6-level2-key-name`\"/>\n\t<parameter name=\"eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value\" value=\"`$tmp.level2-key-value`\"/>","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1624.4251403808594,"y":1689.3054504394531,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"8d6278e2.6e90d8","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":1211.4247131347656,"y":1659.3054504394531,"z":"6dc3ee07.6f3c9","wires":[["ee77392f.cc70e8","51cc56d.7fcaca8","8d5048f5.5af5f8"]]},{"id":"ee77392f.cc70e8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1407.424819946289,"y":1655.3054504394531,"z":"6dc3ee07.6f3c9","wires":[["4da2c6f8.8fd8f8"]]},{"id":"51cc56d.7fcaca8","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1409.424819946289,"y":1688.3054504394531,"z":"6dc3ee07.6f3c9","wires":[["2554e31c.bafd1c"]]},{"id":"48e3eddd.5cf3a4","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":782.4245223999023,"y":1131.6057434082031,"z":"6dc3ee07.6f3c9","wires":[["5c12bfff.591ad"]]},{"id":"e1049ec5.94e4f","type":"set","name":"set: eipam-ip-block.plans[]++","xml":"<set>\n\t<parameter name=\"eipam-ip-block.plans_length\" value=\"`$eipam-ip-block.plans_length + 1`\" />","comments":"","x":1216.433723449707,"y":1761.4557189941406,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"f7dde4c9.c086c8","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":593.3139228820801,"y":509.99999618530273,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"7d40e359.db691c","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":631.3138809204102,"y":1213.0000305175781,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"4e295a6e.146bd4","type":"switchNode","name":"switch: network-model.eipam-v4-address-plan","xml":"<switch test=\"`$network-model.eipam-v4-address-plan`\">","comments":"","outputs":1,"x":1205.8667602539062,"y":485.00001525878906,"z":"6dc3ee07.6f3c9","wires":[["c7f9c5c5.984098","b8f776c8.678198","14d5ccbc.b07fc3","db5e463e.a76ce8","25ce3aeb.1c3556","1e8eee8f.1c8f41","500be3dd.629e5c"]]},{"id":"c7f9c5c5.984098","type":"other","name":"AIC_ATM_UNPROTECTED_V4","xml":"<outcome value=\"AIC_ATM_UNPROTECTED_V4\">","comments":"","outputs":1,"x":1589.8666381835938,"y":347,"z":"6dc3ee07.6f3c9","wires":[["1b50937b.47467d"]]},{"id":"1e8eee8f.1c8f41","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1458.866397857666,"y":777.9999532699585,"z":"6dc3ee07.6f3c9","wires":[["1297ddd5.55e232"]]},{"id":"b8f776c8.678198","type":"other","name":"AIC_ATM_PROTECTED_V4","xml":"<outcome value=\"AIC_ATM_PROTECTED_V4\">","comments":"","outputs":1,"x":1584.866455078125,"y":605.0000152587891,"z":"6dc3ee07.6f3c9","wires":[["a8bc86cd.e9adb8"]]},{"id":"c46ef9dd.702ad8","type":"set","name":"set ATM-U US/CALA","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"ATM-U US/CALA\"/>\n","comments":"","x":2779.616668701172,"y":339.25000381469727,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"a8bc86cd.e9adb8","type":"set","name":"set EIPAM ATM-P...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'ATM-P ' + $tmp.region`\"/>\n","comments":"","x":1814.7319641113281,"y":605.2500095367432,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"588def21.4b782","type":"set","name":"set EIPAM DP-U...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'DP-U ' + $tmp.region`\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1894.4822120666504,"y":412.25000762939453,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"14d5ccbc.b07fc3","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V4","xml":"<outcome value=\"AIC_DATA_PLANE_UNPROTECTED_V4\">","comments":"","outputs":1,"x":1623.482177734375,"y":411.00001525878906,"z":"6dc3ee07.6f3c9","wires":[["588def21.4b782"]]},{"id":"db5e463e.a76ce8","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V4","xml":"<outcome value=\"AIC_DATA_PLANE_PROTECTED_V4\">","comments":"","outputs":1,"x":1605.482177734375,"y":671.9999771118164,"z":"6dc3ee07.6f3c9","wires":[["cc123b02.749538"]]},{"id":"25ce3aeb.1c3556","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V4","xml":"<outcome value=\"AIC_DATA_PLANE_PRIVATE_V4\">","comments":"","outputs":1,"x":1596.482177734375,"y":475.00001525878906,"z":"6dc3ee07.6f3c9","wires":[["bf8177bc.929288"]]},{"id":"cc123b02.749538","type":"set","name":"set EIPAM DP-P...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'DP-P ' + $tmp.region`\"/>\n","comments":"","x":1857.4822082519531,"y":671.0000114440918,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"bf8177bc.929288","type":"set","name":"set EIPAM DP-Private...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'DP-Private ' + $tmp.region`\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1864.2322082519531,"y":473.75000953674316,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"1297ddd5.55e232","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"EIPAM Address Plan is not valid.\" />\n\t","comments":"","x":1645.4819984436035,"y":778.3002767562866,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"aede8b94.3dd928","type":"get-resource","name":"get-resource V4 - validate if level 1 pool exists already","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ;\"\n pfx='tmp.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":1363.8905334472656,"y":153.00000190734863,"z":"6dc3ee07.6f3c9","wires":[["979a0232.c8ca8","d3d655a1.81da98","d0f4f252.81e2f"]]},{"id":"48b02ca2.3c15d4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_POOLS failed.\" />\n\t","comments":"","x":1862.890365600586,"y":97.99999618530273,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"979a0232.c8ca8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1714.8904571533203,"y":135.99999618530273,"z":"6dc3ee07.6f3c9","wires":[["a8a45e63.55859"]]},{"id":"bd6316dd.01f488","type":"get-resource","name":"get-resource V6 - validate if level 1 pool does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ;\"\n pfx='tmp.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":1437.8904113769531,"y":987.4505271911621,"z":"6dc3ee07.6f3c9","wires":[["755fa51f.051f6c","acfb8f9c.8b719","7a94d503.2b709c"]]},{"id":"755fa51f.051f6c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1786.0333633422852,"y":942.4505395889282,"z":"6dc3ee07.6f3c9","wires":[["d76959c0.6c0b08"]]},{"id":"d76959c0.6c0b08","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_POOLS failed.\" />\n\t","comments":"","x":1891.8904132843018,"y":973.4505271911621,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"acfb8f9c.8b719","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1731.8904132843018,"y":1016.4505271911621,"z":"6dc3ee07.6f3c9","wires":[["6d0fdc64.45e2c4"]]},{"id":"a76a1da4.57966","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":926.9715576171875,"y":153,"z":"6dc3ee07.6f3c9","wires":[["9616eb47.081718","ae32d988.98a7b8","4dfeeca6.6acf74"]]},{"id":"9616eb47.081718","type":"other","name":"1","xml":"<outcome value='1'>","comments":"","outputs":1,"x":1105.9716491699219,"y":154,"z":"6dc3ee07.6f3c9","wires":[["aede8b94.3dd928"]]},{"id":"ae32d988.98a7b8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1109.9716796875,"y":188,"z":"6dc3ee07.6f3c9","wires":[["1d817bf1.6e6ed4"]]},{"id":"1d817bf1.6e6ed4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Please set the eipam-ip-block.level for appropriate EIPAM request.\" />\n\t","comments":"","x":1250.9715576171875,"y":187,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"7d2cc75f.256b88","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Please set the eipam-ip-block.level for appropriate EIPAM request.\" />\n\t","comments":"","x":1435.9715881347656,"y":817.0000152587891,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"5c12bfff.591ad","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":995.0525360107422,"y":987.1502380371094,"z":"6dc3ee07.6f3c9","wires":[["3091df64.495d8","c1ccb031.3b0dd","66b6b8f5.87f508"]]},{"id":"3091df64.495d8","type":"other","name":"1","xml":"<outcome value='1'>","comments":"","outputs":1,"x":1177.0525360107422,"y":988.1502380371094,"z":"6dc3ee07.6f3c9","wires":[["bd6316dd.01f488"]]},{"id":"c1ccb031.3b0dd","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1178.0525360107422,"y":1033.1502380371094,"z":"6dc3ee07.6f3c9","wires":[["cfa3c1cf.d3542"]]},{"id":"cfa3c1cf.d3542","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Please set the eipam-ip-block.level for appropriate EIPAM request.\" />\n\t","comments":"","x":1317.0525512695312,"y":1033.1502075195312,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"d3eb1f70.63b4f","type":"switchNode","name":"switch: tmp.region","xml":"<switch test=\"`$tmp.region`\">","comments":"","outputs":1,"x":358.61720275878906,"y":327,"z":"6dc3ee07.6f3c9","wires":[["2d405261.474d8e"]]},{"id":"2d405261.474d8e","type":"other","name":"USA","xml":"<outcome value=\"USA\">","comments":"","outputs":1,"x":529.6172103881836,"y":327,"z":"6dc3ee07.6f3c9","wires":[["7d12cbbb.84e944"]]},{"id":"7d12cbbb.84e944","type":"set","name":"set: region to US","xml":"<set>\n\t<parameter name=\"tmp.region\" value=\"US\" />\n","comments":"","x":685.6172103881836,"y":327,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"6e747bb2.c77de4","type":"switchNode","name":"switch: tmp.region","xml":"<switch test=\"`$tmp.region`\">","comments":"","outputs":1,"x":1847.6450500488281,"y":283.7500057220459,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"ea6b61f4.f3c03","type":"other","name":"US","xml":"<outcome value=\"US\">","comments":"","outputs":1,"x":2588.1450576782227,"y":340.25000381469727,"z":"6dc3ee07.6f3c9","wires":[["c46ef9dd.702ad8"]]},{"id":"ec65c0d5.ad202","type":"other","name":"CALA","xml":"<outcome value=\"CALA\">","comments":"","outputs":1,"x":2588.145050048828,"y":379.25000381469727,"z":"6dc3ee07.6f3c9","wires":[["c46ef9dd.702ad8"]]},{"id":"1b50937b.47467d","type":"set","name":"set EIPAM ATM-U...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'ATM-U ' + $tmp.region`\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1831.3718528747559,"y":348.7500057220459,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"9b8273cf.516a7","type":"other","name":"US","xml":"<outcome value=\"US\">","comments":"","outputs":1,"x":2159.6500854492188,"y":413,"z":"6dc3ee07.6f3c9","wires":[["50068753.808278"]]},{"id":"f5544ca1.d2498","type":"other","name":"CALA","xml":"<outcome value=\"CALA\">","comments":"","outputs":1,"x":2162.6500854492188,"y":445,"z":"6dc3ee07.6f3c9","wires":[["50068753.808278"]]},{"id":"df5f268.74b93d8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2164.1217651367188,"y":479,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"50068753.808278","type":"set","name":"set EIPAM DP-U US/CALA","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"DP-U US/CALA\"/>\n","comments":"","x":2352.1217651367188,"y":422,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"354f6964.9359f6","type":"other","name":"US","xml":"<outcome value=\"US\">","comments":"","outputs":1,"x":2060.1217651367188,"y":519,"z":"6dc3ee07.6f3c9","wires":[["8ed8c8a6.0a2b88"]]},{"id":"55bc8b35.36fae4","type":"other","name":"CALA","xml":"<outcome value=\"CALA\">","comments":"","outputs":1,"x":2063.1217651367188,"y":551,"z":"6dc3ee07.6f3c9","wires":[["8ed8c8a6.0a2b88"]]},{"id":"4a22e406.2769ec","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2064.5934448242188,"y":587,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"8ed8c8a6.0a2b88","type":"set","name":"set EIPAM DP-Private US/CALA","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"DP-Private US/CALA\"/>\n","comments":"","x":2262.121826171875,"y":533,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"3ea5f5f2.660d4a","type":"save","name":"insert EIPAM_IP_POOLS for level 1 V4","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_POOLS\n SET\n key_name = $tmp.v4-level1-key-name ,\n key_value = $tmp.level1-key-value ,\n level = 1 ,\n plan_name = $network-model.eipam-v4-address-plan ,\n address_family = $network-model.ipv4-ip-version ,\n parent_pool = $tmp.v4-qip-pool ,\n service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-v4pool-row'>\n","comments":"","outputs":1,"x":1649.3138122558594,"y":2026.9009246826172,"z":"6dc3ee07.6f3c9","wires":[["4fc3b13.1b5e75","cb1fbb3e.9ae378","9d9c30f0.bfcd6"]]},{"id":"4f20cdc5.ce5d74","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":316.31373596191406,"y":2024.9009094238281,"z":"6dc3ee07.6f3c9","wires":[["c756b985.74f438","d7077282.32388","7dde4fe0.5fed5"]]},{"id":"d7077282.32388","type":"other","name":"NULL","xml":"<outcome value=\"\">","comments":"","outputs":1,"x":512.3137969970703,"y":2057.900909423828,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"c756b985.74f438","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":511.31382751464844,"y":2022.900894165039,"z":"6dc3ee07.6f3c9","wires":[["eafb15f2.ced188"]]},{"id":"54364f4e.86c9","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1045.3137664794922,"y":2025.9009094238281,"z":"6dc3ee07.6f3c9","wires":[["d1ac24b0.594b48","55c4a88b.3bbf18"]]},{"id":"7dde4fe0.5fed5","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":512.2032012939453,"y":2088.295196533203,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"d1ac24b0.594b48","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":1245.3137664794922,"y":2025.9009094238281,"z":"6dc3ee07.6f3c9","wires":[["c5a5d0d6.05f92","8c62f6ce.ae9f38"]]},{"id":"c5a5d0d6.05f92","type":"other","name":"1","xml":"<outcome value='1'>","comments":"","outputs":1,"x":1430.5239715576172,"y":2026.9009246826172,"z":"6dc3ee07.6f3c9","wires":[["3ea5f5f2.660d4a"]]},{"id":"8c62f6ce.ae9f38","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1429.5239715576172,"y":2064.900924682617,"z":"6dc3ee07.6f3c9","wires":[["892ac8ba.478b28"]]},{"id":"ac181a44.58b678","type":"switchNode","name":"switch: network-model.eipam-v6-address-plan","xml":"<switch test=\"`$network-model.eipam-v6-address-plan`\">","comments":"","outputs":1,"x":1309.8605346679688,"y":1242.6006164550781,"z":"6dc3ee07.6f3c9","wires":[["998c14eb.3f7248","80c73b8c.18b6f8","a88b17f9.0808e8","196b5b3a.8bc225","31c46282.a455fe","f3fa83c7.d2a72","8e27759a.8d4fc8"]]},{"id":"998c14eb.3f7248","type":"other","name":"AIC_ATM_UNPROTECTED_V6","xml":"<outcome value=\"AIC_ATM_UNPROTECTED_V6\">","comments":"","outputs":1,"x":1657.8606901168823,"y":1239.6006164550781,"z":"6dc3ee07.6f3c9","wires":[["6031017.2f6c7"]]},{"id":"f3fa83c7.d2a72","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1667.8606567382812,"y":1619.6006469726562,"z":"6dc3ee07.6f3c9","wires":[["1bbf3844.a518e8"]]},{"id":"80c73b8c.18b6f8","type":"other","name":"AIC_ATM_PROTECTED_V6","xml":"<outcome value=\"AIC_ATM_PROTECTED_V6\">","comments":"","outputs":1,"x":1658.8606567382812,"y":1361.6006164550781,"z":"6dc3ee07.6f3c9","wires":[["b61678d6.a75618"]]},{"id":"2d4b0cbe.c106a4","type":"set","name":"set ATM-U US/CALA","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"ATM-U US/CALA\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2925.861083984375,"y":1132.6006546020508,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"a88b17f9.0808e8","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_UNPROTECTED_V6\">","comments":"","outputs":1,"x":1692.4761962890625,"y":1409.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["9c87b3d0.2a4ab"]]},{"id":"196b5b3a.8bc225","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PROTECTED_V6\">","comments":"","outputs":1,"x":1687.4762573242188,"y":1580.6006774902344,"z":"6dc3ee07.6f3c9","wires":[["ffc23e8a.ea5e7"]]},{"id":"31c46282.a455fe","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PRIVATE_V6\">","comments":"","outputs":1,"x":1672.4762573242188,"y":1514.6006164550781,"z":"6dc3ee07.6f3c9","wires":[["260b6372.66e11c"]]},{"id":"683ba220.bdfd4c","type":"set","name":"set EIPAM DP-Private...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'DP-Private ' + $tmp.region`\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2980.4761962890625,"y":1543.6006546020508,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"1bbf3844.a518e8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"EIPAM Address Plan is not valid.\" />\n\t","comments":"","x":1816.4764976501465,"y":1618.9008083343506,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"f198d989.da91f8","type":"other","name":"US","xml":"<outcome value=\"US\">","comments":"","outputs":1,"x":2734.3894119262695,"y":1133.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["2d4b0cbe.c106a4"]]},{"id":"1a4744ba.b6db7b","type":"other","name":"CALA","xml":"<outcome value=\"CALA\">","comments":"","outputs":1,"x":2734.389404296875,"y":1172.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["2d4b0cbe.c106a4"]]},{"id":"fe10c05f.fd8f2","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2737.1160888671875,"y":1205.6006927490234,"z":"6dc3ee07.6f3c9","wires":[["ce940217.e14ff"]]},{"id":"ce940217.e14ff","type":"set","name":"set EIPAM ATM-U...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'ATM-U ' + $tmp.region`\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2920.1161499023438,"y":1209.6006546020508,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"1f26bc21.ed2444","type":"other","name":"US","xml":"<outcome value=\"US\">","comments":"","outputs":1,"x":2757.644287109375,"y":1332.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["fa8eca78.b78638"]]},{"id":"a4b8515f.1e731","type":"other","name":"CALA","xml":"<outcome value=\"CALA\">","comments":"","outputs":1,"x":2760.644287109375,"y":1364.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["fa8eca78.b78638"]]},{"id":"5d47f6cc.d34df8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2762.115966796875,"y":1398.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["fc2eb964.bbd8e8"]]},{"id":"5b545946.be5228","type":"other","name":"US","xml":"<outcome value=\"US\">","comments":"","outputs":1,"x":2775.1158447265625,"y":1482.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["58832e6d.14734"]]},{"id":"3fc23e86.c0b2e2","type":"other","name":"CALA","xml":"<outcome value=\"CALA\">","comments":"","outputs":1,"x":2778.1158447265625,"y":1514.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["58832e6d.14734"]]},{"id":"2e39e070.22d6b","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2779.5875244140625,"y":1550.6006546020508,"z":"6dc3ee07.6f3c9","wires":[["683ba220.bdfd4c"]]},{"id":"58832e6d.14734","type":"set","name":"set EIPAM DP-Private US/CALA","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"DP-Private US/CALA\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2977.1159057617188,"y":1496.6006546020508,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"892ac8ba.478b28","type":"save","name":"insert EIPAM_IP_POOLS for level 2 V4","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_POOLS\n SET\n key_name = $tmp.v4-level2-key-name ,\n key_value = $tmp.level2-key-value ,\n level = 2 ,\n plan_name = $network-model.eipam-v4-address-plan ,\n address_family = $network-model.ipv4-ip-version ,\n parent_pool = $tmp.level1-key-value ,\n service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-v4pool-row'>\n","comments":"","outputs":1,"x":1647.8362121582031,"y":2065.7509384155273,"z":"6dc3ee07.6f3c9","wires":[["4fc3b13.1b5e75","cb1fbb3e.9ae378","9d9c30f0.bfcd6"]]},{"id":"ee635c77.3edaa","type":"save","name":"insert EIPAM_IP_POOLS for level 1 V6","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_POOLS\n SET\n key_name = $tmp.v6-level1-key-name ,\n key_value = $tmp.level1-key-value ,\n level = 1 ,\n plan_name = $network-model.eipam-v6-address-plan ,\n address_family = $network-model.ipv6-ip-version ,\n parent_pool = $tmp.v6-qip-pool ,\n service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-v6pool-row'>\n","comments":"","outputs":1,"x":1646.5000305175781,"y":2187.900924682617,"z":"6dc3ee07.6f3c9","wires":[["80223e6e.1e1bc","cb1fbb3e.9ae378","9d9c30f0.bfcd6"]]},{"id":"81702e48.02ed2","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":315.4999694824219,"y":2183.900909423828,"z":"6dc3ee07.6f3c9","wires":[["4269ade.b697754","fa55f05.ad22e1","1c5e05b8.c0b46a"]]},{"id":"fa55f05.ad22e1","type":"other","name":"NULL","xml":"<outcome value=\"\">","comments":"","outputs":1,"x":511.5000305175781,"y":2216.900909423828,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"4269ade.b697754","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":510.50006103515625,"y":2181.900894165039,"z":"6dc3ee07.6f3c9","wires":[["ff7097a5.2445a8"]]},{"id":"75ad3e3.bae7ac","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1062.5,"y":2185.900909423828,"z":"6dc3ee07.6f3c9","wires":[["b043e234.3ccba","c7888924.cf81f8"]]},{"id":"1c5e05b8.c0b46a","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":511.3894348144531,"y":2247.295196533203,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"b043e234.3ccba","type":"switchNode","name":"switch: eipam-ip-block.level","xml":"<switch test=\"`$eipam-ip-block.level`\">","comments":"","outputs":1,"x":1265.4999694824219,"y":2159.900909423828,"z":"6dc3ee07.6f3c9","wires":[["480befa6.aff2d","843fced5.bca99"]]},{"id":"480befa6.aff2d","type":"other","name":"1","xml":"<outcome value='1'>","comments":"","outputs":1,"x":1426.7102508544922,"y":2188.900924682617,"z":"6dc3ee07.6f3c9","wires":[["ee635c77.3edaa"]]},{"id":"843fced5.bca99","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1428.710189819336,"y":2223.900924682617,"z":"6dc3ee07.6f3c9","wires":[["682ef59d.bd6ccc"]]},{"id":"682ef59d.bd6ccc","type":"save","name":"insert EIPAM_IP_POOLS for level 2 V6","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_POOLS\n SET\n key_name = $tmp.v6-level2-key-name ,\n key_value = $tmp.level2-key-value ,\n level = 2 ,\n plan_name = $network-model.eipam-v6-address-plan ,\n address_family = $network-model.ipv6-ip-version ,\n parent_pool = $tmp.level1-key-value ,\n service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,\n network_id = $tmp.network-id ; \"\n force='true'\n pfx='pfx.eipam-v6pool-row'>\n","comments":"","outputs":1,"x":1647.022476196289,"y":2224.750778198242,"z":"6dc3ee07.6f3c9","wires":[["80223e6e.1e1bc","cb1fbb3e.9ae378","9d9c30f0.bfcd6"]]},{"id":"94b879b3.2c6d48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />\n","comments":"","x":2105.8364219665527,"y":2111.351348876953,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"80223e6e.1e1bc","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1938.8364562988281,"y":2197.201202392578,"z":"6dc3ee07.6f3c9","wires":[["94b879b3.2c6d48"]]},{"id":"4fc3b13.1b5e75","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1960.8364562988281,"y":2040.2012023925781,"z":"6dc3ee07.6f3c9","wires":[["94b879b3.2c6d48"]]},{"id":"d3d655a1.81da98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1713.7522430419922,"y":99.99999618530273,"z":"6dc3ee07.6f3c9","wires":[["48b02ca2.3c15d4"]]},{"id":"d0f4f252.81e2f","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1374.7523193359375,"y":228.99999618530273,"z":"6dc3ee07.6f3c9","wires":[["1cadfb2f.7c4855"]]},{"id":"7a94d503.2b709c","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1496.9744873046875,"y":1077.4504699707031,"z":"6dc3ee07.6f3c9","wires":[["d4642437.67b8a8"]]},{"id":"ab1f59fa.bc8a28","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />\n","comments":"","x":2290.974609375,"y":959.4505004882812,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"de6d3f5d.9271","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />\n","comments":"","x":254.07363891601562,"y":2269.501739501953,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"4a355dc8.b91904","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1011.6351699829102,"y":1803.2012023925781,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"cb1fbb3e.9ae378","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1938.6353149414062,"y":2137.351348876953,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"9d9c30f0.bfcd6","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1939.3140258789062,"y":2093.351348876953,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"4da2c6f8.8fd8f8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Please set the eipam-ip-block.level for appropriate EIPAM request.\" />\n\t","comments":"","x":1550.3139953613281,"y":1652.6006164550781,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"4e418bcf.7dd274","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1293.401008605957,"y":898.0000381469727,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"8d5048f5.5af5f8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1412.4010314941406,"y":1724.7507629394531,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"4270a1fe.6fc57","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 1 already exists, SKIP.\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>\n","comments":"","outputs":1,"x":2029.83935546875,"y":130.99999618530273,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"1cadfb2f.7c4855","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":803.4609680175781,"y":614.0000305175781,"z":"6dc3ee07.6f3c9","wires":[["4e295a6e.146bd4","150e6bd8.81df94","a21e5aab.edf9e8","f6408602.6c6e38","5be47438.2e9b1c"]]},{"id":"4dfeeca6.6acf74","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1109.4609375,"y":219,"z":"6dc3ee07.6f3c9","wires":[["1cadfb2f.7c4855"]]},{"id":"36e65a91.f23396","type":"switchNode","name":"switch: tmp.create-v4-pool-flag","xml":"<switch test=\"`$tmp.create-v4-pool-flag`\">","comments":"","outputs":1,"x":836.1005096435547,"y":2024.3513488769531,"z":"6dc3ee07.6f3c9","wires":[["45812ad5.8fc274","f1ff3af9.fb01b8"]]},{"id":"eafb15f2.ced188","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":652.1005096435547,"y":2071.351348876953,"z":"6dc3ee07.6f3c9","wires":[["36e65a91.f23396"]]},{"id":"ff7097a5.2445a8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":654.1005096435547,"y":2213.351348876953,"z":"6dc3ee07.6f3c9","wires":[["d466e078.d4e8b"]]},{"id":"d466e078.d4e8b","type":"switchNode","name":"switch: tmp.create-v6-pool-flag","xml":"<switch test=\"`$tmp.create-v6-pool-flag`\">","comments":"","outputs":1,"x":833.1005249023438,"y":2182.351348876953,"z":"6dc3ee07.6f3c9","wires":[["ed3cdb83.f7b648","345e8d8e.846422"]]},{"id":"45812ad5.8fc274","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1020.0675659179688,"y":1978.5014953613281,"z":"6dc3ee07.6f3c9","wires":[["54364f4e.86c9"]]},{"id":"f1ff3af9.fb01b8","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1030.0675659179688,"y":2077.501495361328,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"ed3cdb83.f7b648","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1029.0675659179688,"y":2141.501495361328,"z":"6dc3ee07.6f3c9","wires":[["75ad3e3.bae7ac"]]},{"id":"345e8d8e.846422","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1031.0675659179688,"y":2239.501495361328,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"ea8f54b6.fbc178","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v6-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 1 already exists, SKIP.\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>","comments":"","outputs":1,"x":2025.01953125,"y":1019.4505004882812,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"d4642437.67b8a8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":973.5090789794922,"y":1395.9009094238281,"z":"6dc3ee07.6f3c9","wires":[["ac181a44.58b678","dd380ea7.76015","8d6278e2.6e90d8","e1049ec5.94e4f","8da006d2.7f55a8"]]},{"id":"66b6b8f5.87f508","type":"other","name":"2","xml":"<outcome value='2'>","comments":"","outputs":1,"x":1180.8153076171875,"y":1074.4505004882812,"z":"6dc3ee07.6f3c9","wires":[["d4642437.67b8a8"]]},{"id":"9ed33bd1.14ef08","type":"switchNode","name":"switch: tmp.create-v4-pool-flag","xml":"<switch test=\"`$tmp.create-v4-pool-flag`\">","comments":"","outputs":1,"x":322.26275634765625,"y":1659.5014953613281,"z":"6dc3ee07.6f3c9","wires":[["519b37d4.1c93f8","d1d416bf.13e748"]]},{"id":"519b37d4.1c93f8","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":527.2627563476562,"y":1661.5014953613281,"z":"6dc3ee07.6f3c9","wires":[["dacc275b.c28ca8"]]},{"id":"d1d416bf.13e748","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":527.2627563476562,"y":1713.5014953613281,"z":"6dc3ee07.6f3c9","wires":[["191d33d1.417a7c"]]},{"id":"191d33d1.417a7c","type":"switchNode","name":"switch: tmp.create-v6-pool-flag","xml":"<switch test=\"`$tmp.create-v6-pool-flag`\">","comments":"","outputs":1,"x":391.26275634765625,"y":1823.5014953613281,"z":"6dc3ee07.6f3c9","wires":[["2675fdbd.2ff072","49ecfe56.73744"]]},{"id":"2675fdbd.2ff072","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":582.3138732910156,"y":1827.2012023925781,"z":"6dc3ee07.6f3c9","wires":[["dacc275b.c28ca8"]]},{"id":"55c4a88b.3bbf18","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.v4-level1-key-name`\"/>\n<parameter name=\"field6\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field7\" value=\"`$tmp.v4-level2-key-name`\"/>\n<parameter name=\"field8\" value=\"`$tmp.level2-key-value`\"/>\n<parameter name=\"field9\" value=\"`$network-model.network-role`\"/>\n<parameter name=\"field10\" value=\"`$tmp.network-id`\"/>\n<parameter name=\"field11\" value=\"Saving to EIPAM_IP_POOLS table.\"/>\n","comments":"","outputs":1,"x":1187.611171722412,"y":2070.6517515182495,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"c7888924.cf81f8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v6-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.v6-level1-key-name`\"/>\n<parameter name=\"field6\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field7\" value=\"`$tmp.v6-level2-key-name`\"/>\n<parameter name=\"field8\" value=\"`$tmp.level2-key-value`\"/>\n<parameter name=\"field9\" value=\"`$network-model.network-role`\"/>\n<parameter name=\"field10\" value=\"`$tmp.network-id`\"/>\n<parameter name=\"field11\" value=\"Saving to EIPAM_IP_POOLS table.\"/>\n","comments":"","outputs":1,"x":1196.611083984375,"y":2241.6515197753906,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"a8a45e63.55859","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1865.590087890625,"y":135.99999618530273,"z":"6dc3ee07.6f3c9","wires":[["4270a1fe.6fc57","b85dffae.db0b"]]},{"id":"b85dffae.db0b","type":"set","name":"set eipam-pool.v4.pre-existing","xml":"<set>\n\t<parameter name=\"eipam-pool.v4.pre-existing\" value=\"true\"/>\n","comments":"","x":2068.590087890625,"y":174.99999618530273,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"3315c8cc.a1f408","type":"set","name":"set eipam-pool.v6.pre-existing","xml":"<set>\n\t<parameter name=\"eipam-pool.v6.pre-existing\" value=\"true\"/>\n","comments":"","x":2088.689208984375,"y":1065.4505004882812,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"6d0fdc64.45e2c4","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1881.587158203125,"y":1015.4504699707031,"z":"6dc3ee07.6f3c9","wires":[["ea8f54b6.fbc178","3315c8cc.a1f408"]]},{"id":"49ecfe56.73744","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":581.5780639648438,"y":1880.3513488769531,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"a58ac782.1df4c8","type":"get-resource","name":"get-resource V4 - validate if level 2 pool exists already","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * FROM EIPAM_IP_POOLS where plan_name = $network-model.eipam-v4-address-plan and parent_pool = $tmp.v4-level1-key-value and level = 2 and key_value = $tmp.v4-level2-key-value ;\"\n pfx='tmp.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":1781.635009765625,"y":218.99999618530273,"z":"6dc3ee07.6f3c9","wires":[["d3d655a1.81da98","d441f2ab.dcc1"]]},{"id":"d441f2ab.dcc1","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2100.460693359375,"y":225.99999618530273,"z":"6dc3ee07.6f3c9","wires":[["333eed20.e7d002"]]},{"id":"5c0a8e64.9776a","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v4-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 2 already exists, SKIP.\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>\n<parameter name=\"field8\" value=\"`$tmp.level2-key-value`\"/>","comments":"","outputs":1,"x":2393.460693359375,"y":203.99999618530273,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"333eed20.e7d002","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2248.21142578125,"y":224.99999618530273,"z":"6dc3ee07.6f3c9","wires":[["5c0a8e64.9776a","ccaeba29.4acba8"]]},{"id":"ccaeba29.4acba8","type":"set","name":"set eipam-pool.v4.pre-existing","xml":"<set>\n\t<parameter name=\"eipam-pool.v4.pre-existing\" value=\"true\"/>\n\t<parameter name=\"tmp.eipam-pool-row.pool-id\" value=\"$tmp.eipam-pool-row\"/>\t\n","comments":"","x":2463.21142578125,"y":242.99999618530273,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"412eb16f.56358","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2108.7882080078125,"y":1134.6006164550781,"z":"6dc3ee07.6f3c9","wires":[["a043a4f0.fddc18"]]},{"id":"a9b4d095.e336b","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"eipam-create-network-role-pool\"/>\n<parameter name=\"field4\" value=\"`$network-model.eipam-v6-address-plan`\"/>\n<parameter name=\"field5\" value=\"`$tmp.v6-level1-key-value`\"/>\n<parameter name=\"field6\" value=\"Level 2 already exists, SKIP.\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-pool-row.pool-id`\"/>\n<parameter name=\"field8\" value=\"`$tmp.level2-key-value`\"/>","comments":"","outputs":1,"x":2423.7882080078125,"y":1115.6006164550781,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"a043a4f0.fddc18","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2259.5389404296875,"y":1120.6006164550781,"z":"6dc3ee07.6f3c9","wires":[["a9b4d095.e336b","48066cd9.ab0d14"]]},{"id":"48066cd9.ab0d14","type":"set","name":"set eipam-pool.v6.pre-existing","xml":"<set>\n\t<parameter name=\"eipam-pool.v6.pre-existing\" value=\"true\"/>\n","comments":"","x":2462.5389404296875,"y":1159.6006164550781,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"7999536.e89ceac","type":"get-resource","name":"get-resource V6 - validate if level 2 pool exists already","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * FROM EIPAM_IP_POOLS where plan_name = $network-model.eipam-v6-address-plan and parent_pool = $tmp.v6-level1-key-value and level = 2 and key_value = $tmp.v6-level2-key-value ;\"\n pfx='tmp.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":1814.7880859375,"y":1155.4504699707031,"z":"6dc3ee07.6f3c9","wires":[["755fa51f.051f6c","412eb16f.56358"]]},{"id":"d6a82de8.b3cde","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2579.856231689453,"y":313.2612190246582,"z":"6dc3ee07.6f3c9","wires":[["c46ef9dd.702ad8"]]},{"id":"57216709.5730d8","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2153.1062622070312,"y":384.0111999511719,"z":"6dc3ee07.6f3c9","wires":[["50068753.808278"]]},{"id":"a592aecf.0ca4f","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2042.1062622070312,"y":496.0111389160156,"z":"6dc3ee07.6f3c9","wires":[["8ed8c8a6.0a2b88"]]},{"id":"3a2161a3.8dec4e","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2733.1064453125,"y":1096.0111770629883,"z":"6dc3ee07.6f3c9","wires":[["2d4b0cbe.c106a4"]]},{"id":"73369c47.a3a034","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2740.1063232421875,"y":1310.0111770629883,"z":"6dc3ee07.6f3c9","wires":[["fa8eca78.b78638"]]},{"id":"2d62d630.f2cbaa","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2763.106201171875,"y":1460.0111770629883,"z":"6dc3ee07.6f3c9","wires":[["58832e6d.14734"]]},{"id":"fa8eca78.b78638","type":"set","name":"set EIPAM DP-U US/CALA","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"DP-U US/CALA\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2992.1063232421875,"y":1334.0111770629883,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"fc2eb964.bbd8e8","type":"set","name":"set EIPAM DP-U...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'DP-U ' + $tmp.region`\"/>\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":2952.1063232421875,"y":1400.0111770629883,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"6031017.2f6c7","type":"set","name":"set EIPAM ATM-U-V6...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'ATM-U-V6 ' + $tmp.region`\"/>\n","comments":"","x":1920.50634765625,"y":1240.9999465942383,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"b61678d6.a75618","type":"set","name":"set EIPAM ATM-P-V6...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'ATM-P-V6 ' + $tmp.region`\"/>\n","comments":"","x":1919.5062255859375,"y":1360.9999465942383,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"9c87b3d0.2a4ab","type":"set","name":"set EIPAM AIC-DP-U-V6...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'AIC-DP-U-V6 ' + $tmp.region`\"/>\n\t<parameter name=\"tmp.v6-level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.v6-level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />\n","comments":"","x":1993.106201171875,"y":1408.9999465942383,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"260b6372.66e11c","type":"set","name":"set EIPAM AIC-DP-PRIVATE-V6...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'AIC-DP-PRIVATE-V6 ' + $tmp.region`\"/>\n\t<parameter name=\"tmp.v6-level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.v6-level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />\n","comments":"","x":1943.106201171875,"y":1514.9999465942383,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"ffc23e8a.ea5e7","type":"set","name":"set EIPAM AIC-DP-P-V6...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'AIC-DP-P-V6 ' + $tmp.region`\"/>\n\t<parameter name=\"tmp.v6-level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.v6-level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />\n","comments":"","x":1974.106201171875,"y":1577.9999465942383,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"2d4ba575.af754a","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2067.106201171875,"y":739.8000411987305,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"4f23f0e5.6fcf8","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2065.106201171875,"y":706.8000335693359,"z":"6dc3ee07.6f3c9","wires":[["b9a94ee7.e0806"]]},{"id":"b9a94ee7.e0806","type":"set","name":"set EIPAM DP-P CALA...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"DP-P CALA\"/>\n","comments":"","x":2247.3060913085938,"y":703.8000030517578,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"8ba23c37.a01ef","type":"other","name":"CA","xml":"<outcome value=\"CA\">","comments":"","outputs":1,"x":2469.5562438964844,"y":612.55002784729,"z":"6dc3ee07.6f3c9","wires":[["5eeb30ec.4871b"]]},{"id":"5eeb30ec.4871b","type":"set","name":"set EIPAM ATM-P CALA...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"ATM-P CALA\"/>\n","comments":"","x":2651.756134033203,"y":609.5499973297119,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"d6168e7a.a83d2","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2474.5562438964844,"y":648.55002784729,"z":"6dc3ee07.6f3c9","wires":[[]]},{"id":"500be3dd.629e5c","type":"other","name":"AIC_AIM_LANDING_NETWORK_V4","xml":"<outcome value=\"AIC_AIM_LANDING_NETWORK_V4\">","comments":"","outputs":1,"x":1572.5062255859375,"y":727.0000076293945,"z":"6dc3ee07.6f3c9","wires":[["8db5c326.7d3e5"]]},{"id":"8db5c326.7d3e5","type":"set","name":"set AIC-AIM-LANDING-V4...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'AIC-AIM-LANDING-V4 ' + $tmp.region`\"/>\n\t<parameter name=\"tmp.v4-level1-key-name\" value=\"CLLI:CLOUD_REGION\" />\n\t<parameter name=\"tmp.v4-level2-key-name\" value=\"NETWORK_ROLE:NETWORK_ID\" />\n","comments":"","x":1852.0062522888184,"y":727.2500114440918,"z":"6dc3ee07.6f3c9","wires":[]},{"id":"8e27759a.8d4fc8","type":"other","name":"AIC_AIM_LANDING_NETWORK_V6","xml":"<outcome value=\"AIC_AIM_LANDING_NETWORK_V6\">","comments":"","outputs":1,"x":1680,"y":1293.75,"z":"6dc3ee07.6f3c9","wires":[["915104aa.5dac18"]]},{"id":"915104aa.5dac18","type":"set","name":"set AIC-AIM-LANDING-V6...","xml":"<set>\n\t<parameter name=\"tmp.qip-pool\" value=\"`'AIC-AIM-LANDING-V6 ' + $tmp.region`\"/>\n\n","comments":"","x":1959.5000267028809,"y":1294.0000038146973,"z":"6dc3ee07.6f3c9","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-l3network-network-id.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-l3network-network-id.json
new file mode 100644
index 00000000..e0a41e99
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-l3network-network-id.json
@@ -0,0 +1,398 @@
+[
+ {
+ "id": "32a337db.ae5aa8",
+ "type": "execute",
+ "name": "execute: generateUUID",
+ "xml": "<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-l3network-network-id.uuid\" />",
+ "comments": "",
+ "outputs": 1,
+ "x": 475.8888854980469,
+ "y": 396.50000381469727,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "aee3b0da.c79fb"
+ ]
+ ]
+ },
+ {
+ "id": "aee3b0da.c79fb",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 671.6388931274414,
+ "y": 396.50000381469727,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "2e6b8196.18f09e"
+ ]
+ ]
+ },
+ {
+ "id": "2e6b8196.18f09e",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<!-- Used to work around execute node bug -->\n\t<parameter name=\"execute_failure\" value=\"false\" />\n\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"An error occured while generating a UUID for L3-NETWORK.\" />",
+ "comments": "",
+ "x": 836.6388931274414,
+ "y": 396.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "19e3e967.c281b7",
+ "type": "get-resource",
+ "name": "Query AnAI - l3-network",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"l3-network\"\n key=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\"\n local-only=\"false\"\n pfx=\"tmp.local-variables.generate-l3network-network-id.L3NETWORK\" >",
+ "comments": "",
+ "outputs": 1,
+ "x": 601.1388931274414,
+ "y": 487.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "2807c6fa.8fbd4a",
+ "94e9ced3.238",
+ "4ecb327.82397cc",
+ "a2e8b62.4d66748"
+ ]
+ ]
+ },
+ {
+ "id": "c1a23e2e.3f106",
+ "type": "for",
+ "name": "for n: true",
+ "xml": "<for atomic=\"true\" index=\"n\" start=\"0\" end=\"1\" >",
+ "comments": "",
+ "outputs": 1,
+ "x": 425.1388931274414,
+ "y": 487.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "19e3e967.c281b7"
+ ]
+ ]
+ },
+ {
+ "id": "2807c6fa.8fbd4a",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 805.6388931274414,
+ "y": 487.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "6fcc46f3.9af1a8"
+ ]
+ ]
+ },
+ {
+ "id": "94e9ced3.238",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 801.6388931274414,
+ "y": 567.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "537fe43b.f1146c"
+ ]
+ ]
+ },
+ {
+ "id": "4ecb327.82397cc",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 810.6388931274414,
+ "y": 527.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "4292e2a6.5346ac"
+ ]
+ ]
+ },
+ {
+ "id": "537fe43b.f1146c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status=\"failure\">\n\t<!-- return parameters -->\n\t<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`\" />",
+ "comments": "",
+ "x": 968.1389007568359,
+ "y": 592.7500066757202,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "6fcc46f3.9af1a8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 963.6388931274414,
+ "y": 487.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "17797a19.8abea6",
+ "4e358d48.be92b4"
+ ]
+ ]
+ },
+ {
+ "id": "17797a19.8abea6",
+ "type": "set",
+ "name": "set: ...local...is-unique = 0",
+ "xml": "<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.is-unique\" value=\"0\" />",
+ "comments": "",
+ "x": 1181.1389465332031,
+ "y": 487.7500066757202,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "4e358d48.be92b4",
+ "type": "execute",
+ "name": "execute: generateUUID",
+ "xml": "<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-l3network-network-id.uuid\" />",
+ "comments": "",
+ "outputs": 1,
+ "x": 1174.6388931274414,
+ "y": 527.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "4cf76132.02956"
+ ]
+ ]
+ },
+ {
+ "id": "4cf76132.02956",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1361.6388931274414,
+ "y": 527.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "dea8bdbf.c6534"
+ ]
+ ]
+ },
+ {
+ "id": "dea8bdbf.c6534",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"An error occured while generating a UUID for L3-NETWORK.\" />",
+ "comments": "",
+ "x": 1515.6388931274414,
+ "y": 527.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "4292e2a6.5346ac",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 941.6388931274414,
+ "y": 527.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "dfc540f2.ccff2",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 182.13888931274414,
+ "y": 84,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "b386b9cc.e3d508"
+ ]
+ ]
+ },
+ {
+ "id": "b386b9cc.e3d508",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 206.13888549804688,
+ "y": 130.25,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "a7f05089.bec56"
+ ]
+ ]
+ },
+ {
+ "id": "a7f05089.bec56",
+ "type": "method",
+ "name": "method generate-l3network-network-id",
+ "xml": "<method rpc=\"generate-l3network-network-id\" mode=\"sync\">",
+ "comments": "",
+ "outputs": 1,
+ "x": 291.8888854980469,
+ "y": 182.75,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "34f40852.137a58"
+ ]
+ ]
+ },
+ {
+ "id": "f5b14600.c43d28",
+ "type": "comment",
+ "name": "GENERIC-RESOURCE-API: GENERATE-L3NETWORK-NETWORK-ID",
+ "info": "",
+ "comments": "",
+ "x": 733.6389007568359,
+ "y": 90.24999809265137,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "34f40852.137a58",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 243.6388931274414,
+ "y": 307.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "32a337db.ae5aa8",
+ "c1a23e2e.3f106",
+ "6d1bc386.49356c",
+ "2d49b311.80b8cc"
+ ]
+ ]
+ },
+ {
+ "id": "de1da0bf.8163b",
+ "type": "comment",
+ "name": "LOOP UNTIL GENERATED NETWORK-ID ISN'T FOUND IN A&AI",
+ "info": "",
+ "comments": "",
+ "x": 644.8888854980469,
+ "y": 444.0000047683716,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "6ed54c0.6154fb4",
+ "type": "comment",
+ "name": "GENERATE A NETWORK-ID",
+ "info": "",
+ "comments": "",
+ "x": 508.6388854980469,
+ "y": 354.00000286102295,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "6d1bc386.49356c",
+ "type": "set",
+ "name": "unset: local-variables & return",
+ "xml": "<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.\" value=\"\" />\n\t<parameter name=\"tmp.return.generate-l3network-network-id.\" value=\"\" />",
+ "comments": "",
+ "x": 494.6388931274414,
+ "y": 307.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "b0ae69a3.56e508",
+ "type": "comment",
+ "name": "CLEANUP LOCAL VARIABLES TO BE USED",
+ "info": "",
+ "comments": "",
+ "x": 578.8888854980469,
+ "y": 264.00000190734863,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "5a56764d.91fa68",
+ "type": "comment",
+ "name": "GLOBAL VARIABLES USED",
+ "info": "// RETURN VALUES\nerror-message.generate-l3network-network-id\ntmp.return.generate-l3network-network-id.uuid\n\n// LOCAL VARIABLES (erased at beginning & end of DG)\ntmp.local-variables.generate-l3network-network-id.*\ntmp.return.generate-l3network-network-id.*\n",
+ "comments": "",
+ "x": 720.138916015625,
+ "y": 130.24999809265137,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "2d49b311.80b8cc",
+ "type": "set",
+ "name": "unset: local-variables & return",
+ "xml": "<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.\" value=\"\" />",
+ "comments": "",
+ "x": 494.6388931274414,
+ "y": 587.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "979528d.92883d8",
+ "type": "comment",
+ "name": "CLEANUP LOCAL VARIABLES",
+ "info": "",
+ "comments": "",
+ "x": 536.1388854980469,
+ "y": 545.2500057220459,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": []
+ },
+ {
+ "id": "a2e8b62.4d66748",
+ "type": "other",
+ "name": "Other",
+ "xml": "<outcome value=\"Other\">",
+ "comments": "",
+ "outputs": 1,
+ "x": 801.6388931274414,
+ "y": 607.7500009536743,
+ "z": "ed9b1fd8.6f0a7",
+ "wires": [
+ [
+ "537fe43b.f1146c"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-panorama-name.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-panorama-name.json
new file mode 100755
index 00000000..674c865b
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-panorama-name.json
@@ -0,0 +1 @@
+[{"id":"86ab255a.7522f8","type":"dgstart","name":"DGSTART","outputs":1,"x":110.23809051513672,"y":45.23809242248535,"z":"58bca720.478948","wires":[["678d9d6c.30b764"]]},{"id":"678d9d6c.30b764","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":213.14283752441406,"y":119.5238208770752,"z":"58bca720.478948","wires":[["b2221892.cef528"]]},{"id":"b2221892.cef528","type":"method","name":"generate-panorama-name","xml":"<method rpc='generate-panorama-name' mode='sync'>\n","comments":"","outputs":1,"x":203.8215560913086,"y":205.95234966278076,"z":"58bca720.478948","wires":[["f0364dcb.e5f17"]]},{"id":"3d24b231.0488de","type":"execute","name":"SliStringUtils - untrusted name length","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='getLength' >\n <parameter name=\"source\" value=\"`$new-name`\" />\n <parameter name=\"outputPath\" value=\"tmp.strlen\"/>\n \n","comments":"","outputs":1,"x":619.2857666015625,"y":451.9047336578369,"z":"58bca720.478948","wires":[[]]},{"id":"209cc858.355be8","type":"switchNode","name":"switch strlen > 14","xml":"<switch test='`$tmp.strlen > 14`'>\n","comments":"","outputs":1,"x":557.6191902160645,"y":506.6667060852051,"z":"58bca720.478948","wires":[["5e19e3e9.a31dfc","f283f234.fff93"]]},{"id":"5e19e3e9.a31dfc","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":748.0952911376953,"y":514.2856960296631,"z":"58bca720.478948","wires":[["cc102d9.0977bd"]]},{"id":"f283f234.fff93","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":750.0000343322754,"y":567.8571586608887,"z":"58bca720.478948","wires":[["237a8ded.5a3e32"]]},{"id":"f0364dcb.e5f17","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":221.6666717529297,"y":288.33328199386597,"z":"58bca720.478948","wires":[["3d24b231.0488de","209cc858.355be8","66cd5e7f.c924a","64e4cd4b.fe6024","41133073.515b5","675c7c6.f01b184","8effe6b3.282828","67ad6570.58f12c","a3bbbbad.a464e8","5b9cfe55.47f8e","c675a56.6ee6d58","f88531c9.a42ed","969e46d2.b374b8","94f4e81f.b72c58","1956129b.dcb17d"]]},{"id":"64e4cd4b.fe6024","type":"execute","name":"SliStringUtils - split after .","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n <parameter name=\"original_string\" value=\"`$original-name`\" />\n <parameter name=\"regex\" value=\"\\.\"/>\n <parameter name=\"limit\" value=\"2\" />\n <parameter name=\"ctx_memory_result_key\" value=\"splits\" />\n \n","comments":"","outputs":1,"x":584.9999237060547,"y":365.0000514984131,"z":"58bca720.478948","wires":[[]]},{"id":"cc102d9.0977bd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":919.9999771118164,"y":514.9999675750732,"z":"58bca720.478948","wires":[["18e960c5.ed36bf"]]},{"id":"237a8ded.5a3e32","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":918.3332824707031,"y":569.9999866485596,"z":"58bca720.478948","wires":[["433f13a6.865dec"]]},{"id":"433f13a6.865dec","type":"set","name":"set newname","xml":"<set>\n<parameter name='new-name' value='`$new-name`' />\n","comments":"","x":1111.666893005371,"y":568.3333539962769,"z":"58bca720.478948","wires":[]},{"id":"66cd5e7f.c924a","type":"set","name":"set original-name","xml":"<set>\n<parameter name='original-name' value='`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`' />\n","comments":"","x":563.3332672119141,"y":328.3333225250244,"z":"58bca720.478948","wires":[]},{"id":"ea3b507a.625f2","type":"set","name":"set newname","xml":"<set>\n<parameter name='new-name' value='`$splits[1]`' />\n","comments":"","x":991.666576385498,"y":380.6666660308838,"z":"58bca720.478948","wires":[]},{"id":"41133073.515b5","type":"switchNode","name":"switch splits length","xml":"<switch test='`$splits_length`'>\n","comments":"","outputs":1,"x":566.666633605957,"y":404.99998664855957,"z":"58bca720.478948","wires":[["f70ab86.5576d48","a0a0b61d.244a98","41e61d00.f9cea4"]]},{"id":"f70ab86.5576d48","type":"outcome","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":814.9999961853027,"y":350.0000400543213,"z":"58bca720.478948","wires":[["d7fc706c.8b686"]]},{"id":"a0a0b61d.244a98","type":"outcome","name":"outcome 2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":814.999927520752,"y":379.99999809265137,"z":"58bca720.478948","wires":[["ea3b507a.625f2"]]},{"id":"d7fc706c.8b686","type":"set","name":"set newname","xml":"<set>\n<parameter name='new-name' value='`$splits[0]`' />\n","comments":"","x":988.3331985473633,"y":345.00002574920654,"z":"58bca720.478948","wires":[]},{"id":"41e61d00.f9cea4","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":801.6666374206543,"y":413.3333396911621,"z":"58bca720.478948","wires":[["f60e104a.d022b"]]},{"id":"f60e104a.d022b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Unexpected network role used for panorama naming' />\n","comments":"","x":993.333324432373,"y":413.3333559036255,"z":"58bca720.478948","wires":[]},{"id":"18e960c5.ed36bf","type":"execute","name":"SliStringUtils - 14 len substring","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring' >\n <parameter name=\"string\" value=\"`$new-name`\" />\n <parameter name=\"result\" value=\"new-name\"/>\n <parameter name=\"begin-index\" value=\"0\" />\n <parameter name=\"end-index\" value=\"14\" />\n \n","comments":"","outputs":1,"x":1168.3332061767578,"y":503.33331966400146,"z":"58bca720.478948","wires":[[]]},{"id":"f88531c9.a42ed","type":"execute","name":"SliStringUtils - untrusted name length","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='getLength' >\n <parameter name=\"source\" value=\"`$new-name`\" />\n <parameter name=\"outputPath\" value=\"tmp.strlen\"/>\n \n","comments":"","outputs":1,"x":618.3332824707031,"y":799.9999866485596,"z":"58bca720.478948","wires":[[]]},{"id":"969e46d2.b374b8","type":"switchNode","name":"switch strlen > 14","xml":"<switch test='`$tmp.strlen > 14`'>\n","comments":"","outputs":1,"x":556.6667060852051,"y":854.7619590759277,"z":"58bca720.478948","wires":[["2eb1e963.8f58a6","af892ecf.e3fc8"]]},{"id":"2eb1e963.8f58a6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":747.1428070068359,"y":862.3809490203857,"z":"58bca720.478948","wires":[["22bdc134.447f8e"]]},{"id":"af892ecf.e3fc8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":749.047550201416,"y":915.9524116516113,"z":"58bca720.478948","wires":[["b9e7b020.1beb"]]},{"id":"5b9cfe55.47f8e","type":"execute","name":"SliStringUtils - split after .","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n <parameter name=\"original_string\" value=\"`$original-name`\" />\n <parameter name=\"regex\" value=\"\\.\"/>\n <parameter name=\"limit\" value=\"2\" />\n <parameter name=\"ctx_memory_result_key\" value=\"splits\" />\n \n","comments":"","outputs":1,"x":584.0474395751953,"y":713.0953044891357,"z":"58bca720.478948","wires":[[]]},{"id":"22bdc134.447f8e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":919.047492980957,"y":863.0952205657959,"z":"58bca720.478948","wires":[["4f716d08.83a7d4"]]},{"id":"b9e7b020.1beb","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":917.3807983398438,"y":918.0952396392822,"z":"58bca720.478948","wires":[["b4fb00b0.5d6e"]]},{"id":"b4fb00b0.5d6e","type":"set","name":"set newname","xml":"<set>\n<parameter name='new-name' value='`$new-name`' />\n","comments":"","x":1110.7144088745117,"y":916.4286069869995,"z":"58bca720.478948","wires":[]},{"id":"a3bbbbad.a464e8","type":"set","name":"set original-name","xml":"<set>\n<parameter name='original-name' value='`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`' />\n","comments":"","x":562.3807830810547,"y":676.4285755157471,"z":"58bca720.478948","wires":[]},{"id":"a908f194.577e2","type":"set","name":"set newname","xml":"<set>\n<parameter name='new-name' value='`$splits[1]`' />\n","comments":"","x":990.7140922546387,"y":728.7619190216064,"z":"58bca720.478948","wires":[]},{"id":"c675a56.6ee6d58","type":"switchNode","name":"switch splits length","xml":"<switch test='`$splits_length`'>\n","comments":"","outputs":1,"x":565.7141494750977,"y":753.0952396392822,"z":"58bca720.478948","wires":[["db39b4ca.681638","b28e57b5.d7f178","97c9e8ea.f63768"]]},{"id":"db39b4ca.681638","type":"outcome","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":814.0475120544434,"y":698.095293045044,"z":"58bca720.478948","wires":[["c17629d6.f61e28"]]},{"id":"b28e57b5.d7f178","type":"outcome","name":"outcome 2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":814.0474433898926,"y":728.095251083374,"z":"58bca720.478948","wires":[["a908f194.577e2"]]},{"id":"c17629d6.f61e28","type":"set","name":"set newname","xml":"<set>\n<parameter name='new-name' value='`$splits[0]`' />\n","comments":"","x":987.3807563781738,"y":693.0952663421631,"z":"58bca720.478948","wires":[]},{"id":"97c9e8ea.f63768","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":800.7141532897949,"y":761.4285926818848,"z":"58bca720.478948","wires":[["6cb0731e.f3e13c"]]},{"id":"6cb0731e.f3e13c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Unexpected network role used for panorama naming' />\n","comments":"","x":992.3808403015137,"y":761.4286088943481,"z":"58bca720.478948","wires":[]},{"id":"4f716d08.83a7d4","type":"execute","name":"SliStringUtils - 14 len substring","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring' >\n <parameter name=\"string\" value=\"`$new-name`\" />\n <parameter name=\"result\" value=\"new-name\"/>\n <parameter name=\"begin-index\" value=\"0\" />\n <parameter name=\"end-index\" value=\"14\" />\n \n","comments":"","outputs":1,"x":1167.3807220458984,"y":851.4285726547241,"z":"58bca720.478948","wires":[[]]},{"id":"675c7c6.f01b184","type":"set","name":"set trust and untrust sz name","xml":"<set>\n<parameter name='tmp.trust-sz' value='$TenantOAMNetworkRole_$LandingNetworkRole_T' />\n<parameter name='tmp.untrust-sz' value='$TenantOAMNetworkRole_$LandingNetworkRole_U' />\n","comments":"","x":599.9999084472656,"y":289.999960899353,"z":"58bca720.478948","wires":[]},{"id":"8effe6b3.282828","type":"execute","name":"execute SliStringUtils - replace TenantOAMNetworkRole - trust-sz","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.trust-sz`\"/>\n <parameter name=\"outputPath\" value=\"tmp.trust-sz\"/>\n <parameter name=\"target\" value=\"$TenantOAMNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$new-name`\"/>\n\n","comments":"","outputs":1,"x":706.9049072265625,"y":611.1904067993164,"z":"58bca720.478948","wires":[[]]},{"id":"94f4e81f.b72c58","type":"execute","name":"execute SliStringUtils - replace LandingNetworkRole - trust-sz","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.trust-sz`\"/>\n <parameter name=\"outputPath\" value=\"tmp.trust-sz\"/>\n <parameter name=\"target\" value=\"$LandingNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$new-name`\"/>\n\n","comments":"","outputs":1,"x":692.5240325927734,"y":985.7141342163086,"z":"58bca720.478948","wires":[[]]},{"id":"1956129b.dcb17d","type":"execute","name":"execute SliStringUtils - replace LandingNetworkRole untrust-sz","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.untrust-sz`\"/>\n <parameter name=\"outputPath\" value=\"tmp.untrust-sz\"/>\n <parameter name=\"target\" value=\"$LandingNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$new-name`\"/>\n\n","comments":"","outputs":1,"x":690.6665954589844,"y":1018.8092594146729,"z":"58bca720.478948","wires":[[]]},{"id":"67ad6570.58f12c","type":"execute","name":"execute SliStringUtils - replace TenantOAMNetworkRole - untrust-sz","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.untrust-sz`\"/>\n <parameter name=\"outputPath\" value=\"tmp.untrust-sz\"/>\n <parameter name=\"target\" value=\"$TenantOAMNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$new-name`\"/>\n\n","comments":"","outputs":1,"x":711.6665954589844,"y":643.3332996368408,"z":"58bca720.478948","wires":[[]]},{"id":"e32a37ab.31d3f8","type":"outcome","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":814.9999084472656,"y":316.66665840148926,"z":"58bca720.478948","wires":[[]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-unique-name.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-unique-name.json
new file mode 100755
index 00000000..df5494b2
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-unique-name.json
@@ -0,0 +1 @@
+[{"id":"67de88fb.8c7938","type":"comment","name":"Validation of required data","info":"","comments":"","x":1057.142822265625,"y":515.5803684507098,"z":"90110745.0f08b8","wires":[]},{"id":"94850767.18cb88","type":"dgstart","name":"DGSTART","outputs":1,"x":102.17857578822532,"y":85.27079963684082,"z":"90110745.0f08b8","wires":[["9515dbaf.7cfdd8"]]},{"id":"9515dbaf.7cfdd8","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":217.46428680419922,"y":126.5089168548584,"z":"90110745.0f08b8","wires":[["e2f684c5.eb7ee8"]]},{"id":"e2f684c5.eb7ee8","type":"method","name":"method generate-unique-name","xml":"<method rpc='generate-unique-name' mode='sync'>\n","comments":"","outputs":1,"x":173.5238800048828,"y":168.1874546323504,"z":"90110745.0f08b8","wires":[["68aae923.1b9ef8"]]},{"id":"2c60d5c7.2f6a4a","type":"comment","name":"generate-unique-name","info":"Input arguments:\ngenerate-unique-name-input.index-table-name - name of INDEX table\ngenerate-unique-name-input.index-table-prefix-column - name of prefix column in above table\ngenerate-unique-name-input.name-table-name - name of table holding all generated names\ngenerate-unique-name-input.index-length - non-null digit if index should be fixed length\n\nOutput arguments:\ngenerate-unique-name-output.generated-name - generated name (null if error)\ngenerate-unique-name-output.error-message - error message (non-null if error)\n","comments":"","x":496.52343205043235,"y":32.85714340209961,"z":"90110745.0f08b8","wires":[]},{"id":"c38467.17e88b98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":552.0595245361328,"y":1462.4405617032733,"z":"90110745.0f08b8","wires":[["e07193e1.224fa","db37eadb.3a3d08","f2d5b5.74cefa48","e4e1fe0e.7ce86","536fad15.81aec4","54f8ebb1.fbd3a4","56d20088.dca34","a0df1e14.0a77c","2db87246.6ac1ae","a9e87bf7.6d8b68","4e23a92d.e2e488"]]},{"id":"e07193e1.224fa","type":"switchNode","name":"switch generate-unique-name-input.index-table-name","xml":"<switch test='`$generate-unique-name-input.index-table-name`'>\n","comments":"","outputs":1,"x":993.7262115478516,"y":561.1905063901629,"z":"90110745.0f08b8","wires":[["18433a18.3228e6"]]},{"id":"18433a18.3228e6","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1323.726131439209,"y":561.1904958997454,"z":"90110745.0f08b8","wires":[["631b8d51.8c1104"]]},{"id":"631b8d51.8c1104","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.index-table-name not supplied' />\n","comments":"","x":1497.0594520568848,"y":561.1904873166766,"z":"90110745.0f08b8","wires":[]},{"id":"db37eadb.3a3d08","type":"switchNode","name":"switch generate-unique-name-input.index-table-prefix-column","xml":"<switch test='`$generate-unique-name-input.index-table-prefix-column`'>\n","comments":"","outputs":1,"x":1018.7261810302734,"y":604.5238422666278,"z":"90110745.0f08b8","wires":[["1d937744.b083a9"]]},{"id":"1d937744.b083a9","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1322.0594444274902,"y":604.5238212857928,"z":"90110745.0f08b8","wires":[["545cc85f.e1dd58"]]},{"id":"545cc85f.e1dd58","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.index-table-prefix-column not supplied' />\n","comments":"","x":1495.3927612304688,"y":604.8571647916522,"z":"90110745.0f08b8","wires":[]},{"id":"f2d5b5.74cefa48","type":"switchNode","name":"switch generate-unique-name-input.name-table-type","xml":"<switch test='`$generate-unique-name-input.name-table-type`'>\n","comments":"","outputs":1,"x":989.726188659668,"y":649.5238346372332,"z":"90110745.0f08b8","wires":[["c3a054c.71adaa8"]]},{"id":"c3a054c.71adaa8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1322.0593852996826,"y":649.5238441739764,"z":"90110745.0f08b8","wires":[["a9d236bd.19e0f8"]]},{"id":"a9d236bd.19e0f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.name-table-type not supplied' />\n","comments":"","x":1493.726161956787,"y":649.8571476255145,"z":"90110745.0f08b8","wires":[]},{"id":"56d20088.dca34","type":"get-resource","name":"get-resource current name index","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='tmp.gun.prefixdb'>\n\n","comments":"","outputs":1,"x":921.3927917480469,"y":1090.2855362210955,"z":"90110745.0f08b8","wires":[["145a06ca.15e939","b91db4d1.5863b8","c98722cf.dc1a3"]]},{"id":"145a06ca.15e939","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1146.5832595825195,"y":1168.8094429288592,"z":"90110745.0f08b8","wires":[["5ade3940.140eb8"]]},{"id":"5ade3940.140eb8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Error reading the ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":1309.2023811340332,"y":1170.238171032497,"z":"90110745.0f08b8","wires":[]},{"id":"43b733f4.e9302c","type":"for","name":"for idx from current index to list-end","xml":"<for index='tmp.gun.idx' start='`$tmp.gun.index-number`' end='`$tmp.gun.list-end`' >\n","comments":"","outputs":1,"x":1073.7261962890625,"y":1492.8571519851685,"z":"90110745.0f08b8","wires":[["91d927f9.353948"]]},{"id":"e4e1fe0e.7ce86","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":836.3451919555664,"y":1492.8571171079363,"z":"90110745.0f08b8","wires":[["43b733f4.e9302c","c322ca3a.666808"]]},{"id":"c322ca3a.666808","type":"returnSuccess","name":"CATCH BREAK","xml":"<return status='success'>\n\n","comments":"","x":1024.6786041259766,"y":2067.857247761318,"z":"90110745.0f08b8","wires":[]},{"id":"536fad15.81aec4","type":"switchNode","name":"switch generate-unique-name-input.prefix","xml":"<switch test='`$generate-unique-name-input.prefix`'>\n","comments":"","outputs":1,"x":955.3928298950195,"y":694.5238136563983,"z":"90110745.0f08b8","wires":[["82c1a7dd.32a6a8"]]},{"id":"82c1a7dd.32a6a8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1322.7260189056396,"y":694.5238384519305,"z":"90110745.0f08b8","wires":[["db83eab5.1248c8"]]},{"id":"db83eab5.1248c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.prefix not supplied' />\n","comments":"","x":1495.3927955627441,"y":694.8571419034686,"z":"90110745.0f08b8","wires":[]},{"id":"54f8ebb1.fbd3a4","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":978.7261962890625,"y":829.523755482265,"z":"90110745.0f08b8","wires":[["f7c6d6ff.541f78","ce184e71.86be8","4c11c2f5.d535ac","d88178cc.f88d98","febff3b8.f5c6e"]]},{"id":"f7c6d6ff.541f78","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1322.0595092773438,"y":737.8571419034686,"z":"90110745.0f08b8","wires":[["5b517f27.498b7"]]},{"id":"febff3b8.f5c6e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1319.3928985595703,"y":914.5238022123065,"z":"90110745.0f08b8","wires":[["2531a549.b793aa"]]},{"id":"ce184e71.86be8","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1320.3928565979004,"y":782.8571819577899,"z":"90110745.0f08b8","wires":[["31a1c558.a77dba"]]},{"id":"4c11c2f5.d535ac","type":"outcome","name":"2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":1320.3928413391113,"y":827.8571724210467,"z":"90110745.0f08b8","wires":[["510f4c1a.709e14"]]},{"id":"d88178cc.f88d98","type":"outcome","name":"3","xml":"<outcome value='3'>\n","comments":"","outputs":1,"x":1318.7261772155762,"y":871.1905082975115,"z":"90110745.0f08b8","wires":[["9efb14fc.5f68e8"]]},{"id":"31a1c558.a77dba","type":"set","name":"set list-end = 10","xml":"<set>\n<parameter name='tmp.gun.list-end' value='10' />\n","comments":"","x":1503.0595932006836,"y":782.8571705136981,"z":"90110745.0f08b8","wires":[]},{"id":"510f4c1a.709e14","type":"set","name":"set list-end = 100","xml":"<set>\n<parameter name='tmp.gun.list-end' value='100' />\n","comments":"","x":1506.392822265625,"y":827.8571724210467,"z":"90110745.0f08b8","wires":[]},{"id":"9efb14fc.5f68e8","type":"set","name":"set list-end = 1000","xml":"<set>\n<parameter name='tmp.gun.list-end' value='1000' />\n","comments":"","x":1508.392822265625,"y":871.190485409328,"z":"90110745.0f08b8","wires":[]},{"id":"2531a549.b793aa","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.prefix not supplied' />\n","comments":"","x":1490.392822265625,"y":913.8571724210467,"z":"90110745.0f08b8","wires":[]},{"id":"70192d95.678c34","type":"set","name":"set new index number to 1","xml":"<set>\n<parameter name='tmp.gun.index-number' value='1' />\n","comments":"","x":1481.8216018676758,"y":1113.4288276944842,"z":"90110745.0f08b8","wires":[]},{"id":"5b517f27.498b7","type":"set","name":"set list-end = 10000 (infinity basically)","xml":"<set>\n<parameter name='tmp.gun.list-end' value='10000' />\n","comments":"","x":1571.0594482421875,"y":738.190485409328,"z":"90110745.0f08b8","wires":[]},{"id":"314df997.3fe296","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":1635.3927764892578,"y":1419.5237907682147,"z":"90110745.0f08b8","wires":[["d05e660d.be4cd8","c3985438.571b88","b03a2186.83945","f88e445.6bd78b8"]]},{"id":"d05e660d.be4cd8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1915.3927764892578,"y":1349.523851803371,"z":"90110745.0f08b8","wires":[["4bdac272.02882c"]]},{"id":"c3985438.571b88","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1913.7261238098145,"y":1394.5238918576922,"z":"90110745.0f08b8","wires":[["4bdac272.02882c"]]},{"id":"b03a2186.83945","type":"outcome","name":"2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":1913.7262115478516,"y":1447.8572391782488,"z":"90110745.0f08b8","wires":[["aa9d44e3.177b58"]]},{"id":"f88e445.6bd78b8","type":"outcome","name":"3","xml":"<outcome value='3'>\n","comments":"","outputs":1,"x":1913.726089477539,"y":1544.5239719663348,"z":"90110745.0f08b8","wires":[["9cdd86f.ae52778"]]},{"id":"4bdac272.02882c","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2100.392925262451,"y":1367.8571953092303,"z":"90110745.0f08b8","wires":[]},{"id":"aa9d44e3.177b58","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2080.3928413391113,"y":1447.857137135097,"z":"90110745.0f08b8","wires":[["db28baee.042fe8","31a49c00.cbd4c4"]]},{"id":"db28baee.042fe8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2242.0594749450684,"y":1421.1905102048602,"z":"90110745.0f08b8","wires":[["1f2e15a5.5c898a"]]},{"id":"31a49c00.cbd4c4","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2242.0594329833984,"y":1469.523846081325,"z":"90110745.0f08b8","wires":[["5fd3a71c.4e8c88"]]},{"id":"1f2e15a5.5c898a","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":2433.726234436035,"y":1420.523737362453,"z":"90110745.0f08b8","wires":[]},{"id":"5fd3a71c.4e8c88","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2417.05948638916,"y":1469.1904529844012,"z":"90110745.0f08b8","wires":[]},{"id":"9cdd86f.ae52778","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2082.059425354004,"y":1542.8570999417987,"z":"90110745.0f08b8","wires":[["4dff528e.5fe12c","e36c83c7.3522d"]]},{"id":"4dff528e.5fe12c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2242.0594024658203,"y":1516.1904777799334,"z":"90110745.0f08b8","wires":[["3d8d515c.20155e"]]},{"id":"e36c83c7.3522d","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2243.726058959961,"y":1591.1904358182635,"z":"90110745.0f08b8","wires":[["5210620f.f035ac"]]},{"id":"3d8d515c.20155e","type":"set","name":"set index-string to '00' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '00' + $tmp.gun.idx`\" />\n","comments":"","x":2437.0594940185547,"y":1516.1903686523438,"z":"90110745.0f08b8","wires":[]},{"id":"5210620f.f035ac","type":"switchNode","name":"switch idx < 100","xml":"<switch test='`$tmp.gun.idx &lt; 100`'>\n","comments":"","outputs":1,"x":2400.059440612793,"y":1589.5237964902606,"z":"90110745.0f08b8","wires":[["bb2d2969.5be9a8","f8c44cdb.e372f"]]},{"id":"bb2d2969.5be9a8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2557.0594177246094,"y":1562.8571743283953,"z":"90110745.0f08b8","wires":[["7621b36e.37c05c"]]},{"id":"f8c44cdb.e372f","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2557.0593757629395,"y":1611.1905102048602,"z":"90110745.0f08b8","wires":[["c1d12981.5578f8"]]},{"id":"7621b36e.37c05c","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":2749.726203918457,"y":1562.5238289151873,"z":"90110745.0f08b8","wires":[]},{"id":"c1d12981.5578f8","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2733.726188659668,"y":1610.8571323667254,"z":"90110745.0f08b8","wires":[]},{"id":"630383d6.9584cc","type":"set","name":"set generated-name to prefix + index-string","xml":"<set>\n<parameter name='tmp.gun.generated-name' value='`$generate-unique-name-input.prefix + $tmp.gun.index-string`' />\n","comments":"","x":1619.3928680419922,"y":1696.1904396329608,"z":"90110745.0f08b8","wires":[]},{"id":"e52dd26e.0f4e","type":"set","name":"increment index number","xml":"<set>\n<parameter name='tmp.gun.index-number' value='`$tmp.gun.prefixdb.index-number + 1`' />\n","comments":"","x":1473.7261962890625,"y":1023.4761659417834,"z":"90110745.0f08b8","wires":[]},{"id":"73c9dbdb.c05d54","type":"comment","name":"First check from the current index to the max index","info":"","comments":"","x":1037.0595397949219,"y":1431.1905206952777,"z":"90110745.0f08b8","wires":[]},{"id":"1b12fce7.736083","type":"comment","name":"check if we've used this name before","info":"","comments":"","x":1616.1073913574219,"y":1780.4765853881836,"z":"90110745.0f08b8","wires":[]},{"id":"60c15f95.e82e1","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1723.7261924743652,"y":1857.8573679242816,"z":"90110745.0f08b8","wires":[["d699e5de.1c2618"]]},{"id":"38122015.0cd4f","type":"set","name":"set generate-unique-name-output.error-message","xml":"<set>\n<parameter name='generate-unique-name-output.error-message' value=\"`'Error reading the GENERIC_RESOURCE_NAME table'`\" />\n","comments":"","x":2169.6784439086914,"y":1831.4287008558001,"z":"90110745.0f08b8","wires":[]},{"id":"9f978d91.b34da","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2034.916690826416,"y":1876.4287885938372,"z":"90110745.0f08b8","wires":[]},{"id":"48493fbe.6eb1a","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2037.7737121582031,"y":1971.33347933633,"z":"90110745.0f08b8","wires":[]},{"id":"ff71e11.cb7392","type":"comment","name":"found one we can use","info":"","comments":"","x":1855.6311683654785,"y":1902.3814014707293,"z":"90110745.0f08b8","wires":[]},{"id":"a0df1e14.0a77c","type":"switchNode","name":"switch generate-unique-name-output.error-message","xml":"<switch test='`$generate-unique-name-output.error-message`'>\n","comments":"","outputs":1,"x":987.8928833007812,"y":2185.7143883023946,"z":"90110745.0f08b8","wires":[["47956a10.f7f354","822e2233.58978"]]},{"id":"47956a10.f7f354","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1261.2262916564941,"y":2159.0476402555196,"z":"90110745.0f08b8","wires":[["9fcbb9ed.6b3558"]]},{"id":"9fcbb9ed.6b3558","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1396.2262916564941,"y":2159.0476402555196,"z":"90110745.0f08b8","wires":[[]]},{"id":"822e2233.58978","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1261.2262573242188,"y":2209.0476612363545,"z":"90110745.0f08b8","wires":[["d471ec21.e29e1"]]},{"id":"d471ec21.e29e1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n","comments":"","x":1411.2262573242188,"y":2209.0476612363545,"z":"90110745.0f08b8","wires":[]},{"id":"2db87246.6ac1ae","type":"switchNode","name":"switch found-flag","xml":"<switch test='`$tmp.gun.found-flag`'>\n","comments":"","outputs":1,"x":859.6071929931641,"y":2468.5715078626363,"z":"90110745.0f08b8","wires":[["1afe7988.3e2406","382ec618.a7ddba"]]},{"id":"1afe7988.3e2406","type":"outcome","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1033.9405326843262,"y":2468.5715088163106,"z":"90110745.0f08b8","wires":[["3d2939f2.411d96"]]},{"id":"97761528.22f748","type":"set","name":"set generate-unique-name-output.generated-name","xml":"<set>\n<parameter name='generate-unique-name-output.generated-name' value='`$tmp.gun.generated-name`' />\n","comments":"","x":1504.6071472167969,"y":2313.5717949186055,"z":"90110745.0f08b8","wires":[]},{"id":"eda538a7.a89168","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n","comments":"","x":1386.6547164916992,"y":2650.952589443752,"z":"90110745.0f08b8","wires":[]},{"id":"3d2939f2.411d96","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1185.607162475586,"y":2467.9049228940694,"z":"90110745.0f08b8","wires":[["97761528.22f748","8aabfd4d.0ee5a","b24cce42.caeba","eda538a7.a89168","76d2de9f.d1d72"]]},{"id":"77a666ae.651d38","type":"set","name":"set index-exists flag to false","xml":"<set>\n<parameter name='tmp.gun.index-exists' value='false' />\n","comments":"","x":1485.8689880371094,"y":1067.142887524196,"z":"90110745.0f08b8","wires":[]},{"id":"21842051.8fdc8","type":"set","name":"set index-exists flag to true","xml":"<set>\n<parameter name='tmp.gun.index-exists' value='true' />\n","comments":"","x":1482.0120010375977,"y":978.571439913341,"z":"90110745.0f08b8","wires":[]},{"id":"4cecef4a.45b81","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1288.7262725830078,"y":1000.0000459466662,"z":"90110745.0f08b8","wires":[["21842051.8fdc8","e52dd26e.0f4e"]]},{"id":"8aabfd4d.0ee5a","type":"switchNode","name":"switch index-exists","xml":"<switch test='`$tmp.gun.index-exists`'>\n","comments":"","outputs":1,"x":1400.369155883789,"y":2445.714796475002,"z":"90110745.0f08b8","wires":[["346f0424.17228c","2db882f9.07b2be"]]},{"id":"346f0424.17228c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1578.9405212402344,"y":2421.429064205715,"z":"90110745.0f08b8","wires":[["46d7a7fe.5f3bf8"]]},{"id":"2db882f9.07b2be","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1578.9405364990234,"y":2468.571989468166,"z":"90110745.0f08b8","wires":[["a296a95c.85f908"]]},{"id":"783bc8f9.d13d28","type":"save","name":"save (update) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1974.6548461914062,"y":2422.857480457851,"z":"90110745.0f08b8","wires":[["67762a25.ef1984"]]},{"id":"c608a7c.ab02058","type":"save","name":"save (insert) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1967.5118255615234,"y":2517.1429485593526,"z":"90110745.0f08b8","wires":[["396de0c3.36e29"]]},{"id":"67762a25.ef1984","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2167.512046813965,"y":2422.8574995313375,"z":"90110745.0f08b8","wires":[["77e2ebe5.4aacd4"]]},{"id":"396de0c3.36e29","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2164.6546173095703,"y":2515.71446459634,"z":"90110745.0f08b8","wires":[["a64a1c5c.548e1"]]},{"id":"b24cce42.caeba","type":"save","name":"save (insert) generated name","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1434.797752380371,"y":2604.2857708249776,"z":"90110745.0f08b8","wires":[["6e840dcf.98d2c4"]]},{"id":"6e840dcf.98d2c4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1644.7976837158203,"y":2604.2858223233907,"z":"90110745.0f08b8","wires":[["14711303.85363d"]]},{"id":"14711303.85363d","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"Failed insert into GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":1799.0834999084473,"y":2604.285841396877,"z":"90110745.0f08b8","wires":[]},{"id":"a9e87bf7.6d8b68","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from ' + $generate-unique-name-input.index-table-name\n+ ' WHERE ' + $generate-unique-name-input.index-table-prefix-column + ' = '\n+ '$generate-unique-name-input.prefix'`\" />\n","comments":"","x":877.2976760864258,"y":958.5715393338885,"z":"90110745.0f08b8","wires":[]},{"id":"91d927f9.353948","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1315.8690567016602,"y":1491.428631237575,"z":"90110745.0f08b8","wires":[["314df997.3fe296","630383d6.9584cc","3e27b62f.f1d58a","880d7037.87ac9"]]},{"id":"d699e5de.1c2618","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1876.1071891784668,"y":1857.3812870298113,"z":"90110745.0f08b8","wires":[["38122015.0cd4f","9f978d91.b34da"]]},{"id":"46d7a7fe.5f3bf8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1756.226333618164,"y":2398.5715927396504,"z":"90110745.0f08b8","wires":[["d44f050d.8c0008","783bc8f9.d13d28"]]},{"id":"a296a95c.85f908","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1753.3691864013672,"y":2494.285911015102,"z":"90110745.0f08b8","wires":[["c608a7c.ab02058","462aa6c7.448d08"]]},{"id":"d44f050d.8c0008","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'update ' + $generate-unique-name-input.index-table-name\n+ ' set index_number = ' + $tmp.gun.index-string + ' where '\n+ $generate-unique-name-input.index-table-prefix-column\n+ ' = $generate-unique-name-input.prefix'`\" />\n","comments":"","x":1944.7976150512695,"y":2374.285564354488,"z":"90110745.0f08b8","wires":[]},{"id":"462aa6c7.448d08","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into ' + $generate-unique-name-input.index-table-name\n+ '(' + $generate-unique-name-input.index-table-prefix-column + ', index_number) values ('\n+ ' $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ')'`\" />\n\n","comments":"","x":1943.3691635131836,"y":2468.571381023952,"z":"90110745.0f08b8","wires":[]},{"id":"bbed7686.7c8a78","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1730.3929290771484,"y":1948.8097633634295,"z":"90110745.0f08b8","wires":[["193702b8.5c51ed"]]},{"id":"6d5c7c0e.2718a4","type":"for","name":"for idx from 1 to current index","xml":"<for index='tmp.gun.idx' start='1' end='`$tmp.gun.index-number`' >\n","comments":"","outputs":1,"x":1580.1787033081055,"y":3060.5239128385274,"z":"90110745.0f08b8","wires":[["c87de081.2b7b6"]]},{"id":"1185013a.772fcf","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1348.5119857788086,"y":3060.5239137922017,"z":"90110745.0f08b8","wires":[["6d5c7c0e.2718a4","bf365e0a.2dfca"]]},{"id":"bf365e0a.2dfca","type":"returnSuccess","name":"CATCH BREAK","xml":"<return status='success'>\n\n","comments":"","x":1531.1310958862305,"y":3635.5240434919087,"z":"90110745.0f08b8","wires":[]},{"id":"9144f7d0.dfe548","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":2141.8452682495117,"y":2987.1905864988057,"z":"90110745.0f08b8","wires":[["644f5421.41381c","e5c0619b.7a065","e0c68335.db7ab","41de4558.401f8c"]]},{"id":"644f5421.41381c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2421.8452682495117,"y":2917.190647533962,"z":"90110745.0f08b8","wires":[["fb2ee76c.834068"]]},{"id":"e5c0619b.7a065","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":2420.1786155700684,"y":2962.1906875882833,"z":"90110745.0f08b8","wires":[["fb2ee76c.834068"]]},{"id":"e0c68335.db7ab","type":"outcome","name":"2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":2420.1787033081055,"y":3015.52403490884,"z":"90110745.0f08b8","wires":[["21e6c935.f093a6"]]},{"id":"41de4558.401f8c","type":"outcome","name":"3","xml":"<outcome value='3'>\n","comments":"","outputs":1,"x":2420.178581237793,"y":3112.190767696926,"z":"90110745.0f08b8","wires":[["ae67a8d.0fd0d58"]]},{"id":"fb2ee76c.834068","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2606.845417022705,"y":2935.5239910398213,"z":"90110745.0f08b8","wires":[]},{"id":"21e6c935.f093a6","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2586.8453330993652,"y":3015.523932865688,"z":"90110745.0f08b8","wires":[["c00eb747.c971c8","7a0fee3a.c8155"]]},{"id":"c00eb747.c971c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2748.5119667053223,"y":2988.857305935451,"z":"90110745.0f08b8","wires":[["c515b54.3569d48"]]},{"id":"7a0fee3a.c8155","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2748.5119247436523,"y":3037.190641811916,"z":"90110745.0f08b8","wires":[["de2fc71d.e11088"]]},{"id":"c515b54.3569d48","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":2940.178726196289,"y":2988.190533093044,"z":"90110745.0f08b8","wires":[]},{"id":"de2fc71d.e11088","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2923.511978149414,"y":3036.8572487149922,"z":"90110745.0f08b8","wires":[]},{"id":"ae67a8d.0fd0d58","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2588.511917114258,"y":3110.5238956723897,"z":"90110745.0f08b8","wires":[["c8925f4d.077c6","12f4b493.683e8b"]]},{"id":"c8925f4d.077c6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2748.511894226074,"y":3083.8572735105245,"z":"90110745.0f08b8","wires":[["c22d1aeb.d63b48"]]},{"id":"12f4b493.683e8b","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2750.178550720215,"y":3158.8572315488545,"z":"90110745.0f08b8","wires":[["90f5c134.3ca9"]]},{"id":"c22d1aeb.d63b48","type":"set","name":"set index-string to '00' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '00' + $tmp.gun.idx`\" />\n","comments":"","x":2943.511978149414,"y":3083.8572487149922,"z":"90110745.0f08b8","wires":[]},{"id":"90f5c134.3ca9","type":"switchNode","name":"switch idx < 100","xml":"<switch test='`$tmp.gun.idx &lt; 100`'>\n","comments":"","outputs":1,"x":2906.511932373047,"y":3157.1905922208516,"z":"90110745.0f08b8","wires":[["87f17e57.81d71","f8e50bff.aaa1f8"]]},{"id":"87f17e57.81d71","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3063.5119094848633,"y":3130.5239700589864,"z":"90110745.0f08b8","wires":[["caf5e13b.23238"]]},{"id":"f8e50bff.aaa1f8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3063.5118675231934,"y":3178.857305935451,"z":"90110745.0f08b8","wires":[["2e72859.272837a"]]},{"id":"caf5e13b.23238","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":3256.178695678711,"y":3130.1906246457784,"z":"90110745.0f08b8","wires":[]},{"id":"2e72859.272837a","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":3240.178680419922,"y":3178.5239280973165,"z":"90110745.0f08b8","wires":[]},{"id":"9775d1bd.a31a5","type":"set","name":"set generated-name to prefix + index-string","xml":"<set>\n<parameter name='tmp.gun.generated-name' value='`$generate-unique-name-input.prefix + $tmp.gun.index-string`' />\n","comments":"","x":2125.845359802246,"y":3263.857235363552,"z":"90110745.0f08b8","wires":[]},{"id":"35bc5497.2d892c","type":"comment","name":"Wrapping around - now check from 1 to the original index","info":"","comments":"","x":1553.5120162963867,"y":2946.000319889614,"z":"90110745.0f08b8","wires":[]},{"id":"ccb5f6ab.ef5478","type":"comment","name":"check if we've used this name before","info":"","comments":"","x":2112.5598068237305,"y":3378.8575090680806,"z":"90110745.0f08b8","wires":[]},{"id":"e74cf3af.ae8e8","type":"get-resource","name":"get-resource name","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='tmp.gun.namedb'>\n\n","comments":"","outputs":1,"x":2050.178623199463,"y":3519.571578979492,"z":"90110745.0f08b8","wires":[["2f478f3e.e0607","398f430e.7a743c"]]},{"id":"2f478f3e.e0607","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2228.5120162963867,"y":3473.8574156079976,"z":"90110745.0f08b8","wires":[["c9df5194.5868"]]},{"id":"9ffe2099.9294f","type":"set","name":"set generate-unique-name-output.error-message","xml":"<set>\n<parameter name='generate-unique-name-output.error-message' value=\"Error reading the GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":2674.464267730713,"y":3447.428748539516,"z":"90110745.0f08b8","wires":[]},{"id":"745383f6.b6740c","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2539.7025146484375,"y":3492.4288362775533,"z":"90110745.0f08b8","wires":[]},{"id":"cd5abdec.20e31","type":"switchNode","name":"switch generate-unique-name-output.error-message","xml":"<switch test='`$generate-unique-name-output.error-message`'>\n","comments":"","outputs":1,"x":1512.5595932006836,"y":3743.381119183132,"z":"90110745.0f08b8","wires":[["8a7bb59.e987548","ec85a0b6.70f26"]]},{"id":"8a7bb59.e987548","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1785.8930015563965,"y":3716.714371136257,"z":"90110745.0f08b8","wires":[["13932aab.cff7c5"]]},{"id":"13932aab.cff7c5","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1920.8930015563965,"y":3716.714371136257,"z":"90110745.0f08b8","wires":[[]]},{"id":"ec85a0b6.70f26","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1785.892967224121,"y":3766.714392117092,"z":"90110745.0f08b8","wires":[["a496c9cc.3afe48"]]},{"id":"a496c9cc.3afe48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n","comments":"","x":1935.892967224121,"y":3766.714392117092,"z":"90110745.0f08b8","wires":[]},{"id":"e38bddb.6889c2","type":"switchNode","name":"switch found-flag","xml":"<switch test='`$tmp.gun.found-flag`'>\n","comments":"","outputs":1,"x":1394.2738723754883,"y":3922.905027798244,"z":"90110745.0f08b8","wires":[["d6f25ad7.1e9978"]]},{"id":"70380c05.64b0a4","type":"comment","name":"if db name is null we found an index we can use","info":"","comments":"","x":1560.9882125854492,"y":3872.428802898952,"z":"90110745.0f08b8","wires":[]},{"id":"d6f25ad7.1e9978","type":"outcome","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1553.607192993164,"y":3922.9049848829,"z":"90110745.0f08b8","wires":[["e5da090c.731d68"]]},{"id":"feb55f31.73e7a","type":"set","name":"set generate-unique-name-output.generated-name","xml":"<set>\n<parameter name='generate-unique-name-output.generated-name' value='`$tmp.gun.generated-name`' />\n","comments":"","x":2029.2738571166992,"y":3871.238525799343,"z":"90110745.0f08b8","wires":[]},{"id":"89e6e738.067dc8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\n","comments":"","x":1912.7499084472656,"y":4210.047996929714,"z":"90110745.0f08b8","wires":[]},{"id":"e5da090c.731d68","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1720.2738876342773,"y":3921.238203457424,"z":"90110745.0f08b8","wires":[["feb55f31.73e7a","4da56fe5.e07a7","e153c7a4.007a58","89e6e738.067dc8","9ece7ac0.84e2b8"]]},{"id":"4da56fe5.e07a7","type":"switchNode","name":"switch index-exists","xml":"<switch test='`$tmp.gun.index-exists`'>\n","comments":"","outputs":1,"x":1925.0358657836914,"y":4003.3815273557393,"z":"90110745.0f08b8","wires":[["a21cdd7a.49ed","31ea122e.79dede"]]},{"id":"a21cdd7a.49ed","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2103.6072311401367,"y":3979.095795086452,"z":"90110745.0f08b8","wires":[["63c24c47.93cb44"]]},{"id":"31ea122e.79dede","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2103.607246398926,"y":4026.2387203489034,"z":"90110745.0f08b8","wires":[["a5ce5bde.1b0538"]]},{"id":"c6f53c8c.15009","type":"save","name":"save (update) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":2499.3215560913086,"y":3980.5242113385884,"z":"90110745.0f08b8","wires":[["5f753ea1.c860f"]]},{"id":"93519bfb.b8ef58","type":"save","name":"save (insert) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":2492.178535461426,"y":4074.80967944009,"z":"90110745.0f08b8","wires":[["cb6afb42.e26668"]]},{"id":"5f753ea1.c860f","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2692.178756713867,"y":3980.5242304120748,"z":"90110745.0f08b8","wires":[["87791e94.3a263"]]},{"id":"87791e94.3a263","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to update ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2846.464572906494,"y":3980.524249485561,"z":"90110745.0f08b8","wires":[]},{"id":"cb6afb42.e26668","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2689.3213272094727,"y":4073.381195477077,"z":"90110745.0f08b8","wires":[["7e817d75.e13cb4"]]},{"id":"7e817d75.e13cb4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to insert record into ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2843.6071434020996,"y":4073.3812145505635,"z":"90110745.0f08b8","wires":[]},{"id":"e153c7a4.007a58","type":"save","name":"save (insert) generated name","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1959.4644622802734,"y":4161.952501705715,"z":"90110745.0f08b8","wires":[["3737e1de.1f275e"]]},{"id":"3737e1de.1f275e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2169.4643936157227,"y":4161.952553204128,"z":"90110745.0f08b8","wires":[["c41eb84f.1afce8"]]},{"id":"c41eb84f.1afce8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"Failed insert into GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":2323.7502098083496,"y":4161.952572277614,"z":"90110745.0f08b8","wires":[]},{"id":"c87de081.2b7b6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1822.321548461914,"y":3059.095426968166,"z":"90110745.0f08b8","wires":[["9144f7d0.dfe548","9775d1bd.a31a5","e74cf3af.ae8e8","49a5595e.684d18","30eb1a83.c57be6"]]},{"id":"c9df5194.5868","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2380.8930130004883,"y":3473.3813347135274,"z":"90110745.0f08b8","wires":[["9ffe2099.9294f","745383f6.b6740c"]]},{"id":"63c24c47.93cb44","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2280.8930435180664,"y":3956.2383236203877,"z":"90110745.0f08b8","wires":[["9f7397b5.b8e698","c6f53c8c.15009"]]},{"id":"a5ce5bde.1b0538","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2278.0358963012695,"y":4051.9526418958394,"z":"90110745.0f08b8","wires":[["93519bfb.b8ef58","2396ee2e.6296a2"]]},{"id":"9f7397b5.b8e698","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'update ' + $generate-unique-name-input.index-table-name\n+ ' set index_number = ' + $tmp.gun.index-string + ' where '\n+ $generate-unique-name-input.index-table-prefix-column\n+ ' = $generate-unique-name-input.prefix'`\" />\n","comments":"","x":2469.464324951172,"y":3931.9522952352254,"z":"90110745.0f08b8","wires":[]},{"id":"2396ee2e.6296a2","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into ' + $generate-unique-name-input.index-table-name\n+ '(' + $generate-unique-name-input.index-table-prefix-column + ', index_number) values ('\n+ ' $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ')'`\" />\n\n","comments":"","x":2468.035873413086,"y":4026.2381119046895,"z":"90110745.0f08b8","wires":[]},{"id":"398f430e.7a743c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2235.17875289917,"y":3564.8098110471456,"z":"90110745.0f08b8","wires":[["efb43154.90976"]]},{"id":"49a5595e.684d18","type":"set","name":"clear namedb.name","xml":"<set>\n<parameter name='tmp.gun.namedb.name' value='' />\n","comments":"","x":2050.892936706543,"y":3314.8097442899434,"z":"90110745.0f08b8","wires":[]},{"id":"4c9e63b6.428eec","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":1497.1786651611328,"y":2807.190584591457,"z":"90110745.0f08b8","wires":[["a88c76d2.c57508"]]},{"id":"a88c76d2.c57508","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1752.8929977416992,"y":2808.095493725368,"z":"90110745.0f08b8","wires":[["7d718b44.ba6f14"]]},{"id":"7d718b44.ba6f14","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"We have exhausted the naming index count\" />\n","comments":"","x":1910.0358810424805,"y":2808.095493725368,"z":"90110745.0f08b8","wires":[]},{"id":"15057783.9b13f8","type":"comment","name":"if we get here when there is no index length, then we have used up all 1000","info":"","comments":"","x":1628.6072616577148,"y":2763.8098081861226,"z":"90110745.0f08b8","wires":[]},{"id":"48f231a0.1295b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"We have exhausted the naming index count\" />\n","comments":"","x":1388.6072807312012,"y":4323.095478466579,"z":"90110745.0f08b8","wires":[]},{"id":"4e23a92d.e2e488","type":"set","name":"set found-flag=false","xml":"<set>\n<parameter name='tmp.gun.found-flag' value='false' />\n","comments":"","x":883.0119400024414,"y":1234.2857422147479,"z":"90110745.0f08b8","wires":[]},{"id":"90ee10e.7fdccf","type":"set","name":"set found-flag=true","xml":"<set>\n<parameter name='tmp.gun.found-flag' value='true' />\n","comments":"","x":2074.6786308288574,"y":1923.0953316007342,"z":"90110745.0f08b8","wires":[]},{"id":"193702b8.5c51ed","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1881.8214530944824,"y":1949.2382759366717,"z":"90110745.0f08b8","wires":[["90ee10e.7fdccf","48493fbe.6eb1a"]]},{"id":"e2c9737b.99e7f","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2540.035732269287,"y":3585.952526501247,"z":"90110745.0f08b8","wires":[]},{"id":"be7d48f6.6006d8","type":"comment","name":"found one we can use","info":"","comments":"","x":2357.8931884765625,"y":3517.0004486356465,"z":"90110745.0f08b8","wires":[]},{"id":"66fa06ee.f98f28","type":"set","name":"set found-flag=true","xml":"<set>\n<parameter name='tmp.gun.found-flag' value='true' />\n","comments":"","x":2576.9406509399414,"y":3537.7143787656514,"z":"90110745.0f08b8","wires":[]},{"id":"efb43154.90976","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2384.0834732055664,"y":3563.857323101589,"z":"90110745.0f08b8","wires":[["66fa06ee.f98f28","e2c9737b.99e7f"]]},{"id":"583423a0.c77f8c","type":"switchNode","name":"switch generate-unique-name-input.supplied-name","xml":"<switch test='`$generate-unique-name-input.supplied-name`'>\n","comments":"","outputs":1,"x":434.79754638671875,"y":340.7143215451922,"z":"90110745.0f08b8","wires":[["86bad139.04091","9dd1d0d8.1bd5f"]]},{"id":"86bad139.04091","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":693.3690452575684,"y":367.85711710793635,"z":"90110745.0f08b8","wires":[["c38467.17e88b98"]]},{"id":"9dd1d0d8.1bd5f","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":693.3690223693848,"y":310.7142872129168,"z":"90110745.0f08b8","wires":[["f19bef1d.3057b"]]},{"id":"1f92ba68.4441e6","type":"switchNode","name":"switch generate-unique-name-input.name-table-type","xml":"<switch test='`$generate-unique-name-input.name-table-type`'>\n","comments":"","outputs":1,"x":1162.6546936035156,"y":246.42856829507014,"z":"90110745.0f08b8","wires":[["3cf36f75.3d9c6"]]},{"id":"3cf36f75.3d9c6","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1495.9878902435303,"y":246.4285778318133,"z":"90110745.0f08b8","wires":[["c20913bc.b8956"]]},{"id":"c20913bc.b8956","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.name-table-type not supplied' />\n","comments":"","x":1667.6546669006348,"y":246.76188128335139,"z":"90110745.0f08b8","wires":[]},{"id":"f19bef1d.3057b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":847.6547470092773,"y":309.28571741921564,"z":"90110745.0f08b8","wires":[["1f92ba68.4441e6","a5541836.ef0a18","f1e52879.fa9cb8"]]},{"id":"f1e52879.fa9cb8","type":"get-resource","name":"get-resource name","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='tmp.gun.namedb'>\n\n","comments":"","outputs":1,"x":1056.2261581420898,"y":339.2857326780047,"z":"90110745.0f08b8","wires":[["324fd762.c67938","5bbbc00e.34e41","85249bc8.1ea708"]]},{"id":"324fd762.c67938","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1238.8452072143555,"y":326.42862837655207,"z":"90110745.0f08b8","wires":[["bf63fff2.0717"]]},{"id":"a5541836.ef0a18","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'\n+ ' AND name = $generate-unique-name-input.supplied-name'`\" />\n","comments":"","x":1049.7977104187012,"y":291.66675036294123,"z":"90110745.0f08b8","wires":[]},{"id":"5bbbc00e.34e41","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1246.9405632019043,"y":371.66673891884943,"z":"90110745.0f08b8","wires":[["2dce07c3.4cdde8"]]},{"id":"bf63fff2.0717","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value=\"`'Error reading the ' + $generate-unique-name-input.name-table-index + ' table'`\" />\n\n","comments":"","x":1394.7976303100586,"y":326.00003378731867,"z":"90110745.0f08b8","wires":[]},{"id":"85249bc8.1ea708","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1239.0833320617676,"y":413.57143252236506,"z":"90110745.0f08b8","wires":[["b470dc23.972cf"]]},{"id":"b470dc23.972cf","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value=\"`'The name ' + $generate-unique-name-input.supplied-name + ' has already been used'`\" />\n\n","comments":"","x":1394.7975692749023,"y":412.99999659402033,"z":"90110745.0f08b8","wires":[]},{"id":"beb8c925.e74138","type":"comment","name":"Caller supplied name - make sure it's not already used","info":"","comments":"","x":1192.5119018554688,"y":199.85713999611994,"z":"90110745.0f08b8","wires":[]},{"id":"2dce07c3.4cdde8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1396.2262573242188,"y":372.1428455625262,"z":"90110745.0f08b8","wires":[["8c2318a2.ecf138","2d4f1679.5fff5a"]]},{"id":"2d4f1679.5fff5a","type":"save","name":"save (insert) generated name","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1636.2262573242188,"y":396.42858164651057,"z":"90110745.0f08b8","wires":[["e58686f1.2a8ec8"]]},{"id":"e58686f1.2a8ec8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1846.226188659668,"y":396.42863314492365,"z":"90110745.0f08b8","wires":[["c3a9c01e.0e1a8"]]},{"id":"c3a9c01e.0e1a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name=\"generate-unique-name-output.error-message\" value=\"Failed insert into GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":2000.512004852295,"y":396.42865221841,"z":"90110745.0f08b8","wires":[]},{"id":"8c2318a2.ecf138","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into GENERIC_RESOURCE_NAME values ( '\n+ ' $generate-unique-name-input.name-table-type , $generate-unique-name-input.supplied-name )'`\" />\n\n","comments":"","x":1596.226188659668,"y":346.4287590299334,"z":"90110745.0f08b8","wires":[]},{"id":"76d2de9f.d1d72","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into GENERIC_RESOURCE_NAME values ( '\n+ ' $generate-unique-name-input.name-table-type , $tmp.gun.generated-name )'`\" />\n\n","comments":"","x":1396.2262115478516,"y":2557.8571314130513,"z":"90110745.0f08b8","wires":[]},{"id":"30eb1a83.c57be6","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'\n+ ' AND name = $tmp.gun.generated-name'`\" />\n","comments":"","x":2044.3215103149414,"y":3430.238300732204,"z":"90110745.0f08b8","wires":[]},{"id":"9ece7ac0.84e2b8","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into GENERIC_RESOURCE_NAME values ( '\n+ ' $generate-unique-name-input.name-table-type , $tmp.gun.generated-name )'`\" />\n\n","comments":"","x":1920.0357055664062,"y":4114.523828915188,"z":"90110745.0f08b8","wires":[]},{"id":"77e2ebe5.4aacd4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to update ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2319.083396911621,"y":2422.1428484235494,"z":"90110745.0f08b8","wires":[]},{"id":"a64a1c5c.548e1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to insert record into ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2316.2260093688965,"y":2515.4286293302266,"z":"90110745.0f08b8","wires":[]},{"id":"382ec618.a7ddba","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1032.178508758545,"y":2752.8571705136983,"z":"90110745.0f08b8","wires":[["75ff300b.6f6dc"]]},{"id":"75ff300b.6f6dc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1183.0119171142578,"y":3364.523694447109,"z":"90110745.0f08b8","wires":[["4c9e63b6.428eec","1185013a.772fcf","cd5abdec.20e31","e38bddb.6889c2","48f231a0.1295b"]]},{"id":"c98722cf.dc1a3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1149.65482711792,"y":999.2857116971697,"z":"90110745.0f08b8","wires":[["4cecef4a.45b81"]]},{"id":"b91db4d1.5863b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1156.2262916564941,"y":1088.4285854612078,"z":"90110745.0f08b8","wires":[["2195c896.9afd38"]]},{"id":"2195c896.9afd38","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1287.654842376709,"y":1087.857191494533,"z":"90110745.0f08b8","wires":[["77a666ae.651d38","70192d95.678c34"]]},{"id":"880d7037.87ac9","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'\n+ ' AND name = $tmp.gun.generated-name'`\" />\n","comments":"","x":1540.0000267028809,"y":1821.4285945892334,"z":"90110745.0f08b8","wires":[]},{"id":"3e27b62f.f1d58a","type":"get-resource","name":"get-resource name","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.gun.sql`\" pfx='tmp.gun.namedb'>\n\n","comments":"","outputs":1,"x":1541.4286346435547,"y":1908.571517944336,"z":"90110745.0f08b8","wires":[["60c15f95.e82e1","bbed7686.7c8a78"]]},{"id":"68aae923.1b9ef8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":133.75,"y":315.0000047683716,"z":"90110745.0f08b8","wires":[["583423a0.c77f8c","f553193.f9377e8"]]},{"id":"f553193.f9377e8","type":"set","name":"clear variables","xml":"<set>\n<parameter name='generate-unique-name-output.error-message' value='' />\n<parameter name='generate-unique-name-output.generated-name' value='' />\n","comments":"","x":322.50000381469727,"y":290.00000381469727,"z":"90110745.0f08b8","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-activate.json
new file mode 100644
index 00000000..51cbef11
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-activate.json
@@ -0,0 +1 @@
+[{"id":"e6f39633.471c48","type":"dgstart","name":"DGSTART","outputs":1,"x":258.5714416503906,"y":97.14286041259766,"z":"10870127.4386af","wires":[["d6249e04.66f74"]]},{"id":"d6249e04.66f74","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":333.8571472167969,"y":137.38097190856934,"z":"10870127.4386af","wires":[["6c9006ff.722f08"]]},{"id":"6c9006ff.722f08","type":"method","name":"network-topology-operation-activate","xml":"<method rpc='network-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":375.2500762939453,"y":180.89285469055176,"z":"10870127.4386af","wires":[["913b7a05.ce48c8"]]},{"id":"913b7a05.ce48c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":374.57147216796875,"y":275.58634185791016,"z":"10870127.4386af","wires":[["483fa189.e48fa","4a952ce4.1e15f4","dd05a3dc.3a557","abcbde1a.155d9","4323ba0.5293848","64b80dfc.ef3a34","9e1fc71.9223838","c9ccd6fd.b061c8"]]},{"id":"4f6e01d6.e961e","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":894.5714416503906,"y":271.14286041259766,"z":"10870127.4386af","wires":[["a48d6330.48ebc"]]},{"id":"a48d6330.48ebc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"network-id not found in AAI\" />","comments":"","x":1057.7658386230469,"y":271.2540817260742,"z":"10870127.4386af","wires":[]},{"id":"483fa189.e48fa","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":659.2935485839844,"y":275.6274642944336,"z":"10870127.4386af","wires":[["4f6e01d6.e961e","f7be2e5e.033bb"]]},{"id":"f7be2e5e.033bb","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":887.2935485839844,"y":309.6274642944336,"z":"10870127.4386af","wires":[["54a3713d.2b9d5"]]},{"id":"54a3713d.2b9d5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + 'from AnAI'\" />","comments":"","x":1039.4046325683594,"y":309.84969329833984,"z":"10870127.4386af","wires":[]},{"id":"e6d2c8f2.14a568","type":"set","name":"set entity-id and plan-name","xml":"<set>\n\t<parameter name=\"eipam-ip-block.entity-id\" value=\"`$aai.l3-network.subnets.subnet[$sidx].subnet-id`\"/>\n\t<parameter name=\"eipam-ip-block.plans[0].plan-name\" value=\"`$tmp.eipam-subnet-row.plan-name`\"/>\n","comments":"","x":1087.6509094238281,"y":824.222297668457,"z":"10870127.4386af","wires":[]},{"id":"9db53dfb.ded5f","type":"for","name":"for 0..subnet_length","xml":"<for index='sidx' start='0' end='`$aai.l3-network.subnets.subnet_length`' >\n","comments":"","outputs":1,"x":703.9365539550781,"y":465.3651809692383,"z":"10870127.4386af","wires":[["6df15d6b.7d45e4"]]},{"id":"6df15d6b.7d45e4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":907.9365539550781,"y":465.5080032348633,"z":"10870127.4386af","wires":[["34e2f4cb.2f293c"]]},{"id":"34e2f4cb.2f293c","type":"get-resource","name":"get eipam-ip-subnet by subnet-id","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * from EIPAM_IP_SUBNETS where entity_id = $aai.l3-network.subnets.subnet[$sidx].subnet-id ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":863.0794677734375,"y":593.3651103973389,"z":"10870127.4386af","wires":[["5d8dc2c.3d6613c","4a3e4daf.fbea34","159507a4.d55848"]]},{"id":"d270ebed.73a6d8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNETS failed to find subnet matching aai subnet.\" />\n\t","comments":"","x":1271.2222290039062,"y":541.0793916881084,"z":"10870127.4386af","wires":[]},{"id":"5d8dc2c.3d6613c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1121.7938232421875,"y":609.0793621242046,"z":"10870127.4386af","wires":[["9a4c8eed.e5e32"]]},{"id":"4a3e4daf.fbea34","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1122.0841064453125,"y":543.0793916881084,"z":"10870127.4386af","wires":[["d270ebed.73a6d8"]]},{"id":"159507a4.d55848","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1122.9412155151367,"y":577.3651123046875,"z":"10870127.4386af","wires":[["3bd47e7c.2eb412"]]},{"id":"9a4c8eed.e5e32","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1274.507911682129,"y":610.5079824626446,"z":"10870127.4386af","wires":[["e6d2c8f2.14a568","d1f1dda7.2a7f","743c8d64.6209d4"]]},{"id":"3bd47e7c.2eb412","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Subnet not found in EIPAM_IP_SUBNETS - activate failed.\" />\n\t","comments":"","x":1270.222068786621,"y":573.3651428222656,"z":"10870127.4386af","wires":[]},{"id":"d1f1dda7.2a7f","type":"execute","name":"execute EIPAM activateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"activateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":1100.5079498291016,"y":867.0793867111206,"z":"10870127.4386af","wires":[["14296d10.9a71c3"]]},{"id":"14296d10.9a71c3","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1310.5079803466797,"y":868.4697523117065,"z":"10870127.4386af","wires":[["14bf629f.48693d"]]},{"id":"14bf629f.48693d","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while activating subnet in EIPAM.\" />\n\t","comments":"","x":1474.5079612731934,"y":867.1840448379517,"z":"10870127.4386af","wires":[]},{"id":"743c8d64.6209d4","type":"save","name":"Update subnet to Active in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n SET status = 'ACTIVE'\n WHERE entity_id = $eipam-ip-block.entity-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1099.0794525146484,"y":907.0793333053589,"z":"10870127.4386af","wires":[["b0892e3c.001c2","81c9d2da.4de6d","6955b5ef.93cc7c"]]},{"id":"d709d6dc.cc91a8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1467.6508331298828,"y":914.2222089767456,"z":"10870127.4386af","wires":[]},{"id":"6955b5ef.93cc7c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1318.222427368164,"y":982.2221794128418,"z":"10870127.4386af","wires":[["6d0338bb.0ea688"]]},{"id":"b0892e3c.001c2","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1318.512710571289,"y":916.2222089767456,"z":"10870127.4386af","wires":[["d709d6dc.cc91a8"]]},{"id":"81c9d2da.4de6d","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1319.3698196411133,"y":950.5079295933247,"z":"10870127.4386af","wires":[["a647d288.410a9"]]},{"id":"6d0338bb.0ea688","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1470.9365158081055,"y":983.6507997512817,"z":"10870127.4386af","wires":[["9c0c90cf.0e24"]]},{"id":"a647d288.410a9","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1466.6506729125977,"y":946.5079601109028,"z":"10870127.4386af","wires":[]},{"id":"9c0c90cf.0e24","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<parameter name=\"orchestration-status\" value=\"Created\" />\n\t\t","comments":"","outputs":1,"x":1696.22216796875,"y":984.3809642791748,"z":"10870127.4386af","wires":[["e6f35141.0faae","64a1bcb5.b701b4"]]},{"id":"1a14322d.73a58e","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.\" />\n\t","comments":"","x":2087.9683380126953,"y":974.2222089767456,"z":"10870127.4386af","wires":[]},{"id":"e2c902b5.a3806","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1938.5399322509766,"y":1042.2221794128418,"z":"10870127.4386af","wires":[["958ef34e.7f381"]]},{"id":"e6f35141.0faae","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1927.4015789031982,"y":980.5079393386841,"z":"10870127.4386af","wires":[["1a14322d.73a58e"]]},{"id":"64a1bcb5.b701b4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1939.6873245239258,"y":1010.5079295933247,"z":"10870127.4386af","wires":[["434dd028.03aa2"]]},{"id":"958ef34e.7f381","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2091.254020690918,"y":1043.6507997512817,"z":"10870127.4386af","wires":[[]]},{"id":"434dd028.03aa2","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet. Subnet not found.\" />\n\t","comments":"","x":2086.96817779541,"y":1006.5079601109028,"z":"10870127.4386af","wires":[]},{"id":"abcbde1a.155d9","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":667.3651161193848,"y":1390.507939338684,"z":"10870127.4386af","wires":[]},{"id":"64b80dfc.ef3a34","type":"set","name":"set object-path","xml":"<set>\n<parameter name='network-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/networks/network/'\n + $networkId\n + '/network-data/network-topology/'` \" />\n \n","comments":"","x":667.3690605163574,"y":1310.7019815444946,"z":"10870127.4386af","wires":[]},{"id":"4a952ce4.1e15f4","type":"set","name":"set networkId","xml":"<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n","comments":"","x":661.6546936035156,"y":1273.5590896606445,"z":"10870127.4386af","wires":[]},{"id":"dd05a3dc.3a557","type":"set","name":"set network-level-oper-status","xml":"<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status' value='Created' />\n<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`' />\n<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`' />\n","comments":"","x":709.6547546386719,"y":1356.1304550170898,"z":"10870127.4386af","wires":[]},{"id":"4323ba0.5293848","type":"switchNode","name":"switch $aai.l3-network.subnets.subnet_length","xml":"<switch test='`$aai.l3-network.subnets.subnet_length`'>\n","comments":"","outputs":1,"x":692.5714416503906,"y":369.1428909301758,"z":"10870127.4386af","wires":[["24ed13fa.fd22fc","87c32ead.5792"]]},{"id":"24ed13fa.fd22fc","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1012.5714416503906,"y":369.1428909301758,"z":"10870127.4386af","wires":[["55d6b99e.dc48b8"]]},{"id":"55d6b99e.dc48b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"no networks found\" />\n","comments":"","x":1234.3489685058594,"y":367.03186798095703,"z":"10870127.4386af","wires":[]},{"id":"87c32ead.5792","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":888.5714416503906,"y":409.1428909301758,"z":"10870127.4386af","wires":[["9db53dfb.ded5f"]]},{"id":"9e1fc71.9223838","type":"save","name":"update AnAI - network","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"Active\" />\t","comments":"","outputs":1,"x":699.2381057739258,"y":1153.476107597351,"z":"10870127.4386af","wires":[["503fe113.27f6d","728bfb7d.f2fb44"]]},{"id":"f1272b1f.5a1378","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for l3-network\" />\n\t","comments":"","x":1112.317611694336,"y":1138.9840593338013,"z":"10870127.4386af","wires":[]},{"id":"9d9f3cda.c470f","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":962.8892059326172,"y":1206.9840297698975,"z":"10870127.4386af","wires":[["ef2d84a7.0876f8"]]},{"id":"503fe113.27f6d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":951.7508525848389,"y":1145.2697896957397,"z":"10870127.4386af","wires":[["f1272b1f.5a1378"]]},{"id":"728bfb7d.f2fb44","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":964.0365982055664,"y":1175.2697799503803,"z":"10870127.4386af","wires":[["3ba7e47e.1480bc"]]},{"id":"ef2d84a7.0876f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1115.6032943725586,"y":1208.4126501083374,"z":"10870127.4386af","wires":[[]]},{"id":"3ba7e47e.1480bc","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for l3-network. Network not found.\" />\n\t","comments":"","x":1111.3174514770508,"y":1171.2698104679585,"z":"10870127.4386af","wires":[]},{"id":"c9ccd6fd.b061c8","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n","comments":"","x":703.0832290649414,"y":1233.5590562820435,"z":"10870127.4386af","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json
new file mode 100644
index 00000000..a1ee2f86
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json
@@ -0,0 +1 @@
+[{"id":"89493007.0268b","type":"dgstart","name":"DGSTART","outputs":1,"x":111,"y":80,"z":"1a8b5305.c085cd","wires":[["a4a8f170.658a9"]]},{"id":"a4a8f170.658a9","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":254.2856903076172,"y":140.2381067276001,"z":"1a8b5305.c085cd","wires":[["751a884f.6eaac8"]]},{"id":"751a884f.6eaac8","type":"method","name":"network-topology-operation-assign","xml":"<method rpc='network-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":229.96437072753906,"y":220.892840385437,"z":"1a8b5305.c085cd","wires":[["df0099f6.6eeb38"]]},{"id":"df0099f6.6eeb38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":189.28572845458984,"y":405.1578025817871,"z":"1a8b5305.c085cd","wires":[["b6852699.060e68","f58c2417.cbf1f8","91b6be2e.099cc","c7c72a39.652de8","8773a6fd.bcffa8","71a62cc6.0c1ad4","9c5b3463.cd7bf8","a057f23f.aa6af","868ff2ba.bc798","679ee129.c4252","34cb595d.aff816","a5f2c0c4.2e002","aa240c34.3d017","cae13e62.0dbe2","b7ab3890.826f88","a6f05dc6.5396f","2fbd77c1.048628","a9dd6669.a72c38","7a1a7c2.ce09484","5b1e35b2.5ea92c","60381262.576cfc","b629208a.09c27","4728dc8a.76ddd4","a2da1074.b277a","e495d7bf.6827a8","797304de.6cccec","ed1fbf08.fa0f9","cb2ae5c7.b8f7a8","2709264e.6759fa","ca6d6436.b4f728","61bb926f.cd7d7c","13db491e.a822c7","63bb1d97.e60064"]]},{"id":"b6852699.060e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":501.7738227844238,"y":3448.8575134277344,"z":"1a8b5305.c085cd","wires":[]},{"id":"f58c2417.cbf1f8","type":"switchNode","name":"switch network-model.is-bound-to-vpn","xml":"<switch test='`$network-model.is-bound-to-vpn`'>\n","comments":"","outputs":1,"x":577.6110610961914,"y":263.6111059188843,"z":"1a8b5305.c085cd","wires":[["c74440f1.9c51e"]]},{"id":"c74440f1.9c51e","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":842.6110649108887,"y":263.6111068725586,"z":"1a8b5305.c085cd","wires":[["9b88c546.2f2778"]]},{"id":"9b88c546.2f2778","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1005.3611068725586,"y":264.1110954284668,"z":"1a8b5305.c085cd","wires":[["960cc18d.2fd1b"]]},{"id":"be126fa6.e030e","type":"get-resource","name":"get-resource vpn-binding","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.vpn-id = $vpn-bindings[$vidx].binding-uuid\"\n pfx='aai.vpnBinding' local-only='false' >\n\n","comments":"","outputs":1,"x":2285.932662963867,"y":257.8849563598633,"z":"1a8b5305.c085cd","wires":[["612f7c79.d93d64","29e26ef4.5879a2","70ec648.56c6c9c"]]},{"id":"612f7c79.d93d64","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2521.8889961242676,"y":229.63891220092773,"z":"1a8b5305.c085cd","wires":[["b29726d5.228328"]]},{"id":"29e26ef4.5879a2","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2514.8889389038086,"y":262.972243309021,"z":"1a8b5305.c085cd","wires":[["b29726d5.228328"]]},{"id":"b29726d5.228328","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No vpn binding found for network-model.vpn-binding=' \n + $vpn-bindings[$vidx].binding-uuid`\" />\n\n","comments":"","x":2704.031726837158,"y":234.21033000946045,"z":"1a8b5305.c085cd","wires":[]},{"id":"91b6be2e.099cc","type":"switchNode","name":"switch network-request-information.network-name","xml":"<switch test='`$network-topology-operation-input.network-request-input.network-name`'>\n","comments":"","outputs":1,"x":604.3651161193848,"y":470.68650007247925,"z":"1a8b5305.c085cd","wires":[["22435a1e.c63286","1ea3bcf5.db62a3"]]},{"id":"a4d718a8.4b5a78","type":"comment","name":"if network-name not populated, generate","info":"","comments":"","x":577.8889389038086,"y":297.6388816833496,"z":"1a8b5305.c085cd","wires":[]},{"id":"22435a1e.c63286","type":"other","name":"outcome NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":899.5556564331055,"y":463.97219467163086,"z":"1a8b5305.c085cd","wires":[["1d9431b.4db66ce"]]},{"id":"1d9431b.4db66ce","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1092.8888549804688,"y":461.3055396080017,"z":"1a8b5305.c085cd","wires":[["a9e920ad.ae72"]]},{"id":"a9e920ad.ae72","type":"switchNode","name":"switch network-model.ecomp-generated-naming","xml":"<switch test='`$network-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1387.5554695129395,"y":459.3055396080017,"z":"1a8b5305.c085cd","wires":[["2c61b334.66b64c","a3fb55a9.a89968"]]},{"id":"2c61b334.66b64c","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1707.5555229187012,"y":447.30554962158203,"z":"1a8b5305.c085cd","wires":[["e30091c0.02f1a"]]},{"id":"e30091c0.02f1a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1876.305564880371,"y":447.80553817749023,"z":"1a8b5305.c085cd","wires":[["7a3fdfa5.4ccd4"]]},{"id":"a3fb55a9.a89968","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1698.7778129577637,"y":480.30554962158203,"z":"1a8b5305.c085cd","wires":[["da34b64.c9ee048"]]},{"id":"da34b64.c9ee048","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Network name is required if ecomp naming is false\" />\n\n","comments":"","x":1876.7778129577637,"y":479.30554962158203,"z":"1a8b5305.c085cd","wires":[]},{"id":"7a3fdfa5.4ccd4","type":"switchNode","name":"switch network-model.ecomp-generated-naming","xml":"<switch test='`$network-model.naming-policy`'>\n","comments":"","outputs":1,"x":2198.221389770508,"y":447.3055124282837,"z":"1a8b5305.c085cd","wires":[["f1453c06.5ed4a","6b66fa0f.19fd64","f9fba683.787ff8","e3a6601d.ee1c2","d21320c7.875be","3927bc9.ef1ad44"]]},{"id":"6b66fa0f.19fd64","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2501.2216873168945,"y":711.3055171966553,"z":"1a8b5305.c085cd","wires":[["42111482.a679dc"]]},{"id":"f1453c06.5ed4a","type":"other","name":"outcome org.openecomp.policy.naming.SriovProvider.SriovProviderNetwork","xml":"<outcome value='org.openecomp.policy.naming.SriovProvider.SriovProviderNetwork'>\n","comments":"","outputs":1,"x":2715.333381652832,"y":615.3055877685547,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"42111482.a679dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unknown naming policy = ' \n + $network-model.naming-policy`\" />\n\n","comments":"","x":2661.665948867798,"y":710.9721937179565,"z":"1a8b5305.c085cd","wires":[]},{"id":"36f8e62e.3e607a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3251.000175476074,"y":188.6388816833496,"z":"1a8b5305.c085cd","wires":[["e8c5e30.358142","dac3091b.c72dd8","61e7e703.d3e688","749f7e23.95d86","f1f2ca4a.1510c8","c5ab838b.1f37b"]]},{"id":"e8c5e30.358142","type":"set","name":"set nameformat","xml":"<set>\n<parameter name='tmp.network-name-prefix' value='$TenantName_int_$role_net' />\n","comments":"","x":3687.6187286376953,"y":85.40079879760742,"z":"1a8b5305.c085cd","wires":[]},{"id":"4ed6dd56.64d354","type":"set","name":"set nameformat","xml":"<set>\n<parameter name='tmp.network-name-prefix' value='$TenantName_$role_net' />\n","comments":"","x":3685.4286880493164,"y":127.25794219970703,"z":"1a8b5305.c085cd","wires":[]},{"id":"9269a69b.c004e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3201.57186126709,"y":615.3056554794312,"z":"1a8b5305.c085cd","wires":[["4ed6dd56.64d354","dac3091b.c72dd8","61e7e703.d3e688","749f7e23.95d86","f1f2ca4a.1510c8","c5ab838b.1f37b"]]},{"id":"f9fba683.787ff8","type":"other","name":"outcome org.openecomp.policy.naming.ViprProtectedOam.ViprOamProtectedNetwork","xml":"<outcome value='org.openecomp.policy.naming.ViprProtectedOam.ViprOamProtectedNetwork'>\n","comments":"","outputs":1,"x":2755.111503601074,"y":338.6389513015747,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"dac3091b.c72dd8","type":"execute","name":"execute SliStringUtils - replace tenantname","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-name-prefix`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-name-prefix\"/>\n <parameter name=\"target\" value=\"$TenantName\"/>\n <parameter name=\"replacement\" value=\"`$aai.tenant.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":3761.873222351074,"y":250.92461776733398,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"61e7e703.d3e688","type":"execute","name":"execute SliStringUtils - replace role","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-name-prefix`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-name-prefix\"/>\n <parameter name=\"target\" value=\"$role\"/>\n <parameter name=\"replacement\" value=\"`$network-model.network-role`\"/>\n\n","comments":"","outputs":1,"x":3734.873222351074,"y":285.924617767334,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"749f7e23.95d86","type":"get-resource","name":"get-resource NETWORK_INSTANCE_NAME_INDEX","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix\n = $tmp.network-name-prefix'\n pfx='db.network-name-prefix'>\n\n","comments":"","outputs":1,"x":3784.539970397949,"y":321.924617767334,"z":"1a8b5305.c085cd","wires":[["d1722a3d.4b95d8"]]},{"id":"f1f2ca4a.1510c8","type":"switchNode","name":"switch index-number","xml":"<switch test='`$db.network-name-prefix.index-number`'>\n","comments":"","outputs":1,"x":3690.25431060791,"y":426.21020221710205,"z":"1a8b5305.c085cd","wires":[["e5a7ba6c.507c58","27e6f16.769840e"]]},{"id":"27e6f16.769840e","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":3873.1113510131836,"y":467.63871574401855,"z":"1a8b5305.c085cd","wires":[["b0448576.a22c18"]]},{"id":"e5a7ba6c.507c58","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3874.5399017333984,"y":383.3530445098877,"z":"1a8b5305.c085cd","wires":[["7b9484b0.6f36cc"]]},{"id":"9b3d1da7.01a72","type":"save","name":"save (insert) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)\"\n force='false' pfx='pfx'>\n","comments":"","outputs":1,"x":4248.825759887695,"y":487.6390686035156,"z":"1a8b5305.c085cd","wires":[["63e45141.ca441"]]},{"id":"7f3fa0.f0f1d06","type":"set","name":"increment index number","xml":"<set>\n<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />\n","comments":"","x":4245.96854019165,"y":360.4960594177246,"z":"1a8b5305.c085cd","wires":[]},{"id":"b0448576.a22c18","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":4031.6828956604004,"y":466.21035957336426,"z":"1a8b5305.c085cd","wires":[["a01edb2f.ec40a8","9b3d1da7.01a72"]]},{"id":"d1722a3d.4b95d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4058.825611114502,"y":320.4960289001465,"z":"1a8b5305.c085cd","wires":[["f4b5aa4d.2456c8"]]},{"id":"f4b5aa4d.2456c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading the NETWORK_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4213.111427307129,"y":320.4960479736328,"z":"1a8b5305.c085cd","wires":[]},{"id":"a01edb2f.ec40a8","type":"set","name":"set new index number to 1","xml":"<set>\n<parameter name='tmp.index-number' value='1' />\n","comments":"","x":4254.54012298584,"y":444.78167724609375,"z":"1a8b5305.c085cd","wires":[]},{"id":"9005b1b8.d71dc","type":"save","name":"save (update) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"update NETWORK_INSTANCE_NAME_INDEX\n set index_number = $tmp.index-number\n where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix \"\n force='false' pfx='pfx'>\n","comments":"","outputs":1,"x":4253.111484527588,"y":401.9246120452881,"z":"1a8b5305.c085cd","wires":[["d17ac839.1a13f8"]]},{"id":"7b9484b0.6f36cc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":4031.682792663574,"y":381.9244918823242,"z":"1a8b5305.c085cd","wires":[["7f3fa0.f0f1d06","9005b1b8.d71dc"]]},{"id":"d17ac839.1a13f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4475.96854019165,"y":401.9246120452881,"z":"1a8b5305.c085cd","wires":[["957fcd83.2301e"]]},{"id":"957fcd83.2301e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to update SERVICE_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4630.254356384277,"y":401.9246311187744,"z":"1a8b5305.c085cd","wires":[]},{"id":"63e45141.ca441","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4474.539840698242,"y":487.6388244628906,"z":"1a8b5305.c085cd","wires":[["deb7415b.ff8fd"]]},{"id":"deb7415b.ff8fd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4628.825656890869,"y":487.63884353637695,"z":"1a8b5305.c085cd","wires":[]},{"id":"c5ab838b.1f37b","type":"set","name":"set tmp.network-instance-name","xml":"<set>\n<parameter name='tmp.network-instance-name' value=\"`$tmp.network-name-prefix + '_' + $tmp.index-number`\" />\n","comments":"","x":3727.825107574463,"y":505.3531255722046,"z":"1a8b5305.c085cd","wires":[]},{"id":"c7c72a39.652de8","type":"set","name":"set object-path","xml":"<set>\n<parameter name='network-object-path'\n value=\"`$tmp.l3-network.self-link`\"/>\n \n","comments":"","x":503.2063407897949,"y":3350.4801511764526,"z":"1a8b5305.c085cd","wires":[]},{"id":"8773a6fd.bcffa8","type":"set","name":"set networkId","xml":"<set>\n<parameter name='networkId' value='`$tmp.l3-network.network-id`' />\n","comments":"","x":504.63486099243164,"y":3304.765769958496,"z":"1a8b5305.c085cd","wires":[]},{"id":"a057f23f.aa6af","type":"set","name":"set network-level-oper-status","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='PendingCreate' />\n<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`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />\n","comments":"","x":550.9205741882324,"y":3396.194423675537,"z":"1a8b5305.c085cd","wires":[]},{"id":"71a62cc6.0c1ad4","type":"set","name":"set network in service-data","xml":"<set>\n<parameter name=\"service-data.networks.network[$nidx].network-id\" value='`$tmp.l3-network.network-id`' />\n<parameter name=\"service-data.networks.network[$nidx].network-data.network-topology.\" value='$network-topology.' />\n<parameter name=\"service-data.networks.network_length\" value='`$nidx+1`' />\n\n","comments":"","x":552.4920387268066,"y":3124.051595687866,"z":"1a8b5305.c085cd","wires":[]},{"id":"9c5b3463.cd7bf8","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />\n","comments":"","x":547.7300186157227,"y":3163.813540458679,"z":"1a8b5305.c085cd","wires":[]},{"id":"868ff2ba.bc798","type":"set","name":"set network-topology-identifier-structure in service-data","xml":"<set>\n<parameter name='network-topology.network-topology-identifier-structure.' value='`$tmp.l3-network.`' />\n<parameter name='network-topology.tenant' value='`$network-topology-operation-input.network-request-input.tenant`' />\n<parameter name='network-topology.ecomp-model-information.' value='`$network-topology-operation-input.network-information.ecomp-model-information.`' />\n<parameter name='network-topology.network-parameters.' value='`$network-topology-operation-input.network-request-input.network-parameters.`' />\n<parameter name='network-topology.aic-cloud-region' value='`$network-topology-operation-input.network-request-input.aic-cloud-region`' />","comments":"","x":637.4920539855957,"y":3016.908727169037,"z":"1a8b5305.c085cd","wires":[]},{"id":"679ee129.c4252","type":"switchNode","name":"switch service-data.networks_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":582.2538871765137,"y":3073.0992045402527,"z":"1a8b5305.c085cd","wires":[["d892cc25.abd2e","1419948c.74a04b"]]},{"id":"d892cc25.abd2e","type":"other","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":886.0634269714355,"y":3064.0516147613525,"z":"1a8b5305.c085cd","wires":[["256eeb6b.789b54"]]},{"id":"256eeb6b.789b54","type":"set","name":"set nidx","xml":"<set>\n<parameter name='nidx' value='0' />\n","comments":"","x":1066.0634689331055,"y":3061.6230306625366,"z":"1a8b5305.c085cd","wires":[]},{"id":"1419948c.74a04b","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":888.9205894470215,"y":3089.765887260437,"z":"1a8b5305.c085cd","wires":[["265dbf75.6b9f6"]]},{"id":"265dbf75.6b9f6","type":"set","name":"set nidx","xml":"<set>\n<parameter name='nidx' value='`$service-data.networks.network_length`' />\n","comments":"","x":1067.4920196533203,"y":3098.6230878829956,"z":"1a8b5305.c085cd","wires":[]},{"id":"70ec648.56c6c9c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2517.999942779541,"y":194.00002670288086,"z":"1a8b5305.c085cd","wires":[["25c11570.4e18ba"]]},{"id":"25c11570.4e18ba","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2682.999942779541,"y":194.00002670288086,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ea7bbc28.439ef","type":"comment","name":"pull vpn binding from db table vs field","info":"","comments":"","x":1884.0740661621094,"y":187.53438568115234,"z":"1a8b5305.c085cd","wires":[]},{"id":"2dde48f4.4544e8","type":"for","name":"for 0..vpn-bindings_length","xml":"<for index='vidx' start='0' end='`$vpn-bindings_length`' >\n","comments":"","outputs":1,"x":1858.4393882751465,"y":256.34392642974854,"z":"1a8b5305.c085cd","wires":[["654f5072.a2802"]]},{"id":"654f5072.a2802","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2066.9150428771973,"y":258.4233341217041,"z":"1a8b5305.c085cd","wires":[["be126fa6.e030e"]]},{"id":"911dd542.ed2ee8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Unexpected error retrieving vpn binding\" />\n\n","comments":"","x":1638.6769752502441,"y":330.77249813079834,"z":"1a8b5305.c085cd","wires":[]},{"id":"32d5ba47.7aac96","type":"set","name":"set hasVpnBindings=true","xml":"<set>\n<parameter name='hasVpnBindings' value='true' />\n","comments":"","x":1856.6137466430664,"y":224.91532611846924,"z":"1a8b5305.c085cd","wires":[]},{"id":"1ea3bcf5.db62a3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":887.1851005554199,"y":520.2963137626648,"z":"1a8b5305.c085cd","wires":[["e6e8dae5.027898"]]},{"id":"34cb595d.aff816","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND\n\t\t tenant.tenant-id = $network-topology-operation-input.network-request-input.tenant\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":516.6295700073242,"y":382.962947845459,"z":"1a8b5305.c085cd","wires":[["8869ece2.c675b","49964e35.7bcd","f9e58c7b.aacc4"]]},{"id":"8869ece2.c675b","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":737.4909591674805,"y":375.5740623474121,"z":"1a8b5305.c085cd","wires":[["12cdda76.c90c96"]]},{"id":"49964e35.7bcd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":732.8239860534668,"y":408.9073762893677,"z":"1a8b5305.c085cd","wires":[["12cdda76.c90c96"]]},{"id":"12cdda76.c90c96","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":933.666633605957,"y":383.6296272277832,"z":"1a8b5305.c085cd","wires":[]},{"id":"4f0e6905.0b7fa8","type":"set","name":"set tmp.network-instance-name","xml":"<set>\n<parameter name='tmp.network-instance-name' value=\"`$network-topology-operation-input.network-request-input.network-name`\" />\n","comments":"","x":1342.3702583312988,"y":520.2962832450867,"z":"1a8b5305.c085cd","wires":[]},{"id":"e6e8dae5.027898","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1085.7036628723145,"y":520.2962832450867,"z":"1a8b5305.c085cd","wires":[["4f0e6905.0b7fa8"]]},{"id":"aa240c34.3d017","type":"set","name":"set tmp.l3-network","xml":"<set>\n<parameter name='tmp.l3-network.network-id' value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n<parameter name='tmp.l3-network.network-name' value=\"`$tmp.network-instance-name`\" />\n<parameter name='tmp.l3-network.network-type' value=\"`$network-model.network-type`\" />\n<parameter name='tmp.l3-network.network-role' value=\"`$network-model.network-role`\" />\n<parameter name='tmp.l3-network.network-technology' value=\"`$network-model.network-technology`\" />\n<parameter name='tmp.l3-network.is-bound-to-vpn' value=\"`$network-model.is-bound-to-vpn`\" />\n<parameter name='tmp.l3-network.orchestration-status' value=\"PendingCreate\" />\n<parameter name='tmp.l3-network.model-invariant-id' value=\"`$network-topology-operation-input.network-information.ecomp-model-information.model-invariant-uuid`\" />\n<parameter name='tmp.l3-network.model-version-id' value=\"`$network-topology-operation-input.network-information.ecomp-model-information.model-version`\" />\n<parameter name='tmp.l3-network.model-customization-id' value=\"`$network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid`\" />\n<parameter name='tmp.l3-network.is-provider-network' value=\"`$network-model.is-provider-network`\" />\n<parameter name='tmp.l3-network.is-shared-network' value=\"`$network-model.is-shared-network`\" />\n<parameter name='tmp.l3-network.is-external-network' value=\"`$network-model.is-external-network`\" />\n<parameter name='tmp.l3-network.eipam-v6-address-plan' value=\"`$network-model.eipam-v6-address-plan`\" />\n<parameter name='tmp.l3-network.eipam-v4-address-plan' value=\"`$network-model.eipam-v4-address-plan`\" />\n<parameter name='tmp.l3-network.service-id' value=\"`$service-data.service-information.service-id`\" />\n<parameter name='tmp.l3-network.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/networks/network/'\n + $tmp.l3-network.network-id\n + '/network-data/network-topology/'` \" />\n","comments":"","x":509.244140625,"y":653.2910766601562,"z":"1a8b5305.c085cd","wires":[]},{"id":"a5f2c0c4.2e002","type":"call","name":"call generate-l3network-network-id","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-l3network-network-id' mode='sync' >\n","comments":"","outputs":1,"x":556.3866653442383,"y":605.7196311950684,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"cae13e62.0dbe2","type":"switchNode","name":"switch network--model.is-provider-network","xml":"<switch test='`$network-model.is-provider-network`'>\n","comments":"","outputs":1,"x":582.7352676391602,"y":694.5768089294434,"z":"1a8b5305.c085cd","wires":[["89c6a854.601f48","7724a3fb.17a6ec"]]},{"id":"89c6a854.601f48","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":882.8784408569336,"y":679.402265548706,"z":"1a8b5305.c085cd","wires":[["602f391.030b8c8"]]},{"id":"602f391.030b8c8","type":"set","name":"set tmp.l3-network.physical-network-name","xml":"<set>\n<parameter name='tmp.l3-network.physical-network-name' value=\"`$network-model.physical-network-name`\" />\n<parameter name='tmp.l3-network.is-provider-network-boolean' value='true' />","comments":"","x":1150.8782958984375,"y":676.4022312164307,"z":"1a8b5305.c085cd","wires":[]},{"id":"4728dc8a.76ddd4","type":"set","name":"set tmp.network-topology","xml":"<set>\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-id' value=\"`$tmp.l3-network.network-name`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-name' value=\"`$tmp.l3-network.network-name`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-type' value=\"`$tmp.l3-network.network-type`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-role' value=\"`$tmp.l3-network.network-role`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-technology' value=\"`$tmp.l3-network.network-technology`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v4-address-plan' value=\"`$network-model.eipam-v4-address-plan`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v6-address-plan' value=\"`$network-model.eipam-v6-address-plan`\" />\n<parameter name='tmp.network-topology.region-identifier.tenant' value=\"`$network-topology-operation-input.network-request-input.tenant`\" />\n<parameter name='tmp.network-topology.region-identifier.aic-cloud-region' value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n<parameter name='tmp.network-topology.region-identifier.aic-clli' value=\"`$network-topology-operation-input.network-request-input.aic-clli`\" />\n<parameter name='tmp.network-topology.ecomp-model-information.' value=\"`$network-topology-operation-input.network-information.ecomp-model-information.`\" />\n<parameter name='tmp.network-topology.network-parameters.' value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.`\" />\n","comments":"","x":577.4101905822754,"y":2448.9736881256104,"z":"1a8b5305.c085cd","wires":[]},{"id":"bc4df92.6ad6f08","type":"switchNode","name":"switch network-model.eipam-v4-address-plan (VIPR)","xml":"<switch test='`$network-model.eipam-v4-address-plan`'>\n","comments":"","outputs":1,"x":2028.5613021850586,"y":1388.909984588623,"z":"1a8b5305.c085cd","wires":[["5efa60f2.f4a81","464197e1.4cabd8","b87722fe.57e3c","279f950e.baf49a"]]},{"id":"5efa60f2.f4a81","type":"other","name":"AIC_ATM_UNPROTECTED_V4","xml":"<outcome value='AIC_ATM_UNPROTECTED_V4'>","comments":"","outputs":1,"x":2488.560722351074,"y":1357.9098014831543,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"464197e1.4cabd8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2412.2276878356934,"y":1473.2434101104736,"z":"1a8b5305.c085cd","wires":[["54efc2e2.b2c12c"]]},{"id":"797304de.6cccec","type":"save","name":"save relationship: service-instance","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"service-instance\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"customer.global-customer-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.service-information.global-customer-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"service-subscription.service-type\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$service-data.service-information.subscription-service-type`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"service-instance.service-instance-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$service-data.service-information.service-instance-id`\" />","comments":"","outputs":1,"x":617.2711410522461,"y":2710.8468132019043,"z":"1a8b5305.c085cd","wires":[["2f4f1f7c.f19a9","29f88949.932b36"]]},{"id":"b87722fe.57e3c","type":"other","name":"AIC_ATM_PROTECTED_V4","xml":"<outcome value='AIC_ATM_PROTECTED_V4'>","comments":"","outputs":1,"x":2478.449333190918,"y":1395.4656400680542,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"54efc2e2.b2c12c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid address plan for VIPR\" />\n","comments":"","x":2583.1158714294434,"y":1474.5766925811768,"z":"1a8b5305.c085cd","wires":[]},{"id":"ccfde65e.e5a838","type":"switchNode","name":"switch network-model.eipam-v4-address-plan (SRIOV)","xml":"<switch test='`$network-model.eipam-v4-address-plan`'>\n","comments":"","outputs":1,"x":2064.2953033447266,"y":1737.5170440673828,"z":"1a8b5305.c085cd","wires":[["7d69ddb.4eb1724","661e7fce.8d3e6","cb5bdfca.b22e2","2a9685d1.8f282a"]]},{"id":"7d69ddb.4eb1724","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V4","xml":"<outcome value='AIC_DATA_PLANE_UNPROTECTED_V4'>","comments":"","outputs":1,"x":2531.5452423095703,"y":1736.7669706344604,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"661e7fce.8d3e6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2424.15252494812,"y":1851.588595867157,"z":"1a8b5305.c085cd","wires":[["e08c16f9.560da8"]]},{"id":"cb5bdfca.b22e2","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V4","xml":"<outcome value='AIC_DATA_PLANE_PROTECTED_V4'>","comments":"","outputs":1,"x":2527.9339141845703,"y":1773.5725135803223,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"e08c16f9.560da8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid address plan for SRIOV\" />\n","comments":"","x":2570.0407104492188,"y":1854.1718482971191,"z":"1a8b5305.c085cd","wires":[]},{"id":"2a9685d1.8f282a","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V4","xml":"<outcome value='AIC_DATA_PLANE_PRIVATE_V4'>","comments":"","outputs":1,"x":2510.1525268554688,"y":1812.3384685516357,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"14bf4e76.feb402","type":"switchNode","name":"switch network-model.eipam-v6-address-plan","xml":"<switch test='`$network-model.eipam-v6-address-plan`'>\n","comments":"","outputs":1,"x":2008.493263244629,"y":1556.5017204284668,"z":"1a8b5305.c085cd","wires":[["24428acd.934a56","a8641e83.b8db7","95022c2.dc0f4d","e1a0deaa.2971a"]]},{"id":"a2da1074.b277a","type":"save","name":"save AnAI - l3-network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"network-name\" value=\"`$tmp.l3-network.network-name`\" />\n<parameter name=\"network-type\" value=\"`$tmp.l3-network.network-type`\" />\n<parameter name=\"network-role\" value=\"`$tmp.l3-network.network-role`\" />\n<parameter name=\"network-technology\" value=\"`$tmp.l3-network.network-technology`\" />\n<parameter name=\"is-bound-to-vpn\" value=\"`$tmp.l3-network.is-bound-to-vpn`\" />\n<parameter name=\"service-id\" value=\"`$tmp.l3-network.service-id`\" />\n<parameter name=\"tenant-id\" value=\"`$network-topology-operation-input.network-request-information.tenant`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />\n<parameter name=\"persona-model-id\" value=\"`$tmp.l3-network.persona-model-id`\" />\n<parameter name=\"persona-model-version\" value=\"`$tmp.l3-network.persona-model-version`\" />\n<parameter name=\"persona-model-customization-id\" value=\"`$tmp.l3-network.persona-model-customization-id`\" />\n<parameter name=\"physical-network-name\" value=\"`$tmp.l3-network.physical-network-name`\" />\n<parameter name=\"is-provider-network\" value=\"`$tmp.l3-network.is-provider-network-boolean`\" />\n<parameter name=\"is-shared-network\" value=\"`$tmp.l3-network.is-shared-network-boolean`\" />\n<parameter name=\"is-external-network\" value=\"`$tmp.l3-network.is-external-network-boolean`\" />\n<parameter name=\"selflink\" value=\"`$tmp.l3-network.self-link`\" />\n","comments":"","outputs":1,"x":560.1203231811523,"y":2508.6126823425293,"z":"1a8b5305.c085cd","wires":[["c40893c5.bed6a","cc2e1488.ed29e8"]]},{"id":"a3b08dd5.410cf","type":"switchNode","name":"switch network-model.eipam-v6-address-plan (SRIOV)","xml":"<switch test='`$network-model.eipam-v6-address-plan`'>\n","comments":"","outputs":1,"x":2100.3426971435547,"y":1955.7078790664673,"z":"1a8b5305.c085cd","wires":[["9370dcee.b1658","230c5ba9.b8ec14","8421ed93.f98dc","d1efeef1.782e5","c7ab8d9a.6efc4","4e216a04.bdc844"]]},{"id":"9370dcee.b1658","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2434.770872116089,"y":2150.6365903019905,"z":"1a8b5305.c085cd","wires":[["e7e4c219.08456"]]},{"id":"e7e4c219.08456","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid ipv6 address plan for SRIOV\" />\n","comments":"","x":2600.6589279174805,"y":2149.6485112309456,"z":"1a8b5305.c085cd","wires":[]},{"id":"230c5ba9.b8ec14","type":"other","name":"AIC_ATM_UNPROTECTED_V6","xml":"<outcome value=\"AIC_ATM_UNPROTECTED_V6\">","comments":"","outputs":1,"x":2503.6082305908203,"y":1956.9102249145508,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"8421ed93.f98dc","type":"other","name":"AIC_ATM_PROTECTED_V6","xml":"<outcome value=\"AIC_ATM_PROTECTED_V6\">","comments":"","outputs":1,"x":2498.893585205078,"y":1998.9102478027344,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"d1efeef1.782e5","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_UNPROTECTED_V6\">","comments":"","outputs":1,"x":2538.795234680176,"y":2037.0531024932861,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"4e216a04.bdc844","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PROTECTED_V6\">","comments":"","outputs":1,"x":2527.509864807129,"y":2104.4815190434456,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"c7ab8d9a.6efc4","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PRIVATE_V6\">","comments":"","outputs":1,"x":2515.795440673828,"y":2071.910224914551,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"7724a3fb.17a6ec","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":870.2434997558594,"y":710.2752866744995,"z":"1a8b5305.c085cd","wires":[["e943ec69.aeaf6"]]},{"id":"e943ec69.aeaf6","type":"set","name":"set tmp.l3-network.physical-network-name","xml":"<set>\n<parameter name='tmp.l3-network.physical-network-name' value=\"\" />\n<parameter name='tmp.l3-network.is-provider-network-boolean' value='false' />","comments":"","x":1154.5294570922852,"y":708.8467178344727,"z":"1a8b5305.c085cd","wires":[]},{"id":"b7ab3890.826f88","type":"switchNode","name":"switch network--model.is-shared-network","xml":"<switch test='`$network-model.is-shared-network`'>\n","comments":"","outputs":1,"x":583.7351722717285,"y":741.878303527832,"z":"1a8b5305.c085cd","wires":[["ddbe6021.0df94","43db457d.275bfc"]]},{"id":"ddbe6021.0df94","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":881.0210113525391,"y":745.2752389907837,"z":"1a8b5305.c085cd","wires":[["dfdc8285.e2d84"]]},{"id":"dfdc8285.e2d84","type":"set","name":"set tmp.l3-network.is-shared-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-shared-network-boolean' value='true' />","comments":"","x":1173.3067245483398,"y":745.2750864028931,"z":"1a8b5305.c085cd","wires":[]},{"id":"43db457d.275bfc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":869.8150367736816,"y":780.5767459869385,"z":"1a8b5305.c085cd","wires":[["48fd2235.78fcdc"]]},{"id":"48fd2235.78fcdc","type":"set","name":"set tmp.l3-network.is-shared-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-shared-network-boolean' value='false' />","comments":"","x":1174.1009559631348,"y":780.4339237213135,"z":"1a8b5305.c085cd","wires":[]},{"id":"a6f05dc6.5396f","type":"switchNode","name":"switch network--model.is-external-network","xml":"<switch test='`$network-model.is-external-network`'>\n","comments":"","outputs":1,"x":586.7517318725586,"y":810.5926513671875,"z":"1a8b5305.c085cd","wires":[["dde6ab06.666f48","3f618dc2.181b72"]]},{"id":"dde6ab06.666f48","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":884.0375709533691,"y":813.9895868301392,"z":"1a8b5305.c085cd","wires":[["fa82ba7a.274818"]]},{"id":"fa82ba7a.274818","type":"set","name":"set tmp.l3-network.is-external-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-external-network-boolean' value='true' />","comments":"","x":1176.32328414917,"y":813.9894342422485,"z":"1a8b5305.c085cd","wires":[]},{"id":"3f618dc2.181b72","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":872.8315963745117,"y":849.291093826294,"z":"1a8b5305.c085cd","wires":[["1d5e084a.a29b78"]]},{"id":"1d5e084a.a29b78","type":"set","name":"set tmp.l3-network.is-external-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-external-network-boolean' value='false' />","comments":"","x":1177.1175155639648,"y":849.148271560669,"z":"1a8b5305.c085cd","wires":[]},{"id":"3837a2bc.6e158e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to save l3-network in AAI for network-id = ' + $tmp.l3-network.network-id`\" />\n","comments":"","x":1023.7992134094238,"y":2491.6560916900635,"z":"1a8b5305.c085cd","wires":[]},{"id":"c40893c5.bed6a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":795.2278213500977,"y":2490.671829223633,"z":"1a8b5305.c085cd","wires":[["3837a2bc.6e158e"]]},{"id":"8d2ed5fd.a2be38","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnet-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.l3-network.subnet[$sidx].gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$tmp.l3-network.subnet[$sidx].network-start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$tmp.l3-network.subnet[$sidx].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.l3-network.subnet[$sidx].ip-version`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1678.6559104919434,"y":2591.67188167572,"z":"1a8b5305.c085cd","wires":[["10173bcb.62db54","304a38c0.5ac098"]]},{"id":"e495d7bf.6827a8","type":"for","name":"for 0..subnet_length","xml":"<for index='sidx' start='0' end='`$tmp.l3-network.subnet_length`' >\n","comments":"","outputs":1,"x":562.2121324539185,"y":2569.6719675064087,"z":"1a8b5305.c085cd","wires":[["9a14be8b.c4dce"]]},{"id":"9a14be8b.c4dce","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":789.3548126220703,"y":2568.5609188079834,"z":"1a8b5305.c085cd","wires":[["113cc2e1.6bb4ed","cb48f70c.4ee7f8"]]},{"id":"10173bcb.62db54","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1934.4962425231934,"y":2548.1478338241577,"z":"1a8b5305.c085cd","wires":[["e72b852c.6da448"]]},{"id":"ed1fbf08.fa0f9","type":"save","name":"save relationship: tenant and cloud-region","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t<!-- create relationship-list -->\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"tenant\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"att-aic\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"tenant.tenant-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.tenant`\" />\n\t<parameter name=\"relationship-list.relationship[1].related-to\" value=\"cloud-region\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-value\" value=\"att-aic\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n\t\n\t","comments":"","outputs":1,"x":617.9264144897461,"y":2846.2435417175293,"z":"1a8b5305.c085cd","wires":[["f876d5b8.4f26c8","9ea6263d.2cf398"]]},{"id":"f876d5b8.4f26c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":865.9264183044434,"y":2846.243532180786,"z":"1a8b5305.c085cd","wires":[["e0ef3b91.882348"]]},{"id":"e0ef3b91.882348","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1054.3192462921143,"y":2845.879650115967,"z":"1a8b5305.c085cd","wires":[["74512067.32d89","21428fc3.65275"]]},{"id":"74512067.32d89","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<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`\"/>","comments":"","x":1300.0851249694824,"y":2836.5820569992065,"z":"1a8b5305.c085cd","wires":[]},{"id":"304a38c0.5ac098","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1943.2193870544434,"y":2585.79102230072,"z":"1a8b5305.c085cd","wires":[["e72b852c.6da448"]]},{"id":"9ea6263d.2cf398","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":873.9342613220215,"y":2888.0768547058105,"z":"1a8b5305.c085cd","wires":[["e0ef3b91.882348"]]},{"id":"2f4f1f7c.f19a9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":853.4181060791016,"y":2709.989246368408,"z":"1a8b5305.c085cd","wires":[["10d1d9fc.30afb6"]]},{"id":"29f88949.932b36","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":864.1411399841309,"y":2743.632335662842,"z":"1a8b5305.c085cd","wires":[["10d1d9fc.30afb6"]]},{"id":"48994ca2.f68244","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\">","comments":"","outputs":1,"x":1814.7355880737305,"y":3411.2118644714355,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ca9121d3.7a07d","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Error writing to l3-network - ' + $tmp.error-message`\"/>","comments":"","x":1803.3397216796875,"y":3454.407875061035,"z":"1a8b5305.c085cd","wires":[]},{"id":"21428fc3.65275","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1624.911849975586,"y":3411.4634532928467,"z":"1a8b5305.c085cd","wires":[["48994ca2.f68244","ca9121d3.7a07d"]]},{"id":"dc5a36f4.8bbba8","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<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`\"/>","comments":"","x":2374.3692893981934,"y":2563.0052556991577,"z":"1a8b5305.c085cd","wires":[]},{"id":"e72b852c.6da448","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2119.2267112731934,"y":2562.4337224960327,"z":"1a8b5305.c085cd","wires":[["dc5a36f4.8bbba8","21428fc3.65275"]]},{"id":"cc2e1488.ed29e8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":799.0373191833496,"y":2520.1482458114624,"z":"1a8b5305.c085cd","wires":[["3837a2bc.6e158e"]]},{"id":"113cc2e1.6bb4ed","type":"set","name":"set: tmp.subnet-id","xml":"<set>\n<parameter name=\"tmp.subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\"/>\n\t","comments":"","x":1015.4183883666992,"y":2528.8146476745605,"z":"1a8b5305.c085cd","wires":[]},{"id":"cb48f70c.4ee7f8","type":"switchNode","name":"switch dhcp-enabled","xml":"<switch test='`$tmp.l3-network.subnet[$sidx].dhcp-enabled`'>\n","comments":"","outputs":1,"x":1018.7674827575684,"y":2573.683539390564,"z":"1a8b5305.c085cd","wires":[["332a0d9a.2096e2","37b18102.98d6ce"]]},{"id":"37b18102.98d6ce","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1252.7674827575684,"y":2549.6836614608765,"z":"1a8b5305.c085cd","wires":[["bbfc739f.96b1"]]},{"id":"332a0d9a.2096e2","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1250.7674827575684,"y":2585.6836614608765,"z":"1a8b5305.c085cd","wires":[["4c50ff55.54e58"]]},{"id":"412912ba.445eac","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnet-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.l3-network.subnet[$sidx].gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$tmp.l3-network.subnet[$sidx].network-start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$tmp.l3-network.subnet[$sidx].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.l3-network.subnet[$sidx].ip-version`\" />\n<parameter name=\"dhcp-start\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-start`\" />\n<parameter name=\"dhcp-end\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-end`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1678.7672386169434,"y":2547.68360042572,"z":"1a8b5305.c085cd","wires":[["304a38c0.5ac098","10173bcb.62db54"]]},{"id":"bbfc739f.96b1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1443.6559104919434,"y":2549.906012535095,"z":"1a8b5305.c085cd","wires":[["412912ba.445eac"]]},{"id":"4c50ff55.54e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1443.6561546325684,"y":2589.906012535095,"z":"1a8b5305.c085cd","wires":[["8d2ed5fd.a2be38"]]},{"id":"3917cd9.7ed7c32","type":"for","name":"for 0..vpn-bindings_length","xml":"<for index='vidx' start='0' end='`$vpn-bindings_length`' >\n","comments":"","outputs":1,"x":1144.9518966674805,"y":2649.239086151123,"z":"1a8b5305.c085cd","wires":[["7c900881.645018"]]},{"id":"cb2ae5c7.b8f7a8","type":"switchNode","name":"switch hasVpnBindings","xml":"<switch test='`$hasVpnBindings`'>\n","comments":"","outputs":1,"x":585.6190299987793,"y":2650.202492713928,"z":"1a8b5305.c085cd","wires":[["8207c0b3.22e3f"]]},{"id":"6cf30f85.f2632","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":946.285758972168,"y":2651.535472869873,"z":"1a8b5305.c085cd","wires":[["3917cd9.7ed7c32"]]},{"id":"5f2018d1.a1d508","type":"save","name":"save relationship: vpn_bindings","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-binding\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-binding.vpn-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vpn-bindings[$vidx].binding-uuid`\" />","comments":"","outputs":1,"x":1606.285514831543,"y":2649.202220916748,"z":"1a8b5305.c085cd","wires":[["c08b58ea.2e93c8","6ffa9708.073958"]]},{"id":"c08b58ea.2e93c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1838.0251121520996,"y":2648.0110969543457,"z":"1a8b5305.c085cd","wires":[["a8bf5972.afc6a8"]]},{"id":"a8bf5972.afc6a8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1994.9179916381836,"y":2647.647204399109,"z":"1a8b5305.c085cd","wires":[["21428fc3.65275","55da40d2.2f072"]]},{"id":"6ffa9708.073958","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1847.0555114746094,"y":2682.289525985718,"z":"1a8b5305.c085cd","wires":[["a8bf5972.afc6a8"]]},{"id":"7c900881.645018","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1362.6186447143555,"y":2651.201976776123,"z":"1a8b5305.c085cd","wires":[["5f2018d1.a1d508"]]},{"id":"10d1d9fc.30afb6","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1045.581932067871,"y":2709.5356254577637,"z":"1a8b5305.c085cd","wires":[["21428fc3.65275","fd152d37.d5acd"]]},{"id":"fd152d37.d5acd","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<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`\"/>","comments":"","x":1270.581932067871,"y":2708.202251434326,"z":"1a8b5305.c085cd","wires":[]},{"id":"55da40d2.2f072","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<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`\"/>","comments":"","x":2222.581886291504,"y":2646.8689556121826,"z":"1a8b5305.c085cd","wires":[]},{"id":"b629208a.09c27","type":"switchNode","name":"switch network-technology","xml":"<switch test='`$network-model.network-technology`'>\n","comments":"","outputs":1,"x":546.1110458374023,"y":1389.4443473815918,"z":"1a8b5305.c085cd","wires":[["5d98c991.20e8f8","9d4e2f0d.1638","bcb49c2d.d02b3"]]},{"id":"a9dd6669.a72c38","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND \n\t\t depth = '0'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":543.444450378418,"y":982.4443778991699,"z":"1a8b5305.c085cd","wires":[["b1b41c5c.6ac73","b1eb8b68.e93818"]]},{"id":"b1eb8b68.e93818","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":765.8335571289062,"y":1019.1665458679199,"z":"1a8b5305.c085cd","wires":[["358bf8ac.301e38"]]},{"id":"358bf8ac.301e38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":944.1192016601562,"y":1019.1665458679199,"z":"1a8b5305.c085cd","wires":[]},{"id":"b1b41c5c.6ac73","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":772.333553314209,"y":983.1666069030762,"z":"1a8b5305.c085cd","wires":[["cccc3223.636ff"]]},{"id":"cccc3223.636ff","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":940.1113891601562,"y":982.4721488952637,"z":"1a8b5305.c085cd","wires":[]},{"id":"9de966ff.c0be48","type":"comment","name":"Per test failure in IT, need to throw error if relationships don't exist","info":"","comments":"","x":661.6946868896484,"y":939.5276851654053,"z":"1a8b5305.c085cd","wires":[]},{"id":"2fbd77c1.048628","type":"set","name":"set tmp.complex-found","xml":"<set>\n<parameter name='tmp.complex-found' value='false' />\n\n","comments":"","x":529.8890609741211,"y":882.8332328796387,"z":"1a8b5305.c085cd","wires":[]},{"id":"93a30dfc.d4482","type":"get-resource","name":"get-resource complex","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"complex\" \n\t\tkey=\"complex.physical-location-id = $aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value\"\n pfx='aai.complex' local-only='false' >\n \n\n\n","comments":"","outputs":1,"x":1634.999870300293,"y":1202.4444198608398,"z":"1a8b5305.c085cd","wires":[["4044fb25.8ce8c4","898fafd9.df1f5","9249c225.c0f71"]]},{"id":"898fafd9.df1f5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1866.6391830444336,"y":1261.916404724121,"z":"1a8b5305.c085cd","wires":[["97d0bcc0.ddc29"]]},{"id":"97d0bcc0.ddc29","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving complex from AAI\" />\n","comments":"","x":2040.9248275756836,"y":1261.916404724121,"z":"1a8b5305.c085cd","wires":[]},{"id":"4044fb25.8ce8c4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1869.1391792297363,"y":1221.9164657592773,"z":"1a8b5305.c085cd","wires":[["b737ddd0.c8ed4"]]},{"id":"b737ddd0.c8ed4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex not found in AAI\" />\n","comments":"","x":2036.917106628418,"y":1221.2218132019043,"z":"1a8b5305.c085cd","wires":[]},{"id":"5b1e35b2.5ea92c","type":"for","name":"for relationship list","xml":"<for silentFailure='false' index='ridx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship_length`\" >\n","comments":"","outputs":1,"x":509.86153411865234,"y":1158.6747665405273,"z":"1a8b5305.c085cd","wires":[["6b0ad57f.0fe9cc"]]},{"id":"862e6c4c.7a97","type":"switchNode","name":"switch","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":915.361198425293,"y":1162.3888778686523,"z":"1a8b5305.c085cd","wires":[["5eb1534d.ddb1fc"]]},{"id":"6b0ad57f.0fe9cc","type":"for","name":"for relationship data","xml":"<for silentFailure='false' index='rdidx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data_length`\" >\n","comments":"","outputs":1,"x":732.7779769897461,"y":1159.6389999389648,"z":"1a8b5305.c085cd","wires":[["862e6c4c.7a97"]]},{"id":"5eb1534d.ddb1fc","type":"other","name":"complex.physical-location-id","xml":"<outcome value='complex.physical-location-id'>\n","comments":"","outputs":1,"x":1137.8612594604492,"y":1160.8055038452148,"z":"1a8b5305.c085cd","wires":[["ec522bfd.604bd8"]]},{"id":"ec522bfd.604bd8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1377.2775802612305,"y":1158.5556259155273,"z":"1a8b5305.c085cd","wires":[["93a30dfc.d4482","a0b8ae7e.73db","1478ab7a.138b25"]]},{"id":"9249c225.c0f71","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1861.6669752332891,"y":1175.9721787770586,"z":"1a8b5305.c085cd","wires":[["73c62e58.62479"]]},{"id":"73c62e58.62479","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2038.8098449707031,"y":1177.222131729126,"z":"1a8b5305.c085cd","wires":[["97a332a5.2b6c9"]]},{"id":"a0b8ae7e.73db","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.network-request-input.aic-clli' value='`$aai.complex.physical-location-id`' />\n\n","comments":"","x":1601.7781372070312,"y":1165.5000114440918,"z":"1a8b5305.c085cd","wires":[]},{"id":"7a1a7c2.ce09484","type":"switchNode","name":"switch relationship_length","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship_length`'>\n","comments":"","outputs":1,"x":539.8889694213867,"y":1081.7221908569336,"z":"1a8b5305.c085cd","wires":[["727319e3.8edd98","26c69776.80cfa8"]]},{"id":"727319e3.8edd98","type":"other","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":733.8890414767793,"y":1080.7222796546089,"z":"1a8b5305.c085cd","wires":[["6823a93b.07df48"]]},{"id":"26c69776.80cfa8","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":735.8890380859375,"y":1119.7223110198975,"z":"1a8b5305.c085cd","wires":[["6823a93b.07df48"]]},{"id":"6823a93b.07df48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region missing relationships in AAI\" />\n","comments":"","x":919.8890380859375,"y":1085.7223110198975,"z":"1a8b5305.c085cd","wires":[]},{"id":"1478ab7a.138b25","type":"set","name":"set tmp.complex-found","xml":"<set>\n<parameter name='tmp.complex-found' value='true' />\n\n","comments":"","x":1640.1111450195312,"y":1133.8333854675293,"z":"1a8b5305.c085cd","wires":[]},{"id":"60381262.576cfc","type":"switchNode","name":"switch tmp.complex-found","xml":"<switch test='`$tmp.complex-found`'>\n","comments":"","outputs":1,"x":537.8890914916992,"y":1241.9444198608398,"z":"1a8b5305.c085cd","wires":[["5a328de2.03b8b4"]]},{"id":"5a328de2.03b8b4","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":755.3890914916992,"y":1241.3055038452148,"z":"1a8b5305.c085cd","wires":[["e8bfbba2.de15b8"]]},{"id":"e8bfbba2.de15b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex not found in AAI\" />\n","comments":"","x":912.889030456543,"y":1242.8056259155273,"z":"1a8b5305.c085cd","wires":[]},{"id":"5d98c991.20e8f8","type":"outcome","name":"outcome Contrail","xml":"<outcome value='Contrail'>\n","comments":"","outputs":1,"x":788.9999618530273,"y":1389.8886833190918,"z":"1a8b5305.c085cd","wires":[["f6f1d63d.fe27e8"]]},{"id":"9d4e2f0d.1638","type":"outcome","name":"outcome AIC_SR_IOV","xml":"<outcome value='AIC_SR_IOV'>\n","comments":"","outputs":1,"x":822.9999923706055,"y":1732.8888053894043,"z":"1a8b5305.c085cd","wires":[["46abce7a.44c39"]]},{"id":"97a332a5.2b6c9","type":"switchNode","name":"switch region","xml":"<switch test='`$aai.complex.region`'>\n","comments":"","outputs":1,"x":2241.4445724487305,"y":1176.8888053894043,"z":"1a8b5305.c085cd","wires":[["38bf1673.6311ca","961953ad.504c8","5a180df4.7bc884","f16470ad.05b77","7e5b906f.9202a","5490bc7c.7aca24"]]},{"id":"38bf1673.6311ca","type":"other","name":"USA","xml":"<outcome value='USA'>\n","comments":"","outputs":1,"x":2475.9447729322637,"y":1120.1388247807818,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"961953ad.504c8","type":"other","name":"US","xml":"<outcome value='US'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1151.3888368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"5a180df4.7bc884","type":"other","name":"CALA","xml":"<outcome value='CALA'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1183.8888368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"f16470ad.05b77","type":"other","name":"EMEA","xml":"<outcome value='EMEA'>\n","comments":"","outputs":1,"x":2475.9446601867676,"y":1215.1388368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"7e5b906f.9202a","type":"other","name":"AP","xml":"<outcome value='AP'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1248.8887758255005,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"5490bc7c.7aca24","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2477.1945152282715,"y":1280.1387453079224,"z":"1a8b5305.c085cd","wires":[["e44c109d.dc45c"]]},{"id":"e44c109d.dc45c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex.region unknown\" />\n","comments":"","x":2645.9446601867676,"y":1278.8887758255005,"z":"1a8b5305.c085cd","wires":[]},{"id":"b368b63c.3dd7a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2634.888779110379,"y":1145.3889084921943,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"bcb49c2d.d02b3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":773.0000076293945,"y":2019.3336906433105,"z":"1a8b5305.c085cd","wires":[["939bed8f.13cae"]]},{"id":"939bed8f.13cae","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid network-technology. Only AIC_SR_IOV and Contrail are supported\" />\n","comments":"","x":1000.9999465942383,"y":2019.3336906433105,"z":"1a8b5305.c085cd","wires":[]},{"id":"b8481fbd.f33f6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2745.9997024536133,"y":1365.1110954284668,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"dd3a41a3.fce13","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2803.000259399414,"y":1745.1110877990723,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"403ea448.83caac","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2844.9997940063477,"y":2003.1112187504768,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ca6d6436.b4f728","type":"call","name":"call process-eipam-pools","xml":"<call module='GENERIC-RESOURCE-API' rpc='process-eipam-pools' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":570.3022994995117,"y":2234.156078338623,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"13db491e.a822c7","type":"call","name":"call GENERIC-RESOURCE-API:create-l3-subnet","xml":"<call module='GENERIC-RESOURCE-API' rpc='create-l3-subnet' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":651.5131759643555,"y":2312.913890838623,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"2709264e.6759fa","type":"set","name":"set process-eipam-action","xml":"<set>\n<parameter name='tmp.process-eipam-action' value='assign' />\n","comments":"","x":573.7677536010742,"y":2195.156322479248,"z":"1a8b5305.c085cd","wires":[]},{"id":"61bb926f.cd7d7c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Values after process-eipam\"/>\n<parameter name=\"field5\" value=\"`level1-v4-mask`\"/>\n<parameter name=\"field6\" value=\"`$tmp.l3-network.level1.v4.mask`\"/>\n<parameter name=\"field7\" value=\"`level1-v4-ipprefix`\"/>\n<parameter name=\"field8\" value=\"`$tmp.l3-network.level1.v4.ip-prefix`\"/>\n<parameter name=\"field9\" value=\"`level1-v4-entity-id`\"/>\n<parameter name=\"field10\" value=\"`$tmp.l3-network.level1.v4.entity-id`\"/>\n<parameter name=\"field11\" value=\"`level2-v4-mask`\"/>\n<parameter name=\"field12\" value=\"`$tmp.l3-network.level2.v4.mask`\"/>\n<parameter name=\"field13\" value=\"`level2-v4-ipprefix`\"/>\n<parameter name=\"field14\" value=\"`$tmp.l3-network.level2.v4.ip-prefix`\"/>\n<parameter name=\"field15\" value=\"`level2-v4-entity-id`\"/>\n<parameter name=\"field16\" value=\"`$tmp.l3-network.level2.v4.entity-id`\"/>\n\n\n","comments":"","outputs":1,"x":520.4187545776367,"y":2269.938060760498,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"f6f1d63d.fe27e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1000.9999923706055,"y":1388.8888053894043,"z":"1a8b5305.c085cd","wires":[["d1028c12.c84fc","bade0de.687c6f"]]},{"id":"46abce7a.44c39","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1048.9999313354492,"y":1732.8888053894043,"z":"1a8b5305.c085cd","wires":[["6dc461c1.1dfdf","330b7d34.5dfc22"]]},{"id":"8207c0b3.22e3f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":778.9999923706055,"y":2650.999828338623,"z":"1a8b5305.c085cd","wires":[["6cf30f85.f2632"]]},{"id":"f9e58c7b.aacc4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":732.9999923706055,"y":344.00002670288086,"z":"1a8b5305.c085cd","wires":[["18ec6cc4.a941f3"]]},{"id":"18ec6cc4.a941f3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912.9999847412109,"y":342.00000190734863,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"63bb1d97.e60064","type":"switchNode","name":"switch network-technology","xml":"<switch test='`$network-model.network-technology`'>\n","comments":"","outputs":1,"x":574.9999923706055,"y":2927.999828338623,"z":"1a8b5305.c085cd","wires":[["939b5aed.1aae58"]]},{"id":"939b5aed.1aae58","type":"outcome","name":"outcome AIC_SR_IOV","xml":"<outcome value='AIC_SR_IOV'>\n","comments":"","outputs":1,"x":877.8889694213867,"y":2929.444164276123,"z":"1a8b5305.c085cd","wires":[["e82a508a.4229a"]]},{"id":"e82a508a.4229a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1095.8887252807617,"y":2927.4442863464355,"z":"1a8b5305.c085cd","wires":[["aebd7334.b437c","8cea94a0.5581b8"]]},{"id":"aebd7334.b437c","type":"save","name":"save AnAI - segmentation-assignment","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"segmentation-assignment\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND segmentation-assignment.segmentation-id = $tmp.l3-network.segmentation-id\" >\n<!-- Create segmentation-assignment object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"segmentation-id\" value=\"`$tmp.l3-network.segmentation-id`\" />\n","comments":"","outputs":1,"x":1374.999870300293,"y":2983.7777824401855,"z":"1a8b5305.c085cd","wires":[["635baecf.da65a","844325db.02e548"]]},{"id":"635baecf.da65a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1643.999870300293,"y":2960.777904510498,"z":"1a8b5305.c085cd","wires":[["1db9bcd1.f30e23"]]},{"id":"844325db.02e548","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1652.723014831543,"y":2998.4210929870605,"z":"1a8b5305.c085cd","wires":[["1db9bcd1.f30e23"]]},{"id":"fc0f6851.bec3b8","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<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`\"/>","comments":"","x":2083.872917175293,"y":2975.635326385498,"z":"1a8b5305.c085cd","wires":[]},{"id":"1db9bcd1.f30e23","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1828.730339050293,"y":2975.063793182373,"z":"1a8b5305.c085cd","wires":[["fc0f6851.bec3b8","21428fc3.65275"]]},{"id":"c2804041.b3c85","type":"execute","name":"execute readProperties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties'>\n <parameter name='contextPrefix' value='prop'/>\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api.properties'/>\n","comments":"","outputs":1,"x":1342.999984741211,"y":2906.666576385498,"z":"1a8b5305.c085cd","wires":[["5bb8bd75.e7bd04","b6b631b.f63f8d"]]},{"id":"5bb8bd75.e7bd04","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1550.999984741211,"y":2848.666576385498,"z":"1a8b5305.c085cd","wires":[["44e3f917.1e2e28"]]},{"id":"b6b631b.f63f8d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1544.999984741211,"y":2884.666576385498,"z":"1a8b5305.c085cd","wires":[["4be39f81.4fd4a"]]},{"id":"95dbb3fd.0c1f7","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while reading default segmentation-assignment for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":1952.9999923706055,"y":2868.666332244873,"z":"1a8b5305.c085cd","wires":[]},{"id":"4be39f81.4fd4a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1721.857406616211,"y":2884.095043182373,"z":"1a8b5305.c085cd","wires":[["95dbb3fd.0c1f7","21428fc3.65275"]]},{"id":"e1be1a52.54f3b8","type":"set","name":"set: tmp.l3-network.segmentation-id","xml":"<set>\n\t<parameter name=\"tmp.l3-network.segmentation-id\" value=\"`$prop.default.segmentation-assignment`\"/>","comments":"","x":1984.9999923706055,"y":2836.666332244873,"z":"1a8b5305.c085cd","wires":[]},{"id":"44e3f917.1e2e28","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1727.857406616211,"y":2848.095043182373,"z":"1a8b5305.c085cd","wires":[["e1be1a52.54f3b8"]]},{"id":"d1028c12.c84fc","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":1256.999870300293,"y":1387.4445915222168,"z":"1a8b5305.c085cd","wires":[["2024b896.76a498"]]},{"id":"2024b896.76a498","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1511.9999961853027,"y":1387.8731479644775,"z":"1a8b5305.c085cd","wires":[["27e33253.31496e"]]},{"id":"27e33253.31496e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1684.5713157653809,"y":1388.301752090454,"z":"1a8b5305.c085cd","wires":[["bc4df92.6ad6f08"]]},{"id":"6dc461c1.1dfdf","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":1324.1111755371094,"y":1733.4446239471436,"z":"1a8b5305.c085cd","wires":[["140551e2.4f61fe"]]},{"id":"140551e2.4f61fe","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1579.1113014221191,"y":1736.8731803894043,"z":"1a8b5305.c085cd","wires":[["ea5dcb81.6728d8"]]},{"id":"ea5dcb81.6728d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1751.6826210021973,"y":1737.3017845153809,"z":"1a8b5305.c085cd","wires":[["ccfde65e.e5a838"]]},{"id":"330b7d34.5dfc22","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":1344.1111373901367,"y":1954.4445304870605,"z":"1a8b5305.c085cd","wires":[["65a51dc6.c0e5e4"]]},{"id":"65a51dc6.c0e5e4","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1599.1112632751465,"y":1957.8730869293213,"z":"1a8b5305.c085cd","wires":[["9d1d090d.9dc2f8"]]},{"id":"9d1d090d.9dc2f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1795.6825942993164,"y":1956.3017692565918,"z":"1a8b5305.c085cd","wires":[["a3b08dd5.410cf"]]},{"id":"bade0de.687c6f","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":1266.1111373901367,"y":1556.4445304870605,"z":"1a8b5305.c085cd","wires":[["4e4efcc8.51a894"]]},{"id":"4e4efcc8.51a894","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1521.1112632751465,"y":1559.8730869293213,"z":"1a8b5305.c085cd","wires":[["26c43fce.b1a9a"]]},{"id":"26c43fce.b1a9a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1717.6825942993164,"y":1558.3017692565918,"z":"1a8b5305.c085cd","wires":[["14bf4e76.feb402"]]},{"id":"8cea94a0.5581b8","type":"set","name":"set: segmentionat-d=1","xml":"<set>\n\t<parameter name=\"tmp.l3-network.segmentation-id\" value=\"1\"/>","comments":"","x":1329.9841690063477,"y":2950.8570852279663,"z":"1a8b5305.c085cd","wires":[]},{"id":"7e62bfac.efaea","type":"comment","name":"future if need from property","info":"","comments":"","x":1348.5556564331055,"y":2871.999828338623,"z":"1a8b5305.c085cd","wires":[]},{"id":"e3a6601d.ee1c2","type":"other","name":"outcome oam_vipr_protected_network","xml":"<outcome value='oam_vipr_protected_network'>\n","comments":"","outputs":1,"x":2609.555305480957,"y":375.50263023376465,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"d21320c7.875be","type":"other","name":"outcome network_without_route_tags_naming_default","xml":"<outcome value='network_without_route_tags_naming_default'>\n","comments":"","outputs":1,"x":2656.2219772338867,"y":412.16929817199707,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"3927bc9.ef1ad44","type":"other","name":"outcome sriov_provider_network","xml":"<outcome value='sriov_provider_network'>\n","comments":"","outputs":1,"x":2587.888801574707,"y":648.8359718322754,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"f545226c.1e1f3","type":"other","name":"outcome oam_atm_u_landing_network","xml":"<outcome value='oam_atm_u_landing_network'>\n","comments":"","outputs":1,"x":2602.888496398926,"y":453.83595752716064,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"983a4aba.12f018","type":"other","name":"outcome oam_atm_p_landing_network","xml":"<outcome value='oam_atm_p_landing_network'>\n","comments":"","outputs":1,"x":2601.2216720581055,"y":488.8359594345093,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"9ac69de3.85dd5","type":"other","name":"outcome oam_aim_landing_network","xml":"<outcome value='oam_aim_landing_network'>\n","comments":"","outputs":1,"x":2594.5555114746094,"y":520.502628326416,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"56b6dcac.c4bfc4","type":"other","name":"outcome network_with_route_tags_naming_default","xml":"<outcome value='network_with_route_tags_naming_default'>\n","comments":"","outputs":1,"x":2639.555595397949,"y":553.8359527587891,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"279f950e.baf49a","type":"other","name":"AIC_AIM_LANDING_NETWORK_V4","xml":"<outcome value='AIC_AIM_LANDING_NETWORK_V4'>","comments":"","outputs":1,"x":2502.999824523926,"y":1429.9999198913574,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"960cc18d.2fd1b","type":"get-resource","name":"get-resource VPN_BINDINGS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VPN_BINDINGS WHERE network_customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid'\n pfx='vpn-bindings[]'>\n\n","comments":"","outputs":1,"x":1246.142807006836,"y":264.28571128845215,"z":"1a8b5305.c085cd","wires":[["feb45c91.fd681","d7038114.b2909","7f333885.c94138"]]},{"id":"d7038114.b2909","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1467.5714111328125,"y":296.99999237060547,"z":"1a8b5305.c085cd","wires":[["ef08fa38.9d4078"]]},{"id":"7f333885.c94138","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1462.9044380187988,"y":329.33330631256104,"z":"1a8b5305.c085cd","wires":[["911dd542.ed2ee8"]]},{"id":"feb45c91.fd681","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1463.0804443359375,"y":264.4259567260742,"z":"1a8b5305.c085cd","wires":[["cda800bd.57b12"]]},{"id":"ef08fa38.9d4078","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Network model is_bound_to_vpn=true but no vpn_binding is present\" />\n\n","comments":"","x":1636.1428604125977,"y":297.28572368621826,"z":"1a8b5305.c085cd","wires":[]},{"id":"cda800bd.57b12","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1633.2857666015625,"y":263.99999237060547,"z":"1a8b5305.c085cd","wires":[["32d5ba47.7aac96","2dde48f4.4544e8"]]},{"id":"43007d32.9c93f4","type":"comment","name":"Changelog","info":"1707: Change vpn binding from field to table selection\n1710: Add ipv6 vipr flows","comments":"","x":323.8571472167969,"y":80.00000667572021,"z":"1a8b5305.c085cd","wires":[]},{"id":"a8641e83.b8db7","type":"other","name":"AIC_ATM_UNPROTECTED_V6","xml":"<outcome value='AIC_ATM_UNPROTECTED_V6'>","comments":"","outputs":1,"x":2493.800048828125,"y":1535,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"95022c2.dc0f4d","type":"other","name":"AIC_ATM_PROTECTED_V6","xml":"<outcome value='AIC_ATM_PROTECTED_V6'>","comments":"","outputs":1,"x":2483.6886596679688,"y":1572.5558385849,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"140e9a55.7c9096","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2751.239028930664,"y":1542.2012939453125,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"e1a0deaa.2971a","type":"other","name":"AIC_AIM_LANDING_NETWORK_V6","xml":"<outcome value='AIC_AIM_LANDING_NETWORK_V6'>","comments":"","outputs":1,"x":2508.2391510009766,"y":1607.0901184082031,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"24428acd.934a56","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2414.243480682373,"y":1644.6681156158447,"z":"1a8b5305.c085cd","wires":[["7c564997.04f088"]]},{"id":"7c564997.04f088","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"EIPAM V6 Address plan should be null\" />\n","comments":"","x":2585.131175994873,"y":1643.5013790130615,"z":"1a8b5305.c085cd","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-deactivate.json
new file mode 100644
index 00000000..0473bf72
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-deactivate.json
@@ -0,0 +1 @@
+[{"id":"69f402c5.4ffaec","type":"dgstart","name":"DGSTART","outputs":1,"x":158.3333282470703,"y":65,"z":"432e7ac4.a40554","wires":[["e26fa578.48fab8"]]},{"id":"e26fa578.48fab8","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":233.61903381347656,"y":105.23811149597168,"z":"432e7ac4.a40554","wires":[["682aae1.218495"]]},{"id":"682aae1.218495","type":"method","name":"network-topology-operation-deactivate","xml":"<method rpc='network-topology-operation-deactivate' mode='sync'>\n","comments":"","outputs":1,"x":275.011962890625,"y":148.7499942779541,"z":"432e7ac4.a40554","wires":[["5fc5c371.08d5ac"]]},{"id":"5fc5c371.08d5ac","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":274.33335876464844,"y":243.4434814453125,"z":"432e7ac4.a40554","wires":[["c9dbaeef.d2b7f","e37a3f33.284a1","807c556a.69d798","e47607dd.0bd2c8","a435410a.7fa9b","211e0507.82ebaa","aaf73e80.537c","b2d1cdcb.f51cb"]]},{"id":"beafbfc9.85ba1","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":794.3333282470703,"y":239,"z":"432e7ac4.a40554","wires":[["bfb7faa.23a5b08"]]},{"id":"bfb7faa.23a5b08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"network-id not found in AAI\" />","comments":"","x":957.5277252197266,"y":239.11122131347656,"z":"432e7ac4.a40554","wires":[]},{"id":"c9dbaeef.d2b7f","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":559.0554351806641,"y":243.48460388183594,"z":"432e7ac4.a40554","wires":[["beafbfc9.85ba1","98643732.417478"]]},{"id":"98643732.417478","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":787.0554351806641,"y":277.48460388183594,"z":"432e7ac4.a40554","wires":[["11e10f89.d2fcc"]]},{"id":"11e10f89.d2fcc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + 'from AnAI'\" />","comments":"","x":939.1665191650391,"y":277.7068328857422,"z":"432e7ac4.a40554","wires":[]},{"id":"4acd3ea8.47a81","type":"set","name":"set entity-id and plan-name","xml":"<set>\n\t<parameter name=\"eipam-ip-block.entity-id\" value=\"`$aai.l3-network.subnets.subnet[$sidx].subnet-id`\"/>\n\t<parameter name=\"eipam-ip-block.plans[0].plan-name\" value=\"$tmp.eipam-subnet-row.plan-name\"/>\n","comments":"","x":1405.4127349853516,"y":578.0794448852539,"z":"432e7ac4.a40554","wires":[]},{"id":"2d59a7f6.f14488","type":"for","name":"for 0..subnet_length","xml":"<for index='sidx' start='0' end='`$aai.l3-network.subnets.subnet_length`' >\n","comments":"","outputs":1,"x":603.6984405517578,"y":433.2223205566406,"z":"432e7ac4.a40554","wires":[["1d464653.da7e5a"]]},{"id":"1d464653.da7e5a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":809.6984405517578,"y":433.36515045166016,"z":"432e7ac4.a40554","wires":[["7047b8ac.d02de8","fa64d7ef.074b98"]]},{"id":"fa64d7ef.074b98","type":"get-resource","name":"get eipam-ip-subnet by subnet-id","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * from EIPAM_IP_SUBNETS where entity_id = $aai.l3-network.subnets.subnet[$sidx].subnet-id ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":762.8413238525391,"y":561.2222671508789,"z":"432e7ac4.a40554","wires":[["9e4e6381.a12b5","ea671a42.72df38","12b2b17a.2c624f"]]},{"id":"d52179ea.880588","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNETS failed to find subnet matching aai subnet.\" />\n\t","comments":"","x":1170.984115600586,"y":508.9365312755108,"z":"432e7ac4.a40554","wires":[]},{"id":"9e4e6381.a12b5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1021.5557098388672,"y":576.936501711607,"z":"432e7ac4.a40554","wires":[["722407af.2ab048"]]},{"id":"ea671a42.72df38","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1021.8459930419922,"y":510.9365312755108,"z":"432e7ac4.a40554","wires":[["d52179ea.880588"]]},{"id":"12b2b17a.2c624f","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1022.7031021118164,"y":545.2222518920898,"z":"432e7ac4.a40554","wires":[["63b1b75.e304248"]]},{"id":"722407af.2ab048","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1174.2697982788086,"y":578.3651220500469,"z":"432e7ac4.a40554","wires":[["4acd3ea8.47a81"]]},{"id":"63b1b75.e304248","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Subnet not found in EIPAM_IP_SUBNETS - deactivate failed.\" />\n\t","comments":"","x":1171.650650024414,"y":544.5556163787842,"z":"432e7ac4.a40554","wires":[]},{"id":"7047b8ac.d02de8","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n\t\t","comments":"","outputs":1,"x":715.9840240478516,"y":616.2380752563477,"z":"432e7ac4.a40554","wires":[["d5cee8ce.8467a8","a456dec9.801d3"]]},{"id":"b752a8a2.9451f8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.\" />\n\t","comments":"","x":1175.7301864624023,"y":620.0793077647686,"z":"432e7ac4.a40554","wires":[]},{"id":"d1b0ef11.e7fe1","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1026.3017807006836,"y":688.0792782008648,"z":"432e7ac4.a40554","wires":[["70e3044e.599f2c"]]},{"id":"d5cee8ce.8467a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1015.1634273529053,"y":626.3650381267071,"z":"432e7ac4.a40554","wires":[["b752a8a2.9451f8"]]},{"id":"a456dec9.801d3","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1027.4491729736328,"y":656.3650283813477,"z":"432e7ac4.a40554","wires":[["40d65762.2df748"]]},{"id":"70e3044e.599f2c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1179.015869140625,"y":689.5078985393047,"z":"432e7ac4.a40554","wires":[[]]},{"id":"40d65762.2df748","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet. Subnet not found.\" />\n\t","comments":"","x":1174.7300262451172,"y":652.3650588989258,"z":"432e7ac4.a40554","wires":[]},{"id":"e47607dd.0bd2c8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":579.1270027160645,"y":1012.3650369644165,"z":"432e7ac4.a40554","wires":[]},{"id":"211e0507.82ebaa","type":"set","name":"set object-path","xml":"<set>\n<parameter name='network-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/networks/network/'\n + $networkId\n + '/network-data/network-topology/'` \" />\n \n","comments":"","x":579.1309471130371,"y":932.559079170227,"z":"432e7ac4.a40554","wires":[]},{"id":"e37a3f33.284a1","type":"set","name":"set networkId","xml":"<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n","comments":"","x":573.4165802001953,"y":895.416187286377,"z":"432e7ac4.a40554","wires":[]},{"id":"807c556a.69d798","type":"set","name":"set network-level-oper-status","xml":"<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status' value='PendingDelete' />\n<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`' />\n<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`' />\n","comments":"","x":621.4166412353516,"y":971.9875411987305,"z":"432e7ac4.a40554","wires":[]},{"id":"b2d1cdcb.f51cb","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n","comments":"","x":614.8451156616211,"y":858.7494688034058,"z":"432e7ac4.a40554","wires":[]},{"id":"a435410a.7fa9b","type":"switchNode","name":"switch $aai.l3-network.subnets.subnet_length","xml":"<switch test='`$aai.l3-network.subnets.subnet_length`'>\n","comments":"","outputs":1,"x":594.3333282470703,"y":339.0000343322754,"z":"432e7ac4.a40554","wires":[["e70ca1dd.ede2d","e9f5fa31.af0bd8"]]},{"id":"e70ca1dd.ede2d","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":890.3333282470703,"y":339.0000343322754,"z":"432e7ac4.a40554","wires":[["fe251278.16a15"]]},{"id":"fe251278.16a15","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"no networks found\" />\n","comments":"","x":1082.1109161376953,"y":338.88901138305664,"z":"432e7ac4.a40554","wires":[]},{"id":"e9f5fa31.af0bd8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":872.3333282470703,"y":373.0000343322754,"z":"432e7ac4.a40554","wires":[["2d59a7f6.f14488"]]},{"id":"aaf73e80.537c","type":"save","name":"update AnAI - network","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n\t\t","comments":"","outputs":1,"x":620.3333282470703,"y":770.999870300293,"z":"432e7ac4.a40554","wires":[["3889bc7f.e0c1b4","9f2104a9.50f748"]]},{"id":"538a0124.f3f62","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for l3-network\" />\n\t","comments":"","x":1024.0794982910156,"y":760.8411569595337,"z":"432e7ac4.a40554","wires":[]},{"id":"4e255bd5.3a5b74","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":874.6510925292969,"y":828.8411273956299,"z":"432e7ac4.a40554","wires":[["4ff385ad.29927c"]]},{"id":"3889bc7f.e0c1b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":863.5127391815186,"y":767.1268873214722,"z":"432e7ac4.a40554","wires":[["538a0124.f3f62"]]},{"id":"9f2104a9.50f748","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":875.7984848022461,"y":797.1268775761127,"z":"432e7ac4.a40554","wires":[["49adaed9.4e1b1"]]},{"id":"4ff385ad.29927c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1027.3651809692383,"y":830.2697477340698,"z":"432e7ac4.a40554","wires":[[]]},{"id":"49adaed9.4e1b1","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for l3-network. Network not found.\" />\n\t","comments":"","x":1023.0793380737305,"y":793.1269080936909,"z":"432e7ac4.a40554","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-unassign.json
new file mode 100644
index 00000000..c515b31a
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-unassign.json
@@ -0,0 +1 @@
+[{"id":"6fc27e63.df644","type":"dgstart","name":"DGSTART","outputs":1,"x":211.66665649414062,"y":119.99999237060547,"z":"e6d3ce58.fa2c8","wires":[["6a69dde5.372664"]]},{"id":"6a69dde5.372664","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":286.9523620605469,"y":160.23810386657715,"z":"e6d3ce58.fa2c8","wires":[["6774371f.c72918"]]},{"id":"6774371f.c72918","type":"method","name":"network-topology-operation-unassign","xml":"<method rpc='network-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":328.3452911376953,"y":203.74998664855957,"z":"e6d3ce58.fa2c8","wires":[["3b010977.d25f36"]]},{"id":"3b010977.d25f36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":200.1667251586914,"y":450.94350242614746,"z":"e6d3ce58.fa2c8","wires":[["9367d2f0.ac7cd","dccbe93e.635408","5da52b9e.8ab724","8425d631.8915c8","1f202a24.17dfa6","31934beb.434534","2bf9b42d.37f73c","9f6002ee.2d44e","ea07e49d.c44d28","77c21435.c8c26c"]]},{"id":"9367d2f0.ac7cd","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":421.1746063232422,"y":1775.603003501892,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"dccbe93e.635408","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\">","comments":"","outputs":1,"x":429.7142791748047,"y":1671.23788356781,"z":"e6d3ce58.fa2c8","wires":[["1620a04e.1c095"]]},{"id":"5e0ac328.ccf85c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting network from AAI\" />\n\t","comments":"","x":824.0475883483887,"y":1673.23788356781,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1620a04e.1c095","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":639.909481048584,"y":1673.571216583252,"z":"e6d3ce58.fa2c8","wires":[["5e0ac328.ccf85c"]]},{"id":"ff693a96.e53918","type":"for","name":"for snidx..service-data.networks.network[]","xml":"<for silentFailure='true' index='snidx' start='`$tmp.nidx + 1`' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1351.5040588378906,"y":1534.4204578399658,"z":"e6d3ce58.fa2c8","wires":[["b6af5793.a513d8"]]},{"id":"34a42575.3d745a","type":"comment","name":"Remove network from service data","info":"","comments":"","x":518.9008865356445,"y":1440.849277496338,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1d9c15e4.8caeba","type":"set","name":"move network to remove one","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.newidx].\" value=\"$service-data.networks.network[$snidx].\" />\n\t\n","comments":"","x":1886.0950469970703,"y":1570.3015813827515,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"5da52b9e.8ab724","type":"switchNode","name":"switch $service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":525.666618347168,"y":1388.8573188781738,"z":"e6d3ce58.fa2c8","wires":[["af4a3c9c.17fad","f60f5a83.183488"]]},{"id":"af4a3c9c.17fad","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":828.7142181396484,"y":1385.5238056182861,"z":"e6d3ce58.fa2c8","wires":[["f455e258.ce2b2"]]},{"id":"620ae252.136c7c","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.\" value=\"\"/>\n\n","comments":"","x":1261.333122253418,"y":1389.190631866455,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"f60f5a83.183488","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":795.0951690673828,"y":1537.857123374939,"z":"e6d3ce58.fa2c8","wires":[["5673f37.74a050c"]]},{"id":"b6af5793.a513d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1621.0950317382812,"y":1536.85710811615,"z":"e6d3ce58.fa2c8","wires":[["1d9c15e4.8caeba","c424b3c4.b893"]]},{"id":"1527854.67b9a7b","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\n\t\n","comments":"","x":1290.962890625,"y":1571.1906881332397,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1f202a24.17dfa6","type":"execute","name":"execute EIPAM deallocateAllSubnets","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deallocateAllSubnets\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":526.6296844482422,"y":878.2963314056396,"z":"e6d3ce58.fa2c8","wires":[["cf30078e.ee1458"]]},{"id":"cf30078e.ee1458","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":758.6298065185547,"y":879.0198421478271,"z":"e6d3ce58.fa2c8","wires":[["5696f470.3c1d0c"]]},{"id":"5696f470.3c1d0c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deallocating subnets in EIPAM.\" />\n\t","comments":"","x":914.6298065185547,"y":879.0198421478271,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"8425d631.8915c8","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$network-topology-operation-input.network-information.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n\t<parameter name=\"eipam-ip-block.entity-id\" value='' />","comments":"","x":544.0581588745117,"y":842.955403804779,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"31934beb.434534","type":"execute","name":"execute deletePoolByNetworkLevel for level 2 by network id","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":593.629638671875,"y":914.4815731048584,"z":"e6d3ce58.fa2c8","wires":[["ebe90e81.d5e8a"]]},{"id":"ebe90e81.d5e8a","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":893.2963409423828,"y":914.2049083709717,"z":"e6d3ce58.fa2c8","wires":[["8fc65822.231948"]]},{"id":"8fc65822.231948","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting level 2 plans in EIPAM.\" />\n\t","comments":"","x":1051.6297760009766,"y":914.5382900238037,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"b2717721.885438","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.new_length].\" value=\"\"/>\n\n","comments":"","x":1270.8093566894531,"y":1609.1586332321167,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"5673f37.74a050c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1017.0950469970703,"y":1537.857123374939,"z":"e6d3ce58.fa2c8","wires":[["ff693a96.e53918","b2717721.885438","1527854.67b9a7b","593f35c1.0cb4dc"]]},{"id":"e06cbad4.12aea8","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"0\"/>\n\n\t\n","comments":"","x":1277.6664962768555,"y":1423.894289970398,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"f455e258.ce2b2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1008.0475311279297,"y":1386.2276020050049,"z":"e6d3ce58.fa2c8","wires":[["620ae252.136c7c","e06cbad4.12aea8"]]},{"id":"ca1fe8d0.acb968","type":"comment","name":"deallocate level 2 subnet and pool","info":"","comments":"","x":510.7037048339844,"y":804.037260055542,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"2bf9b42d.37f73c","type":"get-resource","name":"get-resource - Get all subnet/subnet keys for networkid ","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='tmp.eipam-subnet-row[]'>\n\n","comments":"","outputs":1,"x":600.9657363891602,"y":558.9896192550659,"z":"e6d3ce58.fa2c8","wires":[["4c03ccb1.83dfa4","51a9a0f7.ff71d","53e0949c.105acc"]]},{"id":"a0c6837c.97584","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1147.8705673217773,"y":562.0371742248535,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"4c03ccb1.83dfa4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":999.870719909668,"y":596.0371761322021,"z":"e6d3ce58.fa2c8","wires":[["14d18416.66a7ac"]]},{"id":"51a9a0f7.ff71d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":998.7325248718262,"y":561.7038660049438,"z":"e6d3ce58.fa2c8","wires":[["a0c6837c.97584"]]},{"id":"53e0949c.105acc","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1002.732551574707,"y":629.5372514724731,"z":"e6d3ce58.fa2c8","wires":[["f53c90ed.dd296"]]},{"id":"14d18416.66a7ac","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1147.492332458496,"y":596.1843366622925,"z":"e6d3ce58.fa2c8","wires":[["181b9ad1.935b45"]]},{"id":"cc99f629.56fc48","type":"comment","name":"Get all subnets for network","info":"","comments":"","x":515.9763031005859,"y":514.9048748016357,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"c424b3c4.b893","type":"set","name":"Set new index","xml":"<set>\n\t<parameter name=\"tmp.newidx\" value=\"`$snidx - 1`\"/>\n\t\n\t\n","comments":"","x":1835.7987670898438,"y":1532.1164503097534,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"a8da53.1ff3c5b","type":"comment","name":"If only one remove all networks","info":"","comments":"","x":900.0845794677734,"y":1350.1165790557861,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"593f35c1.0cb4dc","type":"set","name":"Set new network length","xml":"<set>\n\t<parameter name=\"tmp.new_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\t\n\t\n","comments":"","x":1293.7987670898438,"y":1504.1165075302124,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"769c8ef5.20813","type":"get-resource","name":"get-resource - Determine if level 1 in use in other level 2 subnets","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k \n WHERE p.level = 2 \n and p.plan_name = $tmp.plan-name\n and k.level = 1 \n and p.pool_id = s.pool_id and s.entity_id = k.entity_id \n and k.key_value = $tmp.level1-key-value ; \"\n pfx='tmp.level2pool[]'>\n\n\n\n","comments":"","outputs":1,"x":2889.1427154541016,"y":1316.1908049583435,"z":"e6d3ce58.fa2c8","wires":[["d19663a0.372ea","35b0a814.7ff6f8","cefed4e1.edee88"]]},{"id":"b6da7ef4.53354","type":"comment","name":"Determine if any other level 2 pool is using level 1 pool","info":"","comments":"","x":567.3809814453125,"y":1087.5239009857178,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"3055bb43.ba84e4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":3367.380699157715,"y":1313.6192660331726,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"35b0a814.7ff6f8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3219.380790710449,"y":1347.6192660331726,"z":"e6d3ce58.fa2c8","wires":[["41518681.495688"]]},{"id":"d19663a0.372ea","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3218.2425956726074,"y":1313.2859559059143,"z":"e6d3ce58.fa2c8","wires":[["3055bb43.ba84e4"]]},{"id":"cefed4e1.edee88","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":3223.909267425537,"y":1380.285921573639,"z":"e6d3ce58.fa2c8","wires":[["c76a8907.a34918"]]},{"id":"41518681.495688","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":3381.2883644104004,"y":1346.3380432128906,"z":"e6d3ce58.fa2c8","wires":[["72cfd522.7f4c2c"]]},{"id":"f53c90ed.dd296","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1151.500244140625,"y":630.1668291091919,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"563ca4c8.52338c","type":"switchNode","name":"switch level1poolkeyvalue","xml":"<switch test='`$tmp.level1-key-value`'>\n","comments":"","outputs":1,"x":913.0953674316406,"y":1159.3811874389648,"z":"e6d3ce58.fa2c8","wires":[["b37602d8.cd2a8","9a159b72.b21bf8"]]},{"id":"9a159b72.b21bf8","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1168.0000648498535,"y":1165.3335418701172,"z":"e6d3ce58.fa2c8","wires":[["990e2ddf.e26ba"]]},{"id":"b37602d8.cd2a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1171.3335456848145,"y":1208.4287815093994,"z":"e6d3ce58.fa2c8","wires":[["ea364a04.764748"]]},{"id":"9f6002ee.2d44e","type":"set","name":"set prerequisites","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value\" value=\"\"/>\n\t<parameter name=\"tmp.level1inuse\" value=\"false\" />\n\t<parameter name=\"pidx\" value=\"0\" />\n\t<parameter name=\"pidx-len\" value=\"0\" />\n\t\n","comments":"","x":476.83348846435547,"y":386.16670989990234,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"ea364a04.764748","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1334.0478223164878,"y":1208.8097178141277,"z":"e6d3ce58.fa2c8","wires":[["76e440dc.55429"]]},{"id":"c76a8907.a34918","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":3377.047306060791,"y":1379.619264125824,"z":"e6d3ce58.fa2c8","wires":[["60c91be.c368ce4"]]},{"id":"72cfd522.7f4c2c","type":"set","name":"set level1inuse = true","xml":"<set>\n\t<parameter name=\"tmp.level1inuse\" value=\"true\" />\n\t\n","comments":"","x":3617.7615509033203,"y":1346.1906471252441,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"60c91be.c368ce4","type":"get-resource","name":"get-resource - Get level 1 pool and subnet","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k \n WHERE p.level = 1 \n and p.plan_name = $tmp.plan-name\n and k.level = 1 \n and p.pool_id = s.pool_id and s.entity_id = k.entity_id \n and k.key_value = $tmp.level1-key-value ; \"\n pfx='tmp.level1pool[]'>\n\n","comments":"","outputs":1,"x":3685.5022468566895,"y":1404.8572969436646,"z":"e6d3ce58.fa2c8","wires":[["625791ca.98209","fea9576b.0b8778","eed682f1.7be6"]]},{"id":"cbfd3973.515b08","type":"comment","name":"Try to clean up the level 1 pool","info":"","comments":"","x":3644.761417388916,"y":1375.8203229904175,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"82dc834a.951ef","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":4131.190410614014,"y":1370.582124710083,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"fea9576b.0b8778","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3983.190502166748,"y":1404.582124710083,"z":"e6d3ce58.fa2c8","wires":[["a6a5ea1b.29fbb8"]]},{"id":"625791ca.98209","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3979.0523071289062,"y":1373.2488145828247,"z":"e6d3ce58.fa2c8","wires":[["82dc834a.951ef"]]},{"id":"eed682f1.7be6","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":3986.052318572998,"y":1440.582124710083,"z":"e6d3ce58.fa2c8","wires":[["7b1dce7d.fb116"]]},{"id":"a6a5ea1b.29fbb8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4130.812114715576,"y":1404.7292852401733,"z":"e6d3ce58.fa2c8","wires":[["c09043c3.8f797"]]},{"id":"7b1dce7d.fb116","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4142.190372467041,"y":1439.9154510498047,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"ddface0d.c9495","type":"execute","name":"execute EIPAM deallocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deallocateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4847.566329956055,"y":1437.222445487976,"z":"e6d3ce58.fa2c8","wires":[["e40c8d06.d4c8a"]]},{"id":"e40c8d06.d4c8a","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5081.566257476807,"y":1436.6128482818604,"z":"e6d3ce58.fa2c8","wires":[["32450237.7b326e"]]},{"id":"32450237.7b326e","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deallocating subnet in EIPAM.\" />\n\t","comments":"","x":5250.566287994385,"y":1436.6128787994385,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"10424d8a.e25d82","type":"set","name":"set","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='`$tmp.level1pool[$lidx].entity-id`' />\n<parameter name='eipam-ip-block.ip-address' value='`$tmp.level1pool[$lidx].ip-address`' />\n<parameter name='eipam-ip-block.mask' value='`$tmp.level1pool[$lidx].prefix-length`' />\n<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.level1pool[$lidx].network-id`\" />\n<parameter name=\"eipam-ip-block.pool-id\" value=\"`$tmp.level1pool[$lidx].pool-id`\" />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n\n","comments":"","x":4767.566165924072,"y":1407.2224645614624,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"c09043c3.8f797","type":"for","name":"for lidx .. level1pool_length","xml":"<for silentFailure='true' index='lidx' start='0' end='`$tmp.level1pool_length`' >\n","comments":"","outputs":1,"x":4340.581939697266,"y":1405.9365863800049,"z":"e6d3ce58.fa2c8","wires":[["9f0474be.521c98"]]},{"id":"8996414e.07646","type":"execute","name":"execute EIPAM deletePoolByNetworkLevel","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4876.0322265625,"y":1536.508228302002,"z":"e6d3ce58.fa2c8","wires":[["5edc86b0.053708"]]},{"id":"5edc86b0.053708","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5148.603260040283,"y":1526.2318725585938,"z":"e6d3ce58.fa2c8","wires":[["1987167a.d664ba"]]},{"id":"1987167a.d664ba","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting pool in EIPAM.\" />\n\t","comments":"","x":5291.413055419922,"y":1524.0414810180664,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"9f0474be.521c98","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4563.248825073242,"y":1406.0476474761963,"z":"e6d3ce58.fa2c8","wires":[["10424d8a.e25d82","ddface0d.c9495","6a4eeffe.8b70f"]]},{"id":"47658288.8bc70c","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":2165.529266357422,"y":1242.2754878997803,"z":"e6d3ce58.fa2c8","wires":[["10367136.0cd76f"]]},{"id":"10367136.0cd76f","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2372.243621826172,"y":1242.7039947509766,"z":"e6d3ce58.fa2c8","wires":[["465bb5a9.3433ac"]]},{"id":"99b561a2.7e8d5","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":2168.465835571289,"y":1281.5611591339111,"z":"e6d3ce58.fa2c8","wires":[["bc9e64a1.aec018"]]},{"id":"bc9e64a1.aec018","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2380.4182319641113,"y":1280.322937965393,"z":"e6d3ce58.fa2c8","wires":[["7bfdd186.4b7d"]]},{"id":"90b2471d.61bb28","type":"set","name":"set tmp.plan-name v4","xml":"<set>\n<parameter name='tmp.plan-name' value='`$network-model.eipam-v4-address-plan`' />\n\n","comments":"","x":2758.0215377807617,"y":1245.0372776985168,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"92f5da7c.e52b38","type":"set","name":"set tmp.plan-name v6","xml":"<set>\n<parameter name='tmp.plan-name' value='`$network-model.eipam-v6-address-plan`' />\n\n","comments":"","x":2756.9579849243164,"y":1281.3230781555176,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"465bb5a9.3433ac","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2533.624641418457,"y":1244.9738402366638,"z":"e6d3ce58.fa2c8","wires":[["90b2471d.61bb28","769c8ef5.20813"]]},{"id":"7bfdd186.4b7d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2541.0848693847656,"y":1286.4024066925049,"z":"e6d3ce58.fa2c8","wires":[["92f5da7c.e52b38","769c8ef5.20813"]]},{"id":"ea07e49d.c44d28","type":"get-resource","name":"get-resource NETWORK_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $service-data.networks.network[$nidx].network-data.network-information.ecomp-model-information.model-customization-uuid\n and service_uuid = $service-data.networks.network[$nidx].network-data.service-information.ecomp-model-information.model-uuid'\n pfx='network-model'>\n\n","comments":"","outputs":1,"x":533.5000381469727,"y":356.49999618530273,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"31dbc2d1.6c75ce","type":"comment","name":"Pull in network model as it is needed for level 1 removal","info":"","comments":"","x":716.6666412353516,"y":104.9999942779541,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"76e440dc.55429","type":"switchNode","name":"switch network-model","xml":"<switch test='`$network-model`'>\n","comments":"","outputs":1,"x":1547.0370953877768,"y":1209.0954424540203,"z":"e6d3ce58.fa2c8","wires":[["baf3d319.da1aa","ea8854e.ae0bca8"]]},{"id":"baf3d319.da1aa","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1745.0373090108237,"y":1196.7621285120647,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"ea8854e.ae0bca8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1743.3704846700034,"y":1231.7620493570964,"z":"e6d3ce58.fa2c8","wires":[["b6b1ecbb.608a6"]]},{"id":"b6b1ecbb.608a6","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1911.7037963867188,"y":1240.3335638046265,"z":"e6d3ce58.fa2c8","wires":[["47658288.8bc70c","99b561a2.7e8d5"]]},{"id":"990e2ddf.e26ba","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1342.629726409912,"y":1164.6668338775635,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"26c77134.bb304e","type":"comment","name":"Get tosca network data","info":"","comments":"","x":494.8000030517578,"y":320.00000953674316,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"3738319f.dac18e","type":"comment","name":"1707 - remove call to AAI for subnets","info":"","comments":"","x":539.6571578979492,"y":417.7142868041992,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"181b9ad1.935b45","type":"for","name":"for 0..subnet-row-length","xml":"<for silentFailure='true' index='esidx' start='0' end='`$tmp.eipam-subnet-row_length`' >\n","comments":"","outputs":1,"x":572.799919128418,"y":716.0001192092896,"z":"e6d3ce58.fa2c8","wires":[["5675ba2a.a19eb4"]]},{"id":"5675ba2a.a19eb4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":797.4666213989258,"y":716.142879486084,"z":"e6d3ce58.fa2c8","wires":[["933440ac.3bb5c"]]},{"id":"933440ac.3bb5c","type":"switchNode","name":"switch level","xml":"<switch test='`$tmp.eipam-subnet-row[$esidx].level`'>\n","comments":"","outputs":1,"x":991.4666290283203,"y":717.4815645217896,"z":"e6d3ce58.fa2c8","wires":[["2dd2061b.14feea","1dd6c81e.b58788"]]},{"id":"2dd2061b.14feea","type":"outcome","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1163.1332473754883,"y":715.4815626144409,"z":"e6d3ce58.fa2c8","wires":[["be2d994e.39d748"]]},{"id":"be2d994e.39d748","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1346.4667129516602,"y":713.8148784637451,"z":"e6d3ce58.fa2c8","wires":[["e6b6bab1.c5dc08","97386b74.6dc3d8","5b35da26.7674b4","1cf42296.65b5ad"]]},{"id":"e6b6bab1.c5dc08","type":"set","name":"set level 1 key value","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value[$pidx]\" value=\"`$tmp.eipam-subnet-row[$esidx].key-value`\"/>\n\n\t\n","comments":"","x":1562.3711738586426,"y":654.9577598571777,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1dd6c81e.b58788","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1154.800033569336,"y":750.4815444946289,"z":"e6d3ce58.fa2c8","wires":[["7bbe227c.493acc"]]},{"id":"7bbe227c.493acc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1346.4667129516602,"y":748.8148784637451,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"97386b74.6dc3d8","type":"set","name":"increment pidx_len","xml":"<set>\n\t<parameter name=\"pidx\" value=\"`$pidx + 1`\"/>\n\n\t\n","comments":"","x":1559.3715286254883,"y":712.8571500778198,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"77c21435.c8c26c","type":"for","name":"for 0 ... level 1 length","xml":"<for silentFailure='true' index='npidx' start='0' end='`$pidx-len`' >\n","comments":"","outputs":1,"x":472.8571319580078,"y":1129.999997138977,"z":"e6d3ce58.fa2c8","wires":[["d8f81bee.ac72d8"]]},{"id":"d8f81bee.ac72d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":690.8571376800537,"y":1130.999997138977,"z":"e6d3ce58.fa2c8","wires":[["563ca4c8.52338c","2ed54557.59eeca"]]},{"id":"2ed54557.59eeca","type":"set","name":"set level 1 key value/plan name","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value\" value=\"`$tmp.level1-key-value[$npidx]`\" />\n\t<parameter name=\"tmp.plan-name\" value=\"`$tmp.plan-name[$npidx]`\" />\n\t\n","comments":"","x":928.8571166992188,"y":1127.999963760376,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"5b35da26.7674b4","type":"set","name":"set level 1 plan_name","xml":"<set>\n\t<parameter name=\"tmp.plan-name[$pidx]\" value=\"`$tmp.eipam-subnet-row[$esidx].plan-name`\"/>\n\n\t\n","comments":"","x":1566.5714836120605,"y":681.4285335540771,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"6a4eeffe.8b70f","type":"execute","name":"execute EIPAM deletePoolByPoolId","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByPoolId\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4831.714248657227,"y":1471.4286003112793,"z":"e6d3ce58.fa2c8","wires":[["84b97cc7.29b2c"]]},{"id":"84b97cc7.29b2c","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5077.142574310303,"y":1471.152198791504,"z":"e6d3ce58.fa2c8","wires":[["821a1504.8a0b48"]]},{"id":"821a1504.8a0b48","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting pool in EIPAM.\" />\n\t","comments":"","x":5272.809608459473,"y":1473.2474827766418,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1cf42296.65b5ad","type":"set","name":"set length","xml":"<set>\n\t<parameter name=\"pidx-len\" value=\"`$pidx`\"/>\n\n\t\n","comments":"","x":1530.0000457763672,"y":736.0000219345093,"z":"e6d3ce58.fa2c8","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation.json
new file mode 100644
index 00000000..fa5c8916
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation.json
@@ -0,0 +1,748 @@
+[
+ {
+ "id": "c99606bb.e2a028",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 112.11111450195312,
+ "y": 72.41365623474121,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "864e4d1.67b0cb"
+ ]
+ ]
+ },
+ {
+ "id": "864e4d1.67b0cb",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 194.0634765625,
+ "y": 112.6517686843872,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "8523dd91.6b0d1"
+ ]
+ ]
+ },
+ {
+ "id": "8523dd91.6b0d1",
+ "type": "method",
+ "name": "network-topology-operation",
+ "xml": "<method rpc='network-topology-operation' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 190.53974151611328,
+ "y": 152.4136505126953,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "1a229729.b26c99"
+ ]
+ ]
+ },
+ {
+ "id": "38f1087b.161648",
+ "type": "comment",
+ "name": " NETWORK-TOPOLOGY-OPERATION ",
+ "info": "",
+ "comments": "",
+ "x": 506.45597076416016,
+ "y": 20,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "1a229729.b26c99",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 226.11114501953125,
+ "y": 235.85713958740234,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "98cc4191.2cf35",
+ "57ac21c1.a3bc3",
+ "987f679f.f57988",
+ "1170a38.c1b8e5d"
+ ]
+ ]
+ },
+ {
+ "id": "98cc4191.2cf35",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 456.1945037841797,
+ "y": 859.6997756958008,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "57ac21c1.a3bc3",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 452.82537841796875,
+ "y": 466.2708339691162,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "f08cfd72.f6d7a",
+ "ba263e37.fc151",
+ "ee75a5f3.d1d328",
+ "906cbd9a.3bcc1",
+ "483543a0.87b2ec"
+ ]
+ ]
+ },
+ {
+ "id": "f08cfd72.f6d7a",
+ "type": "other",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 673.3015747070312,
+ "y": 328.5564842224121,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "85930aff.cc50b8"
+ ]
+ ]
+ },
+ {
+ "id": "85930aff.cc50b8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 854.5397338867188,
+ "y": 329.5566062927246,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "733204ba.52ff4c"
+ ]
+ ]
+ },
+ {
+ "id": "987f679f.f57988",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:validate-network-input",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-network-input' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 584.1111145019531,
+ "y": 236.4136562347412,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "733204ba.52ff4c",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:network-topology-operation-assign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1226.111083984375,
+ "y": 326.4136619567871,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ba263e37.fc151",
+ "type": "other",
+ "name": "activate",
+ "xml": "<outcome value='activate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 675.1111145019531,
+ "y": 416.4136562347412,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "70342e4b.918dc"
+ ]
+ ]
+ },
+ {
+ "id": "70342e4b.918dc",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 859.3492736816406,
+ "y": 417.4137783050537,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "69a87518.69854c",
+ "bd1a56c0.3e9138"
+ ]
+ ]
+ },
+ {
+ "id": "68785460.4653ec",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:network-topology-operation-activate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-activate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1991.9206848144531,
+ "y": 579.2708282470703,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ee75a5f3.d1d328",
+ "type": "other",
+ "name": "deactivate",
+ "xml": "<outcome value='deactivate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 664.1111145019531,
+ "y": 576.4136810302734,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "444b8a86.f0f0b4"
+ ]
+ ]
+ },
+ {
+ "id": "444b8a86.f0f0b4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 845.3492736816406,
+ "y": 577.4138031005859,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "69a87518.69854c",
+ "142787bd.d3eaa8"
+ ]
+ ]
+ },
+ {
+ "id": "a1ea1a5a.119a28",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:network-topology-operation-deactivate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-deactivate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1998.4205932617188,
+ "y": 695.0208282470703,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "906cbd9a.3bcc1",
+ "type": "other",
+ "name": "unassign",
+ "xml": "<outcome value='unassign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 672.1111145019531,
+ "y": 641.4136810302734,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "78e21d22.3aa574"
+ ]
+ ]
+ },
+ {
+ "id": "78e21d22.3aa574",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 853.3492736816406,
+ "y": 642.4138031005859,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "69a87518.69854c",
+ "9de6fd5e.4ad14"
+ ]
+ ]
+ },
+ {
+ "id": "6c5f5914.18dc18",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:network-topology-operation-unassign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-unassign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2005.1705932617188,
+ "y": 807.7708282470703,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "483543a0.87b2ec",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 663.1111183166504,
+ "y": 701.4136714935303,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "a3c1c755.071638"
+ ]
+ ]
+ },
+ {
+ "id": "a3c1c755.071638",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n",
+ "comments": "",
+ "x": 845.1111145019531,
+ "y": 700.4136810302734,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "1170a38.c1b8e5d",
+ "type": "set",
+ "name": "Set final indicator to Y",
+ "xml": "<set>\n<parameter name=\"ack-final\" value=\"Y\"/>",
+ "comments": "",
+ "x": 475.2221984863281,
+ "y": 818.8581142425537,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "d9b3b70a.4d0258",
+ "type": "for",
+ "name": "for nidx..service-data.networks.network[]",
+ "xml": "<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1893.8414764404297,
+ "y": 473.1755828857422,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "7ab3dce2.d045e4"
+ ]
+ ]
+ },
+ {
+ "id": "69a87518.69854c",
+ "type": "switchNode",
+ "name": "switch service-data.networks.network_length",
+ "xml": "<switch test='`$service-data.networks.network_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1227.5555725097656,
+ "y": 437.74696350097656,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "1c5afa5b.117ca6",
+ "e5671ca3.48268"
+ ]
+ ]
+ },
+ {
+ "id": "1c5afa5b.117ca6",
+ "type": "other",
+ "name": "outcome Null",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1470.5555114746094,
+ "y": 439.7469730377197,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "88ef598e.91daa8"
+ ]
+ ]
+ },
+ {
+ "id": "e5671ca3.48268",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1424.5555419921875,
+ "y": 472.7469940185547,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "18cdb225.91a67e"
+ ]
+ ]
+ },
+ {
+ "id": "7ab3dce2.d045e4",
+ "type": "switchNode",
+ "name": "switch networkid found",
+ "xml": "<switch test=\"`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2184.2700271606445,
+ "y": 472.42566680908203,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "3a66da90.0e3556"
+ ]
+ ]
+ },
+ {
+ "id": "3a66da90.0e3556",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2373.222381591797,
+ "y": 473.3184051513672,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "7d4e697f.fd23e8"
+ ]
+ ]
+ },
+ {
+ "id": "7d4e697f.fd23e8",
+ "type": "set",
+ "name": "set tmp.nidx and ctx.network-data",
+ "xml": "<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />\n",
+ "comments": "",
+ "x": 2606.754150390625,
+ "y": 472.0684127807617,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "cc47bcf0.238e4",
+ "type": "comment",
+ "name": "Find the index to service data for this network - save id in tmp.nidx, save service-data",
+ "info": "",
+ "comments": "",
+ "x": 1350.6666564941406,
+ "y": 406.74698638916016,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "60b7d7a1.646f18",
+ "type": "comment",
+ "name": "service-data will not be stored until we have a network-id",
+ "info": "",
+ "comments": "",
+ "x": 1193.7777099609375,
+ "y": 294.63589096069336,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "88ef598e.91daa8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n",
+ "comments": "",
+ "x": 1662.3330688476562,
+ "y": 437.63597106933594,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "18cdb225.91a67e",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1591.8255081176758,
+ "y": 472.301570892334,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "d9b3b70a.4d0258",
+ "46916c71.7511d4"
+ ]
+ ]
+ },
+ {
+ "id": "46916c71.7511d4",
+ "type": "switchNode",
+ "name": "switch tmp.nidx ",
+ "xml": "<switch test=\"`$tmp.nidx`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1812.1429061889648,
+ "y": 515.1587896347046,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "744b6bc1.2a0f74"
+ ]
+ ]
+ },
+ {
+ "id": "570ef8cd.cbcb88",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n",
+ "comments": "",
+ "x": 2164.9998893737793,
+ "y": 510.87303161621094,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "744b6bc1.2a0f74",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1983.5714416503906,
+ "y": 513.7301750183105,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "570ef8cd.cbcb88"
+ ]
+ ]
+ },
+ {
+ "id": "bd1a56c0.3e9138",
+ "type": "switchNode",
+ "name": "switch network-level-oper-status",
+ "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1204.888916015625,
+ "y": 579.2222290039062,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "f3be99d5.176a88",
+ "215ed9fd.338986"
+ ]
+ ]
+ },
+ {
+ "id": "f3be99d5.176a88",
+ "type": "outcome",
+ "name": "outcome PendingCreate",
+ "xml": "<outcome value='PendingCreate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1569.8888956705723,
+ "y": 579.2222137451171,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "68785460.4653ec"
+ ]
+ ]
+ },
+ {
+ "id": "215ed9fd.338986",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1519.8889427185059,
+ "y": 619.2222442626953,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "598a9836.8dec38"
+ ]
+ ]
+ },
+ {
+ "id": "598a9836.8dec38",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />",
+ "comments": "",
+ "x": 1689.8889427185059,
+ "y": 619.2222442626953,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "142787bd.d3eaa8",
+ "type": "switchNode",
+ "name": "switch network-level-oper-status",
+ "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1212.1903991699219,
+ "y": 695.1736297607422,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "ae28e421.942868",
+ "d2690a94.f5d8c8"
+ ]
+ ]
+ },
+ {
+ "id": "ae28e421.942868",
+ "type": "outcome",
+ "name": "outcome Created",
+ "xml": "<outcome value='Created'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1575.1903686523438,
+ "y": 695.1736602783203,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "a1ea1a5a.119a28"
+ ]
+ ]
+ },
+ {
+ "id": "d2690a94.f5d8c8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1545.1903686523438,
+ "y": 735.1736602783203,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "db8d6195.30425"
+ ]
+ ]
+ },
+ {
+ "id": "db8d6195.30425",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />",
+ "comments": "",
+ "x": 1711.1903686523438,
+ "y": 737.1736602783203,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "9de6fd5e.4ad14",
+ "type": "switchNode",
+ "name": "switch network-level-oper-status",
+ "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1211.9919738769531,
+ "y": 809.3750305175781,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "7e221c63.bc45a4",
+ "cf28440b.dda768",
+ "c3dda3f.4ff456"
+ ]
+ ]
+ },
+ {
+ "id": "7e221c63.bc45a4",
+ "type": "outcome",
+ "name": "outcome PendingCreate",
+ "xml": "<outcome value='PendingCreate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1571.991943359375,
+ "y": 809.3750610351562,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "6c5f5914.18dc18"
+ ]
+ ]
+ },
+ {
+ "id": "cf28440b.dda768",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1528.9918823242188,
+ "y": 893.3750762939453,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "fbd25549.98f538"
+ ]
+ ]
+ },
+ {
+ "id": "fbd25549.98f538",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />",
+ "comments": "",
+ "x": 1720.3253021240234,
+ "y": 892.0417051315308,
+ "z": "cb3252c9.673b6",
+ "wires": []
+ },
+ {
+ "id": "c3dda3f.4ff456",
+ "type": "outcome",
+ "name": "outcome PendingDelete",
+ "xml": "<outcome value='PendingDelete'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1575.22216796875,
+ "y": 847.2222290039062,
+ "z": "cb3252c9.673b6",
+ "wires": [
+ [
+ "6c5f5914.18dc18"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-create-policy.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-create-policy.json
new file mode 100755
index 00000000..528eb1bd
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-create-policy.json
@@ -0,0 +1 @@
+[{"id":"5ea66244.2043ac","type":"dgstart","name":"DGSTART","outputs":1,"x":101.42857360839844,"y":82.85714721679688,"z":"2f4e466a.a72c1a","wires":[["1488d42d.2b4bec"]]},{"id":"1488d42d.2b4bec","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":215.04759979248047,"y":123.09526062011719,"z":"2f4e466a.a72c1a","wires":[["accb6834.19e2e8"]]},{"id":"accb6834.19e2e8","type":"method","name":"method policy-manager-create-policy","xml":"<method rpc='policy-manager-create-policy' mode='sync'>\n","comments":"","outputs":1,"x":186.8572006225586,"y":162.85714721679688,"z":"2f4e466a.a72c1a","wires":[["4c2a088b.3e0ba8"]]},{"id":"dfa928b6.5c06b8","type":"comment","name":"policy-manager-create-policy","info":"","comments":"","x":495.77342987060547,"y":30.443490982055664,"z":"2f4e466a.a72c1a","wires":[]},{"id":"4c2a088b.3e0ba8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":217.1428680419922,"y":324.28570556640625,"z":"2f4e466a.a72c1a","wires":[["189efe08.1f8952","e0ad431.613cbc"]]},{"id":"189efe08.1f8952","type":"execute","name":"RestapiCallnode createPolicy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.pm.createpolicy.templatefile`\" />\n <parameter name='restapiUrl' value=\"`$prop.policy-manager.url + '/pdp/api/createPolicy'`\" />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name='convertResponse' value=\"false\" />\n <parameter name='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n","comments":"","outputs":1,"x":472.8571548461914,"y":284.2857074737549,"z":"2f4e466a.a72c1a","wires":[["1edc5a5e.259046","ac8ecfcb.7d84c"]]},{"id":"1edc5a5e.259046","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":685.7142562866211,"y":258.5714349746704,"z":"2f4e466a.a72c1a","wires":[["c0e63f5a.e0d5e"]]},{"id":"c0e63f5a.e0d5e","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":849.428581237793,"y":258.4999108314514,"z":"2f4e466a.a72c1a","wires":[["8a75b361.99d53"]]},{"id":"ac8ecfcb.7d84c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":681.8517951965332,"y":306.4946479797363,"z":"2f4e466a.a72c1a","wires":[["3c3c68db.b16138"]]},{"id":"8a75b361.99d53","type":"execute","name":"RestapiCallnode pushPolicy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.pm.pushpolicy.templatefile`\" />\n <parameter name='restapiUrl' value=\"`$prop.policy-manager.url + '/pdp/api/pushPolicy'`\" />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name='convertResponse' value=\"false\" />\n <parameter name='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n","comments":"","outputs":1,"x":1084.2857666015625,"y":222.85716438293457,"z":"2f4e466a.a72c1a","wires":[["dd3bc8bc.e85af8","5808b3a9.1ba37c"]]},{"id":"dd3bc8bc.e85af8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1290,"y":195.71431159973145,"z":"2f4e466a.a72c1a","wires":[["fe10eb1e.6c23a8"]]},{"id":"fe10eb1e.6c23a8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1453.7143249511719,"y":195.64278745651245,"z":"2f4e466a.a72c1a","wires":[[]]},{"id":"5808b3a9.1ba37c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1286.137538909912,"y":243.63752460479736,"z":"2f4e466a.a72c1a","wires":[["731c4238.4b27ac"]]},{"id":"3c3c68db.b16138","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to create policy in Policy Manager' />\n","comments":"","x":847.1428680419922,"y":306.5714521408081,"z":"2f4e466a.a72c1a","wires":[]},{"id":"731c4238.4b27ac","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to push policy in Policy Manager' />\n","comments":"","x":1450.5714225769043,"y":243.28573417663574,"z":"2f4e466a.a72c1a","wires":[]},{"id":"e0ad431.613cbc","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n","comments":"","x":425.71429443359375,"y":362.857138633728,"z":"2f4e466a.a72c1a","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-delete-policy.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-delete-policy.json
new file mode 100755
index 00000000..3bb45e44
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-manager-delete-policy.json
@@ -0,0 +1 @@
+[{"id":"d581c562.c43188","type":"dgstart","name":"DGSTART","outputs":1,"x":105.71428680419922,"y":82.85714721679688,"z":"3db8bf99.514be","wires":[["fe2cb5ef.9a8118"]]},{"id":"fe2cb5ef.9a8118","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":219.33331298828125,"y":123.09526062011719,"z":"3db8bf99.514be","wires":[["afb77106.81ec6"]]},{"id":"afb77106.81ec6","type":"method","name":"method policy-manager-delete-policy","xml":"<method rpc='policy-manager-delete-policy' mode='sync'>\n","comments":"","outputs":1,"x":191.14291381835938,"y":162.85714721679688,"z":"3db8bf99.514be","wires":[["fac4023.3e872"]]},{"id":"7456b083.f5c67","type":"comment","name":"policy-manager-delete-policy","info":"","comments":"","x":500.05914306640625,"y":30.443490982055664,"z":"3db8bf99.514be","wires":[]},{"id":"fac4023.3e872","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":221.42858123779297,"y":324.28570556640625,"z":"3db8bf99.514be","wires":[["e7322979.b0b9c8","fbc41199.2cc44"]]},{"id":"e7322979.b0b9c8","type":"execute","name":"RestapiCallnode deletePolicy PDP","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.pm.deletepolicypdp.templatefile`\" />\n <parameter name='restapiUrl' value=\"`$prop.policy-manager.url + '/pdp/api/deletePolicy'`\" />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name='convertResponse' value=\"false\" />\n <parameter name='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n","comments":"","outputs":1,"x":499.99998474121094,"y":284.28571224212646,"z":"3db8bf99.514be","wires":[["47d31b8a.83ea94","fef211f6.ec11e"]]},{"id":"47d31b8a.83ea94","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":728.5714263916016,"y":260.0000009536743,"z":"3db8bf99.514be","wires":[["3d158249.ff10fe"]]},{"id":"3d158249.ff10fe","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":892.2857513427734,"y":259.9284768104553,"z":"3db8bf99.514be","wires":[["56e0237b.2129ac"]]},{"id":"fef211f6.ec11e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":724.7089653015137,"y":307.92321395874023,"z":"3db8bf99.514be","wires":[["2cb54eeb.c893e2"]]},{"id":"f1cdea53.99d408","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1370.0000076293945,"y":233.5714454650879,"z":"3db8bf99.514be","wires":[["37d77ceb.7b75b4"]]},{"id":"37d77ceb.7b75b4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1533.7143325805664,"y":233.4999213218689,"z":"3db8bf99.514be","wires":[[]]},{"id":"e6cf96c3.b55948","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1366.1375465393066,"y":281.4946584701538,"z":"3db8bf99.514be","wires":[["898e79aa.dcca08"]]},{"id":"2cb54eeb.c893e2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to delete policy from Policy Manager (PDP)' />\n","comments":"","x":890.0000381469727,"y":308.000018119812,"z":"3db8bf99.514be","wires":[]},{"id":"fbc41199.2cc44","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n","comments":"","x":438.5714111328125,"y":362.85710525512695,"z":"3db8bf99.514be","wires":[]},{"id":"56e0237b.2129ac","type":"execute","name":"RestapiCallnode deletePolicy PAP","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.pm.deletepolicypap.templatefile`\" />\n <parameter name='restapiUrl' value=\"`$prop.policy-manager.url + '/pdp/api/deletePolicy'`\" />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name='convertResponse' value=\"false\" />\n <parameter name='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n","comments":"","outputs":1,"x":1131.4286193847656,"y":259.14286613464355,"z":"3db8bf99.514be","wires":[["f1cdea53.99d408","e6cf96c3.b55948"]]},{"id":"898e79aa.dcca08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to delete policy from Policy Manager (PAP)' />\n","comments":"","x":1529.1429328918457,"y":282.2857246398926,"z":"3db8bf99.514be","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-update-notify-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-update-notify-operation.json
new file mode 100755
index 00000000..c45b46ec
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_policy-update-notify-operation.json
@@ -0,0 +1 @@
+[{"id":"2b8f0645.8e4dda","type":"comment","name":"POLICY-UPDATE-NOTIFY-OPERATION","info":"","comments":"","x":538.3928527832031,"y":34.28571319580078,"z":"c4ddb531.504de8","wires":[]},{"id":"640c5bf2.e2b254","type":"dgstart","name":"DGSTART","outputs":1,"x":110.14285278320312,"y":85.03571319580078,"z":"c4ddb531.504de8","wires":[["6371d353.9eabbc"]]},{"id":"6371d353.9eabbc","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":224.46426391601562,"y":124.7023868560791,"z":"c4ddb531.504de8","wires":[["af806a5c.37c7f8"]]},{"id":"af806a5c.37c7f8","type":"method","name":"method policy-update-notify-operation","xml":"<method rpc='policy-update-notify-operation' mode='sync'>\n","comments":"","outputs":1,"x":201,"y":165.0357151031494,"z":"c4ddb531.504de8","wires":[["59ff8d7a.32d3d4"]]},{"id":"d17a989.54e5868","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"success\" />\n","comments":"","x":338.3810272216797,"y":578.9882106781006,"z":"c4ddb531.504de8","wires":[]},{"id":"3cfb5438.adb59c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":680.2977676391602,"y":313.80953311920166,"z":"c4ddb531.504de8","wires":[["4c9eba0e.d56fd4","bbad0a81.e6a3e8","5bf6f09a.aa2a","dadfe54.591ea18","5210aeb1.e5ac2"]]},{"id":"4c9eba0e.d56fd4","type":"execute","name":"RestapiCallnode getConfig","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.pm.getpolicy.templatefile`\" />\n <parameter name='restapiUrl' value=\"`$prop.policy-manager.url + '/pdp/api/getConfig'`\" />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='responsePrefix' value=\"policy\" /> \n <parameter name='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n","comments":"","outputs":1,"x":938.5714569091797,"y":365.7142572402954,"z":"c4ddb531.504de8","wires":[["371b8aa7.b584d6","eb8e6d2.61e729"]]},{"id":"bbad0a81.e6a3e8","type":"execute","name":"readProperties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":904.285774230957,"y":198.57144355773926,"z":"c4ddb531.504de8","wires":[[]]},{"id":"371b8aa7.b584d6","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1145.7143020629883,"y":342.85714054107666,"z":"c4ddb531.504de8","wires":[["bc023fa9.fe4ae"]]},{"id":"bc023fa9.fe4ae","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1309.4286270141602,"y":342.78561639785767,"z":"c4ddb531.504de8","wires":[[]]},{"id":"eb8e6d2.61e729","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1141.8518409729004,"y":390.7803535461426,"z":"c4ddb531.504de8","wires":[["c447c4e0.dd61f8"]]},{"id":"c447c4e0.dd61f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to get policy from Policy Manager' />\n","comments":"","x":1306.2857246398926,"y":390.42856311798096,"z":"c4ddb531.504de8","wires":[]},{"id":"5bf6f09a.aa2a","type":"execute","name":"execute Contrail API update network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='update' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$cloud-region-id`' />\n<parameter name='update-network-policy-json' value='`$policy.config`' />","comments":"","outputs":1,"x":987.1428680419922,"y":467.14284801483154,"z":"c4ddb531.504de8","wires":[["fca9fae0.1cd838","cadf6d1d.e304e"]]},{"id":"fca9fae0.1cd838","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1240.0000457763672,"y":444.2856969833374,"z":"c4ddb531.504de8","wires":[["9b561741.693e18"]]},{"id":"9b561741.693e18","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1403.714370727539,"y":444.2141728401184,"z":"c4ddb531.504de8","wires":[[]]},{"id":"cadf6d1d.e304e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1236.1375846862793,"y":492.2089099884033,"z":"c4ddb531.504de8","wires":[["bc7e3f77.a2464"]]},{"id":"bc7e3f77.a2464","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to get policy from Policy Manager' />\n","comments":"","x":1400.5714683532715,"y":491.8571195602417,"z":"c4ddb531.504de8","wires":[]},{"id":"50b08b49.336914","type":"switchNode","name":"switch update-type","xml":"<switch test='`$policy-update-notify-operation-input.update-type`'>\n","comments":"","outputs":1,"x":349.9999771118164,"y":314.2857093811035,"z":"c4ddb531.504de8","wires":[["8100e6ab.3c2318"]]},{"id":"59ff8d7a.32d3d4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":140,"y":445.714298248291,"z":"c4ddb531.504de8","wires":[["50b08b49.336914","d17a989.54e5868"]]},{"id":"8100e6ab.3c2318","type":"outcome","name":"Update","xml":"<outcome value='Update'>\n","comments":"","outputs":1,"x":523.5714454650879,"y":313.85714530944824,"z":"c4ddb531.504de8","wires":[["3cfb5438.adb59c"]]},{"id":"dadfe54.591ea18","type":"save","name":"insert to POLICY_UPDATE_NOTIFICATION","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":992.8572158813477,"y":294.28569889068604,"z":"c4ddb531.504de8","wires":[[]]},{"id":"5210aeb1.e5ac2","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.sql' value=\"`'insert into POLICY_UPDATE_NOTIFICATION (policy_name,version_id,update_type) values ( '\n+ ' $policy-update-notify-operation-input.policy-name , $policy-update-notify-operation-input.version-id , $policy-update-notify-operation-input.update-type )'`\" />\n\n","comments":"","x":909.9999465942383,"y":245.71427249908447,"z":"c4ddb531.504de8","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_process-eipam-pools.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_process-eipam-pools.json
new file mode 100644
index 00000000..44fe0225
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_process-eipam-pools.json
@@ -0,0 +1 @@
+[{"id":"b67dacc5.0d756","type":"dgstart","name":"DGSTART","outputs":1,"x":207.99989318847656,"y":99.36906051635742,"z":"f952bc99.2d7ef","wires":[["c49255fa.d97648"]]},{"id":"c49255fa.d97648","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":270.5713233947754,"y":151.3333444595337,"z":"f952bc99.2d7ef","wires":[["3a0b7ea0.7c1512"]]},{"id":"3a0b7ea0.7c1512","type":"method","name":"process-eipam-pools","xml":"<method rpc=\"process-eipam-pools\" mode=\"sync\">","comments":"","outputs":1,"x":204.9046401977539,"y":242.75002574920654,"z":"f952bc99.2d7ef","wires":[["3a4ac45e.70cf9c"]]},{"id":"215818d3.3de248","type":"comment","name":"GENERIC-RESOURCE-API: PROCESS-EIPAM-POOLS","info":"","comments":"","x":666.4046936035156,"y":93.00000953674316,"z":"f952bc99.2d7ef","wires":[]},{"id":"1b779ba4.babaa4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":396.6546745300293,"y":401.5834274291992,"z":"f952bc99.2d7ef","wires":[["1679194b.17c9c7","f4dce5f3.320ae8","8f666f4c.792","a46cbfe1.320c","e8caf88b.999398","d94b078d.3bf3a8","32912400.2c8a1c","984c8c29.958c6","a96ade11.7c13d","4ad3e9cf.db5138"]]},{"id":"cd4e10fa.b05c6","type":"comment","name":"CLEANUP LOCAL VARIABLES TO BE USED","info":"","comments":"","x":747.0117416381836,"y":187.34528636932373,"z":"f952bc99.2d7ef","wires":[]},{"id":"a46cbfe1.320c","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.region' value='`$aai.complex.region`' />\n<parameter name='tmp.cloud-region-id' value=\"`$aai.cloud-region.cloud-region-id`\" />\n<parameter name='tmp.physical-location-id' value=\"`$aai.complex.physical-location-id`\" />\n<parameter name=\"tmp.clli\" value=\"`$aai.complex.physical-location-id`\" />\n<parameter name=\"tmp.zone\" value=\"`$aai.cloud-region.cloud-zone`\" />\n<parameter name=\"tmp.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"tmp.service-type\" value=\"`$network-topology-operation-input.service-information.subscription-service-type`\" />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name='eipam-pool.v4.pre-existing' value='false' />\n<parameter name='eipam-pool.v6.pre-existing' value='false' />\n<parameter name=\"tmp.level1-key-value\" value=\"`$aai.complex.physical-location-id + ':' + $aai.cloud-region.cloud-region-id`\" />\n<parameter name=\"tmp.level2-key-value\" value=\"`$network-model.network-role + ':' + $tmp.l3-network.network-id`\" />\n<parameter name=\"tmp.ipv4-cidr-mask\" value=\"`$network-model.ipv4-cidr-mask`\" />\n<parameter name=\"tmp.ipv6-cidr-mask\" value=\"`$network-model.ipv6-cidr-mask`\" />","comments":"","x":689.9589309692383,"y":253.2447919845581,"z":"f952bc99.2d7ef","wires":[]},{"id":"1f46cdd5.3ab782","type":"comment","name":"Process level 1 pool - works v4 and v6","info":"","comments":"","x":711.8956756591797,"y":443.6019515991211,"z":"f952bc99.2d7ef","wires":[]},{"id":"1679194b.17c9c7","type":"call","name":"call eipam-create-network-role-pool for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":759.5146484375,"y":483.1733283996582,"z":"f952bc99.2d7ef","wires":[["71ac165c.911f28","9a05e4cc.4f8b08"]]},{"id":"dc84bed9.0f66f","type":"call","name":"call eipam-allocate-network-role-subnet for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2261.407512664795,"y":633.7925186157227,"z":"f952bc99.2d7ef","wires":[["7b320795.7564e8","215b2255.65126e"]]},{"id":"7b320795.7564e8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2682.967109680176,"y":707.8354949951172,"z":"f952bc99.2d7ef","wires":[["f2fa55c6.6d3af8"]]},{"id":"71ac165c.911f28","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1048.1928901672363,"y":484.50205993652344,"z":"f952bc99.2d7ef","wires":[["aa1d5c4f.68acc"]]},{"id":"aa1d5c4f.68acc","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"`'An error occured while allocating subnet in EIPAM. Error creating level 1 pool. ' + $error-message`\" />\n\t","comments":"","x":1221.443000793457,"y":483.7043914794922,"z":"f952bc99.2d7ef","wires":[]},{"id":"e1539b17.4fe6e8","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 by network id ","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4254.394844055176,"y":793.3521280288696,"z":"f952bc99.2d7ef","wires":[["1dfbdbc5.996cd4","a34de3f2.f8a7e"]]},{"id":"1dfbdbc5.996cd4","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4527.5618324279785,"y":790.9922323226929,"z":"f952bc99.2d7ef","wires":[["f2a221b4.015d2"]]},{"id":"f2a221b4.015d2","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4701.811347961426,"y":789.4088582992554,"z":"f952bc99.2d7ef","wires":[]},{"id":"4045d178.2db3c","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":4126.339134216309,"y":719.4632081985474,"z":"f952bc99.2d7ef","wires":[]},{"id":"f2fa55c6.6d3af8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2872.7101516723633,"y":705.9723358154297,"z":"f952bc99.2d7ef","wires":[["f0f78b84.6897b8","181af87e.ac39e8"]]},{"id":"b55eba07.112298","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4204.181602478027,"y":756.6947755813599,"z":"f952bc99.2d7ef","wires":[]},{"id":"3a4af118.c4e1ae","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":4700.931427001953,"y":830.9447584152222,"z":"f952bc99.2d7ef","wires":[]},{"id":"a34de3f2.f8a7e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4532.181419372559,"y":830.9447946548462,"z":"f952bc99.2d7ef","wires":[["3a4af118.c4e1ae"]]},{"id":"3a4ac45e.70cf9c","type":"switchNode","name":"switch","xml":"<switch test='`$tmp.process-eipam-action`'>\n","comments":"","outputs":1,"x":160.1824836730957,"y":323.69446563720703,"z":"f952bc99.2d7ef","wires":[["6a3c2e6.90c98d","1950da9.29e6f25","260c039a.83c7cc"]]},{"id":"6a3c2e6.90c98d","type":"other","name":"assign","xml":"<outcome value='assign'>\n","comments":"","outputs":1,"x":217.09911727905273,"y":402.52779388427734,"z":"f952bc99.2d7ef","wires":[["1b779ba4.babaa4"]]},{"id":"1950da9.29e6f25","type":"other","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":176.42317962646484,"y":2742.009256839752,"z":"f952bc99.2d7ef","wires":[["5f392f83.9ef9b"]]},{"id":"260c039a.83c7cc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":166.42319679260254,"y":2812.009350299835,"z":"f952bc99.2d7ef","wires":[["c342f238.9831"]]},{"id":"c342f238.9831","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Invalid option to process-eipam\" />\n\t","comments":"","x":376.42317962646484,"y":2812.009256839752,"z":"f952bc99.2d7ef","wires":[]},{"id":"e8caf88b.999398","type":"set","name":"clean up local variables","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='' />\n<parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='' />\n<parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='' />\n<parameter name='tmp.l3-network.level2.v4.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='' />\n<parameter name='tmp.l3-network.level2.v6.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='false' />\n\n","comments":"","x":674.1254425048828,"y":224.03045272827148,"z":"f952bc99.2d7ef","wires":[]},{"id":"5f392f83.9ef9b","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Invalid option to process-eipam\" />\n\t","comments":"","x":374.7565231323242,"y":2732.009256839752,"z":"f952bc99.2d7ef","wires":[]},{"id":"9c730d35.31f75","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field5\" value=\"`$eipam-pool.v4.pre-existing`\"/>\n<parameter name=\"field6\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field7\" value=\"`$eipam-pool.v6.pre-existing`\"/>\n<parameter name=\"field8\" value=\"tmp.create-v4-pool-flag\" />\n<parameter name=\"field9\" value=\"`$tmp.create-v4-pool-flag`\" />\n<parameter name=\"field10\" value=\"tmp.create-v6-pool-flag\" />\n<parameter name=\"field11\" value=\"`$tmp.create-v6-pool-flag`\" />\n\n","comments":"","outputs":1,"x":1402.2059860229492,"y":487.4008026123047,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"9a05e4cc.4f8b08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1051.3488960266113,"y":518.7182769775391,"z":"f952bc99.2d7ef","wires":[["cc821fe6.cd72f"]]},{"id":"215b2255.65126e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2678.3967208862305,"y":624.0040683746338,"z":"f952bc99.2d7ef","wires":[["71b1901e.8a53c"]]},{"id":"2c44c339.bcfe4c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":3046.587127685547,"y":623.1469631195068,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"f4dce5f3.320ae8","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":702.6823616027832,"y":596.9247398376465,"z":"f952bc99.2d7ef","wires":[["11cf4595.d04cda"]]},{"id":"11cf4595.d04cda","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":917.6824951171875,"y":595.6866140365601,"z":"f952bc99.2d7ef","wires":[["9250fe2.19568"]]},{"id":"9250fe2.19568","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1098.5870895385742,"y":596.1152439117432,"z":"f952bc99.2d7ef","wires":[["58f6d3c8.72fbac"]]},{"id":"33f1dd7e.590052","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv4' />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n\n","comments":"","x":2185.9681816101074,"y":593.7818984985352,"z":"f952bc99.2d7ef","wires":[]},{"id":"9595f2c9.cea8a","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3114.3008575439453,"y":662.4486179351807,"z":"f952bc99.2d7ef","wires":[]},{"id":"71b1901e.8a53c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2843.422897338867,"y":622.6019897460938,"z":"f952bc99.2d7ef","wires":[["2c44c339.bcfe4c","9595f2c9.cea8a"]]},{"id":"cc821fe6.cd72f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1222.793098449707,"y":518.6389312744141,"z":"f952bc99.2d7ef","wires":[["9c730d35.31f75","b4f598b2.142618"]]},{"id":"b4f598b2.142618","type":"set","name":"Save return values from eipam level 1 pool","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>\n<parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>\n","comments":"","x":1505.126480102539,"y":517.305585861206,"z":"f952bc99.2d7ef","wires":[]},{"id":"c09959cb.7d7228","type":"call","name":"call eipam-allocate-network-role-subnet for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2316.126724243164,"y":873.8610801696777,"z":"f952bc99.2d7ef","wires":[["ce7f3982.658828","d176dbca.9f6898"]]},{"id":"ce7f3982.658828","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2643.3530807495117,"y":939.9039907455444,"z":"f952bc99.2d7ef","wires":[["b67d44ba.680b88"]]},{"id":"d184018d.b9a27","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 by network id ","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4173.448627471924,"y":993.7538566589355,"z":"f952bc99.2d7ef","wires":[["455af08a.adb86","51c110c5.707fb"]]},{"id":"455af08a.adb86","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4483.282020568848,"y":999.7273271083832,"z":"f952bc99.2d7ef","wires":[["b58aa487.353488"]]},{"id":"b58aa487.353488","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4637.53137588501,"y":999.1439731121063,"z":"f952bc99.2d7ef","wires":[]},{"id":"b67d44ba.680b88","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2833.096122741699,"y":938.0408315658569,"z":"f952bc99.2d7ef","wires":[["dbe92352.fa718","262b4940.672706"]]},{"id":"28e3d2dc.6d980e","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4121.568744659424,"y":950.4297587871552,"z":"f952bc99.2d7ef","wires":[]},{"id":"200d17f7.3bcdf8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":4636.652282714844,"y":967.6797797679901,"z":"f952bc99.2d7ef","wires":[]},{"id":"51c110c5.707fb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4482.901950836182,"y":968.0132148265839,"z":"f952bc99.2d7ef","wires":[["200d17f7.3bcdf8"]]},{"id":"d176dbca.9f6898","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2654.116050720215,"y":873.4059839248657,"z":"f952bc99.2d7ef","wires":[["1fdda468.d7a17c"]]},{"id":"f8019f13.9e46","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2997.306407928467,"y":834.2155246734619,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"8f666f4c.792","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":705.4019470214844,"y":796.9933710098267,"z":"f952bc99.2d7ef","wires":[["4dcca263.b0f71c"]]},{"id":"4dcca263.b0f71c","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1000.544807434082,"y":796.7552556991577,"z":"f952bc99.2d7ef","wires":[["a0a6b416.6b7e48"]]},{"id":"a0a6b416.6b7e48","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1159.5448532104492,"y":797.4218816757202,"z":"f952bc99.2d7ef","wires":[["54ef1626.295eb8"]]},{"id":"8603aaa6.0967d8","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv6' />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n\n","comments":"","x":2234.687370300293,"y":837.8504018783569,"z":"f952bc99.2d7ef","wires":[]},{"id":"9efc4172.79ebb","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3065.020275115967,"y":871.5172214508057,"z":"f952bc99.2d7ef","wires":[]},{"id":"1fdda468.d7a17c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2819.1422271728516,"y":872.0039052963257,"z":"f952bc99.2d7ef","wires":[["f8019f13.9e46","9efc4172.79ebb"]]},{"id":"58f6d3c8.72fbac","type":"get-resource","name":"get-resource V4 - validate if level 1 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1434.745864868164,"y":595.6706838607788,"z":"f952bc99.2d7ef","wires":[["9ef700ca.0d4c8","1344a1eb.80ac2e"]]},{"id":"9ef700ca.0d4c8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1752.745864868164,"y":566.0872745513916,"z":"f952bc99.2d7ef","wires":[["d60acc9e.ea03d"]]},{"id":"1344a1eb.80ac2e","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1752.857925415039,"y":595.837306022644,"z":"f952bc99.2d7ef","wires":[["4a5fcaaa.0bc904"]]},{"id":"4a5fcaaa.0bc904","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1909.3241157531738,"y":592.551233291626,"z":"f952bc99.2d7ef","wires":[["33f1dd7e.590052","dc84bed9.0f66f"]]},{"id":"d60acc9e.ea03d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1909.7180366516113,"y":566.5873048305511,"z":"f952bc99.2d7ef","wires":[["7fe861f0.6441c","c8cf33c9.77119"]]},{"id":"7fe861f0.6441c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":2120.134552001953,"y":526.0040121078491,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"c8cf33c9.77119","type":"set","name":"set pre-existing for l3subnet for level1","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n\n","comments":"","x":2213.598663330078,"y":558.8056793212891,"z":"f952bc99.2d7ef","wires":[]},{"id":"54ef1626.295eb8","type":"get-resource","name":"get-resource V6 - validate if level 1 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1476.6824798583984,"y":797.0831346511841,"z":"f952bc99.2d7ef","wires":[["c3bac977.4661a8","3db24e26.1b8ac2"]]},{"id":"c3bac977.4661a8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1798.0155334472656,"y":800.4165077209473,"z":"f952bc99.2d7ef","wires":[["9c73f5a5.87c408"]]},{"id":"3db24e26.1b8ac2","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1806.8776626586914,"y":846.416538476944,"z":"f952bc99.2d7ef","wires":[["d2ddd942.d1d868"]]},{"id":"d2ddd942.d1d868","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1957.0938339233398,"y":844.3804972171783,"z":"f952bc99.2d7ef","wires":[["8603aaa6.0967d8","c09959cb.7d7228"]]},{"id":"954c65f8.d15228","type":"comment","name":"Check if level1 ipv6 subnet exists","info":"","comments":"","x":1392.0475616455078,"y":765.4165515899658,"z":"f952bc99.2d7ef","wires":[]},{"id":"9c73f5a5.87c408","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1981.2377014160156,"y":800.4165077209473,"z":"f952bc99.2d7ef","wires":[["e14979b6.d0cfd8","74f6cba0.e206a4"]]},{"id":"e14979b6.d0cfd8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2179.237617492676,"y":758.4165878295898,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"74f6cba0.e206a4","type":"set","name":"set pre-existing for l3subnet for level1","xml":"<set>\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2270.9515686035156,"y":797.718204498291,"z":"f952bc99.2d7ef","wires":[]},{"id":"d94b078d.3bf3a8","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name='eipam-pool.v4.pre-existing' value='false' />\n<parameter name='eipam-pool.v6.pre-existing' value='false' />\n","comments":"","x":703.4510650634766,"y":936.0464601516724,"z":"f952bc99.2d7ef","wires":[]},{"id":"c312d18.e12303","type":"comment","name":"Process level 2 pool - works v4 and v6","info":"","comments":"","x":804.0068283081055,"y":1043.8797640800476,"z":"f952bc99.2d7ef","wires":[]},{"id":"32912400.2c8a1c","type":"call","name":"call eipam-create-network-role-pool for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":767.6258239746094,"y":971.3083038330078,"z":"f952bc99.2d7ef","wires":[["a0afe554.2785e8","2c268f2c.e0546"]]},{"id":"a7cb1cfa.0f549","type":"call","name":"call eipam-allocate-network-role-subnet for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2448.6016960144043,"y":1396.847885131836,"z":"f952bc99.2d7ef","wires":[["8cff1c2d.4bb0c","a802819d.d0e34"]]},{"id":"8cff1c2d.4bb0c","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2793.827995300293,"y":1442.890947341919,"z":"f952bc99.2d7ef","wires":[["36ed6e2.ff4fe92"]]},{"id":"a0afe554.2785e8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1070.3874588012695,"y":972.1130695343018,"z":"f952bc99.2d7ef","wires":[["43ffa10a.8453d"]]},{"id":"e00163e7.419ee","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Error creating level 2 pool\" />\n\t","comments":"","x":1433.4472427368164,"y":968.7915554046631,"z":"f952bc99.2d7ef","wires":[]},{"id":"851486f7.ef53b8","type":"execute","name":"execute deletePoolByNetworkLevel for level 2 by network id ","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4245.256484985352,"y":1471.9630699157715,"z":"f952bc99.2d7ef","wires":[["6c5dac7.20e7854","baf01a29.ea1028"]]},{"id":"6c5dac7.20e7854","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4550.423843383789,"y":1467.6031036376953,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"770097ef.308fe8","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":4117.200759887695,"y":1396.0740814208984,"z":"f952bc99.2d7ef","wires":[]},{"id":"36ed6e2.ff4fe92","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2983.5710372924805,"y":1441.0277881622314,"z":"f952bc99.2d7ef","wires":[["fd0daacd.dcb218","6bf71b9b.45dac4"]]},{"id":"4b72c28b.ed33cc","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n","comments":"","x":4195.043228149414,"y":1433.305648803711,"z":"f952bc99.2d7ef","wires":[]},{"id":"baf01a29.ea1028","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4551.043472290039,"y":1505.5557403564453,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"5ac5e3dd.2f03bc","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field5\" value=\"`$eipam-pool.v4.pre-existing`\"/>\n<parameter name=\"field6\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field7\" value=\"`$eipam-pool.v6.pre-existing`\"/>\n<parameter name=\"field8\" value=\"tmp.create-v4-pool-flag\" />\n<parameter name=\"field9\" value=\"`$tmp.create-v4-pool-flag`\" />\n<parameter name=\"field10\" value=\"tmp.create-v6-pool-flag\" />\n<parameter name=\"field11\" value=\"`$tmp.create-v6-pool-flag`\" />\n\n","comments":"","outputs":1,"x":1422.067237854004,"y":1004.011833190918,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"2c268f2c.e0546","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1070.2100067138672,"y":1003.6625504493713,"z":"f952bc99.2d7ef","wires":[["c4f7ad92.93b9b"]]},{"id":"a802819d.d0e34","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2802.591018676758,"y":1392.392807006836,"z":"f952bc99.2d7ef","wires":[["56cf4de3.7ffac4"]]},{"id":"2bf3b759.27ba98","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level2\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level2\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":3247.1151275634766,"y":1333.535629272461,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"984c8c29.958c6","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":703.2100944519043,"y":1321.3136434555054,"z":"f952bc99.2d7ef","wires":[["e00b80a1.32095"]]},{"id":"e00b80a1.32095","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1047.019817352295,"y":1318.4088668823242,"z":"f952bc99.2d7ef","wires":[["3cda4212.fe039e"]]},{"id":"3cda4212.fe039e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1201.019760131836,"y":1317.4088706970215,"z":"f952bc99.2d7ef","wires":[["13a69cae.ff05c3"]]},{"id":"6b9c56d8.d3ab78","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv4' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$eipam-ip-block.subnet-size-override-v4`\" />\n","comments":"","x":2363.162395477295,"y":1354.837142944336,"z":"f952bc99.2d7ef","wires":[]},{"id":"d7cedcb0.0f074","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3316.8287506103516,"y":1368.8375091552734,"z":"f952bc99.2d7ef","wires":[]},{"id":"56cf4de3.7ffac4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2967.6171951293945,"y":1390.990728378296,"z":"f952bc99.2d7ef","wires":[["2bf3b759.27ba98","d7cedcb0.0f074"]]},{"id":"c4f7ad92.93b9b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1239.3210945129395,"y":1002.9166197776794,"z":"f952bc99.2d7ef","wires":[["5ac5e3dd.2f03bc","52e7f03b.a8622"]]},{"id":"52e7f03b.a8622","type":"set","name":"Save return values from eipam level 2 pool","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>\n<parameter name='tmp.l3-network.level2.v6.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>\n","comments":"","x":1528.3211097717285,"y":1035.9165506362915,"z":"f952bc99.2d7ef","wires":[]},{"id":"39556357.9dce0c","type":"call","name":"call eipam-allocate-network-role-subnet for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2692.988052368164,"y":1870.7125091552734,"z":"f952bc99.2d7ef","wires":[["d3587f17.0022d","d2a4e238.b8b64"]]},{"id":"d3587f17.0022d","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":3070.881118774414,"y":1899.2557220458984,"z":"f952bc99.2d7ef","wires":[["bf4e9f3e.356de"]]},{"id":"3b1c6b3c.bdb1e4","type":"execute","name":"execute deletePoolByNetworkLevel for level 2 by network id ","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4448.309951782227,"y":1980.3278045654297,"z":"f952bc99.2d7ef","wires":[["cb2b5938.735178","16e8f110.41380f"]]},{"id":"cb2b5938.735178","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4763.4767417907715,"y":1937.9679737091064,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"3067d347.4166fc","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":3556.253890991211,"y":1874.4389905929565,"z":"f952bc99.2d7ef","wires":[]},{"id":"bf4e9f3e.356de","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3230.624282836914,"y":1895.392562866211,"z":"f952bc99.2d7ef","wires":[["43d4715c.229a7","ea23f939.5b11b8"]]},{"id":"5bded456.68894c","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n","comments":"","x":4398.096725463867,"y":1943.6704864501953,"z":"f952bc99.2d7ef","wires":[]},{"id":"16e8f110.41380f","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4768.096488952637,"y":1977.9205493927002,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"d2a4e238.b8b64","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3069.6441345214844,"y":1862.75777053833,"z":"f952bc99.2d7ef","wires":[["dbede8bf.788e58"]]},{"id":"861e4276.f3848","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":3434.1677474975586,"y":1799.9007358551025,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"a96ade11.7c13d","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":472.5963897705078,"y":1879.3453130722046,"z":"f952bc99.2d7ef","wires":[["400bdd27.60c6c4"]]},{"id":"400bdd27.60c6c4","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1286.072597503662,"y":1880.773796081543,"z":"f952bc99.2d7ef","wires":[["3c398abd.52b596"]]},{"id":"3c398abd.52b596","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1453.4058952331543,"y":1878.1071949005127,"z":"f952bc99.2d7ef","wires":[["7c82d8bf.aa37c8"]]},{"id":"d5a0936c.26784","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv6' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$eipam-ip-block.subnet-size-override-v6`\" />\n\n","comments":"","x":2616.215347290039,"y":1835.202133178711,"z":"f952bc99.2d7ef","wires":[]},{"id":"58cd1d81.5e80a4","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3501.881607055664,"y":1833.202377319336,"z":"f952bc99.2d7ef","wires":[]},{"id":"dbede8bf.788e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3234.670310974121,"y":1861.35569190979,"z":"f952bc99.2d7ef","wires":[["861e4276.f3848","58cd1d81.5e80a4"]]},{"id":"33a121ac.c45b4e","type":"comment","name":"Allocate ipv4 subnet for level 2","info":"","comments":"","x":814.6547698974609,"y":1257.250023735894,"z":"f952bc99.2d7ef","wires":[]},{"id":"5f27a619.801138","type":"comment","name":"Allocate ipv6 subnet for level 1","info":"","comments":"","x":975.6546173095703,"y":1829.2130088806152,"z":"f952bc99.2d7ef","wires":[]},{"id":"13a69cae.ff05c3","type":"get-resource","name":"get-resource V4 - validate if level 2 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1579.3213958740234,"y":1317.9167461395264,"z":"f952bc99.2d7ef","wires":[["3c187ca6.bd91b4","38f089df.affb66"]]},{"id":"3c187ca6.bd91b4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1921.654598236084,"y":1315.2499845027924,"z":"f952bc99.2d7ef","wires":[["e15a7aa9.2b9be8"]]},{"id":"38f089df.affb66","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1930.5167274475098,"y":1361.250015258789,"z":"f952bc99.2d7ef","wires":[["831568d9.d0ba18"]]},{"id":"831568d9.d0ba18","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2080.732898712158,"y":1359.2139739990234,"z":"f952bc99.2d7ef","wires":[["6b9c56d8.d3ab78","a7cb1cfa.0f549"]]},{"id":"bb9558e5.f99c68","type":"comment","name":"Check if level2 ipv4 subnet exists","info":"","comments":"","x":1548.8769149780273,"y":1221.2499961853027,"z":"f952bc99.2d7ef","wires":[]},{"id":"e15a7aa9.2b9be8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2104.876766204834,"y":1315.2499845027924,"z":"f952bc99.2d7ef","wires":[["21d1d3ff.53e55c","42e8047d.9a082c"]]},{"id":"21d1d3ff.53e55c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level2\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level2\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":2304.876766204834,"y":1267.2499845027924,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"42e8047d.9a082c","type":"set","name":"set pre-existing for l3subnet for level2","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2394.590633392334,"y":1312.551681280136,"z":"f952bc99.2d7ef","wires":[]},{"id":"7c82d8bf.aa37c8","type":"get-resource","name":"get-resource V6 - validate if level 2 subnet does not exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1793.876823425293,"y":1839.4350967407227,"z":"f952bc99.2d7ef","wires":[["af837910.e47218","d3c4bc3.f10a64"]]},{"id":"af837910.e47218","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2216.8767013549805,"y":1789.4350967407227,"z":"f952bc99.2d7ef","wires":[["650a354.ce721cc"]]},{"id":"d3c4bc3.f10a64","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2225.7388305664062,"y":1835.4351274967194,"z":"f952bc99.2d7ef","wires":[["e7e192ea.8a1f3"]]},{"id":"e7e192ea.8a1f3","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2375.9550018310547,"y":1833.3990862369537,"z":"f952bc99.2d7ef","wires":[["d5a0936c.26784","39556357.9dce0c"]]},{"id":"89b66d1e.8fdb3","type":"comment","name":"Check if level2 ipv6 subnet exists","info":"","comments":"","x":1712.0990753173828,"y":1799.4350547790527,"z":"f952bc99.2d7ef","wires":[]},{"id":"650a354.ce721cc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2400.0988693237305,"y":1789.4350967407227,"z":"f952bc99.2d7ef","wires":[["fc0330f9.cfdd6","aac5588c.1aac58"]]},{"id":"fc0330f9.cfdd6","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2560.098808288574,"y":1749.4350624084473,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"aac5588c.1aac58","type":"set","name":"set pre-existing for l3subnet for level2","xml":"<set>\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2651.812759399414,"y":1788.7366790771484,"z":"f952bc99.2d7ef","wires":[]},{"id":"f0f78b84.6897b8","type":"switchNode","name":"switch: tmp.l3-network.level1.v4.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing`\">","comments":"","outputs":1,"x":3174.745864868164,"y":737.6072845458984,"z":"f952bc99.2d7ef","wires":[["38c4ba0d.cf5796","9f8a87cf.2d90c8","690ff915.aa6a28"]]},{"id":"dbe92352.fa718","type":"switchNode","name":"switch: tmp.l3-network.level1.v6.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level1.v6.pool.pre-existing`\">","comments":"","outputs":1,"x":3128.9045906066895,"y":970.527670621872,"z":"f952bc99.2d7ef","wires":[["a3d0a1cb.9d8fd","37d94e45.b2e192","c202d046.5bdbe"]]},{"id":"2bb67e85.513072","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3923.793228149414,"y":756.0836448669434,"z":"f952bc99.2d7ef","wires":[["b55eba07.112298","e1539b17.4fe6e8"]]},{"id":"fd0daacd.dcb218","type":"switchNode","name":"switch: tmp.l3-network.level2.v4.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level2.v4.pool.pre-existing`\">","comments":"","outputs":1,"x":3380.6822662353516,"y":1441.8609466552734,"z":"f952bc99.2d7ef","wires":[["539676f8.1bb8a8","2cbab948.12a936","de33ed91.f2e23"]]},{"id":"539676f8.1bb8a8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3749.0157890319824,"y":1432.527868270874,"z":"f952bc99.2d7ef","wires":[["bd6948f0.ee5558"]]},{"id":"bd6948f0.ee5558","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3899.9047088623047,"y":1432.7501583099365,"z":"f952bc99.2d7ef","wires":[["4b72c28b.ed33cc","851486f7.ef53b8","1749c073.f9a32"]]},{"id":"43d4715c.229a7","type":"switchNode","name":"switch: tmp.l3-network.level2.v6.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level2.v6.pool.pre-existing`\">","comments":"","outputs":1,"x":3565.682632446289,"y":1925.8240814208984,"z":"f952bc99.2d7ef","wires":[["8603fa44.4ac018","5d10faed.7c4fc4","a7751f96.0afc9"]]},{"id":"de2406b6.935868","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4055.9048805236816,"y":1960.0463666915894,"z":"f952bc99.2d7ef","wires":[["5bded456.68894c","3b1c6b3c.bdb1e4","28b9496d.d124d6"]]},{"id":"2cbab948.12a936","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3748.793502807617,"y":1463.861120223999,"z":"f952bc99.2d7ef","wires":[["bd6948f0.ee5558"]]},{"id":"a3d0a1cb.9d8fd","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3436.126968383789,"y":1003.8608856201172,"z":"f952bc99.2d7ef","wires":[["fe337b12.aa2bc8"]]},{"id":"fe337b12.aa2bc8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3850.3494148254395,"y":983.0832011699677,"z":"f952bc99.2d7ef","wires":[["28e3d2dc.6d980e","d184018d.b9a27"]]},{"id":"37d94e45.b2e192","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3439.238052368164,"y":1041.8607652187347,"z":"f952bc99.2d7ef","wires":[["fe337b12.aa2bc8"]]},{"id":"38c4ba0d.cf5796","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3532.126724243164,"y":754.6390228271484,"z":"f952bc99.2d7ef","wires":[["2bb67e85.513072"]]},{"id":"9f8a87cf.2d90c8","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3531.904438018799,"y":785.9722747802734,"z":"f952bc99.2d7ef","wires":[["2bb67e85.513072"]]},{"id":"8603fa44.4ac018","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3864.127000808716,"y":1958.4907836914062,"z":"f952bc99.2d7ef","wires":[["de2406b6.935868"]]},{"id":"5d10faed.7c4fc4","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3863.9047145843506,"y":1989.8240356445312,"z":"f952bc99.2d7ef","wires":[["de2406b6.935868"]]},{"id":"181af87e.ac39e8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level1 ipv4 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3050.0633277893066,"y":702.4642543792725,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"43ffa10a.8453d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1239.079231262207,"y":964.1309933662415,"z":"f952bc99.2d7ef","wires":[["e00163e7.419ee","9d2793f.2e0c17"]]},{"id":"9d2793f.2e0c17","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Error creating level 2 pool, need to attempt rollback\"/>\n\n\n","comments":"","outputs":1,"x":1416.698299407959,"y":934.5277805328369,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"262b4940.672706","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level1 ipv6 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3004.2699127197266,"y":937.8292694091797,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"6bf71b9b.45dac4","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level2 ipv4 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3254.206008911133,"y":1403.3213958740234,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"ea23f939.5b11b8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level2 ipv6 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3432.0953521728516,"y":1893.1890716552734,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"c202d046.5bdbe","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3434.407030105591,"y":968.8875029087067,"z":"f952bc99.2d7ef","wires":[["4f412c0b.853a44"]]},{"id":"4f412c0b.853a44","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3599.7403831481934,"y":969.220671415329,"z":"f952bc99.2d7ef","wires":[]},{"id":"690ff915.aa6a28","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3526.740394592285,"y":722.406120300293,"z":"f952bc99.2d7ef","wires":[["ef38fdaf.f6f95"]]},{"id":"ef38fdaf.f6f95","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3696.407127380371,"y":724.4059133529663,"z":"f952bc99.2d7ef","wires":[]},{"id":"de33ed91.f2e23","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3748.7405395507812,"y":1400.7763605117798,"z":"f952bc99.2d7ef","wires":[["cf9f56ca.cc60a8"]]},{"id":"cf9f56ca.cc60a8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3912.0738792419434,"y":1399.1095304489136,"z":"f952bc99.2d7ef","wires":[]},{"id":"a7751f96.0afc9","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3869.740753173828,"y":1924.776427268982,"z":"f952bc99.2d7ef","wires":[["86f36263.e24d8"]]},{"id":"86f36263.e24d8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4033.0740928649902,"y":1923.1095972061157,"z":"f952bc99.2d7ef","wires":[]},{"id":"6f631f1b.e5302","type":"comment","name":"If preexisting, check to see if there are any level 2 pools whose parent is the level 1, if not remove level 1 pool","info":"","comments":"","x":5221.518356323242,"y":571.2209243774414,"z":"f952bc99.2d7ef","wires":[]},{"id":"5e76fb0f.aae584","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 by network id ","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4927.926284790039,"y":1630.0728302001953,"z":"f952bc99.2d7ef","wires":[["4cea94c4.5ace1c","d344b9bd.898c08"]]},{"id":"4cea94c4.5ace1c","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5237.759677886963,"y":1636.046300649643,"z":"f952bc99.2d7ef","wires":[["54bc6c39.509e84"]]},{"id":"fe5b021d.95d6c","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4872.046646118164,"y":1594.748764038086,"z":"f952bc99.2d7ef","wires":[]},{"id":"d344b9bd.898c08","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":5237.379608154297,"y":1604.3321883678436,"z":"f952bc99.2d7ef","wires":[["d462e2e2.f246"]]},{"id":"1749c073.f9a32","type":"switchNode","name":"switch: v4 or v6 is preexisting","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`\">","comments":"","outputs":1,"x":4155.382095336914,"y":1566.8466339111328,"z":"f952bc99.2d7ef","wires":[["da7188b4.85a168","c8ee2aed.d1d1f8","a846b402.dba418"]]},{"id":"da7188b4.85a168","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":4416.604019165039,"y":1602.1798858642578,"z":"f952bc99.2d7ef","wires":[["2034a050.d1795"]]},{"id":"2034a050.d1795","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4604.827072143555,"y":1619.4021747112274,"z":"f952bc99.2d7ef","wires":[["fe5b021d.95d6c","5e76fb0f.aae584"]]},{"id":"c8ee2aed.d1d1f8","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":4419.715103149414,"y":1640.1797654628754,"z":"f952bc99.2d7ef","wires":[["2034a050.d1795"]]},{"id":"a846b402.dba418","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":4414.884292602539,"y":1567.2064971923828,"z":"f952bc99.2d7ef","wires":[["bfd1edc6.cdf45"]]},{"id":"bfd1edc6.cdf45","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4562.217788696289,"y":1565.5396270751953,"z":"f952bc99.2d7ef","wires":[]},{"id":"a41b37e0.ff6d18","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 by network id ","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":5131.259048461914,"y":2084.7394256591797,"z":"f952bc99.2d7ef","wires":[["1cf60cf2.a24793","943b8edf.5e2ca"]]},{"id":"1cf60cf2.a24793","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5441.092441558838,"y":2090.7128961086273,"z":"f952bc99.2d7ef","wires":[["43ac3bdf.58d534"]]},{"id":"43ac3bdf.58d534","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating level 2 ipv6 subnet in EIPAM. Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":5595.341796875,"y":2090.1295421123505,"z":"f952bc99.2d7ef","wires":[]},{"id":"77c85f5b.a8397","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":5075.379409790039,"y":2049.4153594970703,"z":"f952bc99.2d7ef","wires":[]},{"id":"81111598.7b5d98","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating level 2 ipv6 subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":5594.462703704834,"y":2058.6653487682343,"z":"f952bc99.2d7ef","wires":[]},{"id":"943b8edf.5e2ca","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":5440.712371826172,"y":2058.998783826828,"z":"f952bc99.2d7ef","wires":[["81111598.7b5d98"]]},{"id":"28b9496d.d124d6","type":"switchNode","name":"switch: v4 or v6 is preexisting","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`\">","comments":"","outputs":1,"x":4358.714859008789,"y":2021.5132293701172,"z":"f952bc99.2d7ef","wires":[["6ee92545.ca530c","d02ef2e9.1915","c4c2834a.2f88b"]]},{"id":"6ee92545.ca530c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":4619.936782836914,"y":2056.846481323242,"z":"f952bc99.2d7ef","wires":[["c1d6e6f8.fbd478"]]},{"id":"c1d6e6f8.fbd478","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4808.15983581543,"y":2074.068770170212,"z":"f952bc99.2d7ef","wires":[["77c85f5b.a8397","a41b37e0.ff6d18"]]},{"id":"d02ef2e9.1915","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":4623.047866821289,"y":2094.8463609218597,"z":"f952bc99.2d7ef","wires":[["c1d6e6f8.fbd478"]]},{"id":"c4c2834a.2f88b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":4618.217056274414,"y":2021.8730926513672,"z":"f952bc99.2d7ef","wires":[["bd9b036e.d38c1"]]},{"id":"bd9b036e.d38c1","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4765.550552368164,"y":2020.2062225341797,"z":"f952bc99.2d7ef","wires":[]},{"id":"54bc6c39.509e84","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating level 2 ipv4 subnet in EIPAM. Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":5392.009033203125,"y":1635.462946653366,"z":"f952bc99.2d7ef","wires":[]},{"id":"d462e2e2.f246","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating level 2 ipv4 subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":5391.129940032959,"y":1603.9987533092499,"z":"f952bc99.2d7ef","wires":[]},{"id":"d6d05e96.2a1d9","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while allocating level 2 ipv4 subnet in EIPAM. Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4114.370376586914,"y":1710.2949676513672,"z":"f952bc99.2d7ef","wires":[]},{"id":"968cba1b.6591b8","type":"comment","name":"Check for mask override","info":"","comments":"","x":679.4285278320312,"y":310.7976264953613,"z":"f952bc99.2d7ef","wires":[]},{"id":"f066a056.88e02","type":"for","name":"for pidx..$network-topology-operation-input.network-request-input.network-input-parameters[]","xml":"<for index='pidx' start='0' end='`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`' >\n","comments":"","outputs":1,"x":1892.2857666015625,"y":376.36910581588745,"z":"f952bc99.2d7ef","wires":[["29675950.07bd36"]]},{"id":"4ad3e9cf.db5138","type":"switchNode","name":"network-topology-operation-input.network-request-input.network-input-parameters.param_length","xml":"<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`\">","comments":"","outputs":1,"x":905.1427917480469,"y":343.65476417541504,"z":"f952bc99.2d7ef","wires":[["bde1f4c2.7b0f68","c3a89e3b.da7ed"]]},{"id":"bde1f4c2.7b0f68","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1336.5712642669678,"y":344.08334732055664,"z":"f952bc99.2d7ef","wires":[["6707b611.7d4008"]]},{"id":"6707b611.7d4008","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1501.9998953683034,"y":344.2262050083705,"z":"f952bc99.2d7ef","wires":[["fbcf20a2.8d01d"]]},{"id":"c3a89e3b.da7ed","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1320.8569374084473,"y":376.5119152069092,"z":"f952bc99.2d7ef","wires":[["85e306cd.346a18"]]},{"id":"85e306cd.346a18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1492.857048034668,"y":376.51190757751465,"z":"f952bc99.2d7ef","wires":[["f066a056.88e02"]]},{"id":"29675950.07bd36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2327.42822265625,"y":376.6071472167969,"z":"f952bc99.2d7ef","wires":[["db0dae6d.e44c7","29e7a409.d906cc"]]},{"id":"db0dae6d.e44c7","type":"execute","name":"SliStringUtils - check v4 override","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >\n <parameter name=\"source\" value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`\" />\n <parameter name=\"target\" value=\"network_assignments_ipv4_subnet_default_assignment_cidr_mask\"/>\n \n","comments":"","outputs":1,"x":2591.7615509033203,"y":376.27378845214844,"z":"f952bc99.2d7ef","wires":[["efd3997c.b56db8","807884aa.4d3f48"]]},{"id":"efd3997c.b56db8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2819.0951194763184,"y":376.273832321167,"z":"f952bc99.2d7ef","wires":[["17f753f8.49b80c"]]},{"id":"17f753f8.49b80c","type":"set","name":"set subnet override for v4","xml":"<set>\n<parameter name='eipam-ip-block.subnet-size-override-v4' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />\n\n","comments":"","x":3027.428394317627,"y":376.27378273010254,"z":"f952bc99.2d7ef","wires":[]},{"id":"807884aa.4d3f48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2822.428451538086,"y":411.27381896972656,"z":"f952bc99.2d7ef","wires":[["526fe82a.18d528"]]},{"id":"526fe82a.18d528","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v4\" value=\"`$network-model.ipv4-cidr-mask`\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":3039.094970703125,"y":411.2738037109375,"z":"f952bc99.2d7ef","wires":[]},{"id":"29e7a409.d906cc","type":"execute","name":"SliStringUtils - check v4 override","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >\n <parameter name=\"source\" value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`\" />\n <parameter name=\"target\" value=\"network_assignments_ipv6_subnet_default_assignment_cidr_mask\"/>\n \n","comments":"","outputs":1,"x":2595.76171875,"y":457.9404602050781,"z":"f952bc99.2d7ef","wires":[["b5bfb5c2.97ab28","fe68cfd8.e16af"]]},{"id":"b5bfb5c2.97ab28","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2823.095287322998,"y":457.9405040740967,"z":"f952bc99.2d7ef","wires":[["6746fdb3.eceef4"]]},{"id":"6746fdb3.eceef4","type":"set","name":"set subnet override for v6","xml":"<set>\n<parameter name='eipam-ip-block.subnet-size-override-v6' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />\n\n","comments":"","x":3031.428436279297,"y":462.94046354293823,"z":"f952bc99.2d7ef","wires":[]},{"id":"fe68cfd8.e16af","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2826.4286193847656,"y":492.94049072265625,"z":"f952bc99.2d7ef","wires":[["aafa7dcb.dff8c"]]},{"id":"aafa7dcb.dff8c","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v6\" value=\"`$network-model.ipv6-cidr-mask`\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":3043.0951385498047,"y":492.9404754638672,"z":"f952bc99.2d7ef","wires":[]},{"id":"fbcf20a2.8d01d","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v4\" value=\"`$network-model.ipv4-cidr-mask`\" />\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v6\" value=\"`$network-model.ipv6-cidr-mask`\" />","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1716.4283752441406,"y":341.27379512786865,"z":"f952bc99.2d7ef","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.json
new file mode 100755
index 00000000..5e4161c3
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-activate.json
@@ -0,0 +1 @@
+[{"id":"f4d06dda.30316","type":"dgstart","name":"DGSTART","outputs":1,"x":167.14285278320312,"y":61.42856979370117,"z":"d029d2a.974963","wires":[["7f7c6af3.215f74"]]},{"id":"7f7c6af3.215f74","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":263.38093185424805,"y":122.38096046447754,"z":"d029d2a.974963","wires":[["5a1c2468.67872c"]]},{"id":"5a1c2468.67872c","type":"method","name":"security-zone-topology-operation-activate","xml":"<method rpc='security-zone-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":309.2977104187012,"y":157.61901569366455,"z":"d029d2a.974963","wires":[["dfe1dc14.5964"]]},{"id":"dfe1dc14.5964","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":217.61904525756836,"y":300.95235776901245,"z":"d029d2a.974963","wires":[["3dde4199.1c9e2e","d411dae1.fde8d8","30cc1a1b.8e88e6","6861327d.73bc7c","add0f6b0.d7fa28","b3f7a9f5.747648","5c57b0ca.b25a6","b6f5439f.b0624","fc0c4385.ee3a5","66ef7002.abb7e","56345297.bc34dc","62744ec2.dbf8"]]},{"id":"d411dae1.fde8d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":484.1429634094238,"y":970.6430778503418,"z":"d029d2a.974963","wires":[]},{"id":"3dde4199.1c9e2e","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='security-zone-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $security-zone-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":512.8968772888184,"y":934.7656240463257,"z":"d029d2a.974963","wires":[]},{"id":"66ef7002.abb7e","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$security-zone-topology-operation-input.request-information.request-action`' />\n<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`' />\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":523.8970718383789,"y":681.4799699783325,"z":"d029d2a.974963","wires":[]},{"id":"6861327d.73bc7c","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/security-zone-topology/'` \" />\n\n","comments":"","x":479.880916595459,"y":274.76189517974854,"z":"d029d2a.974963","wires":[]},{"id":"30cc1a1b.8e88e6","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":527.1401786804199,"y":241.02116107940674,"z":"d029d2a.974963","wires":[]},{"id":"add0f6b0.d7fa28","type":"execute","name":"execute Properties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":486.1362724304199,"y":310.66009426116943,"z":"d029d2a.974963","wires":[[]]},{"id":"5c57b0ca.b25a6","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":548.6616058349609,"y":471.8880615234375,"z":"d029d2a.974963","wires":[["bcc2124f.d53a2","f31fdf96.9d6cc"]]},{"id":"b3f7a9f5.747648","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.sz-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":514.207706451416,"y":370.44579887390137,"z":"d029d2a.974963","wires":[[]]},{"id":"bcc2124f.d53a2","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":805.9577445983887,"y":470.69582200050354,"z":"d029d2a.974963","wires":[["f78da3bd.a0afd"]]},{"id":"b6f5439f.b0624","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sz.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":556.6721649169922,"y":824.8627014160156,"z":"d029d2a.974963","wires":[["f821a3fb.c285e","f757d471.7dc7d8","49853f9a.93d68"]]},{"id":"f821a3fb.c285e","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":826.9801826477051,"y":877.8609022125602,"z":"d029d2a.974963","wires":[["630debdb.168f04"]]},{"id":"f757d471.7dc7d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":817.9802322387695,"y":846.3609279617667,"z":"d029d2a.974963","wires":[["630debdb.168f04"]]},{"id":"49853f9a.93d68","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":821.7302703857422,"y":816.7180328369141,"z":"d029d2a.974963","wires":[["fb95f526.14ff08"]]},{"id":"630debdb.168f04","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for security-zone-allotted-resource\" />\n","comments":"","x":987.7302703857422,"y":847.1109518036246,"z":"d029d2a.974963","wires":[]},{"id":"f78da3bd.a0afd","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":986.9576988220215,"y":471.19577145576477,"z":"d029d2a.974963","wires":[["a88d57e7.ea7b68","874276d9.71a568"]]},{"id":"a88d57e7.ea7b68","type":"switchNode","name":"switch sz length","xml":"<switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1232.8149452209473,"y":505.48153471946716,"z":"d029d2a.974963","wires":[["b5653c05.23ac6"]]},{"id":"b5653c05.23ac6","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1423.8149490356445,"y":505.4815323352814,"z":"d029d2a.974963","wires":[["750425c0.df6c0c"]]},{"id":"803be05.23d262","type":"set","name":"set sz-ar from get","xml":"<set>\n<parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />\n","comments":"","x":1823.6720848083496,"y":506.0529565811157,"z":"d029d2a.974963","wires":[]},{"id":"750425c0.df6c0c","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1594.671932220459,"y":506.0530014038086,"z":"d029d2a.974963","wires":[["803be05.23d262","86d2d032.ec9c7","1fd599c8.bea286"]]},{"id":"86d2d032.ec9c7","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1821.6723289489746,"y":573.481520652771,"z":"d029d2a.974963","wires":[]},{"id":"ae3be0c3.a3ad4","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":573.9576683044434,"y":435.19576239585876,"z":"d029d2a.974963","wires":[]},{"id":"1fd599c8.bea286","type":"switchNode","name":"switch order-status","xml":"<switch test='`$sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1831.6721076965332,"y":539.0529546737671,"z":"d029d2a.974963","wires":[["ea7abf8a.d6c0e","88378d84.e1337"]]},{"id":"ea7abf8a.d6c0e","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2043.2720642089844,"y":500.0529546737671,"z":"d029d2a.974963","wires":[["c95729c.38426d8"]]},{"id":"88378d84.e1337","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2068.9864387512207,"y":535.4815454483032,"z":"d029d2a.974963","wires":[["c95729c.38426d8"]]},{"id":"81dbbc42.6cf3b","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":529.4814910888672,"y":525.7672157287598,"z":"d029d2a.974963","wires":[]},{"id":"874276d9.71a568","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-sz-ar' value='$mdsal-ar.' />\n","comments":"","x":1312.5292778015137,"y":471.1958634853363,"z":"d029d2a.974963","wires":[]},{"id":"ef3a6e4c.51d76","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":485.10051345825195,"y":340.0529260635376,"z":"d029d2a.974963","wires":[]},{"id":"fb95f526.14ff08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":963.3862380981445,"y":812.9102020263672,"z":"d029d2a.974963","wires":[[]]},{"id":"369a0f6a.c9ad8","type":"comment","name":"TO DO: vnf/put parent","info":"","comments":"","x":487.38623046875,"y":713.5767650604248,"z":"d029d2a.974963","wires":[]},{"id":"fc0c4385.ee3a5","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":471.38623428344727,"y":642.9101247787476,"z":"d029d2a.974963","wires":[[]]},{"id":"f31fdf96.9d6cc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":805.719539642334,"y":506.90999484062195,"z":"d029d2a.974963","wires":[["19da75c4.bf509a"]]},{"id":"19da75c4.bf509a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":985.7194900512695,"y":507.57654547691345,"z":"d029d2a.974963","wires":[[]]},{"id":"56345297.bc34dc","type":"set","name":"set id","xml":"<set>\n<parameter name='sz-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='sz-ar.allotted-resource-status.action' value=\"`$security-zone-topology-operation-input.request-information.request-action` \" />\n<parameter name='sz-ar.allotted-resource-status.rpc-name' value=\"security-zone-topology-operation\" />\n<parameter name='sz-ar.allotted-resource-status.rpc-action' value=\"`$security-zone-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$security-zone-topology-operation-input.request-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$security-zone-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$security-zone-topology-operation-input.service-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$security-zone-topology-operation-input.allotted-resource-information.` \" />\n<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.` \" />","comments":"","x":454.3862762451172,"y":562.5767364501953,"z":"d029d2a.974963","wires":[]},{"id":"c95729c.38426d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2257.7425804138184,"y":501.4285888671875,"z":"d029d2a.974963","wires":[[]]},{"id":"62744ec2.dbf8","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"in-service-path\" />\n","comments":"","outputs":1,"x":515.0000152587891,"y":746.6666326522827,"z":"d029d2a.974963","wires":[["5211695c.bb63d8","6077137b.90cddc"]]},{"id":"5211695c.bb63d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":770.7619094848633,"y":729.6191296577454,"z":"d029d2a.974963","wires":[["fa37c9f8.eb9288"]]},{"id":"fa37c9f8.eb9288","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":937.2857894897461,"y":741.2382006645203,"z":"d029d2a.974963","wires":[]},{"id":"6077137b.90cddc","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":777.8571968078613,"y":762.381097316742,"z":"d029d2a.974963","wires":[["fa37c9f8.eb9288"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.json
new file mode 100755
index 00000000..bc7f8fc3
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-assign.json
@@ -0,0 +1 @@
+[{"id":"3aa7dd53.c23282","type":"dgstart","name":"DGSTART","outputs":1,"x":113.75662612915039,"y":48.518513679504395,"z":"d9f8bc54.6ca48","wires":[["d95c10eb.dc1d4"]]},{"id":"d95c10eb.dc1d4","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":209.9947052001953,"y":109.47090435028076,"z":"d9f8bc54.6ca48","wires":[["9ec57dff.79a3e"]]},{"id":"9ec57dff.79a3e","type":"method","name":"security-zone-topology-operation-assign","xml":"<method rpc='security-zone-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":255.91148376464844,"y":144.70895957946777,"z":"d9f8bc54.6ca48","wires":[["b469237.21f31e"]]},{"id":"b469237.21f31e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":164.23281860351562,"y":288.0423016548157,"z":"d9f8bc54.6ca48","wires":[["da8bc6b3.f36008","dd46184f.c5ad68","19bd4a95.82d635","7ff7d11f.c2ff8","5082e4fd.fb398c","44a8ff0c.4ea4","3f7399d.1a38166","df2b47bc.dad938","29f6546e.b6ab2c","cd2238ce.a361f8","f37960af.a307","676f8458.1ceddc","41c3e1d7.688b9","bf0c5aa1.d23018","bb728435.7fabc8","db115202.e2393","773fe048.c730b","995418ca.5fe778","422fade5.4f8814","83f71044.bcea7","4f2b0053.cbdf5","14e2f5f2.92d2fa","121f5121.c5ff2f","a4891e73.c917","a62f34b1.dd5738","87ceb4de.ec7128","c025c3c9.338f6"]]},{"id":"dd46184f.c5ad68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":380.75672149658203,"y":2301.73295211792,"z":"d9f8bc54.6ca48","wires":[]},{"id":"da8bc6b3.f36008","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='security-zone-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $security-zone-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":409.51063537597656,"y":2265.855498313904,"z":"d9f8bc54.6ca48","wires":[]},{"id":"a62f34b1.dd5738","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$security-zone-topology-operation-input.request-information.request-action`' />\n<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`' />\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":469.0821876525879,"y":1642.569899559021,"z":"d9f8bc54.6ca48","wires":[]},{"id":"7ff7d11f.c2ff8","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/security-zone-topology/'` \" />\n\n","comments":"","x":426.49468994140625,"y":261.85183906555176,"z":"d9f8bc54.6ca48","wires":[]},{"id":"19bd4a95.82d635","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":473.7539520263672,"y":228.11110496520996,"z":"d9f8bc54.6ca48","wires":[]},{"id":"5082e4fd.fb398c","type":"execute","name":"execute Properties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":432.7500457763672,"y":297.75003814697266,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"3f7399d.1a38166","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":513.2753753662109,"y":520.9779777526855,"z":"d9f8bc54.6ca48","wires":[["5afe88e8.32e0a8","4a737d1.caa4e84"]]},{"id":"44a8ff0c.4ea4","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.sz-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":460.8214797973633,"y":357.5357427597046,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"5afe88e8.32e0a8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":758.5715179443359,"y":523.7857661247253,"z":"d9f8bc54.6ca48","wires":[["b6853767.ffe678"]]},{"id":"14e2f5f2.92d2fa","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sz.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":487.61922454833984,"y":1847.2859721183777,"z":"d9f8bc54.6ca48","wires":[["975af54b.31fe88","615e377.16035c8","3777cc93.f26b94"]]},{"id":"975af54b.31fe88","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":756.2606010437012,"y":1898.6173838600516,"z":"d9f8bc54.6ca48","wires":[["a456aa59.071ed8"]]},{"id":"615e377.16035c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":747.2606506347656,"y":1867.1174096092582,"z":"d9f8bc54.6ca48","wires":[["a456aa59.071ed8"]]},{"id":"3777cc93.f26b94","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":751.0106887817383,"y":1837.4745144844055,"z":"d9f8bc54.6ca48","wires":[["4593956d.d1f3ec"]]},{"id":"a456aa59.071ed8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for security-zone-allotted-resource\" />\n","comments":"","x":917.0106887817383,"y":1867.867433451116,"z":"d9f8bc54.6ca48","wires":[]},{"id":"b6853767.ffe678","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":939.5714721679688,"y":524.2857155799866,"z":"d9f8bc54.6ca48","wires":[["f8ae24aa.f00bb8","a0673b92.f4f7c8"]]},{"id":"f8ae24aa.f00bb8","type":"switchNode","name":"switch sz length","xml":"<switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1185.4287185668945,"y":558.571478843689,"z":"d9f8bc54.6ca48","wires":[["b691cae6.eefd08"]]},{"id":"b691cae6.eefd08","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1376.4287223815918,"y":558.5714764595032,"z":"d9f8bc54.6ca48","wires":[["c71c7fc0.fb074"]]},{"id":"9e2ca7ca.004578","type":"set","name":"set sz-ar from get","xml":"<set>\n<parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />\n","comments":"","x":1770.286018371582,"y":493.14292335510254,"z":"d9f8bc54.6ca48","wires":[]},{"id":"c71c7fc0.fb074","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1563.2858505249023,"y":527.1428961753845,"z":"d9f8bc54.6ca48","wires":[["9e2ca7ca.004578","577032f2.5c728c","f6f446f7.eb6e38"]]},{"id":"577032f2.5c728c","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1770.286018371582,"y":572.5714111328125,"z":"d9f8bc54.6ca48","wires":[]},{"id":"b73d4268.63b59","type":"comment","name":"Save consumed-allotted-resources to mdsal","info":"","comments":"","x":491.0000915527344,"y":1490.238136291504,"z":"d9f8bc54.6ca48","wires":[]},{"id":"9c87c693.6b7aa8","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":526.5714416503906,"y":488.28570652008057,"z":"d9f8bc54.6ca48","wires":[]},{"id":"f6f446f7.eb6e38","type":"switchNode","name":"switch order-status","xml":"<switch test='`$sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1778.2858810424805,"y":526.1428985595703,"z":"d9f8bc54.6ca48","wires":[["1ba18b9c.c66c64","e561c273.b01c"]]},{"id":"1ba18b9c.c66c64","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":1989.8858375549316,"y":487.1428985595703,"z":"d9f8bc54.6ca48","wires":[["ace0f78a.8c4198"]]},{"id":"e561c273.b01c","type":"outcome","name":"outcome PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":2015.600212097168,"y":522.5714893341064,"z":"d9f8bc54.6ca48","wires":[["ace0f78a.8c4198"]]},{"id":"ace0f78a.8c4198","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing security-zone-allotted-resource with order status of ' + $sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2277.885810852051,"y":495.14288544654846,"z":"d9f8bc54.6ca48","wires":[]},{"id":"df2b47bc.dad938","type":"set","name":"set sz-ar-identifiers","xml":"<set>\n<parameter name='sz-ar-identifiers.consuming-service-instance-id' value=\"`$security-zone-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='sz-ar-identifiers.parent-service-instance-id' value=\"`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='sz-ar-identifiers.allotted-resource-type' value=\"`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='sz-ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n","comments":"","x":437.1429138183594,"y":677.1428809165955,"z":"d9f8bc54.6ca48","wires":[]},{"id":"c09b6648.7720b8","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":478.0952682495117,"y":622.8571615219116,"z":"d9f8bc54.6ca48","wires":[]},{"id":"29f6546e.b6ab2c","type":"set","name":"set identifiers in overal structure","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.' \nvalue=\"`$sz-ar-identifiers.`\" />\n\n\n","comments":"","x":474.1428756713867,"y":951.428858757019,"z":"d9f8bc54.6ca48","wires":[]},{"id":"cd2238ce.a361f8","type":"set","name":"set ecomp model information from input","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.security-zone-topology.ecomp-model-information.' \nvalue=\"`$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.`\" />\n\n\n","comments":"","x":505.7143325805664,"y":711.4285831451416,"z":"d9f8bc54.6ca48","wires":[]},{"id":"f37960af.a307","type":"switchNode","name":"switch model-invariant-uuid is null","xml":"<switch test='$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-invariant-uuid'>\n","comments":"","outputs":1,"x":488.5714416503906,"y":745.714301109314,"z":"d9f8bc54.6ca48","wires":[["cdaca375.86687"]]},{"id":"cdaca375.86687","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":715.7143211364746,"y":747.1428184509277,"z":"d9f8bc54.6ca48","wires":[["ca95e15f.7a282"]]},{"id":"ca95e15f.7a282","type":"set","name":"set model-invariant-uuid","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.security-zone-topology.ecomp-model-information.model-invariant-uuid' \nvalue=\"`$ar-model.invariant-uuid`\" />\n\n\n","comments":"","x":917.142894744873,"y":746.5713710784912,"z":"d9f8bc54.6ca48","wires":[]},{"id":"676f8458.1ceddc","type":"switchNode","name":"switch model-uuid is null","xml":"<switch test='$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-uuid'>\n","comments":"","outputs":1,"x":460.00003814697266,"y":780.0000019073486,"z":"d9f8bc54.6ca48","wires":[["c051003f.4d255"]]},{"id":"c051003f.4d255","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":661.4286041259766,"y":780.5714235305786,"z":"d9f8bc54.6ca48","wires":[["17a9ad79.daf043"]]},{"id":"17a9ad79.daf043","type":"set","name":"set model-uuid","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.security-zone-topology.ecomp-model-information.model-uuid' \nvalue=\"`$ar-model.uuid`\" />\n\n\n","comments":"","x":854.2857627868652,"y":780.5713453292847,"z":"d9f8bc54.6ca48","wires":[]},{"id":"41c3e1d7.688b9","type":"switchNode","name":"switch model-version is null","xml":"<switch test='$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-version'>\n","comments":"","outputs":1,"x":468.5714416503906,"y":812.8571290969849,"z":"d9f8bc54.6ca48","wires":[["834cdb5d.a611a8"]]},{"id":"834cdb5d.a611a8","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":718.5714225769043,"y":812.8571138381958,"z":"d9f8bc54.6ca48","wires":[["6df03ba1.da4d84"]]},{"id":"6df03ba1.da4d84","type":"set","name":"set model-version","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.security-zone-topology.ecomp-model-information.model-version' \nvalue=\"`$ar-model.version`\" />\n\n\n","comments":"","x":911.428581237793,"y":812.8570356369019,"z":"d9f8bc54.6ca48","wires":[]},{"id":"bf0c5aa1.d23018","type":"switchNode","name":"switch ar-model.ecomp-generated-naming","xml":"<switch test='`$ar-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":507.1428413391113,"y":914.2858047485352,"z":"d9f8bc54.6ca48","wires":[["8263bea9.21776","31dce175.8172ce"]]},{"id":"8263bea9.21776","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":857.1429061889648,"y":913.7143549919128,"z":"d9f8bc54.6ca48","wires":[["6d3862a4.def2cc"]]},{"id":"6d3862a4.def2cc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1025.8929481506348,"y":914.214343547821,"z":"d9f8bc54.6ca48","wires":[["340cfc26.1a1d64"]]},{"id":"31dce175.8172ce","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":848.3651962280273,"y":946.7143549919128,"z":"d9f8bc54.6ca48","wires":[["79411f72.37cc4"]]},{"id":"79411f72.37cc4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in allotted-resource-model data. Ecomp-generated-naming should be true\" />\n\n","comments":"","x":1026.3651962280273,"y":945.7143549919128,"z":"d9f8bc54.6ca48","wires":[]},{"id":"340cfc26.1a1d64","type":"switchNode","name":"switch ar-model.ecomp-generated-naming","xml":"<switch test='`$ar-model.naming-policy`'>\n","comments":"","outputs":1,"x":1327.1428527832031,"y":914.2858171463013,"z":"d9f8bc54.6ca48","wires":[["c60923e3.e3226","5fb6c973.79b708"]]},{"id":"c60923e3.e3226","type":"other","name":"outcome oam_security_zone_name","xml":"<outcome value='oam_security_zone_name'>\n","comments":"","outputs":1,"x":1668.000617980957,"y":914.8638672828674,"z":"d9f8bc54.6ca48","wires":[["64919905.bc8708"]]},{"id":"5fb6c973.79b708","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1579.4285507202148,"y":945.714367389679,"z":"d9f8bc54.6ca48","wires":[["64919905.bc8708"]]},{"id":"47d880dc.e5c98","type":"set","name":"set ar_name","xml":"<set>\n<parameter name='tmp.ar-name' value='$TenantOAMNetworkRole_$LandingNetworkRole_SZ' />\n","comments":"","x":2108.8573417663574,"y":914.2857584953308,"z":"d9f8bc54.6ca48","wires":[]},{"id":"e616a9fb.2ba0a8","type":"execute","name":"execute SliStringUtils - replace TenantOAMNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantOAMNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`\"/>\n\n","comments":"","outputs":1,"x":2246.0004119873047,"y":947.1429333686829,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"c3a0064f.e2bfc8","type":"execute","name":"execute SliStringUtils - replace LandingNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$LandingNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`\"/>\n\n","comments":"","outputs":1,"x":2229.0004272460938,"y":979.2858099937439,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"64919905.bc8708","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1910.2858276367188,"y":942.8572659492493,"z":"d9f8bc54.6ca48","wires":[["47d880dc.e5c98","e616a9fb.2ba0a8","c3a0064f.e2bfc8","3ea93d43.94b532"]]},{"id":"3ea93d43.94b532","type":"set","name":"set identifiers.allotted-resource-name","xml":"<set>\n<parameter name='sz-ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />\n","comments":"","x":2178.8573150634766,"y":1008.571485042572,"z":"d9f8bc54.6ca48","wires":[]},{"id":"db115202.e2393","type":"set","name":"set assignments in overal structure","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.' \nvalue=\"`$sz-ar-assignments.`\" />\n\n\n","comments":"","x":482.61910247802734,"y":1117.1431503295898,"z":"d9f8bc54.6ca48","wires":[]},{"id":"bb728435.7fabc8","type":"set","name":"set sz-ar-assignments","xml":"<set>\n<parameter name='sz-ar-assignments.vlan-tag' value=\"`$security-zone-topology-operation-input.security-zone-request-input.vlan-tag` \" />\n<parameter name='sz-ar-assignments.trusted-network-role' value=\"`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role` \" />\n<parameter name='sz-ar-assignments.untrusted-network-role' value=\"`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role` \" />\n<parameter name='sz-ar-assignments.security-zone-service-instance-id' value=\"`$tmp.ar.parent-service-instance-id` \" />\n\n","comments":"","x":444.28570556640625,"y":988.5715227127075,"z":"d9f8bc54.6ca48","wires":[]},{"id":"cae22b42.18c468","type":"for","name":"for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":1360.572135925293,"y":1564.8096537590027,"z":"d9f8bc54.6ca48","wires":[["7553ad4e.ad7d94"]]},{"id":"773fe048.c730b","type":"switchNode","name":"switch service-data.consumed-allotted-resources_length","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n","comments":"","outputs":1,"x":534.5714721679688,"y":1524.5236463546753,"z":"d9f8bc54.6ca48","wires":[["38c33f23.a99c8","61a487f.6f30978"]]},{"id":"38c33f23.a99c8","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":840.7143859863281,"y":1529.3809938430786,"z":"d9f8bc54.6ca48","wires":[["3413dfa5.ea0b8"]]},{"id":"61a487f.6f30978","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":820.7143859863281,"y":1564.3809938430786,"z":"d9f8bc54.6ca48","wires":[["a9ef602f.19524"]]},{"id":"7553ad4e.ad7d94","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":1812.6673278808594,"y":1562.869366645813,"z":"d9f8bc54.6ca48","wires":[["2bfef68b.19fdca"]]},{"id":"2bfef68b.19fdca","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2004.4769649505615,"y":1562.3335065841675,"z":"d9f8bc54.6ca48","wires":[["2e1ed2f6.15d1fe"]]},{"id":"a9ef602f.19524","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":974.8415298461914,"y":1564.5069856643677,"z":"d9f8bc54.6ca48","wires":[["cae22b42.18c468","91a87775.758588"]]},{"id":"2e1ed2f6.15d1fe","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2160.238296508789,"y":1562.1907081604004,"z":"d9f8bc54.6ca48","wires":[["e679b033.de33f","4d5ec78f.74ab88"]]},{"id":"3413dfa5.ea0b8","type":"set","name":"set cidx","xml":"<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n","comments":"","x":999.5713996887207,"y":1529.0952253341675,"z":"d9f8bc54.6ca48","wires":[]},{"id":"e679b033.de33f","type":"set","name":"set tmp.cidx and ctx.consumed-ar","xml":"<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />\n<parameter name='tmp.found-cidx' value='true' />","comments":"","x":2406.0957565307617,"y":1556.7621870040894,"z":"d9f8bc54.6ca48","wires":[]},{"id":"995418ca.5fe778","type":"set","name":"set consumed allotted resources","xml":"<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<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` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n","comments":"","x":462.42862701416016,"y":1565.0951986312866,"z":"d9f8bc54.6ca48","wires":[]},{"id":"59610fb0.0a244","type":"execute","name":"execute RestApiCallNode - PUT SZ VNF Provided Allotted Resource","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.vnf-p-ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-prov-ar\" />\n\n","comments":"","outputs":1,"x":575.9049606323242,"y":2049.0955414772034,"z":"d9f8bc54.6ca48","wires":[["ae04f7b.eed3208","5027b5f7.e37cbc"]]},{"id":"a0673b92.f4f7c8","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-sz-ar' value='$mdsal-ar.' />\n","comments":"","x":1265.143051147461,"y":524.2858076095581,"z":"d9f8bc54.6ca48","wires":[]},{"id":"422fade5.4f8814","type":"execute","name":"generate vnf provided ar url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.vnf-provided-allottedresource`\" />\n <parameter name=\"outputPath\" value=\"tmp.vnf-p-ar-url\" />\n <parameter name=\"target\" value=\"{service-instance-id}\" />\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\" />\n","comments":"","outputs":1,"x":452.8571472167969,"y":388.57141876220703,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"83f71044.bcea7","type":"execute","name":"execute SliStringUtils","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.vnf-p-ar-url`\" />\n <parameter name=\"outputPath\" value=\"tmp.vnf-p-ar-url\" />\n <parameter name=\"target\" value=\"{vnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.sz-vnf-id`\"/>\n","comments":"","outputs":1,"x":443.1428985595703,"y":419.99999809265137,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"ec9be6aa.494588","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":431.7142868041992,"y":327.1428699493408,"z":"d9f8bc54.6ca48","wires":[]},{"id":"ae04f7b.eed3208","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":934.4763298034668,"y":2049.666941165924,"z":"d9f8bc54.6ca48","wires":[["f9fdf5f9.8e4668"]]},{"id":"f9fdf5f9.8e4668","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1144.047706604004,"y":2048.738305568695,"z":"d9f8bc54.6ca48","wires":[["3eccb358.12c2dc","968252db.ccc84"]]},{"id":"3eccb358.12c2dc","type":"switchNode","name":"switch sz length","xml":"<switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1389.9049530029297,"y":2083.0240688323975,"z":"d9f8bc54.6ca48","wires":[["452ba5e6.956fcc"]]},{"id":"452ba5e6.956fcc","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1580.904956817627,"y":2083.0240664482117,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"968252db.ccc84","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-sz-ar' value='$mdsal-ar.' />\n","comments":"","x":1469.619285583496,"y":2048.7383975982666,"z":"d9f8bc54.6ca48","wires":[]},{"id":"5027b5f7.e37cbc","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":933.047721862793,"y":2139.6668133735657,"z":"d9f8bc54.6ca48","wires":[["ce01090.f9b9af8"]]},{"id":"f1ea7873.944388","type":"comment","name":"Need to rollback?","info":"","comments":"","x":935.9049758911133,"y":2088.238205432892,"z":"d9f8bc54.6ca48","wires":[]},{"id":"e06b36.87ea84c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for security-zone-allotted-resource\" />\n","comments":"","x":1310.1905517578125,"y":2181.0956473350525,"z":"d9f8bc54.6ca48","wires":[]},{"id":"eeb0dfbd.307f7","type":"execute","name":"execute RestApiCallNode - DELETE AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":1411.6191864013672,"y":2142.5242981910706,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"ce01090.f9b9af8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1107.3334274291992,"y":2142.523895740509,"z":"d9f8bc54.6ca48","wires":[["eeb0dfbd.307f7","e06b36.87ea84c8"]]},{"id":"bde153f5.6a65","type":"comment","name":"Generate Security zone Panorama names","info":"","comments":"","x":494.8095932006836,"y":1016.1907386779785,"z":"d9f8bc54.6ca48","wires":[]},{"id":"4f2b0053.cbdf5","type":"set","name":"set sz-ar-assignments","xml":"<set>\n<parameter name='sz-ar-assignments.security-zone-name-untrusted' value=\"`$tmp.untrust-sz` \" />\n<parameter name='sz-ar-assignments.security-zone-name-trusted' value=\"`$tmp.trust-sz` \" />\n\n\n","comments":"","x":444.0953140258789,"y":1080.7148094177246,"z":"d9f8bc54.6ca48","wires":[]},{"id":"c28eabf9.0410c8","type":"execute","name":"execute SliStringUtils","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.vnf-p-ar-url`\" />\n <parameter name=\"outputPath\" value=\"tmp.vnf-p-ar-url\" />\n <parameter name=\"target\" value=\"{vnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.sz-vnf-id`\"/>\n","comments":"","outputs":1,"x":444.28570556640625,"y":451.4285583496094,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"121f5121.c5ff2f","type":"call","name":"call generate-panorama-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-panorama-name' mode='sync' >\n","comments":"","outputs":1,"x":465.00001525878906,"y":1046.66672706604,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"4593956d.d1f3ec","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":892.6666564941406,"y":1833.6666836738586,"z":"d9f8bc54.6ca48","wires":[["297e2310.b99eec"]]},{"id":"a64508aa.c4e898","type":"comment","name":"Add SZ AR to mdsal","info":"","comments":"","x":416.9048080444336,"y":1808.3808569908142,"z":"d9f8bc54.6ca48","wires":[]},{"id":"a4891e73.c917","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":424.66665840148926,"y":1602.3333406448364,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"4a737d1.caa4e84","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":758.3333129882812,"y":559.9999389648438,"z":"d9f8bc54.6ca48","wires":[["f20f59c0.b02038"]]},{"id":"f20f59c0.b02038","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":938.3332633972168,"y":560.6664896011353,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"87ceb4de.ec7128","type":"set","name":"set id","xml":"<set>\n<parameter name='sz-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='sz-ar.allotted-resource-status.action' value=\"`$security-zone-topology-operation-input.request-information.request-action` \" />\n<parameter name='sz-ar.allotted-resource-status.rpc-name' value=\"security-zone-topology-operation\" />\n<parameter name='sz-ar.allotted-resource-status.rpc-action' value=\"`$security-zone-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$security-zone-topology-operation-input.request-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$security-zone-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$security-zone-topology-operation-input.service-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$security-zone-topology-operation-input.allotted-resource-information.` \" />\n<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.` \" />","comments":"","x":405.000057220459,"y":585.9523229598999,"z":"d9f8bc54.6ca48","wires":[]},{"id":"c025c3c9.338f6","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$ar-model.invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$ar-model.uuid`\" />\n\t<parameter name=\"operational-status\" value=\"null\" />\n","comments":"","outputs":1,"x":446.66668701171875,"y":1730.238124847412,"z":"d9f8bc54.6ca48","wires":[["78f280c9.aa658","3206f266.94f28e"]]},{"id":"78f280c9.aa658","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":702.428596496582,"y":1713.190628528595,"z":"d9f8bc54.6ca48","wires":[["e21aa9c5.4ebb08"]]},{"id":"e21aa9c5.4ebb08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":868.9524765014648,"y":1724.8096995353699,"z":"d9f8bc54.6ca48","wires":[]},{"id":"3206f266.94f28e","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":709.5238838195801,"y":1745.9525961875916,"z":"d9f8bc54.6ca48","wires":[["e21aa9c5.4ebb08"]]},{"id":"91a87775.758588","type":"switchNode","name":"switch tmp.found-cidx","xml":"<switch test='`$tmp.found-cidx`'>\n","comments":"","outputs":1,"x":1177.999984741211,"y":1596.0000410079956,"z":"d9f8bc54.6ca48","wires":[["f9327230.fb919"]]},{"id":"f9327230.fb919","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1367.9999389648438,"y":1595.9999780654907,"z":"d9f8bc54.6ca48","wires":[["fde4a6ad.8b8798"]]},{"id":"fde4a6ad.8b8798","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1533.9999389648438,"y":1595.9999780654907,"z":"d9f8bc54.6ca48","wires":[["f243be1.0d9664"]]},{"id":"f243be1.0d9664","type":"set","name":"set tmp.cidx ","xml":"<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n","comments":"","x":1779.8572673797607,"y":1596.571452140808,"z":"d9f8bc54.6ca48","wires":[]},{"id":"4d5ec78f.74ab88","type":"break","name":"break","xml":"<break>\n","comments":"","x":2324.000057220459,"y":1588.0000791549683,"z":"d9f8bc54.6ca48","wires":[]},{"id":"297e2310.b99eec","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":1243.708797454834,"y":1833.3755688667297,"z":"d9f8bc54.6ca48","wires":[["90eb7941.4e6d28","529b5fcc.fe782","5dd2303d.8c34d"]]},{"id":"c07fd6c.a7d3c28","type":"comment","name":"Rollback parent","info":"","comments":"","x":1087.708724975586,"y":1803.0421993732452,"z":"d9f8bc54.6ca48","wires":[]},{"id":"90eb7941.4e6d28","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1615.016845703125,"y":1894.040535211563,"z":"d9f8bc54.6ca48","wires":[["f889d017.68c21"]]},{"id":"529b5fcc.fe782","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1606.0168952941895,"y":1862.5405609607697,"z":"d9f8bc54.6ca48","wires":[["f889d017.68c21"]]},{"id":"5dd2303d.8c34d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1609.766933441162,"y":1832.897665835917,"z":"d9f8bc54.6ca48","wires":[["f889d017.68c21"]]},{"id":"f889d017.68c21","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1751.4229011535645,"y":1829.0898350253701,"z":"d9f8bc54.6ca48","wires":[[]]},{"id":"d41e8d9f.684df","type":"comment","name":"Generate naming","info":"","comments":"","x":438.00001525878906,"y":876.0000257492065,"z":"d9f8bc54.6ca48","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-create.json
new file mode 100755
index 00000000..427361a3
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-create.json
@@ -0,0 +1 @@
+[{"id":"b6f76cf0.bed9d","type":"dgstart","name":"DGSTART","outputs":1,"x":295,"y":190,"z":"1afa105.0a3f0f","wires":[["ff3a2e96.20279"]]},{"id":"ff3a2e96.20279","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":391.2380790710449,"y":250.95239067077637,"z":"1afa105.0a3f0f","wires":[["b753df27.1ee1e"]]},{"id":"b753df27.1ee1e","type":"method","name":"security-zone-topology-operation-create","xml":"<method rpc='security-zone-topology-operation-create' mode='sync'>\n","comments":"","outputs":1,"x":437.15485763549805,"y":286.1904458999634,"z":"1afa105.0a3f0f","wires":[["3d5f9815.bb72d8"]]},{"id":"3d5f9815.bb72d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":345.47619247436523,"y":429.5237879753113,"z":"1afa105.0a3f0f","wires":[["bd924d4b.6ac3d","58426f57.d9671","87dd9628.4b8e08","24e1c2bf.f38e3e","56c65e21.0c536","42ea3bdc.05eb14","ad98be46.853ca","9549d5d.4d0ae28","7db0224a.ddf40c","c1426d52.6c3f3","8fad2375.b2e97"]]},{"id":"58426f57.d9671","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":612.0001106262207,"y":1099.2145080566406,"z":"1afa105.0a3f0f","wires":[]},{"id":"bd924d4b.6ac3d","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='security-zone-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $security-zone-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":640.7540245056152,"y":1063.3370542526245,"z":"1afa105.0a3f0f","wires":[]},{"id":"c1426d52.6c3f3","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$security-zone-topology-operation-input.request-information.request-action`' />\n<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`' />\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":651.7542190551758,"y":810.0514001846313,"z":"1afa105.0a3f0f","wires":[]},{"id":"24e1c2bf.f38e3e","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/security-zone-topology/'` \" />\n\n","comments":"","x":607.7380638122559,"y":403.33332538604736,"z":"1afa105.0a3f0f","wires":[]},{"id":"87dd9628.4b8e08","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":654.9973258972168,"y":369.59259128570557,"z":"1afa105.0a3f0f","wires":[]},{"id":"56c65e21.0c536","type":"execute","name":"execute Properties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":613.9934196472168,"y":439.23152446746826,"z":"1afa105.0a3f0f","wires":[[]]},{"id":"ad98be46.853ca","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":676.5187530517578,"y":600.4594917297363,"z":"1afa105.0a3f0f","wires":[["26a7a122.8ca35e","eef0e4d0.faeba8"]]},{"id":"42ea3bdc.05eb14","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.sz-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":642.0648536682129,"y":499.0172290802002,"z":"1afa105.0a3f0f","wires":[[]]},{"id":"26a7a122.8ca35e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":933.8148918151855,"y":599.2672522068024,"z":"1afa105.0a3f0f","wires":[["ba2d298f.ee9da8"]]},{"id":"9549d5d.4d0ae28","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sz.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":684.5293121337891,"y":953.4341316223145,"z":"1afa105.0a3f0f","wires":[["c81ee454.030d28","6308f6ba.6c5ee8","f6e148d1.5bbbc8"]]},{"id":"c81ee454.030d28","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":954.837329864502,"y":1006.432332418859,"z":"1afa105.0a3f0f","wires":[["a2f954df.7d6a08"]]},{"id":"6308f6ba.6c5ee8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":945.8373794555664,"y":974.9323581680655,"z":"1afa105.0a3f0f","wires":[["a2f954df.7d6a08"]]},{"id":"f6e148d1.5bbbc8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":949.5874176025391,"y":945.2894630432129,"z":"1afa105.0a3f0f","wires":[["956bdde7.54a34"]]},{"id":"a2f954df.7d6a08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for security-zone-allotted-resource\" />\n","comments":"","x":1115.587417602539,"y":975.6823820099235,"z":"1afa105.0a3f0f","wires":[]},{"id":"ba2d298f.ee9da8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1114.8148460388184,"y":599.7672016620636,"z":"1afa105.0a3f0f","wires":[["f6b8a443.ce37c8","7f9a9607.9deb78"]]},{"id":"f6b8a443.ce37c8","type":"switchNode","name":"switch sz length","xml":"<switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1360.6720924377441,"y":634.052964925766,"z":"1afa105.0a3f0f","wires":[["c19598d2.19bd88"]]},{"id":"c19598d2.19bd88","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1551.6720962524414,"y":634.0529625415802,"z":"1afa105.0a3f0f","wires":[["852776b8.720618"]]},{"id":"20c1fba5.738554","type":"set","name":"set sz-ar from get","xml":"<set>\n<parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />\n","comments":"","x":1951.5292320251465,"y":634.6243867874146,"z":"1afa105.0a3f0f","wires":[]},{"id":"852776b8.720618","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1722.5290794372559,"y":634.6244316101074,"z":"1afa105.0a3f0f","wires":[["20c1fba5.738554","37c4ecf.ab37e14","b8ed9202.62a45"]]},{"id":"37c4ecf.ab37e14","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1949.5294761657715,"y":702.0529508590698,"z":"1afa105.0a3f0f","wires":[]},{"id":"a2659467.3372c8","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":701.8148155212402,"y":563.7671926021576,"z":"1afa105.0a3f0f","wires":[]},{"id":"b8ed9202.62a45","type":"switchNode","name":"switch order-status","xml":"<switch test='`$sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1959.52925491333,"y":667.6243848800659,"z":"1afa105.0a3f0f","wires":[["994a7d02.f776","c6432d89.74604"]]},{"id":"994a7d02.f776","type":"outcome","name":"outcome PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":2171.1292114257812,"y":628.6243848800659,"z":"1afa105.0a3f0f","wires":[["edf3836c.7ac5a"]]},{"id":"c6432d89.74604","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2196.8435859680176,"y":664.052975654602,"z":"1afa105.0a3f0f","wires":[["edf3836c.7ac5a"]]},{"id":"242cf515.aebfea","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":657.3386383056641,"y":654.3386459350586,"z":"1afa105.0a3f0f","wires":[]},{"id":"7f9a9607.9deb78","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-sz-ar' value='$mdsal-ar.' />\n","comments":"","x":1440.3864250183105,"y":599.7672936916351,"z":"1afa105.0a3f0f","wires":[]},{"id":"1ab1e0dc.601f6f","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":612.9576606750488,"y":468.6243562698364,"z":"1afa105.0a3f0f","wires":[]},{"id":"956bdde7.54a34","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1091.2433853149414,"y":941.481632232666,"z":"1afa105.0a3f0f","wires":[[]]},{"id":"2ad43a51.cbb826","type":"comment","name":"TO DO: vnf/put parent","info":"","comments":"","x":625.2433776855468,"y":875.4815540313718,"z":"1afa105.0a3f0f","wires":[]},{"id":"7db0224a.ddf40c","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":599.2433815002441,"y":771.4815549850464,"z":"1afa105.0a3f0f","wires":[[]]},{"id":"eef0e4d0.faeba8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":933.5766868591309,"y":635.4814250469208,"z":"1afa105.0a3f0f","wires":[["c1d6759.acebc88"]]},{"id":"c1d6759.acebc88","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1113.5766372680664,"y":636.1479756832123,"z":"1afa105.0a3f0f","wires":[[]]},{"id":"8fad2375.b2e97","type":"set","name":"set id","xml":"<set>\n<parameter name='sz-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='sz-ar.allotted-resource-status.action' value=\"`$security-zone-topology-operation-input.request-information.request-action` \" />\n<parameter name='sz-ar.allotted-resource-status.rpc-name' value=\"security-zone-topology-operation\" />\n<parameter name='sz-ar.allotted-resource-status.rpc-action' value=\"`$security-zone-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$security-zone-topology-operation-input.request-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$security-zone-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$security-zone-topology-operation-input.service-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$security-zone-topology-operation-input.allotted-resource-information.` \" />\n<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.` \" />","comments":"","x":582.2434234619141,"y":691.1481666564941,"z":"1afa105.0a3f0f","wires":[]},{"id":"edf3836c.7ac5a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2385.5997276306152,"y":630.0000190734863,"z":"1afa105.0a3f0f","wires":[[]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.json
new file mode 100755
index 00000000..00f84486
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-deactivate.json
@@ -0,0 +1 @@
+[{"id":"284e27db.b7e5d8","type":"dgstart","name":"DGSTART","outputs":1,"x":184.2857208251953,"y":55.71428680419922,"z":"65a9f6a1.13f7b8","wires":[["21dc623f.cc352e"]]},{"id":"21dc623f.cc352e","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":280.52379989624023,"y":116.66667747497559,"z":"65a9f6a1.13f7b8","wires":[["eacf77e9.837ad8"]]},{"id":"eacf77e9.837ad8","type":"method","name":"security-zone-topology-operation-deactivate","xml":"<method rpc='security-zone-topology-operation-deactivate' mode='sync'>\n","comments":"","outputs":1,"x":326.44057846069336,"y":151.9047327041626,"z":"65a9f6a1.13f7b8","wires":[["509784b4.18024c"]]},{"id":"509784b4.18024c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":234.76191329956055,"y":295.2380747795105,"z":"65a9f6a1.13f7b8","wires":[["e886f0a3.d1a26","29d9b6af.98a21a","8e5a9b8c.613e38","32c0247b.626e1c","de1f88fd.80fcb8","b9651040.0d909","36f9c9aa.1518a6","91736aaa.410ef8","fe89c5c7.b078a8","5c2248b0.cff7c8","f23600d4.282d8","3eb0bb84.9332a4"]]},{"id":"29d9b6af.98a21a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":501.285831451416,"y":964.9287948608398,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"e886f0a3.d1a26","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='security-zone-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $security-zone-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":530.0397453308105,"y":929.0513410568237,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"5c2248b0.cff7c8","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$security-zone-topology-operation-input.request-information.request-action`' />\n<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`' />\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":541.0399627685547,"y":675.7657089233398,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"32c0247b.626e1c","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/security-zone-topology/'` \" />\n\n","comments":"","x":497.0237846374512,"y":269.0476121902466,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"8e5a9b8c.613e38","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":544.2830467224121,"y":235.30687808990479,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"de1f88fd.80fcb8","type":"execute","name":"execute Properties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":503.2791404724121,"y":304.9458112716675,"z":"65a9f6a1.13f7b8","wires":[[]]},{"id":"36f9c9aa.1518a6","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":565.8044738769531,"y":466.17377853393555,"z":"65a9f6a1.13f7b8","wires":[["e544ca46.98ecd8","e932d850.0e3608"]]},{"id":"b9651040.0d909","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.sz-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":531.3505744934082,"y":364.7315158843994,"z":"65a9f6a1.13f7b8","wires":[[]]},{"id":"e544ca46.98ecd8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":823.1006126403809,"y":464.9815390110016,"z":"65a9f6a1.13f7b8","wires":[["4acc39b.9104dc8"]]},{"id":"91736aaa.410ef8","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sz.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":573.8150329589844,"y":819.1484184265137,"z":"65a9f6a1.13f7b8","wires":[["c7834590.fcdd68","7bc04e80.8eb95","a95d7c62.d143f"]]},{"id":"c7834590.fcdd68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":844.1230506896973,"y":872.1466192230582,"z":"65a9f6a1.13f7b8","wires":[["7bf6e2d9.60f5ec"]]},{"id":"7bc04e80.8eb95","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":835.1231002807617,"y":840.6466449722648,"z":"65a9f6a1.13f7b8","wires":[["7bf6e2d9.60f5ec"]]},{"id":"a95d7c62.d143f","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":838.8731384277344,"y":811.0037498474121,"z":"65a9f6a1.13f7b8","wires":[["50148bc2.55e4c4"]]},{"id":"7bf6e2d9.60f5ec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for security-zone-allotted-resource\" />\n","comments":"","x":1004.8731384277344,"y":841.3966688141227,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"4acc39b.9104dc8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1004.1005668640137,"y":465.4814884662628,"z":"65a9f6a1.13f7b8","wires":[["524c404c.c6e87","712583b3.96568c"]]},{"id":"524c404c.c6e87","type":"switchNode","name":"switch sz length","xml":"<switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1249.9578132629395,"y":499.7672517299652,"z":"65a9f6a1.13f7b8","wires":[["3ad43779.db66e8"]]},{"id":"3ad43779.db66e8","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1440.9578170776367,"y":499.7672493457794,"z":"65a9f6a1.13f7b8","wires":[["4a46e9c4.f9d128"]]},{"id":"a70a2794.6d9408","type":"set","name":"set sz-ar from get","xml":"<set>\n<parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />\n","comments":"","x":1840.8149528503418,"y":500.33867359161377,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"4a46e9c4.f9d128","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1611.8148002624512,"y":500.33871841430664,"z":"65a9f6a1.13f7b8","wires":[["a70a2794.6d9408","b61c60b8.7a4ec","66e00065.03ca4"]]},{"id":"b61c60b8.7a4ec","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1838.8151969909668,"y":567.767237663269,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"ae8a5e82.01315","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":591.1005363464355,"y":429.4814794063568,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"66e00065.03ca4","type":"switchNode","name":"switch order-status","xml":"<switch test='`$sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1848.8149757385254,"y":533.3386716842651,"z":"65a9f6a1.13f7b8","wires":[["65fba3ae.02978c","709a0f22.b2207"]]},{"id":"65fba3ae.02978c","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2060.4149322509766,"y":494.33867168426514,"z":"65a9f6a1.13f7b8","wires":[["389e0eec.32fdf2"]]},{"id":"709a0f22.b2207","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2086.129306793213,"y":529.7672624588013,"z":"65a9f6a1.13f7b8","wires":[["389e0eec.32fdf2"]]},{"id":"c232dfd.abca22","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":546.6243591308594,"y":520.0529327392578,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"712583b3.96568c","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-sz-ar' value='$mdsal-ar.' />\n","comments":"","x":1329.6721458435059,"y":465.48158049583435,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"dd477519.74e698","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":502.24338150024414,"y":334.33864307403564,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"50148bc2.55e4c4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":980.5291061401367,"y":807.1959190368652,"z":"65a9f6a1.13f7b8","wires":[[]]},{"id":"f27feeff.247c1","type":"comment","name":"TO DO: vnf/put parent","info":"","comments":"","x":508.81481170654297,"y":712.6244564056396,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"fe89c5c7.b078a8","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":488.52910232543945,"y":637.1958417892456,"z":"65a9f6a1.13f7b8","wires":[[]]},{"id":"e932d850.0e3608","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":822.8624076843262,"y":501.19571185112,"z":"65a9f6a1.13f7b8","wires":[["44f65ab4.13daa4"]]},{"id":"44f65ab4.13daa4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1002.8623580932617,"y":501.8622624874115,"z":"65a9f6a1.13f7b8","wires":[[]]},{"id":"f23600d4.282d8","type":"set","name":"set id","xml":"<set>\n<parameter name='sz-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='sz-ar.allotted-resource-status.action' value=\"`$security-zone-topology-operation-input.request-information.request-action` \" />\n<parameter name='sz-ar.allotted-resource-status.rpc-name' value=\"security-zone-topology-operation\" />\n<parameter name='sz-ar.allotted-resource-status.rpc-action' value=\"`$security-zone-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$security-zone-topology-operation-input.request-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$security-zone-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$security-zone-topology-operation-input.service-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$security-zone-topology-operation-input.allotted-resource-information.` \" />\n<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.` \" />","comments":"","x":471.5291442871094,"y":556.8624534606934,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"389e0eec.32fdf2","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2274.8854484558105,"y":495.71430587768555,"z":"65a9f6a1.13f7b8","wires":[[]]},{"id":"3eb0bb84.9332a4","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n","comments":"","outputs":1,"x":535.7142944335938,"y":754.2857055664062,"z":"65a9f6a1.13f7b8","wires":[["a77d093e.701398","a0e58ee0.5d11b"]]},{"id":"a77d093e.701398","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":791.476203918457,"y":737.2382092475891,"z":"65a9f6a1.13f7b8","wires":[["dce668a3.1b94f8"]]},{"id":"dce668a3.1b94f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":958.0000839233398,"y":748.857280254364,"z":"65a9f6a1.13f7b8","wires":[]},{"id":"a0e58ee0.5d11b","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":798.5714912414551,"y":770.0001769065857,"z":"65a9f6a1.13f7b8","wires":[["dce668a3.1b94f8"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.json
new file mode 100755
index 00000000..e4c77aa1
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-delete.json
@@ -0,0 +1 @@
+[{"id":"6b945847.1c8628","type":"dgstart","name":"DGSTART","outputs":1,"x":187,"y":84,"z":"cab86701.408c88","wires":[["46c9c550.08ddbc"]]},{"id":"46c9c550.08ddbc","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":283.2380790710449,"y":144.95239067077637,"z":"cab86701.408c88","wires":[["33033a6c.777e46"]]},{"id":"33033a6c.777e46","type":"method","name":"security-zone-topology-operation-delete","xml":"<method rpc='security-zone-topology-operation-delete' mode='sync'>\n","comments":"","outputs":1,"x":329.15485763549805,"y":180.19044589996338,"z":"cab86701.408c88","wires":[["71a136f2.4a6ae8"]]},{"id":"71a136f2.4a6ae8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":237.47619247436523,"y":323.5237879753113,"z":"cab86701.408c88","wires":[["d473982e.2073e8","21b535a4.6f3cfa","58735763.200388","67dca0c.5203f6","d4bebd02.2ac6","ed3aea18.ac56a8","ce33759f.7f8848","af4ea7a7.5e99e8","dd978c58.19189","a078b88c.279298","1469e91d.b421d7","4a2606ec.007d08"]]},{"id":"21b535a4.6f3cfa","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":504.0001106262207,"y":993.2145080566406,"z":"cab86701.408c88","wires":[]},{"id":"d473982e.2073e8","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='security-zone-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $security-zone-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":532.7540245056152,"y":957.3370542526245,"z":"cab86701.408c88","wires":[]},{"id":"dd978c58.19189","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$security-zone-topology-operation-input.request-information.request-action`' />\n<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`' />\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":543.7542190551758,"y":704.0514001846313,"z":"cab86701.408c88","wires":[]},{"id":"67dca0c.5203f6","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/security-zone-topology/'` \" />\n\n","comments":"","x":499.73806381225586,"y":297.33332538604736,"z":"cab86701.408c88","wires":[]},{"id":"58735763.200388","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":546.9973258972168,"y":263.59259128570557,"z":"cab86701.408c88","wires":[]},{"id":"d4bebd02.2ac6","type":"execute","name":"execute Properties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":505.9934196472168,"y":333.23152446746826,"z":"cab86701.408c88","wires":[[]]},{"id":"ce33759f.7f8848","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":568.5187530517578,"y":494.4594917297363,"z":"cab86701.408c88","wires":[["3d6ff871.1b6728","c68f9183.6fe9"]]},{"id":"ed3aea18.ac56a8","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.sz-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":534.0648536682129,"y":393.0172290802002,"z":"cab86701.408c88","wires":[[]]},{"id":"3d6ff871.1b6728","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":825.8148918151855,"y":493.26725220680237,"z":"cab86701.408c88","wires":[["cae924d0.c91d68"]]},{"id":"e3d80d76.f38b6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":846.837329864502,"y":900.432332418859,"z":"cab86701.408c88","wires":[["e5182ef1.2930a"]]},{"id":"408d7749.7bfef8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":837.8373794555664,"y":868.9323581680655,"z":"cab86701.408c88","wires":[["e5182ef1.2930a"]]},{"id":"a26d7c72.44fcc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":841.5874176025391,"y":839.2894630432129,"z":"cab86701.408c88","wires":[["e6e17eb6.e762c"]]},{"id":"e5182ef1.2930a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for security-zone-allotted-resource\" />\n","comments":"","x":1007.5874176025391,"y":869.6823820099235,"z":"cab86701.408c88","wires":[]},{"id":"cae924d0.c91d68","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1006.8148460388184,"y":493.7672016620636,"z":"cab86701.408c88","wires":[["a06def86.57a78","2d0ecbe9.d56c34"]]},{"id":"a06def86.57a78","type":"switchNode","name":"switch sz length","xml":"<switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1252.6720924377441,"y":528.052964925766,"z":"cab86701.408c88","wires":[["ef02f832.92b468"]]},{"id":"ef02f832.92b468","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1443.6720962524414,"y":528.0529625415802,"z":"cab86701.408c88","wires":[["6ff8e752.374018"]]},{"id":"b7d42ce2.9a481","type":"set","name":"set sz-ar from get","xml":"<set>\n<parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />\n","comments":"","x":1843.5292320251465,"y":528.6243867874146,"z":"cab86701.408c88","wires":[]},{"id":"6ff8e752.374018","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1614.5290794372559,"y":528.6244316101074,"z":"cab86701.408c88","wires":[["b7d42ce2.9a481","63e31730.e27918","d8d35b13.b628f8"]]},{"id":"63e31730.e27918","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1841.5294761657715,"y":596.0529508590698,"z":"cab86701.408c88","wires":[]},{"id":"bed5b961.bd6788","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":593.8148155212402,"y":457.7671926021576,"z":"cab86701.408c88","wires":[]},{"id":"d8d35b13.b628f8","type":"switchNode","name":"switch order-status","xml":"<switch test='`$sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1851.52925491333,"y":561.6243848800659,"z":"cab86701.408c88","wires":[["55b36fbc.52943","19d63441.492dec"]]},{"id":"55b36fbc.52943","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2063.1292114257812,"y":522.6243848800659,"z":"cab86701.408c88","wires":[["27c47993.316bb6"]]},{"id":"19d63441.492dec","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2088.8435859680176,"y":558.052975654602,"z":"cab86701.408c88","wires":[["27c47993.316bb6"]]},{"id":"f3aeefda.cd911","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":549.3386383056641,"y":548.3386459350586,"z":"cab86701.408c88","wires":[]},{"id":"2d0ecbe9.d56c34","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-sz-ar' value='$mdsal-ar.' />\n","comments":"","x":1332.3864250183105,"y":493.76729369163513,"z":"cab86701.408c88","wires":[]},{"id":"33868ac7.abca26","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":504.9576606750488,"y":362.6243562698364,"z":"cab86701.408c88","wires":[]},{"id":"e6e17eb6.e762c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":983.2433853149414,"y":835.481632232666,"z":"cab86701.408c88","wires":[[]]},{"id":"2b3604ae.317ccc","type":"comment","name":"TO DO: vnf/put parent","info":"","comments":"","x":517.2433776855468,"y":769.4815540313718,"z":"cab86701.408c88","wires":[]},{"id":"af4ea7a7.5e99e8","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":491.24338150024414,"y":665.4815549850464,"z":"cab86701.408c88","wires":[[]]},{"id":"c68f9183.6fe9","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":825.5766868591309,"y":529.4814250469208,"z":"cab86701.408c88","wires":[["336a662a.c1025a"]]},{"id":"336a662a.c1025a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1005.5766372680664,"y":530.1479756832123,"z":"cab86701.408c88","wires":[[]]},{"id":"a078b88c.279298","type":"set","name":"set id","xml":"<set>\n<parameter name='sz-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='sz-ar.allotted-resource-status.action' value=\"`$security-zone-topology-operation-input.request-information.request-action` \" />\n<parameter name='sz-ar.allotted-resource-status.rpc-name' value=\"security-zone-topology-operation\" />\n<parameter name='sz-ar.allotted-resource-status.rpc-action' value=\"`$security-zone-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$security-zone-topology-operation-input.request-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$security-zone-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$security-zone-topology-operation-input.service-information.` \" />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$security-zone-topology-operation-input.allotted-resource-information.` \" />\n<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.` \" />","comments":"","x":474.24342346191406,"y":585.1481666564941,"z":"cab86701.408c88","wires":[]},{"id":"27c47993.316bb6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2277.5997276306152,"y":524.0000190734863,"z":"cab86701.408c88","wires":[[]]},{"id":"1469e91d.b421d7","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sz.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":574.0000152587891,"y":850.0000247955322,"z":"cab86701.408c88","wires":[["a26d7c72.44fcc","408d7749.7bfef8","e3d80d76.f38b6"]]},{"id":"4a2606ec.007d08","type":"set","name":"clear sz-ar-assignments","xml":"<set>\n<parameter name='sz-ar-assignments.' value=\"\" />\n\n\n\n","comments":"","x":518,"y":736,"z":"cab86701.408c88","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.json
new file mode 100755
index 00000000..e0ba0886
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation-unassign.json
@@ -0,0 +1 @@
+[{"id":"8f1f2ad4.1b2628","type":"dgstart","name":"DGSTART","outputs":1,"x":185,"y":110,"z":"892de9cf.a3e7e8","wires":[["aef28f38.d3ad2"]]},{"id":"aef28f38.d3ad2","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":281.2380790710449,"y":170.95239067077637,"z":"892de9cf.a3e7e8","wires":[["d541214e.1421c"]]},{"id":"d541214e.1421c","type":"method","name":"security-zone-topology-operation-unassign","xml":"<method rpc='security-zone-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":325.15489196777344,"y":210.190447807312,"z":"892de9cf.a3e7e8","wires":[["3d909232.be8cbe"]]},{"id":"3d909232.be8cbe","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":235.47619247436523,"y":349.5237879753113,"z":"892de9cf.a3e7e8","wires":[["ac546d04.a44e3","65b7ebff.45ef54","887af0a1.cfd5a","16719562.f89cfb","921e5db9.a3742","ae6a6800.748f18","4585bd6c.db3454","a30a4193.dc67c"]]},{"id":"65b7ebff.45ef54","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":502.0001106262207,"y":1019.2145080566406,"z":"892de9cf.a3e7e8","wires":[]},{"id":"ac546d04.a44e3","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='security-zone-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $security-zone-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":530.7540245056152,"y":983.3370542526245,"z":"892de9cf.a3e7e8","wires":[]},{"id":"16719562.f89cfb","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/security-zone-topology/'` \" />\n\n","comments":"","x":497.73806381225586,"y":323.33332538604736,"z":"892de9cf.a3e7e8","wires":[]},{"id":"887af0a1.cfd5a","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<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`' />\n\n\n","comments":"","x":544.9973258972168,"y":289.59259128570557,"z":"892de9cf.a3e7e8","wires":[]},{"id":"921e5db9.a3742","type":"execute","name":"execute Properties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":503.9934196472168,"y":359.23152446746826,"z":"892de9cf.a3e7e8","wires":[[]]},{"id":"4585bd6c.db3454","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":566.5187530517578,"y":520.4594917297363,"z":"892de9cf.a3e7e8","wires":[["39c78959.7ed206","f4ec9c65.dbf1a"]]},{"id":"ae6a6800.748f18","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.sz-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":532.0648536682129,"y":419.0172290802002,"z":"892de9cf.a3e7e8","wires":[[]]},{"id":"39c78959.7ed206","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":823.8148918151855,"y":519.2672522068024,"z":"892de9cf.a3e7e8","wires":[["aa4578bf.e01898"]]},{"id":"cf288e81.867c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":844.837329864502,"y":926.432332418859,"z":"892de9cf.a3e7e8","wires":[["562e732f.776e5c"]]},{"id":"8f1f61fb.4c4c9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":835.8373794555664,"y":894.9323581680655,"z":"892de9cf.a3e7e8","wires":[["562e732f.776e5c"]]},{"id":"48115134.9ae56","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":839.5874176025391,"y":865.2894630432129,"z":"892de9cf.a3e7e8","wires":[["9c761fba.db0c3"]]},{"id":"562e732f.776e5c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for security-zone-allotted-resource\" />\n","comments":"","x":1005.5874176025391,"y":895.6823820099235,"z":"892de9cf.a3e7e8","wires":[]},{"id":"aa4578bf.e01898","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1004.8148460388184,"y":519.7672016620636,"z":"892de9cf.a3e7e8","wires":[["d17cf2f0.cec85","dae16c74.e3b7c"]]},{"id":"d17cf2f0.cec85","type":"switchNode","name":"switch sz length","xml":"<switch test='`$mdsal-ar.security-zone-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1250.6720924377441,"y":554.052964925766,"z":"892de9cf.a3e7e8","wires":[["9eb758cd.982008"]]},{"id":"9eb758cd.982008","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1441.6720962524414,"y":554.0529625415802,"z":"892de9cf.a3e7e8","wires":[["e43335e7.a2b4b8"]]},{"id":"90a7fa85.7e06d8","type":"set","name":"set sz-ar from get","xml":"<set>\n<parameter name='sz-ar.' value='$mdsal-ar.security-zone-allotted-resource[0].' />\n","comments":"","x":1841.5292320251465,"y":554.6243867874146,"z":"892de9cf.a3e7e8","wires":[]},{"id":"e43335e7.a2b4b8","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1612.5290794372559,"y":554.6244316101074,"z":"892de9cf.a3e7e8","wires":[["90a7fa85.7e06d8","82e79827.7b2528","e9d4c55b.3b68e8"]]},{"id":"82e79827.7b2528","type":"set","name":"set oper-status","xml":"<set>\n<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`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<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`' />\n\n","comments":"","x":1839.5294761657715,"y":622.0529508590698,"z":"892de9cf.a3e7e8","wires":[]},{"id":"dceff592.9c16a8","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":591.8148155212402,"y":483.7671926021576,"z":"892de9cf.a3e7e8","wires":[]},{"id":"e9d4c55b.3b68e8","type":"switchNode","name":"switch order-status","xml":"<switch test='`$sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1849.52925491333,"y":587.6243848800659,"z":"892de9cf.a3e7e8","wires":[["ee32ca42.029ac8","f44f15e1.8ed938"]]},{"id":"ee32ca42.029ac8","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2061.1292114257812,"y":548.6243848800659,"z":"892de9cf.a3e7e8","wires":[["74e489f7.35eb68"]]},{"id":"f44f15e1.8ed938","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2086.8435859680176,"y":584.052975654602,"z":"892de9cf.a3e7e8","wires":[["74e489f7.35eb68"]]},{"id":"dae16c74.e3b7c","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-sz-ar' value='$mdsal-ar.' />\n","comments":"","x":1330.3864250183105,"y":519.7672936916351,"z":"892de9cf.a3e7e8","wires":[]},{"id":"972a22dc.b7b85","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":502.9576606750488,"y":388.6243562698364,"z":"892de9cf.a3e7e8","wires":[]},{"id":"9c761fba.db0c3","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":981.2433853149414,"y":861.481632232666,"z":"892de9cf.a3e7e8","wires":[[]]},{"id":"f4ec9c65.dbf1a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":823.5766868591309,"y":555.4814250469208,"z":"892de9cf.a3e7e8","wires":[["8c932988.c6f7a8"]]},{"id":"8c932988.c6f7a8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1003.5766372680664,"y":556.1479756832123,"z":"892de9cf.a3e7e8","wires":[[]]},{"id":"74e489f7.35eb68","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2275.5997276306152,"y":550.0000190734863,"z":"892de9cf.a3e7e8","wires":[[]]},{"id":"a30a4193.dc67c","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='DELETE' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":568.0000610351562,"y":878.0000267028809,"z":"892de9cf.a3e7e8","wires":[["48115134.9ae56","8f1f61fb.4c4c9","cf288e81.867c"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation.json
new file mode 100755
index 00000000..26b224fa
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_security-zone-topology-operation.json
@@ -0,0 +1 @@
+[{"id":"e4ebdff3.230ac","type":"dgstart","name":"DGSTART","outputs":1,"x":153.7037124633789,"y":150.37034606933594,"z":"38cff129.fc152e","wires":[["b4010019.28c11"]]},{"id":"b4010019.28c11","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":232.32273864746094,"y":190.60845851898193,"z":"38cff129.fc152e","wires":[["d0b7800c.ff6ae"]]},{"id":"d0b7800c.ff6ae","type":"method","name":"security-zone-topology-operation","xml":"<method rpc='security-zone-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":216.79901123046875,"y":250.3703441619873,"z":"38cff129.fc152e","wires":[["5cabda26.cb2e34"]]},{"id":"1d74440d.0be21c","type":"comment","name":"SECURITY-ZONE-TOPOLOGY-OPERATION ","info":"","comments":"","x":544.7152328491211,"y":97.95668983459473,"z":"38cff129.fc152e","wires":[]},{"id":"5cabda26.cb2e34","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":270.084716796875,"y":333.81380558013916,"z":"38cff129.fc152e","wires":[["8572d942.568b08","a4dc8e17.f43eb","8f606133.785f7","b962e00e.873c9"]]},{"id":"8572d942.568b08","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":494.4537658691406,"y":937.6564655303955,"z":"38cff129.fc152e","wires":[]},{"id":"a4dc8e17.f43eb","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":491.0846405029297,"y":544.2275238037109,"z":"38cff129.fc152e","wires":[["3b96ffc6.57b1a","2254507e.315a2","e31135d3.dc53d8","f3af2581.6384d8","928514d5.296ba8","5ec79a58.8d5414","fd3e4e18.0df77"]]},{"id":"3b96ffc6.57b1a","type":"other","name":"assign","xml":"<outcome value='assign'>\n","comments":"","outputs":1,"x":712.9894676208496,"y":405.0846047401428,"z":"38cff129.fc152e","wires":[["aa516bcc.267f38"]]},{"id":"aa516bcc.267f38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":892.7989959716797,"y":407.51329612731934,"z":"38cff129.fc152e","wires":[["f56f040a.9ba298"]]},{"id":"8f606133.785f7","type":"call","name":"call GENERIC-RESOURCE-API:validate-security-zone-input","xml":"<call module='GENERIC-RESOURCE-API' rpc='validate-security-zone-input' mode='sync' >\n","comments":"","outputs":1,"x":625.6560668945312,"y":325.7989387512207,"z":"38cff129.fc152e","wires":[[]]},{"id":"f56f040a.9ba298","type":"call","name":"call GENERIC-RESOURCE-API:security-zone-topology-operation-assign","xml":"<call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-assign' mode='sync' >\n","comments":"","outputs":1,"x":1264.3702926635742,"y":407.37035179138184,"z":"38cff129.fc152e","wires":[[]]},{"id":"2254507e.315a2","type":"other","name":"activate","xml":"<outcome value='activate'>\n","comments":"","outputs":1,"x":713.3703765869141,"y":494.37034606933594,"z":"38cff129.fc152e","wires":[["2b87dbfe.7ba6e4"]]},{"id":"2b87dbfe.7ba6e4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":897.6085357666016,"y":495.37046813964844,"z":"38cff129.fc152e","wires":[["49265f59.4181d"]]},{"id":"e8d2423f.a9142","type":"call","name":"call GENERIC-RESOURCE-API:network-topology-operation-activate","xml":"<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-activate' mode='sync' >\n","comments":"","outputs":1,"x":1830.1800549825039,"y":1470.5608215332031,"z":"38cff129.fc152e","wires":[[]]},{"id":"e31135d3.dc53d8","type":"other","name":"deactivate","xml":"<outcome value='deactivate'>\n","comments":"","outputs":1,"x":722.3704166412354,"y":554.3704042434692,"z":"38cff129.fc152e","wires":[["39e52589.68fa0a"]]},{"id":"39e52589.68fa0a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":903.6085758209229,"y":555.3705263137817,"z":"38cff129.fc152e","wires":[["430726d9.dbdaa8"]]},{"id":"ed015722.b22218","type":"call","name":"call GENERIC-RESOURCE-API:network-topology-operation-deactivate","xml":"<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-deactivate' mode='sync' >\n","comments":"","outputs":1,"x":1836.6799634297695,"y":1586.3108215332031,"z":"38cff129.fc152e","wires":[[]]},{"id":"f3af2581.6384d8","type":"other","name":"unassign","xml":"<outcome value='unassign'>\n","comments":"","outputs":1,"x":720.370439529419,"y":672.7037439346313,"z":"38cff129.fc152e","wires":[["5b1c51a7.e6aa7"]]},{"id":"5b1c51a7.e6aa7","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":901.6085987091064,"y":673.7038660049438,"z":"38cff129.fc152e","wires":[["5bc27941.d4f4f8"]]},{"id":"1d34f9a1.037d66","type":"call","name":"call GENERIC-RESOURCE-API:network-topology-operation-unassign","xml":"<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-unassign' mode='sync' >\n","comments":"","outputs":1,"x":1843.4299634297695,"y":1699.0608215332031,"z":"38cff129.fc152e","wires":[[]]},{"id":"928514d5.296ba8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":719.7037696838379,"y":732.7037267684937,"z":"38cff129.fc152e","wires":[["4e2016c4.9e9208"]]},{"id":"4e2016c4.9e9208","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n","comments":"","x":901.7037658691406,"y":731.7037363052368,"z":"38cff129.fc152e","wires":[]},{"id":"b962e00e.873c9","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":513.4814605712891,"y":896.8148040771484,"z":"38cff129.fc152e","wires":[]},{"id":"970980ab.4166","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1732.1008466084804,"y":1364.465576171875,"z":"38cff129.fc152e","wires":[["7c375e30.6abc8"]]},{"id":"cec76c20.78cb4","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1065.8149426778164,"y":1329.0369567871094,"z":"38cff129.fc152e","wires":[["5fff2a9.d7e8dd4","94eadb3a.e3a458"]]},{"id":"5fff2a9.d7e8dd4","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1308.81488164266,"y":1331.0369663238525,"z":"38cff129.fc152e","wires":[["a0ca271a.2df248"]]},{"id":"94eadb3a.e3a458","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1262.8149121602382,"y":1364.0369873046875,"z":"38cff129.fc152e","wires":[["955a1867.ed1ea8"]]},{"id":"7c375e30.6abc8","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`\">\n\n","comments":"","outputs":1,"x":2022.5293973286953,"y":1363.7156600952148,"z":"38cff129.fc152e","wires":[["43582bb0.126264"]]},{"id":"43582bb0.126264","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2211.4817517598476,"y":1364.6083984375,"z":"38cff129.fc152e","wires":[["e72ed2b6.760d4"]]},{"id":"e72ed2b6.760d4","type":"set","name":"set tmp.nidx and ctx.network-data","xml":"<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />\n","comments":"","x":2445.0135205586757,"y":1363.3584060668945,"z":"38cff129.fc152e","wires":[]},{"id":"1533495c.2f7d47","type":"comment","name":"Find the index to service data for this network - save id in tmp.nidx, save service-data","info":"","comments":"","x":1188.9260266621914,"y":1298.036979675293,"z":"38cff129.fc152e","wires":[]},{"id":"a0ca271a.2df248","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n","comments":"","x":1500.592439015707,"y":1328.9259643554688,"z":"38cff129.fc152e","wires":[]},{"id":"955a1867.ed1ea8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1430.0848782857265,"y":1363.5915641784668,"z":"38cff129.fc152e","wires":[["970980ab.4166","a77bcb8b.e65188"]]},{"id":"a77bcb8b.e65188","type":"switchNode","name":"switch tmp.nidx ","xml":"<switch test=\"`$tmp.nidx`\">\n\n","comments":"","outputs":1,"x":1650.4022763570156,"y":1406.4487829208374,"z":"38cff129.fc152e","wires":[["4037e2b3.df5d0c"]]},{"id":"bbb7bbcb.e9d3e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n","comments":"","x":2003.25925954183,"y":1402.1630249023438,"z":"38cff129.fc152e","wires":[]},{"id":"4037e2b3.df5d0c","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1821.8308118184414,"y":1405.0201683044434,"z":"38cff129.fc152e","wires":[["bbb7bbcb.e9d3e8"]]},{"id":"14c198e5.1cc677","type":"switchNode","name":"switch network-level-oper-status","xml":"<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1043.1482861836757,"y":1470.512222290039,"z":"38cff129.fc152e","wires":[["3c6c6eae.28e612","103089d1.c81916"]]},{"id":"3c6c6eae.28e612","type":"outcome","name":"outcome PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":1408.148265838623,"y":1470.51220703125,"z":"38cff129.fc152e","wires":[["e8d2423f.a9142"]]},{"id":"103089d1.c81916","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1358.1483128865566,"y":1510.5122375488281,"z":"38cff129.fc152e","wires":[["e490ae22.d5bde"]]},{"id":"e490ae22.d5bde","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />","comments":"","x":1528.1483128865566,"y":1510.5122375488281,"z":"38cff129.fc152e","wires":[]},{"id":"ab179e35.550b2","type":"switchNode","name":"switch network-level-oper-status","xml":"<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1050.4497693379726,"y":1586.463623046875,"z":"38cff129.fc152e","wires":[["9d407a50.6f42b8","50a066bd.db29b8"]]},{"id":"9d407a50.6f42b8","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":1413.4497388203945,"y":1586.4636535644531,"z":"38cff129.fc152e","wires":[["ed015722.b22218"]]},{"id":"50a066bd.db29b8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1383.4497388203945,"y":1626.4636535644531,"z":"38cff129.fc152e","wires":[["a5c499d0.8c9ba8"]]},{"id":"a5c499d0.8c9ba8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />","comments":"","x":1549.4497388203945,"y":1628.4636535644531,"z":"38cff129.fc152e","wires":[]},{"id":"5487a9fc.903868","type":"switchNode","name":"switch network-level-oper-status","xml":"<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1050.2513440450039,"y":1700.665023803711,"z":"38cff129.fc152e","wires":[["774c458d.4976ec","ff4fd639.391848","9d8f3da4.83f8"]]},{"id":"774c458d.4976ec","type":"outcome","name":"outcome PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":1410.2513135274257,"y":1700.665054321289,"z":"38cff129.fc152e","wires":[["1d34f9a1.037d66"]]},{"id":"ff4fd639.391848","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1367.2512524922695,"y":1784.6650695800781,"z":"38cff129.fc152e","wires":[["8f2347ed.c81b08"]]},{"id":"8f2347ed.c81b08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />","comments":"","x":1558.5846722920742,"y":1783.3316984176636,"z":"38cff129.fc152e","wires":[]},{"id":"9d8f3da4.83f8","type":"outcome","name":"outcome PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":1413.4815381368007,"y":1738.512222290039,"z":"38cff129.fc152e","wires":[["1d34f9a1.037d66"]]},{"id":"5ec79a58.8d5414","type":"other","name":"create","xml":"<outcome value='create'>\n","comments":"","outputs":1,"x":718.611083984375,"y":453.97518730163574,"z":"38cff129.fc152e","wires":[["5936e2cd.b6288c"]]},{"id":"5936e2cd.b6288c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":899.8492431640625,"y":454.97530937194824,"z":"38cff129.fc152e","wires":[["4a78d52c.c3db4c"]]},{"id":"4a78d52c.c3db4c","type":"call","name":"call GENERIC-RESOURCE-API:security-zone-topology-operation-create","xml":"<call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-create' mode='sync' >\n","comments":"","outputs":1,"x":1265.7539520263672,"y":454.49903106689453,"z":"38cff129.fc152e","wires":[[]]},{"id":"fd3e4e18.0df77","type":"other","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":716.9444370269775,"y":615.6418466567993,"z":"38cff129.fc152e","wires":[["d1afc7c1.5f5188"]]},{"id":"d1afc7c1.5f5188","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":898.182596206665,"y":616.6419687271118,"z":"38cff129.fc152e","wires":[["c0792090.5b78d"]]},{"id":"430726d9.dbdaa8","type":"call","name":"call GENERIC-RESOURCE-API:security-zone-topology-operation-deactivate","xml":"<call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-deactivate' mode='sync' >\n","comments":"","outputs":1,"x":1285.5184936523438,"y":554.851884841919,"z":"38cff129.fc152e","wires":[[]]},{"id":"c0792090.5b78d","type":"call","name":"call GENERIC-RESOURCE-API:security-zone-topology-operation-delete","xml":"<call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-delete' mode='sync' >\n","comments":"","outputs":1,"x":1275.1853427886963,"y":616.5185136795044,"z":"38cff129.fc152e","wires":[[]]},{"id":"5bc27941.d4f4f8","type":"call","name":"call GENERIC-RESOURCE-API:security-zone-topology-operation-unassign","xml":"<call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-unassign' mode='sync' >\n","comments":"","outputs":1,"x":1280.8518466949463,"y":673.8518400192261,"z":"38cff129.fc152e","wires":[[]]},{"id":"49265f59.4181d","type":"call","name":"call GENERIC-RESOURCE-API:security-zone-topology-operation-activate","xml":"<call module='GENERIC-RESOURCE-API' rpc='security-zone-topology-operation-activate' mode='sync' >\n","comments":"","outputs":1,"x":1275.1851806640625,"y":495.851806640625,"z":"38cff129.fc152e","wires":[[]]},{"id":"ef47642e.ee9758","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />\n","comments":"","x":524.4444580078125,"y":855.873046875,"z":"38cff129.fc152e","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-assign.json
new file mode 100644
index 00000000..7da520a6
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-assign.json
@@ -0,0 +1,881 @@
+[
+ {
+ "id": "295b7d63.10c692",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 112,
+ "y": 86,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "70e80e39.fe45"
+ ]
+ ]
+ },
+ {
+ "id": "70e80e39.fe45",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 187.28570556640625,
+ "y": 126.23811149597168,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "9baf2a8b.239b88"
+ ]
+ ]
+ },
+ {
+ "id": "9baf2a8b.239b88",
+ "type": "method",
+ "name": "method service-topology-operation-assign",
+ "xml": "<method rpc='service-topology-operation-assign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 216.42862701416016,
+ "y": 166,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "5cbbf27f.ee281c"
+ ]
+ ]
+ },
+ {
+ "id": "b98518f1.2eb928",
+ "type": "comment",
+ "name": "service-topology-operation-assign",
+ "info": "",
+ "comments": "",
+ "x": 506.34485626220703,
+ "y": 33.58634376525879,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "5cbbf27f.ee281c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 228.85712432861328,
+ "y": 756.7619457244873,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "fd3525bb.e6b178",
+ "3fc365e1.b2b29a",
+ "80294281.2295d",
+ "6dc77130.ebecc",
+ "ec3c304f.7f733",
+ "3d90af09.6137c",
+ "da5ddc08.e7611",
+ "e78ecd27.54c89",
+ "b5b6afcf.5fa1",
+ "dd72f866.d6cb28"
+ ]
+ ]
+ },
+ {
+ "id": "fd3525bb.e6b178",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$service-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 511.2381134033203,
+ "y": 267.7142915725708,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "d0d2c5a2.a2fa38",
+ "fbf77054.7e3f7"
+ ]
+ ]
+ },
+ {
+ "id": "d0d2c5a2.a2fa38",
+ "type": "outcome",
+ "name": "CreateServiceInstance",
+ "xml": "<outcome value='CreateServiceInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 748.3809280395508,
+ "y": 242,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "c3e09ac6.b0a468"
+ ]
+ ]
+ },
+ {
+ "id": "fbf77054.7e3f7",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 698.3809509277344,
+ "y": 286.04763889312744,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "14ef825f.a8bece"
+ ]
+ ]
+ },
+ {
+ "id": "c3e09ac6.b0a468",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 926.9523849487305,
+ "y": 242.0000352859497,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "14ef825f.a8bece",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateServiceInstance'\" />\n",
+ "comments": "",
+ "x": 905.7618980407715,
+ "y": 286.04765033721924,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "3fc365e1.b2b29a",
+ "type": "get-resource",
+ "name": "get-resource SERVICE_MODEL",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-topology-operation-input.service-information.ecomp-model-information.model-uuid'\n pfx='db.service-model'>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 547.7856292724609,
+ "y": 490.80957984924316,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "42c43d09.6995e4",
+ "141523e4.26033c"
+ ]
+ ]
+ },
+ {
+ "id": "74dca068.1349",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No model found for service UUID ' + $service-topology-operation-input.service-information.ecomp-model-information.model-uuid`\" />\n",
+ "comments": "",
+ "x": 962.0712966918945,
+ "y": 515.6666297912598,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "80294281.2295d",
+ "type": "switchNode",
+ "name": "switch input service-instance-name",
+ "xml": "<switch test='`$service-topology-operation-input.service-request-input.service-instance-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 555.1903610229492,
+ "y": 787.1190090179443,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "2dc0c3ae.1f5c3c",
+ "8c204a35.ee8d38"
+ ]
+ ]
+ },
+ {
+ "id": "2dc0c3ae.1f5c3c",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 776.3569221496582,
+ "y": 712.4761533737183,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "8ca23910.bba748"
+ ]
+ ]
+ },
+ {
+ "id": "36a8a72c.e67fa8",
+ "type": "switchNode",
+ "name": "switch ecomp-naming",
+ "xml": "<switch test='`$db.service-model.ecomp-naming`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1155.6429824829102,
+ "y": 604.8572378158569,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "e46351c0.e65fe",
+ "e2444120.96641",
+ "b83f5b84.1194c8"
+ ]
+ ]
+ },
+ {
+ "id": "8ca23910.bba748",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 922.0714225769043,
+ "y": 712.4762706756592,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "11216bc9.793f94",
+ "730225bd.4a385c",
+ "36a8a72c.e67fa8"
+ ]
+ ]
+ },
+ {
+ "id": "e2444120.96641",
+ "type": "outcome",
+ "name": "N",
+ "xml": "<outcome value='N'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1404.9286422729492,
+ "y": 606.7619466781616,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "e6cfdf66.2d46c"
+ ]
+ ]
+ },
+ {
+ "id": "e6cfdf66.2d46c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"No service-instance-name was received but ecomp-naming is not Y\" />\n",
+ "comments": "",
+ "x": 1559.214427947998,
+ "y": 625.3333911895752,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "e46351c0.e65fe",
+ "type": "outcome",
+ "name": "Y",
+ "xml": "<outcome value='Y'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1404.9286079406738,
+ "y": 562.4762678146362,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "c74d5ad9.510bf8"
+ ]
+ ]
+ },
+ {
+ "id": "b83f5b84.1194c8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1404.9285697937012,
+ "y": 652.4762659072876,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "e6cfdf66.2d46c"
+ ]
+ ]
+ },
+ {
+ "id": "c74d5ad9.510bf8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1542.0715522766113,
+ "y": 562.4762678146362,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "8c204a35.ee8d38",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 778.9286041259766,
+ "y": 858.7618923187256,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "7dd34c72.469dd4"
+ ]
+ ]
+ },
+ {
+ "id": "6c3ec4cc.7720cc",
+ "type": "set",
+ "name": "set tmp.service-instance-name",
+ "xml": "<set>\n<parameter name='tmp.service-instance-name' value=\"`$service-topology-operation-input.service-request-input.service-instance-name`\" />\n",
+ "comments": "",
+ "x": 1820.6428756713867,
+ "y": 906.1905384063721,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "ec3c304f.7f733",
+ "type": "update",
+ "name": "update AAI service instance",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"service-instance\" \n\t\tkey=\"customer.global-customer-id = $service-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-topology-operation-input.service-information.service-instance-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"service-instance-name\" value=\"`$tmp.service-instance-name`\" />\n\t<parameter name=\"selflink\" value=\"`$service-object-path`\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 529.4524154663086,
+ "y": 1013.5237646102905,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "52adc0d3.8b42e",
+ "e75df5d6.b27108"
+ ]
+ ]
+ },
+ {
+ "id": "52adc0d3.8b42e",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 741.214282989502,
+ "y": 988.7619190216064,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "633d341.6a482cc"
+ ]
+ ]
+ },
+ {
+ "id": "633d341.6a482cc",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n",
+ "comments": "",
+ "x": 891.2142486572266,
+ "y": 988.7619972229004,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "dd72f866.d6cb28",
+ "type": "set",
+ "name": "set service-level-oper-status to Created",
+ "xml": "<set>\n<parameter name='service-data.service-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.service-level-oper-status.last-rpc-action' value='assign' />\n<parameter name='service-data.service-level-oper-status.last-action' value='CreateServiceInstance' />\n",
+ "comments": "",
+ "x": 564.7380981445312,
+ "y": 1262.2141160964966,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "b5b6afcf.5fa1",
+ "type": "set",
+ "name": "set service-object-path",
+ "xml": "<set>\n<parameter name='service-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $service-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n",
+ "comments": "",
+ "x": 513.9760437011719,
+ "y": 949.4761152267456,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "6dc77130.ebecc",
+ "type": "switchNode",
+ "name": "switch order-status",
+ "xml": "<switch test='`$service-data.service-level-oper-status.order-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 504.38090896606445,
+ "y": 378.66676330566406,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "a8edf7c5.7b4478",
+ "ad8ed89.4b77b28",
+ "ee8ac40f.7f3d48"
+ ]
+ ]
+ },
+ {
+ "id": "a8edf7c5.7b4478",
+ "type": "outcome",
+ "name": "Created",
+ "xml": "<outcome value='Created'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 700.3333587646484,
+ "y": 378.33335971832275,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "685d0e61.debed"
+ ]
+ ]
+ },
+ {
+ "id": "685d0e61.debed",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"The requested service already exists\" />\n",
+ "comments": "",
+ "x": 902.476188659668,
+ "y": 377.90489387512207,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "3d90af09.6137c",
+ "type": "set",
+ "name": "set service-topology identifiers",
+ "xml": "<set>\n<parameter name='service-data.service-topology.service-topology-identifier.service-instance-id'\n value='`$service-topology-operation-input.service-information.service-instance-id`' />\n<parameter name='service-data.service-topology.service-topology-identifier.service-type'\n value='`$service-topology-operation-input.service-information.subscription-service-type`' />\n<parameter name='service-data.service-topology.service-topology-identifier.service-instance-name'\n value='`$tmp.service-instance-name`' />\n<parameter name='service-data.service-topology.service-topology-identifier.global-customer-id'\n value='`$service-topology-operation-input.service-information.global-customer-id`' />\n",
+ "comments": "",
+ "x": 540.7143249511719,
+ "y": 1081.8570585250854,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "2653a44e.adc4ec",
+ "type": "for",
+ "name": "for each service-input-parameters",
+ "xml": "<for index='idx' start='0' end='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 970.523754119873,
+ "y": 1219.9524974822998,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "6a555acb.26f484"
+ ]
+ ]
+ },
+ {
+ "id": "6a555acb.26f484",
+ "type": "set",
+ "name": "set parameter name/value",
+ "xml": "<set>\n<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-name'\n value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].name`' />\n<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-value'\n value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].value`' />\n",
+ "comments": "",
+ "x": 1251.9522171020508,
+ "y": 1219.952444076538,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "da5ddc08.e7611",
+ "type": "switchNode",
+ "name": "switch input parameter length",
+ "xml": "<switch test='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 533.3333282470703,
+ "y": 1192.3332176208496,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "f2b63cee.3f632",
+ "cf7a3d51.1eefe"
+ ]
+ ]
+ },
+ {
+ "id": "f2b63cee.3f632",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 748.237907409668,
+ "y": 1168.5238513946533,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "8a63c0fd.08758"
+ ]
+ ]
+ },
+ {
+ "id": "8a63c0fd.08758",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 886.8092994689941,
+ "y": 1168.5238342285156,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "cf7a3d51.1eefe",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 746.8093185424805,
+ "y": 1219.9524402618408,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "2653a44e.adc4ec"
+ ]
+ ]
+ },
+ {
+ "id": "e78ecd27.54c89",
+ "type": "set",
+ "name": "set service-topology ecomp-model-information",
+ "xml": "<set>\n<parameter name='service-data.service-topology.ecomp-model-information.'\n value='`$service-topology-operation-input.service-information.ecomp-model-information.`' />\n",
+ "comments": "",
+ "x": 590.7143096923828,
+ "y": 1126.142632484436,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "e75df5d6.b27108",
+ "type": "failure",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 747.5237121582031,
+ "y": 1037.3333368301392,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "d46d87d4.1042c8"
+ ]
+ ]
+ },
+ {
+ "id": "d46d87d4.1042c8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"The service instance does not exist in AAI\" />\n",
+ "comments": "",
+ "x": 890.8570098876953,
+ "y": 1035.6667108535767,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "11216bc9.793f94",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:generate-unique-name",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1261.1904754638672,
+ "y": 762.4761629104614,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "d2b85a61.8d6948",
+ "6193cfa1.f5b12"
+ ]
+ ]
+ },
+ {
+ "id": "d2b85a61.8d6948",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1601.1904487609863,
+ "y": 737.476222038269,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "ed4311d6.fdf73"
+ ]
+ ]
+ },
+ {
+ "id": "6193cfa1.f5b12",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1604.5237986246743,
+ "y": 787.1428651809692,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "42ec1fd9.8064a"
+ ]
+ ]
+ },
+ {
+ "id": "730225bd.4a385c",
+ "type": "set",
+ "name": "set variables for generating unique name",
+ "xml": "<set>\n<parameter name='generate-unique-name-input.index-table-name' value='SERVICE_INSTANCE_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='service_instance_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$db.service-model.service-instance-name-prefix + '_'`\" />\n",
+ "comments": "",
+ "x": 1216.190559387207,
+ "y": 702.142972946167,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "42ec1fd9.8064a",
+ "type": "set",
+ "name": "set tmp.service-instance-name to generated name",
+ "xml": "<set>\n<parameter name='tmp.service-instance-name' value='`$generate-unique-name-output.generated-name`' />\n",
+ "comments": "",
+ "x": 1888.5713500976562,
+ "y": 786.1904458999634,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "ed4311d6.fdf73",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n",
+ "comments": "",
+ "x": 1769.0475616455078,
+ "y": 736.9047336578369,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "7dd34c72.469dd4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 926.8571319580078,
+ "y": 857.4285793304443,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "39e93876.652cd8",
+ "bbc8a4da.124f28"
+ ]
+ ]
+ },
+ {
+ "id": "bbc8a4da.124f28",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:generate-unique-name",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1256.8571472167969,
+ "y": 882.0952301025391,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "8ea07c5d.48a34",
+ "d227b72.98c2048"
+ ]
+ ]
+ },
+ {
+ "id": "8ea07c5d.48a34",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1596.857105255127,
+ "y": 855.428638458252,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "9626e69f.8bab88"
+ ]
+ ]
+ },
+ {
+ "id": "d227b72.98c2048",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1600.190455118815,
+ "y": 907.0952816009521,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "6c3ec4cc.7720cc"
+ ]
+ ]
+ },
+ {
+ "id": "39e93876.652cd8",
+ "type": "set",
+ "name": "set variables for generating unique name",
+ "xml": "<set>\n<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />\n<parameter name='generate-unique-name-input.supplied-name' value='`$service-topology-operation-input.service-request-input.service-instance-name`' />\n",
+ "comments": "",
+ "x": 1215.1905212402344,
+ "y": 833.7619361877441,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "9626e69f.8bab88",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n",
+ "comments": "",
+ "x": 1764.7142181396484,
+ "y": 854.8571500778198,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "42c43d09.6995e4",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 788.5713310241699,
+ "y": 472.19044494628906,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "43d55ae4.17c224"
+ ]
+ ]
+ },
+ {
+ "id": "141523e4.26033c",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 797.1427612304688,
+ "y": 515.4761581420898,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "74dca068.1349"
+ ]
+ ]
+ },
+ {
+ "id": "43d55ae4.17c224",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading SERVICE_MODEL table\" />\n",
+ "comments": "",
+ "x": 961.4284973144531,
+ "y": 470.7618885040283,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "ad8ed89.4b77b28",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 698.3332824707031,
+ "y": 333.66668128967285,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "8fe971e9.f5c2"
+ ]
+ ]
+ },
+ {
+ "id": "ee8ac40f.7f3d48",
+ "type": "other",
+ "name": "PendingDelete",
+ "xml": "<outcome value='PendingDelete'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 721.0000114440918,
+ "y": 422.3333396911621,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ [
+ "840bc4c1.bd8ae8"
+ ]
+ ]
+ },
+ {
+ "id": "840bc4c1.bd8ae8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"The requested service is pending deletion\" />\n",
+ "comments": "",
+ "x": 903.333309173584,
+ "y": 422.3333501815796,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": []
+ },
+ {
+ "id": "8fe971e9.f5c2",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 884.9999923706055,
+ "y": 332.6667003631592,
+ "z": "d6c1fe8e.0dbfc",
+ "wires": [
+ []
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-deactivate.json
new file mode 100644
index 00000000..2e2a4d61
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-deactivate.json
@@ -0,0 +1,388 @@
+[
+ {
+ "id": "604b70a8.30f9f",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$service-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 536.1904602050781,
+ "y": 314.5237846374512,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "9c181b3f.092838",
+ "2760d61f.58392a"
+ ]
+ ]
+ },
+ {
+ "id": "9c181b3f.092838",
+ "type": "outcome",
+ "name": "DeleteServiceInstance",
+ "xml": "<outcome value='DeleteServiceInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 773.3332748413086,
+ "y": 288.80949306488037,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "1a68151d.2ac4eb"
+ ]
+ ]
+ },
+ {
+ "id": "2760d61f.58392a",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 723.3332405090332,
+ "y": 334.5238208770752,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "a78d0f9e.d329f"
+ ]
+ ]
+ },
+ {
+ "id": "1a68151d.2ac4eb",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 951.9047317504883,
+ "y": 288.8095283508301,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a78d0f9e.d329f",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'deactivate' then request-action must be 'DeleteServiceInstance'\" />\n",
+ "comments": "",
+ "x": 969.0475769042969,
+ "y": 334.5237846374512,
+ "z": "62cfcbc6.1804e4",
+ "wires": []
+ },
+ {
+ "id": "ee30906.f78157",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 262.1427879333496,
+ "y": 405.2380313873291,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "604b70a8.30f9f",
+ "b7ce906b.bd1c6",
+ "6b83ed66.08c724",
+ "415b774b.0e0bf8",
+ "388700f9.d2aff"
+ ]
+ ]
+ },
+ {
+ "id": "d424f27.d8ceb1",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 99.99999237060547,
+ "y": 81.66666412353516,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "e272ce64.f9ac"
+ ]
+ ]
+ },
+ {
+ "id": "e272ce64.f9ac",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 175.28569793701172,
+ "y": 121.90477561950684,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "f939e6bb.1b9ce8"
+ ]
+ ]
+ },
+ {
+ "id": "f939e6bb.1b9ce8",
+ "type": "method",
+ "name": "method service-topology-operation-deactivate",
+ "xml": "<method rpc='service-topology-operation-deactivate' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 216.09528350830078,
+ "y": 163.33332443237305,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "ee30906.f78157"
+ ]
+ ]
+ },
+ {
+ "id": "d253a6a8.6c8668",
+ "type": "comment",
+ "name": "service-topology-operation-deactivate",
+ "info": "",
+ "comments": "",
+ "x": 494.3448486328125,
+ "y": 29.253007888793945,
+ "z": "62cfcbc6.1804e4",
+ "wires": []
+ },
+ {
+ "id": "b7ce906b.bd1c6",
+ "type": "switchNode",
+ "name": "switch service-data service-instance-id",
+ "xml": "<switch test='`$service-data.service-topology.service-topology-identifier.service-instance-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 591.6666564941406,
+ "y": 239.7618865966797,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "fbf7b015.33a16"
+ ]
+ ]
+ },
+ {
+ "id": "fbf7b015.33a16",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 821.4285621643066,
+ "y": 239.76190662384033,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "a2f01f45.35d09"
+ ]
+ ]
+ },
+ {
+ "id": "a2f01f45.35d09",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"`'Service ' + $service-topology-operation-input.service-information.service-instance-id + ' is not found'`\" />\n",
+ "comments": "",
+ "x": 977.1428070068359,
+ "y": 239.76190185546875,
+ "z": "62cfcbc6.1804e4",
+ "wires": []
+ },
+ {
+ "id": "6b83ed66.08c724",
+ "type": "update",
+ "name": "update AAI service instance",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"service-instance\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-topology.service-topology-identifier.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-topology.service-topology-identifier.service-type AND\n\t\t\tservice-instance.service-instance-id = $service-topology-operation-input.service-information.service-instance-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 557.9523620605469,
+ "y": 524.7619037628174,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "1a658f52.90fe91",
+ "7fbd10da.9b854"
+ ]
+ ]
+ },
+ {
+ "id": "1a658f52.90fe91",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 770.7142295837402,
+ "y": 500.0000581741333,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "ec560782.dd0478"
+ ]
+ ]
+ },
+ {
+ "id": "ec560782.dd0478",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n",
+ "comments": "",
+ "x": 920.7141952514648,
+ "y": 500.00013637542725,
+ "z": "62cfcbc6.1804e4",
+ "wires": []
+ },
+ {
+ "id": "7fbd10da.9b854",
+ "type": "failure",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 777.0236587524414,
+ "y": 548.571475982666,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "ca3b7680.173278"
+ ]
+ ]
+ },
+ {
+ "id": "415b774b.0e0bf8",
+ "type": "set",
+ "name": "set service-level-oper-status to PendingDelete",
+ "xml": "<set>\n<parameter name='service-data.service-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.service-level-oper-status.last-rpc-action' value='deactivate' />\n<parameter name='service-data.service-level-oper-status.last-action' value='DeleteServiceInstance' />\n",
+ "comments": "",
+ "x": 613.9523239135742,
+ "y": 594.5237979888916,
+ "z": "62cfcbc6.1804e4",
+ "wires": []
+ },
+ {
+ "id": "ca3b7680.173278",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 904.9999580383301,
+ "y": 548.3333377838135,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7e175a90.802564",
+ "type": "comment",
+ "name": "Don't treat this as an error",
+ "info": "",
+ "comments": "",
+ "x": 1080.0000457763672,
+ "y": 548.3333177566528,
+ "z": "62cfcbc6.1804e4",
+ "wires": []
+ },
+ {
+ "id": "388700f9.d2aff",
+ "type": "switchNode",
+ "name": "switch provided-allotted-resource length",
+ "xml": "<switch test='`$service-data.provided-allotted-resources.provided-allotted-resource_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 596.6667098999023,
+ "y": 408.3333396911621,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "9ed42146.3d389",
+ "3c14b3ca.f345ac",
+ "40e1d77.09f5028"
+ ]
+ ]
+ },
+ {
+ "id": "9ed42146.3d389",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 836.666576385498,
+ "y": 409.9999752044678,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "5abdf37a.97301c"
+ ]
+ ]
+ },
+ {
+ "id": "3c14b3ca.f345ac",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 836.6666793823242,
+ "y": 451.66663360595703,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "55a7bd8c.02e934"
+ ]
+ ]
+ },
+ {
+ "id": "55a7bd8c.02e934",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cannot deactivate this service because there are provided allotted resources\" />\n",
+ "comments": "",
+ "x": 991.6666641235352,
+ "y": 454.9999313354492,
+ "z": "62cfcbc6.1804e4",
+ "wires": []
+ },
+ {
+ "id": "5abdf37a.97301c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 973.3332710266113,
+ "y": 386.66664123535156,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "40e1d77.09f5028",
+ "type": "outcome",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 836.666576385498,
+ "y": 368.3332872390747,
+ "z": "62cfcbc6.1804e4",
+ "wires": [
+ [
+ "5abdf37a.97301c"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-delete.json
new file mode 100644
index 00000000..109bb2dc
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation-delete.json
@@ -0,0 +1,655 @@
+[
+ {
+ "id": "708d5adc.4b14a4",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$service-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 485.2381134033203,
+ "y": 314.761923789978,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "24de1645.3af2ea",
+ "d3cb3641.f27678"
+ ]
+ ]
+ },
+ {
+ "id": "24de1645.3af2ea",
+ "type": "outcome",
+ "name": "DeleteServiceInstance",
+ "xml": "<outcome value='DeleteServiceInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 722.3809280395508,
+ "y": 289.0476322174072,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "e780c482.9646b8"
+ ]
+ ]
+ },
+ {
+ "id": "d3cb3641.f27678",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 672.3808937072754,
+ "y": 334.76196002960205,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "18ac75d0.4e2baa"
+ ]
+ ]
+ },
+ {
+ "id": "e780c482.9646b8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 900.9523849487305,
+ "y": 289.04766750335693,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "18ac75d0.4e2baa",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'delete' then request-action must be 'DeleteServiceInstance'\" />\n",
+ "comments": "",
+ "x": 918.0952301025391,
+ "y": 334.761923789978,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "42440be9.04b654",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 263.80948638916016,
+ "y": 431.90471744537354,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "708d5adc.4b14a4",
+ "c64008cb.372058",
+ "8cbcdd86.4ea2d",
+ "9c98677c.c76e58",
+ "889c05be.733888",
+ "9f043d1e.49bce",
+ "d20eaf9b.6a16d",
+ "c3e8266e.658778"
+ ]
+ ]
+ },
+ {
+ "id": "c64008cb.372058",
+ "type": "switchNode",
+ "name": "switch network_length",
+ "xml": "<switch test='`$service-data.networks.network_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 486.66666412353516,
+ "y": 504.7618865966797,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "5e24f54a.aadfdc",
+ "6b934fd0.898a2",
+ "c530e391.01e37"
+ ]
+ ]
+ },
+ {
+ "id": "5e24f54a.aadfdc",
+ "type": "outcome",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 670.9523239135742,
+ "y": 463.3332452774048,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "fa7e1e62.08a81"
+ ]
+ ]
+ },
+ {
+ "id": "6b934fd0.898a2",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 669.5237350463867,
+ "y": 504.76190280914307,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "fa7e1e62.08a81"
+ ]
+ ]
+ },
+ {
+ "id": "fa7e1e62.08a81",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 818.0952491760254,
+ "y": 484.7619037628174,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "c530e391.01e37",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 669.5237846374512,
+ "y": 546.1904907226562,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "983f9e5e.6f1e4"
+ ]
+ ]
+ },
+ {
+ "id": "983f9e5e.6f1e4",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cannot delete the service because there are networks defined\" />\n",
+ "comments": "",
+ "x": 836.6666793823242,
+ "y": 544.7618789672852,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "8cbcdd86.4ea2d",
+ "type": "switchNode",
+ "name": "switch vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 475.2381057739258,
+ "y": 631.904670715332,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "1a015c38.b0cdd4",
+ "3d0c23ae.7944fc",
+ "42c177a7.fa5448"
+ ]
+ ]
+ },
+ {
+ "id": "1a015c38.b0cdd4",
+ "type": "outcome",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 668.0951614379883,
+ "y": 590.4760599136353,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "b2b3efeb.d8fc2"
+ ]
+ ]
+ },
+ {
+ "id": "3d0c23ae.7944fc",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 666.6665725708008,
+ "y": 631.9047174453735,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "b2b3efeb.d8fc2"
+ ]
+ ]
+ },
+ {
+ "id": "b2b3efeb.d8fc2",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 815.2380867004395,
+ "y": 611.9047183990479,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "42c177a7.fa5448",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 666.6666221618652,
+ "y": 673.3333053588867,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "9b2891f2.0e51b"
+ ]
+ ]
+ },
+ {
+ "id": "9b2891f2.0e51b",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cannot delete the service because there are VNFs defined\" />\n",
+ "comments": "",
+ "x": 833.8095169067383,
+ "y": 671.9046936035156,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "9c98677c.c76e58",
+ "type": "set",
+ "name": "clear service-data and service-status",
+ "xml": "<set>\n<parameter name='service-data.' value='' />\n<parameter name='service-status.' value='' />\n",
+ "comments": "",
+ "x": 538.0952453613281,
+ "y": 958.095130443573,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "8ebb5ade.227d28",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 113.33336639404297,
+ "y": 84.99999237060547,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "c1ce781b.d50358"
+ ]
+ ]
+ },
+ {
+ "id": "c1ce781b.d50358",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 188.61907196044922,
+ "y": 125.23810386657715,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "25743b1c.a929d4"
+ ]
+ ]
+ },
+ {
+ "id": "25743b1c.a929d4",
+ "type": "method",
+ "name": "method service-topology-operation-delete",
+ "xml": "<method rpc='service-topology-operation-delete' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 217.76199340820312,
+ "y": 164.99998664855957,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "42440be9.04b654"
+ ]
+ ]
+ },
+ {
+ "id": "f1543edb.c8ae1",
+ "type": "comment",
+ "name": "service-topology-operation-delete",
+ "info": "",
+ "comments": "",
+ "x": 507.67822265625,
+ "y": 32.58633613586426,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "889c05be.733888",
+ "type": "switchNode",
+ "name": "switch service-data.service-topology.service-topology-identifier.service-instance-id",
+ "xml": "<switch test='`$service-data.service-topology.service-topology-identifier.service-instance-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 677.1428756713867,
+ "y": 242.85715293884277,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "1019f3dd.ec3c3c"
+ ]
+ ]
+ },
+ {
+ "id": "1019f3dd.ec3c3c",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1048.5714950561523,
+ "y": 242.85716938972473,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "a97d9d2d.ac5c1"
+ ]
+ ]
+ },
+ {
+ "id": "9f043d1e.49bce",
+ "type": "switchNode",
+ "name": "switch service-data.service-level-oper-status.order-status",
+ "xml": "<switch test='`$service-data.service-level-oper-status.order-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 597.1428680419922,
+ "y": 398.57144355773926,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "d2aec0fb.6eb24",
+ "d6b45bcb.26da28"
+ ]
+ ]
+ },
+ {
+ "id": "d2aec0fb.6eb24",
+ "type": "outcome",
+ "name": "PendingDelete",
+ "xml": "<outcome value='PendingDelete'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 918.5714285714284,
+ "y": 382.85714285714283,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "93e133c9.0b965"
+ ]
+ ]
+ },
+ {
+ "id": "d6b45bcb.26da28",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 892.8571357727051,
+ "y": 427.14287185668945,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "929eab0f.dcf048"
+ ]
+ ]
+ },
+ {
+ "id": "929eab0f.dcf048",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Order status is ' + $service-data.service-level-oper-status.order-status\n + ' but must be PendingDelete'`\" />\n",
+ "comments": "",
+ "x": 1092.857177734375,
+ "y": 425.71429443359375,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "93e133c9.0b965",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1095.71435546875,
+ "y": 381.4285888671875,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d20eaf9b.6a16d",
+ "type": "switchNode",
+ "name": "switch provided-allotted-resource length",
+ "xml": "<switch test='`$service-data.provided-allotted-resources.provided-allotted-resource_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 541.6666870117188,
+ "y": 758.3332624435425,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "f2b5411.bb824c",
+ "feaed589.3e9658",
+ "55f0e2d1.bcd42c"
+ ]
+ ]
+ },
+ {
+ "id": "f2b5411.bb824c",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 783.333179473877,
+ "y": 758.3332424163818,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "c7e318df.48c538"
+ ]
+ ]
+ },
+ {
+ "id": "feaed589.3e9658",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 783.3332023620605,
+ "y": 799.9999504089355,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "b72c1478.7fe018"
+ ]
+ ]
+ },
+ {
+ "id": "b72c1478.7fe018",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cannot deactivate this service because there are provided allotted resources\" />\n",
+ "comments": "",
+ "x": 931.6666030883789,
+ "y": 799.999870300293,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "c7e318df.48c538",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 913.3332061767578,
+ "y": 736.6666164398193,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "c3e8266e.658778",
+ "type": "switchNode",
+ "name": "switch consumed-allotted-resource length",
+ "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 546.6666564941406,
+ "y": 881.666600227356,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "b525f07c.00458",
+ "98609590.b62e08",
+ "a7d2b5a5.d54a78"
+ ]
+ ]
+ },
+ {
+ "id": "b525f07c.00458",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 781.6664962768555,
+ "y": 881.666579246521,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "138caece.68dc91"
+ ]
+ ]
+ },
+ {
+ "id": "98609590.b62e08",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 781.6665344238281,
+ "y": 921.6666011810303,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "46ef5f07.ba5fb"
+ ]
+ ]
+ },
+ {
+ "id": "46ef5f07.ba5fb",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cannot deactivate this service because there are consumed allotted resources\" />\n",
+ "comments": "",
+ "x": 931.6665420532227,
+ "y": 923.3331871032715,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ },
+ {
+ "id": "138caece.68dc91",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 909.9998321533203,
+ "y": 858.3332653045654,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "55f0e2d1.bcd42c",
+ "type": "outcome",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 784.9999389648438,
+ "y": 716.6666259765625,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "c7e318df.48c538"
+ ]
+ ]
+ },
+ {
+ "id": "a7d2b5a5.d54a78",
+ "type": "outcome",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 783.3332405090332,
+ "y": 841.6666393280029,
+ "z": "2b8c09cd.8f7676",
+ "wires": [
+ [
+ "138caece.68dc91"
+ ]
+ ]
+ },
+ {
+ "id": "a97d9d2d.ac5c1",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"`'Service ' + $service-topology-operation-input.service-information.service-instance-id + ' is not found'`\" />\n",
+ "comments": "",
+ "x": 1200.0000076293945,
+ "y": 243.33331489562988,
+ "z": "2b8c09cd.8f7676",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation.json
new file mode 100644
index 00000000..d323b416
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_service-topology-operation.json
@@ -0,0 +1,252 @@
+[
+ {
+ "id": "ffcdcaf9.978378",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 110.00003814697266,
+ "y": 84.28563117980957,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "19a4815b.2d2d0f"
+ ]
+ ]
+ },
+ {
+ "id": "19a4815b.2d2d0f",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 185.2857437133789,
+ "y": 124.52374267578125,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "936b3cb3.ebe9b"
+ ]
+ ]
+ },
+ {
+ "id": "936b3cb3.ebe9b",
+ "type": "method",
+ "name": "method service-topology-operation",
+ "xml": "<method rpc='service-topology-operation' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 188.4286651611328,
+ "y": 164.28562545776367,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "ed52e81.7853818"
+ ]
+ ]
+ },
+ {
+ "id": "a6ec4b68.d62da8",
+ "type": "comment",
+ "name": "service-topology-operation",
+ "info": "",
+ "comments": "",
+ "x": 504.3448944091797,
+ "y": 31.87197494506836,
+ "z": "3794a147.f3878e",
+ "wires": []
+ },
+ {
+ "id": "ed52e81.7853818",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 184.50008392333984,
+ "y": 365.3124828338623,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "8f72acdd.c62fa",
+ "12bcf998.a7e046",
+ "b4070b55.94bb78",
+ "6af30001.5e0fe"
+ ]
+ ]
+ },
+ {
+ "id": "8f72acdd.c62fa",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 468.33333587646484,
+ "y": 540.7146196365356,
+ "z": "3794a147.f3878e",
+ "wires": []
+ },
+ {
+ "id": "b4070b55.94bb78",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 475.0475769042969,
+ "y": 417.80941009521484,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "81b85c4d.7a8e1",
+ "e6fcf5d0.16c4f8",
+ "64f4285d.b775f8",
+ "a2995c44.e9432"
+ ]
+ ]
+ },
+ {
+ "id": "81b85c4d.7a8e1",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 685.8571166992188,
+ "y": 343.09522819519043,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "5f230ac8.35fac4"
+ ]
+ ]
+ },
+ {
+ "id": "e6fcf5d0.16c4f8",
+ "type": "outcome",
+ "name": "delete",
+ "xml": "<outcome value='delete'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 685.2380981445312,
+ "y": 437.61927127838135,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "55a1c437.344cfc"
+ ]
+ ]
+ },
+ {
+ "id": "a2995c44.e9432",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 684.2856369018555,
+ "y": 486.47603607177734,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "8bf7b987.d11358"
+ ]
+ ]
+ },
+ {
+ "id": "12bcf998.a7e046",
+ "type": "set",
+ "name": "copy input to service-data",
+ "xml": "<set>\n<parameter name='service-data.sdnc-request-header.' value='`$service-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.request-information.' value='`$service-topology-operation-input.request-information.`' />\n<parameter name='service-data.service-information.' value='`$service-topology-operation-input.service-information.`' />\n<parameter name='service-data.service-request-input.' value='`$service-topology-operation-input.service-request-input.`' />\n",
+ "comments": "",
+ "x": 503.15476989746094,
+ "y": 285.5118703842163,
+ "z": "3794a147.f3878e",
+ "wires": []
+ },
+ {
+ "id": "8bf7b987.d11358",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$service-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n",
+ "comments": "",
+ "x": 860.4760818481445,
+ "y": 486.47610092163086,
+ "z": "3794a147.f3878e",
+ "wires": []
+ },
+ {
+ "id": "6af30001.5e0fe",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:validate-service-input",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-service-input' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 590.4166717529297,
+ "y": 237.33333015441895,
+ "z": "3794a147.f3878e",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "5f230ac8.35fac4",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:service-topology-operation-assign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-assign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1026.9999694824219,
+ "y": 342.6666889190674,
+ "z": "3794a147.f3878e",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1d8ee48d.69b27b",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:service-topology-operation-deactivate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-deactivate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1039.9999237060547,
+ "y": 389.6666831970215,
+ "z": "3794a147.f3878e",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "55a1c437.344cfc",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:service-topology-operation-delete",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-delete' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1028.333194732666,
+ "y": 438.333402633667,
+ "z": "3794a147.f3878e",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "64f4285d.b775f8",
+ "type": "outcome",
+ "name": "deactivate",
+ "xml": "<outcome value='deactivate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 696.6665649414062,
+ "y": 391.33335876464844,
+ "z": "3794a147.f3878e",
+ "wires": [
+ [
+ "1d8ee48d.69b27b"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-contrail-route-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-contrail-route-input.json
new file mode 100755
index 00000000..2305570b
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-contrail-route-input.json
@@ -0,0 +1 @@
+[{"id":"35266b9e.c1cf04","type":"dgstart","name":"DGSTART","outputs":1,"x":202.7777862548828,"y":205.27777099609375,"z":"b42bbd9e.9cab","wires":[["d8231d59.d0416"]]},{"id":"d8231d59.d0416","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":359.06349182128906,"y":279.51588439941406,"z":"b42bbd9e.9cab","wires":[["3b37cf29.2770b"]]},{"id":"3b37cf29.2770b","type":"method","name":"validate-contrail-route-input","xml":"<method rpc='validate-contrail-route-input' mode='sync'>\n","comments":"","outputs":1,"x":359.20641326904297,"y":341.27777099609375,"z":"b42bbd9e.9cab","wires":[["bb11dc2e.ba771"]]},{"id":"bb11dc2e.ba771","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":372.52783203125,"y":623.7212657928467,"z":"b42bbd9e.9cab","wires":[["aa4b4f9b.d66d5","a357d6d0.d1e828","d43473e3.39bf6","43b27b77.234ba4","dbabb342.08cce","c28b8276.ad796"]]},{"id":"aa4b4f9b.d66d5","type":"switchNode","name":"switch svc-request-id","xml":"<switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`'>\n","comments":"","outputs":1,"x":707.5873565673828,"y":108.37305164337158,"z":"b42bbd9e.9cab","wires":[["3094a18d.2341ce"]]},{"id":"3094a18d.2341ce","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":937.3016417367116,"y":106.37304837363081,"z":"b42bbd9e.9cab","wires":[["3d7d8e8e.e7a2e2"]]},{"id":"3d7d8e8e.e7a2e2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n","comments":"","x":1088.7302077157156,"y":106.37304646628218,"z":"b42bbd9e.9cab","wires":[]},{"id":"a357d6d0.d1e828","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":700.1586990356445,"y":64.94446277618408,"z":"b42bbd9e.9cab","wires":[["aa49fe92.cd19a"]]},{"id":"aa49fe92.cd19a","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":935.8730621337891,"y":63.51587390899658,"z":"b42bbd9e.9cab","wires":[["8fc24fab.a40e7"]]},{"id":"8fc24fab.a40e7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n","comments":"","x":1085.8730354309082,"y":63.515883445739746,"z":"b42bbd9e.9cab","wires":[]},{"id":"d43473e3.39bf6","type":"switchNode","name":"switch request-action","xml":"<switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":710.1587524414062,"y":157.23019981384277,"z":"b42bbd9e.9cab","wires":[["57e78919.ef0688","f69fee2.01a8c1","63c630c0.7b3d4","b809f5ff.bb3ad8"]]},{"id":"57e78919.ef0688","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":941.8730659484863,"y":256.08739280700684,"z":"b42bbd9e.9cab","wires":[["ca244a95.514758"]]},{"id":"ca244a95.514758","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n","comments":"","x":1113.3015060424805,"y":256.0873918533325,"z":"b42bbd9e.9cab","wires":[]},{"id":"89209f0f.b42ea","type":"comment","name":"validate-alloted-resource-input - CHANGELOG","info":"3/22: Initial release 2.0.0","comments":"","x":215.7777862548828,"y":109.27777099609375,"z":"b42bbd9e.9cab","wires":[]},{"id":"43b27b77.234ba4","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":604.1111145019531,"y":625.944411277771,"z":"b42bbd9e.9cab","wires":[["b241564a.80dee8","13332075.a90e5","5c11ee06.80d44","e1547517.5bdd98","4c19740c.db392c","897a0281.ce1ee"]]},{"id":"b241564a.80dee8","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":873.4921493530273,"y":464.8492374420166,"z":"b42bbd9e.9cab","wires":[["167db0e.a9d9b4f"]]},{"id":"13332075.a90e5","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":893.7777557373047,"y":652.2778015136719,"z":"b42bbd9e.9cab","wires":[["fa98c4a3.48c008"]]},{"id":"5c11ee06.80d44","type":"other","name":"deactivate","xml":"<outcome value='deactivate'>","comments":"","outputs":1,"x":900.7777557373047,"y":742.2778015136719,"z":"b42bbd9e.9cab","wires":[["e8ed620e.34218"]]},{"id":"167db0e.a9d9b4f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1030.7777862548828,"y":467.6111469268799,"z":"b42bbd9e.9cab","wires":[["9230ea14.806408"]]},{"id":"9230ea14.806408","type":"switchNode","name":"switch request-action","xml":"<switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1237.4444198608398,"y":467.6111354827881,"z":"b42bbd9e.9cab","wires":[["61434823.60b248","2f5e13cc.428ddc"]]},{"id":"61434823.60b248","type":"other","name":"CreateContrailRouteInstance","xml":"<outcome value='CreateContrailRouteInstance'>","comments":"","outputs":1,"x":1585.3015899658203,"y":394.7540102005005,"z":"b42bbd9e.9cab","wires":[["10dadd6a.d1a0d3"]]},{"id":"2f5e13cc.428ddc","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1524.7777671813965,"y":461.6111640930176,"z":"b42bbd9e.9cab","wires":[["d7368e17.11a7b"]]},{"id":"d7368e17.11a7b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be CreateContrailRouteInstance for svc-action=assign\" />\n","comments":"","x":1672.1111106872559,"y":461.6111831665039,"z":"b42bbd9e.9cab","wires":[]},{"id":"fa98c4a3.48c008","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1067.7777557373047,"y":652.2778015136719,"z":"b42bbd9e.9cab","wires":[["39112fa6.850cd"]]},{"id":"39112fa6.850cd","type":"switchNode","name":"switch request-action","xml":"<switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1284.7777557373047,"y":652.2778015136719,"z":"b42bbd9e.9cab","wires":[["a46c6029.9eecb","80369920.1e1528"]]},{"id":"a46c6029.9eecb","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1508.7777557373047,"y":693.2778015136719,"z":"b42bbd9e.9cab","wires":[["87417d62.3c22"]]},{"id":"87417d62.3c22","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be CreateContrailRouteInstance for svc-action=activate\" />\n","comments":"","x":1677.7777557373047,"y":693.2778015136719,"z":"b42bbd9e.9cab","wires":[]},{"id":"e8ed620e.34218","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1082.7777557373047,"y":741.2778015136719,"z":"b42bbd9e.9cab","wires":[["7f72c3c8.8a71dc"]]},{"id":"7f72c3c8.8a71dc","type":"switchNode","name":"switch request-action","xml":"<switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1299.7777557373047,"y":741.2778015136719,"z":"b42bbd9e.9cab","wires":[["96b39e05.6b30d","baf7a6c3.22b2b8"]]},{"id":"96b39e05.6b30d","type":"other","name":"DeleteContrailRouteInstance","xml":"<outcome value='DeleteContrailRouteInstance'>","comments":"","outputs":1,"x":1582.4442901611328,"y":740.6111879348755,"z":"b42bbd9e.9cab","wires":[["89e918a.16dc8e8"]]},{"id":"baf7a6c3.22b2b8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1523.7777557373047,"y":782.2778015136719,"z":"b42bbd9e.9cab","wires":[["e25c9a86.2130e8"]]},{"id":"e25c9a86.2130e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be DeleteContrailRouteInstance for svc-action=deactivate\" />\n","comments":"","x":1692.7777557373047,"y":782.2778015136719,"z":"b42bbd9e.9cab","wires":[]},{"id":"e1547517.5bdd98","type":"other","name":"unassign","xml":"<outcome value='unassign'>","comments":"","outputs":1,"x":881.7776184082031,"y":909.6111288070679,"z":"b42bbd9e.9cab","wires":[["25d3342e.bf055c"]]},{"id":"25d3342e.bf055c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1063.7776489257812,"y":905.6111516952515,"z":"b42bbd9e.9cab","wires":[["4096d7e5.754058"]]},{"id":"4096d7e5.754058","type":"switchNode","name":"switch request-action","xml":"<switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1280.7776489257812,"y":905.6111516952515,"z":"b42bbd9e.9cab","wires":[["7977bc3b.695434","4cf8061.e28dff8"]]},{"id":"7977bc3b.695434","type":"other","name":"DeleteContrailRouteInstance","xml":"<outcome value='DeleteContrailRouteInstance'>","comments":"","outputs":1,"x":1561.7775192260742,"y":906.6111688613892,"z":"b42bbd9e.9cab","wires":[["a46d071e.eae668"]]},{"id":"4cf8061.e28dff8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1504.7776489257812,"y":946.6111516952515,"z":"b42bbd9e.9cab","wires":[["ebab16c5.c33a78"]]},{"id":"ebab16c5.c33a78","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be DeleteContrailRouteInstance for svc-action=unassign\" />\n","comments":"","x":1673.7776489257812,"y":946.6111516952515,"z":"b42bbd9e.9cab","wires":[]},{"id":"10dadd6a.d1a0d3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1831.3015403747559,"y":393.7539978027344,"z":"b42bbd9e.9cab","wires":[["8353a7c2.7d6ba8","3697eb9e.353964","4b1f2e92.74dfd","d06491a2.0b602","344f0df1.0efab2","6b07cbd7.0e7d04","e5f84df2.f1e94","2032eb88.550194","aa2cdb28.13b088"]]},{"id":"d15b9d66.afba","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1790.7777557373047,"y":653.2778015136719,"z":"b42bbd9e.9cab","wires":[["d06491a2.0b602","6b07cbd7.0e7d04"]]},{"id":"89e918a.16dc8e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1836.7777557373047,"y":743.2778015136719,"z":"b42bbd9e.9cab","wires":[["d06491a2.0b602","6b07cbd7.0e7d04"]]},{"id":"a46d071e.eae668","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1820.7776489257812,"y":907.6111516952515,"z":"b42bbd9e.9cab","wires":[["d06491a2.0b602"]]},{"id":"8353a7c2.7d6ba8","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`'>\n","comments":"","outputs":1,"x":2229.063278198242,"y":263.9920644760132,"z":"b42bbd9e.9cab","wires":[["aa3ce30.606892"]]},{"id":"aa3ce30.606892","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2455.063335418701,"y":262.1349468231201,"z":"b42bbd9e.9cab","wires":[["d5826697.16cc88"]]},{"id":"d5826697.16cc88","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id is a required input\" />\n","comments":"","x":2622.9203872680664,"y":262.1349210739136,"z":"b42bbd9e.9cab","wires":[]},{"id":"4b1f2e92.74dfd","type":"switchNode","name":"switch ecomp-model-information.model-customization-uuid","xml":"<switch test='`$contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`'>\n","comments":"","outputs":1,"x":2301.6351318359375,"y":190.27785205841064,"z":"b42bbd9e.9cab","wires":[["d1cbbe07.cc9e3"]]},{"id":"d1cbbe07.cc9e3","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2595.635040283203,"y":191.27779293060303,"z":"b42bbd9e.9cab","wires":[["5ffa0f1.a317af"]]},{"id":"5ffa0f1.a317af","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"contrail-route-information.ecomp-model-information.model-customization-uuid is a required input\" />\n","comments":"","x":2743.063507080078,"y":191.27779293060303,"z":"b42bbd9e.9cab","wires":[]},{"id":"dbabb342.08cce","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":666.2777404785156,"y":1056.7777633666992,"z":"b42bbd9e.9cab","wires":[]},{"id":"93757aef.15f468","type":"comment","name":"validate service-information.ecomp-model-information.model0uuid is in service table","info":"","comments":"","x":2369.496368408203,"y":484.91669940948486,"z":"b42bbd9e.9cab","wires":[]},{"id":"3697eb9e.353964","type":"get-resource","name":"get-resource AR_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from ALLOTTED_RESOURCE_MODEL WHERE customization_uuid = $contrail-route-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid'\n pfx='ar-model'>\n\n","comments":"","outputs":1,"x":2202.413101196289,"y":527.6428871154785,"z":"b42bbd9e.9cab","wires":[["81c17c72.98f07","5ee9c459.84ea3c"]]},{"id":"fe930095.bdfb1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":2659.4962844848633,"y":508.3094844818115,"z":"b42bbd9e.9cab","wires":[]},{"id":"81c17c72.98f07","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2460.746364593506,"y":503.6667003631592,"z":"b42bbd9e.9cab","wires":[["fe930095.bdfb1"]]},{"id":"5ee9c459.84ea3c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2454.496364593506,"y":536.1667003631592,"z":"b42bbd9e.9cab","wires":[["fe930095.bdfb1"]]},{"id":"f69fee2.01a8c1","type":"other","name":"CreateContrailRouteInstance","xml":"<outcome value='CreateContrailRouteInstance'>","comments":"","outputs":1,"x":1005.8254241943359,"y":142.8968276977539,"z":"b42bbd9e.9cab","wires":[["f0bb52f0.17e47"]]},{"id":"63c630c0.7b3d4","type":"other","name":"DeleteContrailRouteInstance","xml":"<outcome value='DeleteContrailRouteInstance'>","comments":"","outputs":1,"x":1006.1110687255859,"y":180.32544708251953,"z":"b42bbd9e.9cab","wires":[["f0bb52f0.17e47"]]},{"id":"b809f5ff.bb3ad8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":945.6825752258301,"y":296.468297958374,"z":"b42bbd9e.9cab","wires":[["30198bb7.e55ef4"]]},{"id":"30198bb7.e55ef4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid request-information.request-action \" />\n","comments":"","x":1117.1109809875488,"y":297.4683132171631,"z":"b42bbd9e.9cab","wires":[]},{"id":"c28b8276.ad796","type":"switchNode","name":"switch service-instance-id","xml":"<switch test='`$contrail-route-topology-operation-input.service-information.service-instance-id`'>\n","comments":"","outputs":1,"x":707.2063446044922,"y":337.1349639892578,"z":"b42bbd9e.9cab","wires":[["9b3d73ec.0eef6"]]},{"id":"9b3d73ec.0eef6","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":923.6349334716797,"y":338.1349639892578,"z":"b42bbd9e.9cab","wires":[["64812692.977708"]]},{"id":"64812692.977708","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-instance-id is a required input\" />\n","comments":"","x":1082.063461303711,"y":337.1349639892578,"z":"b42bbd9e.9cab","wires":[]},{"id":"4c19740c.db392c","type":"other","name":"create","xml":"<outcome value='create'>","comments":"","outputs":1,"x":880.5555000305176,"y":550.1851797103882,"z":"b42bbd9e.9cab","wires":[["81ff7e79.12005"]]},{"id":"81ff7e79.12005","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1041.1744995117188,"y":549.6137495040894,"z":"b42bbd9e.9cab","wires":[["87874560.8aa258"]]},{"id":"87874560.8aa258","type":"switchNode","name":"switch request-action","xml":"<switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1261.1744995117188,"y":549.6137495040894,"z":"b42bbd9e.9cab","wires":[["90eb84df.b09858","c5d024ea.750c08"]]},{"id":"90eb84df.b09858","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1518.5079936981201,"y":553.6138019561768,"z":"b42bbd9e.9cab","wires":[["cddf826d.b9fc1"]]},{"id":"cddf826d.b9fc1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be CreateNetworkInstance for svc-action=create\" />\n","comments":"","x":1684.1744995117188,"y":553.61376953125,"z":"b42bbd9e.9cab","wires":[]},{"id":"c5d024ea.750c08","type":"other","name":"CreateContrailRouteInstance","xml":"<outcome value='CreateContrailRouteInstance'>","comments":"","outputs":1,"x":1590.555419921875,"y":518.5184936523438,"z":"b42bbd9e.9cab","wires":[["b77bfd7b.7219"]]},{"id":"b77bfd7b.7219","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1826.555419921875,"y":517.5184936523438,"z":"b42bbd9e.9cab","wires":[["d06491a2.0b602","6b07cbd7.0e7d04"]]},{"id":"80369920.1e1528","type":"other","name":"CreateContrailRouteInstance","xml":"<outcome value='CreateContrailRouteInstance'>","comments":"","outputs":1,"x":1575.555419921875,"y":653.5184936523438,"z":"b42bbd9e.9cab","wires":[["d15b9d66.afba"]]},{"id":"897a0281.ce1ee","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":893.8888702392578,"y":826.8517656326294,"z":"b42bbd9e.9cab","wires":[["f3f463d2.77152"]]},{"id":"f3f463d2.77152","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1075.888900756836,"y":822.851788520813,"z":"b42bbd9e.9cab","wires":[["62f5a00e.aa5da"]]},{"id":"62f5a00e.aa5da","type":"switchNode","name":"switch request-action","xml":"<switch test='`$contrail-route-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1292.888900756836,"y":822.851788520813,"z":"b42bbd9e.9cab","wires":[["63c7e61e.93d818","1d99e0e.0795e1f"]]},{"id":"63c7e61e.93d818","type":"other","name":"DeleteContrailRouteInstance","xml":"<outcome value='DeleteContrailRouteInstance'>","comments":"","outputs":1,"x":1573.888771057129,"y":823.8518056869507,"z":"b42bbd9e.9cab","wires":[["59164fba.8b1df"]]},{"id":"1d99e0e.0795e1f","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1516.888900756836,"y":863.851788520813,"z":"b42bbd9e.9cab","wires":[["bad4ddd2.41bde"]]},{"id":"bad4ddd2.41bde","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be DeleteContrailRouteInstance for svc-action=delete\" />\n","comments":"","x":1685.888900756836,"y":863.851788520813,"z":"b42bbd9e.9cab","wires":[]},{"id":"59164fba.8b1df","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1832.888900756836,"y":824.851788520813,"z":"b42bbd9e.9cab","wires":[["d06491a2.0b602","6b07cbd7.0e7d04"]]},{"id":"f0bb52f0.17e47","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1222.2221794128418,"y":174.22221088409424,"z":"b42bbd9e.9cab","wires":[[]]},{"id":"d06491a2.0b602","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\n","comments":"","outputs":1,"x":2203.5715942382812,"y":37.81745147705078,"z":"b42bbd9e.9cab","wires":[["6091bbb5.92fcb4"]]},{"id":"6091bbb5.92fcb4","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2404.107276916504,"y":36.38887977600098,"z":"b42bbd9e.9cab","wires":[["ab33d03a.508ae"]]},{"id":"ab33d03a.508ae","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"allotted-resource-information.allotted-resource-id is a required input\" />\n","comments":"","x":2555.535743713379,"y":35.38887977600098,"z":"b42bbd9e.9cab","wires":[]},{"id":"344f0df1.0efab2","type":"switchNode","name":"switch allotted-resource-type","xml":"<switch test='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`'>\n","comments":"","outputs":1,"x":2210.0001373291016,"y":73.01586723327637,"z":"b42bbd9e.9cab","wires":[["a58be7c1.0caec8"]]},{"id":"a58be7c1.0caec8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2410.5356826782227,"y":71.5872974395752,"z":"b42bbd9e.9cab","wires":[["fcfba520.ba2978"]]},{"id":"fcfba520.ba2978","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"allotted-resource-information.allotted-resource-type is a required input\" />\n","comments":"","x":2561.9641494750977,"y":70.5872974395752,"z":"b42bbd9e.9cab","wires":[]},{"id":"6b07cbd7.0e7d04","type":"switchNode","name":"switch parent-service-instance-id","xml":"<switch test='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>\n","comments":"","outputs":1,"x":2222.8573837280273,"y":108.73015213012695,"z":"b42bbd9e.9cab","wires":[["b1db037c.92b1"]]},{"id":"b1db037c.92b1","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2438.571533203125,"y":105.87300872802734,"z":"b42bbd9e.9cab","wires":[["9de46686.383798"]]},{"id":"9de46686.383798","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"allotted-resource-information.parent-service-instance-id is a required input\" />\n","comments":"","x":2590,"y":104.87300872802734,"z":"b42bbd9e.9cab","wires":[]},{"id":"e5f84df2.f1e94","type":"switchNode","name":"switch source-network.network-role","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-role`'>\n","comments":"","outputs":1,"x":2232.5394897460938,"y":303.5872793197632,"z":"b42bbd9e.9cab","wires":[["b6f894c7.bdf1d8"]]},{"id":"b6f894c7.bdf1d8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2461.396903991699,"y":298.3015818595886,"z":"b42bbd9e.9cab","wires":[["d18a5c04.9d4c5"]]},{"id":"d18a5c04.9d4c5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-role is a required input\" />\n","comments":"","x":2626.3970489501953,"y":298.3015422821045,"z":"b42bbd9e.9cab","wires":[]},{"id":"2032eb88.550194","type":"switchNode","name":"switch dest-network.network-role","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-role`'>\n","comments":"","outputs":1,"x":2226.4446754455566,"y":336.46821308135986,"z":"b42bbd9e.9cab","wires":[["96119098.5cd1d"]]},{"id":"96119098.5cd1d","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2461.4448280334473,"y":336.46821689605713,"z":"b42bbd9e.9cab","wires":[["c91e6a99.23dd98"]]},{"id":"c91e6a99.23dd98","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"contrail-topology-operation-input.contrail-route-request-input.dest-network.network-role is a required input\" />\n","comments":"","x":2627.8732948303223,"y":336.468186378479,"z":"b42bbd9e.9cab","wires":[]},{"id":"aa2cdb28.13b088","type":"switchNode","name":"switch contrail-applied-service-information.service-instance-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.service-instance-id`'>\n","comments":"","outputs":1,"x":2311.111152648926,"y":401.58727073669434,"z":"b42bbd9e.9cab","wires":[["3cf17aee.5329a6"]]},{"id":"3cf17aee.5329a6","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2623.2542304992676,"y":401.3015937805176,"z":"b42bbd9e.9cab","wires":[["ed461440.88de78"]]},{"id":"ed461440.88de78","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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\" />\n","comments":"","x":2778.254253387451,"y":401.5872268676758,"z":"b42bbd9e.9cab","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-network-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-network-input.json
new file mode 100644
index 00000000..d9100197
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-network-input.json
@@ -0,0 +1 @@
+[{"id":"6ab127d7.3e57c8","type":"dgstart","name":"DGSTART","outputs":1,"x":172.85714721679688,"y":85.71428680419922,"z":"41a5a817.3d5648","wires":[["4c59a442.f4cf4c"]]},{"id":"4c59a442.f4cf4c","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":245.14285278320312,"y":137.95240020751953,"z":"41a5a817.3d5648","wires":[["f4dd0024.4a75d"]]},{"id":"f4dd0024.4a75d","type":"method","name":"validate-network-input","xml":"<method rpc='validate-network-input' mode='sync'>\n","comments":"","outputs":1,"x":245.28577423095703,"y":199.71428680419922,"z":"41a5a817.3d5648","wires":[["6b1e8286.76d08c"]]},{"id":"6b1e8286.76d08c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":258.60719299316406,"y":482.15778160095215,"z":"41a5a817.3d5648","wires":[["d7d522c6.c47a1","ef3da6ff.fcb4c8","d770503.09738b","49787de8.d52cc4","4dc7f80.27c8508","9e606dc6.bb62"]]},{"id":"d7d522c6.c47a1","type":"switchNode","name":"switch svc-request-id","xml":"<switch test='`$network-topology-operation-input.sdnc-request-header.svc-request-id`'>\n","comments":"","outputs":1,"x":575.0000076293945,"y":208.14287757873535,"z":"41a5a817.3d5648","wires":[["eda00305.af8c6"]]},{"id":"eda00305.af8c6","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":800.7143118722097,"y":208.14288003104048,"z":"41a5a817.3d5648","wires":[["5fa7cf6c.c6e4f"]]},{"id":"5fa7cf6c.c6e4f","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n","comments":"","x":952.1428778512136,"y":208.14287812369184,"z":"41a5a817.3d5648","wires":[]},{"id":"ef3da6ff.fcb4c8","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":563.5713806152344,"y":166.71430778503418,"z":"41a5a817.3d5648","wires":[["d3c980b5.f4f9d"]]},{"id":"d3c980b5.f4f9d","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":799.2857322692871,"y":165.28570556640625,"z":"41a5a817.3d5648","wires":[["60f3d2b2.8b6fec"]]},{"id":"60f3d2b2.8b6fec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n","comments":"","x":949.2857055664062,"y":165.2857151031494,"z":"41a5a817.3d5648","wires":[]},{"id":"d770503.09738b","type":"switchNode","name":"switch request-action","xml":"<switch test='`$network-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":573.571418762207,"y":251.00002479553223,"z":"41a5a817.3d5648","wires":[["642ffc6d.edb964"]]},{"id":"642ffc6d.edb964","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":800.7143075125559,"y":251.0000337873189,"z":"41a5a817.3d5648","wires":[["d98a3d01.69dd1"]]},{"id":"d98a3d01.69dd1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n","comments":"","x":952.1428734915598,"y":251.00003187997027,"z":"41a5a817.3d5648","wires":[]},{"id":"49787de8.d52cc4","type":"switchNode","name":"switch service-instance-id","xml":"<switch test='`$network-topology-operation-input.service-information.service-instance-id`'>\n","comments":"","outputs":1,"x":582.7143249511719,"y":293.7142868041992,"z":"41a5a817.3d5648","wires":[["e35572e4.683a8"]]},{"id":"e35572e4.683a8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":799.1429138183594,"y":294.7142868041992,"z":"41a5a817.3d5648","wires":[["18765702.c192b9"]]},{"id":"18765702.c192b9","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-instance-id is a required input\" />\n","comments":"","x":957.5714416503906,"y":293.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"5cdaef51.cf01","type":"comment","name":"validate-network-input - CHANGELOG","info":"12/8: Initial release 1.0.0","comments":"","x":457.8571472167969,"y":49.71428680419922,"z":"41a5a817.3d5648","wires":[]},{"id":"4dc7f80.27c8508","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":559.8571472167969,"y":380.7142868041992,"z":"41a5a817.3d5648","wires":[["ab840805.c88aa8","7698d514.9e9e2c","9c038218.279e2","8a5331f6.7fc97"]]},{"id":"ab840805.c88aa8","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":792.5715026855469,"y":386.2856979370117,"z":"41a5a817.3d5648","wires":[["181f85f2.59fb4a"]]},{"id":"7698d514.9e9e2c","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":797.8571472167969,"y":443.7142868041992,"z":"41a5a817.3d5648","wires":[["d7064d3a.59a01"]]},{"id":"9c038218.279e2","type":"other","name":"deactivate","xml":"<outcome value='deactivate'>","comments":"","outputs":1,"x":804.8571472167969,"y":533.7142868041992,"z":"41a5a817.3d5648","wires":[["c401091a.c37a98"]]},{"id":"181f85f2.59fb4a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":954.8571472167969,"y":385.7142868041992,"z":"41a5a817.3d5648","wires":[["9bede249.ab53a"]]},{"id":"9bede249.ab53a","type":"switchNode","name":"switch request-action","xml":"<switch test='`$network-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1174.8571472167969,"y":385.7142868041992,"z":"41a5a817.3d5648","wires":[["a2e85843.a5abb8","d66ddc9c.2a644"]]},{"id":"a2e85843.a5abb8","type":"other","name":"CreateNetworkInstance","xml":"<outcome value='CreateNetworkInstance'>","comments":"","outputs":1,"x":1454.8571472167969,"y":350.7142868041992,"z":"41a5a817.3d5648","wires":[["3038a703.535d38"]]},{"id":"d66ddc9c.2a644","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1403.8571472167969,"y":394.7142868041992,"z":"41a5a817.3d5648","wires":[["f2b15bb.3c848a8"]]},{"id":"f2b15bb.3c848a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be CreateNetworkInstance for svc-action=assign\" />\n","comments":"","x":1572.8571472167969,"y":394.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"d7064d3a.59a01","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":971.8571472167969,"y":443.7142868041992,"z":"41a5a817.3d5648","wires":[["34fe96d4.b2500a"]]},{"id":"34fe96d4.b2500a","type":"switchNode","name":"switch request-action","xml":"<switch test='`$network-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1188.8571472167969,"y":443.7142868041992,"z":"41a5a817.3d5648","wires":[["c4a51e3e.a25db","8bdfe41b.6d4f88"]]},{"id":"c4a51e3e.a25db","type":"other","name":"CreateNetworkInstance","xml":"<outcome value='CreateNetworkInstance'>","comments":"","outputs":1,"x":1469.8571472167969,"y":444.7142868041992,"z":"41a5a817.3d5648","wires":[["246b8ff9.bce8"]]},{"id":"8bdfe41b.6d4f88","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1412.8571472167969,"y":484.7142868041992,"z":"41a5a817.3d5648","wires":[["bc9c621d.3e2ae"]]},{"id":"bc9c621d.3e2ae","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be CreateNetworkInstance for svc-action=activate\" />\n","comments":"","x":1584.714443206787,"y":486.1428928375244,"z":"41a5a817.3d5648","wires":[]},{"id":"c401091a.c37a98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":986.8571472167969,"y":532.7142868041992,"z":"41a5a817.3d5648","wires":[["a1a63bd0.1ec5a8"]]},{"id":"a1a63bd0.1ec5a8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$network-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1203.8571472167969,"y":532.7142868041992,"z":"41a5a817.3d5648","wires":[["75f3214d.9e77d","21bf838c.09f3ec"]]},{"id":"75f3214d.9e77d","type":"other","name":"DeleteNetworkInstance","xml":"<outcome value='DeleteNetworkInstance'>","comments":"","outputs":1,"x":1484.8571472167969,"y":533.7142868041992,"z":"41a5a817.3d5648","wires":[["5a3b4e49.08f33"]]},{"id":"21bf838c.09f3ec","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1427.8571472167969,"y":573.7142868041992,"z":"41a5a817.3d5648","wires":[["a50b5c0e.432a7"]]},{"id":"a50b5c0e.432a7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be DeleteNetworkInstance for svc-action=deactivate\" />\n","comments":"","x":1596.8572120666504,"y":576.5714483261108,"z":"41a5a817.3d5648","wires":[]},{"id":"8a5331f6.7fc97","type":"other","name":"unassign","xml":"<outcome value='unassign'>","comments":"","outputs":1,"x":800.8571166992188,"y":627.7142639160156,"z":"41a5a817.3d5648","wires":[["3a283b63.0312d4"]]},{"id":"3a283b63.0312d4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":982.8571472167969,"y":623.7142868041992,"z":"41a5a817.3d5648","wires":[["acd7d9f1.6d5088"]]},{"id":"acd7d9f1.6d5088","type":"switchNode","name":"switch request-action","xml":"<switch test='`$network-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1199.8571472167969,"y":623.7142868041992,"z":"41a5a817.3d5648","wires":[["32330185.59cdce","3c3df1cc.6cec8e"]]},{"id":"32330185.59cdce","type":"other","name":"DeleteNetworkInstance","xml":"<outcome value='DeleteNetworkInstance'>","comments":"","outputs":1,"x":1480.8571472167969,"y":624.7142868041992,"z":"41a5a817.3d5648","wires":[["d66e133d.3bb22"]]},{"id":"3c3df1cc.6cec8e","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1423.8571472167969,"y":664.7142868041992,"z":"41a5a817.3d5648","wires":[["778da03.f91686"]]},{"id":"778da03.f91686","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is required to be DeleteNetworkInstance for svc-action=unassign\" />\n","comments":"","x":1592.8571472167969,"y":664.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"3038a703.535d38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1690.8571472167969,"y":349.7142868041992,"z":"41a5a817.3d5648","wires":[["c765164c.9eace8","11185b8d.68e464","d22c5621.e7ed08","53430aac.e9f274","8953c98c.1fc098","b1716261.5a723","2999af64.a7a08"]]},{"id":"246b8ff9.bce8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1694.8571472167969,"y":444.7142868041992,"z":"41a5a817.3d5648","wires":[["5011a400.db0fec","c765164c.9eace8","11185b8d.68e464","d22c5621.e7ed08","53430aac.e9f274","b1716261.5a723","2999af64.a7a08"]]},{"id":"5a3b4e49.08f33","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1740.8571472167969,"y":534.7142868041992,"z":"41a5a817.3d5648","wires":[["5011a400.db0fec"]]},{"id":"d66e133d.3bb22","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1739.8571472167969,"y":625.7142868041992,"z":"41a5a817.3d5648","wires":[["5011a400.db0fec"]]},{"id":"2999af64.a7a08","type":"switchNode","name":"switch ecomp-model-information.model-uuid","xml":"<switch test='`$network-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":2327.523811340332,"y":1073.714238166809,"z":"41a5a817.3d5648","wires":[["da26908.26dc67","7dd72bf4.535174"]]},{"id":"5011a400.db0fec","type":"switchNode","name":"switch network-information.network-id","xml":"<switch test='`$network-topology-operation-input.network-information.network-id`'>\n","comments":"","outputs":1,"x":2299.8569946289062,"y":592.3809604644775,"z":"41a5a817.3d5648","wires":[["da2e5662.90bf18"]]},{"id":"da2e5662.90bf18","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2528.571319580078,"y":594.3809604644775,"z":"41a5a817.3d5648","wires":[["46bc6888.3cf728"]]},{"id":"46bc6888.3cf728","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.network-information.network-id is a required input\" />\n","comments":"","x":2692.9999389648438,"y":592.3809604644775,"z":"41a5a817.3d5648","wires":[]},{"id":"7432549d.7b029c","type":"comment","name":"validations - required for all","info":"","comments":"","x":590.8571472167969,"y":123.71428680419922,"z":"41a5a817.3d5648","wires":[]},{"id":"6149c7a0.9e2508","type":"comment","name":"validations specific per svc-action","info":"","comments":"","x":602.8571472167969,"y":338.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"507daba4.f33a84","type":"comment","name":"network-request-information block validations","info":"","comments":"","x":2330.857147216797,"y":925.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"c765164c.9eace8","type":"switchNode","name":"switch network-request-information.tenant","xml":"<switch test='`$network-topology-operation-input.network-request-input.tenant`'>\n","comments":"","outputs":1,"x":2327.857147216797,"y":975.7142868041992,"z":"41a5a817.3d5648","wires":[["1a5fa5c7.b0d18a"]]},{"id":"1a5fa5c7.b0d18a","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2569.571502685547,"y":977.7142868041992,"z":"41a5a817.3d5648","wires":[["f027f546.8a9e68"]]},{"id":"f027f546.8a9e68","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-request-input.tenant is a required input\" />\n","comments":"","x":2721.0000915527344,"y":975.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"11185b8d.68e464","type":"switchNode","name":"switch network-request-information.aic-cloud-region","xml":"<switch test='`$network-topology-operation-input.network-request-input.aic-cloud-region`'>\n","comments":"","outputs":1,"x":2356.857147216797,"y":1018.7142868041992,"z":"41a5a817.3d5648","wires":[["7c6634cb.2fe02c"]]},{"id":"7c6634cb.2fe02c","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2618.571502685547,"y":1018.7142868041992,"z":"41a5a817.3d5648","wires":[["5b96c621.a931a8"]]},{"id":"5b96c621.a931a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.network-request-information.aic-cloud-region is a required input\" />\n","comments":"","x":2782.999969482422,"y":1017.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"d22c5621.e7ed08","type":"switchNode","name":"switch ecomp-model-information.model-invariant-uuid","xml":"<switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":2346.857208251953,"y":769.7143230438232,"z":"41a5a817.3d5648","wires":[["ffe55e64.cc6e"]]},{"id":"ffe55e64.cc6e","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2631.8572692871094,"y":768.7143173217773,"z":"41a5a817.3d5648","wires":[["5ca74dcc.f22ac4"]]},{"id":"5ca74dcc.f22ac4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-information.ecomp-model-information.model-invariant-uuid is a required input\" />\n","comments":"","x":2783.2857360839844,"y":767.7143173217773,"z":"41a5a817.3d5648","wires":[]},{"id":"53430aac.e9f274","type":"switchNode","name":"switch ecomp-model-information.model-uuid","xml":"<switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":2320.0000915527344,"y":845.571403503418,"z":"41a5a817.3d5648","wires":[["cc57c618.935228"]]},{"id":"cc57c618.935228","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2560.0000915527344,"y":846.571403503418,"z":"41a5a817.3d5648","wires":[["475e9557.c6d32c"]]},{"id":"475e9557.c6d32c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-information.ecomp-model-information.model-uuid is a required input\" />\n","comments":"","x":2725.4285583496094,"y":844.5713729858398,"z":"41a5a817.3d5648","wires":[]},{"id":"2fbcae92.f3d252","type":"comment","name":"network-information.ecomp-model-information block validations","info":"","comments":"","x":2366.0000915527344,"y":730.571403503418,"z":"41a5a817.3d5648","wires":[]},{"id":"b1716261.5a723","type":"switchNode","name":"switch ecomp-model-information.model-customization-uuid","xml":"<switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid`'>\n","comments":"","outputs":1,"x":2364.857147216797,"y":804.7142868041992,"z":"41a5a817.3d5648","wires":[["a7c4b830.4d2a88"]]},{"id":"a7c4b830.4d2a88","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2660.857147216797,"y":805.7142868041992,"z":"41a5a817.3d5648","wires":[["50af7fb0.9a0cd"]]},{"id":"50af7fb0.9a0cd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-information.ecomp-model-information.model-customization-uuid is a required input\" />\n","comments":"","x":2808.285614013672,"y":805.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"9e606dc6.bb62","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":565.2142219543457,"y":702.3571214675903,"z":"41a5a817.3d5648","wires":[]},{"id":"8953c98c.1fc098","type":"switchNode","name":"switch network-information.network-id","xml":"<switch test='`$network-topology-operation-input.network-information.network-id`'>\n\n","comments":"","outputs":1,"x":2301.8570709228516,"y":639.047643661499,"z":"41a5a817.3d5648","wires":[["aae74684.f0dda8","80692ac4.4c61e8"]]},{"id":"aae74684.f0dda8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2597.857021331787,"y":671.71435546875,"z":"41a5a817.3d5648","wires":[["4ed88700.e91638"]]},{"id":"80692ac4.4c61e8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2595.5239181518555,"y":638.7142295837402,"z":"41a5a817.3d5648","wires":[["8c56108c.57f57"]]},{"id":"8c56108c.57f57","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name='' value='' />\n","comments":"","x":2755.857147216797,"y":635.7142868041992,"z":"41a5a817.3d5648","wires":[]},{"id":"841b40cc.f635f","type":"get-resource","name":"get-resource NETWORK_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid\n and service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'\n pfx='network-model'>\n\n","comments":"","outputs":1,"x":3043.040214538574,"y":1288.8927631378174,"z":"41a5a817.3d5648","wires":[["5d7f37c8.9ba188","b4e8d9f3.c1cda8"]]},{"id":"c17b9253.2645b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No network model found for customization UUID ' \n + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +\n ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`\" />\n","comments":"","x":3502.5044174194336,"y":1279.9401788711548,"z":"41a5a817.3d5648","wires":[]},{"id":"5d7f37c8.9ba188","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3303.7544288635254,"y":1273.2973852157593,"z":"41a5a817.3d5648","wires":[["c17b9253.2645b"]]},{"id":"b4e8d9f3.c1cda8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3297.5044288635254,"y":1305.7973852157593,"z":"41a5a817.3d5648","wires":[["c17b9253.2645b"]]},{"id":"5076277.ef718d8","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":3745.9684448242188,"y":711.1587524414062,"z":"41a5a817.3d5648","wires":[["bdf3da2f.82df78"]]},{"id":"7b4191b9.96922","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":3005.682388305664,"y":673.730110168457,"z":"41a5a817.3d5648","wires":[["5d1aec57.6490c4","eeefabc.77a5a58"]]},{"id":"5d1aec57.6490c4","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3294.682388305664,"y":675.7301712036133,"z":"41a5a817.3d5648","wires":[["c38a3978.799d68"]]},{"id":"eeefabc.77a5a58","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3274.682388305664,"y":710.7301712036133,"z":"41a5a817.3d5648","wires":[["43481644.30d748"]]},{"id":"bdf3da2f.82df78","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`\">\n\n","comments":"","outputs":1,"x":4036.3969955444336,"y":710.4088363647461,"z":"41a5a817.3d5648","wires":[["6db05184.d3014"]]},{"id":"6db05184.d3014","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":4225.349349975586,"y":711.3015747070312,"z":"41a5a817.3d5648","wires":[["95f707a8.f519b8"]]},{"id":"d129023b.96226","type":"set","name":"set tmp.nidx and ctx.network-data","xml":"<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />\n","comments":"","x":4668.881118774414,"y":720.0515975952148,"z":"41a5a817.3d5648","wires":[]},{"id":"43481644.30d748","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3475.952407836914,"y":712.2847366333008,"z":"41a5a817.3d5648","wires":[["5076277.ef718d8","37c09b6f.552274"]]},{"id":"37c09b6f.552274","type":"switchNode","name":"switch tmp.nidx ","xml":"<switch test=\"`$tmp.nidx`\">\n\n","comments":"","outputs":1,"x":3664.269874572754,"y":753.1419591903687,"z":"41a5a817.3d5648","wires":[["3234ec06.966ed4"]]},{"id":"62bd6613.9eb128","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n","comments":"","x":4017.1268577575684,"y":748.856201171875,"z":"41a5a817.3d5648","wires":[]},{"id":"3234ec06.966ed4","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3835.6984100341797,"y":751.7133445739746,"z":"41a5a817.3d5648","wires":[["62bd6613.9eb128"]]},{"id":"4ed88700.e91638","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2731.968276977539,"y":672.1587600708008,"z":"41a5a817.3d5648","wires":[["7b4191b9.96922"]]},{"id":"c38a3978.799d68","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.validate-network-input\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Network id proveded but no network exists that matches\"/>\n<parameter name=\"field5\" value=\"`$network-topology-operation-input.network-information.network-id`\"/>\n\n\n\n","comments":"","outputs":1,"x":3455.968276977539,"y":675.1587600708008,"z":"41a5a817.3d5648","wires":[[]]},{"id":"c767fce.cccd4","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ctx.network-data.network-data.network-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":4627.301528930664,"y":757.1587753295898,"z":"41a5a817.3d5648","wires":[["a1a0872f.35e998"]]},{"id":"a1a0872f.35e998","type":"other","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":4841.301528930664,"y":757.1587753295898,"z":"41a5a817.3d5648","wires":[["7d734a8.c4b78b4"]]},{"id":"7d734a8.c4b78b4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Network aready exists in Created state matching network-id ' + $network-topology-operation-input.network-information.network-id`\" />\n","comments":"","x":5045.301528930664,"y":753.1587600708008,"z":"41a5a817.3d5648","wires":[]},{"id":"95f707a8.f519b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":4373.967788696289,"y":711.1587600708008,"z":"41a5a817.3d5648","wires":[["d129023b.96226"]]},{"id":"da26908.26dc67","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2592.671890258789,"y":1073.3068771362305,"z":"41a5a817.3d5648","wires":[["1dddd4c3.75a05b"]]},{"id":"7dd72bf4.535174","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":2598.9218254089355,"y":1212.473482131958,"z":"41a5a817.3d5648","wires":[["d31eafb0.3ca5d"]]},{"id":"eadc3f09.27d1","type":"get-resource","name":"get-resource SERVICE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'\n pfx='service-model'>\n\n","comments":"","outputs":1,"x":3045.540199279785,"y":1211.9575357437134,"z":"41a5a817.3d5648","wires":[["3724789a.07bf88","7fff67b2.5b9128"]]},{"id":"cdf7a94d.143108","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`\" />\n","comments":"","x":3492.623565673828,"y":1211.9575662612915,"z":"41a5a817.3d5648","wires":[]},{"id":"3724789a.07bf88","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3293.8736457824707,"y":1207.3147821426392,"z":"41a5a817.3d5648","wires":[["cdf7a94d.143108"]]},{"id":"7fff67b2.5b9128","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3287.6236457824707,"y":1239.8147821426392,"z":"41a5a817.3d5648","wires":[["cdf7a94d.143108"]]},{"id":"2199ac52.a52754","type":"get-resource","name":"get-resource NETWORK_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid\n and service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'\n pfx='network-model'>\n\n","comments":"","outputs":1,"x":3039.226402282715,"y":1148.1150856018066,"z":"41a5a817.3d5648","wires":[["fb39ce72.7ac11","9a65b565.a66b48"]]},{"id":"b207cf63.6ed86","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No network model found for customization UUID ' \n + $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +\n ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`\" />\n","comments":"","x":3498.690605163574,"y":1139.162501335144,"z":"41a5a817.3d5648","wires":[]},{"id":"fb39ce72.7ac11","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3299.940616607666,"y":1132.5197076797485,"z":"41a5a817.3d5648","wires":[["b207cf63.6ed86"]]},{"id":"9a65b565.a66b48","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3294.9405937194824,"y":1163.7697067260742,"z":"41a5a817.3d5648","wires":[["b207cf63.6ed86"]]},{"id":"65fe4dcf.819eb4","type":"get-resource","name":"get-resource SERVICE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'\n pfx='service-model'>","comments":"","outputs":1,"x":3037.9763259887695,"y":1073.6797513961792,"z":"41a5a817.3d5648","wires":[["718f4575.5b593c","2ee513d0.71b3dc"]]},{"id":"17962387.d3415c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`\" />\n","comments":"","x":3488.8097534179688,"y":1071.1798887252808,"z":"41a5a817.3d5648","wires":[]},{"id":"718f4575.5b593c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3290.0598335266113,"y":1066.5371046066284,"z":"41a5a817.3d5648","wires":[["17962387.d3415c"]]},{"id":"2ee513d0.71b3dc","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3283.8098335266113,"y":1099.0371046066284,"z":"41a5a817.3d5648","wires":[["17962387.d3415c"]]},{"id":"1dddd4c3.75a05b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2767.996139526367,"y":1072.5197052955627,"z":"41a5a817.3d5648","wires":[["65fe4dcf.819eb4","2199ac52.a52754"]]},{"id":"d31eafb0.3ca5d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2760.496139526367,"y":1211.2697086334229,"z":"41a5a817.3d5648","wires":[["eadc3f09.27d1","841b40cc.f635f"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-security-zone-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-security-zone-input.json
new file mode 100755
index 00000000..5e212f4e
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-security-zone-input.json
@@ -0,0 +1 @@
+[{"id":"d8f6b3bb.4c275","type":"dgstart","name":"DGSTART","outputs":1,"x":235.55557250976562,"y":315.5555419921875,"z":"893326ee.bae438","wires":[["a018c9a4.117f98"]]},{"id":"a018c9a4.117f98","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":391.8412780761719,"y":389.7936553955078,"z":"893326ee.bae438","wires":[["3f03d10e.2ffb5e"]]},{"id":"3f03d10e.2ffb5e","type":"method","name":"validate-security-zone-input","xml":"<method rpc='validate-security-zone-input' mode='sync'>\n","comments":"","outputs":1,"x":391.9841842651367,"y":453.22223949432373,"z":"893326ee.bae438","wires":[["b2b60df0.c53fb"]]},{"id":"b2b60df0.c53fb","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":405.3056182861328,"y":733.9990367889404,"z":"893326ee.bae438","wires":[["e18f70ed.64e6e","c55d0b64.80ebf8","798d06aa.649188","9a6b6b65.fb46e8","e80fb296.5b5af","36ba5c7b.d8e654"]]},{"id":"e18f70ed.64e6e","type":"switchNode","name":"switch svc-request-id","xml":"<switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-request-id`'>\n","comments":"","outputs":1,"x":740.3651428222656,"y":218.65082263946533,"z":"893326ee.bae438","wires":[["991652a9.25d26"]]},{"id":"991652a9.25d26","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":970.0794279915945,"y":216.65081936972456,"z":"893326ee.bae438","wires":[["aa2be7a3.2f0818"]]},{"id":"aa2be7a3.2f0818","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n","comments":"","x":1121.5079345703125,"y":213.31748580932617,"z":"893326ee.bae438","wires":[]},{"id":"c55d0b64.80ebf8","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":732.9364929199219,"y":172.22222137451172,"z":"893326ee.bae438","wires":[["86d6351c.c6dd08"]]},{"id":"86d6351c.c6dd08","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":968.6508483886719,"y":173.79364490509033,"z":"893326ee.bae438","wires":[["b2821e24.be3db"]]},{"id":"b2821e24.be3db","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n","comments":"","x":1118.650821685791,"y":173.7936544418335,"z":"893326ee.bae438","wires":[]},{"id":"798d06aa.649188","type":"switchNode","name":"switch request-action","xml":"<switch test='`$security-zone-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":742.9365386962891,"y":267.5079708099365,"z":"893326ee.bae438","wires":[["cbf1edf6.578e5","3a2f6108.3a98ce","d7c95278.f68aa","c59cbe0b.ae17b"]]},{"id":"cbf1edf6.578e5","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":977.9841423034668,"y":331.3651924133301,"z":"893326ee.bae438","wires":[["7c061461.ed6d7c"]]},{"id":"7c061461.ed6d7c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n","comments":"","x":1149.412582397461,"y":331.36519145965576,"z":"893326ee.bae438","wires":[]},{"id":"4bfff6bd.144358","type":"comment","name":"validate-security-zone-input - CHANGELOG","info":"3/22: Initial release 1.0.0","comments":"","x":248.55557250976562,"y":219.5555419921875,"z":"893326ee.bae438","wires":[]},{"id":"9a6b6b65.fb46e8","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$security-zone-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":645.2222328186035,"y":739.5555782318115,"z":"893326ee.bae438","wires":[["f61c14ca.d17008","c832b3ea.1cb26","ce191e6f.c63c","83dfb84.6c9ec48","f0422740.d800b8","f1ddac97.f2155"]]},{"id":"f61c14ca.d17008","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":906.2699356079102,"y":575.1270084381104,"z":"893326ee.bae438","wires":[["7ceecd60.009724"]]},{"id":"c832b3ea.1cb26","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":926.5555419921875,"y":762.5555725097656,"z":"893326ee.bae438","wires":[["72bc9a53.a4a1c4"]]},{"id":"ce191e6f.c63c","type":"other","name":"deactivate","xml":"<outcome value='deactivate'>","comments":"","outputs":1,"x":933.5555419921875,"y":852.5555725097656,"z":"893326ee.bae438","wires":[["ed55d557.297dd8"]]},{"id":"7ceecd60.009724","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1063.5555725097656,"y":577.8889179229736,"z":"893326ee.bae438","wires":[["ba167228.b3ffe"]]},{"id":"ba167228.b3ffe","type":"switchNode","name":"switch request-action","xml":"<switch test='`$security-zone-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1271.8889541625977,"y":577.8889236450195,"z":"893326ee.bae438","wires":[["e9519759.0bd708","b5904d01.67034"]]},{"id":"e9519759.0bd708","type":"other","name":"CreateSecurityZoneInstance","xml":"<outcome value='CreateSecurityZoneInstance'>","comments":"","outputs":1,"x":1618.0793151855469,"y":505.0317816734314,"z":"893326ee.bae438","wires":[["ec0a16a2.d398b8"]]},{"id":"b5904d01.67034","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1557.5555534362793,"y":571.8889350891113,"z":"893326ee.bae438","wires":[["6ff9efab.1acb8"]]},{"id":"6ff9efab.1acb8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be CreateSecurityZoneInstance for svc-action=assign\" />\n","comments":"","x":1704.8888969421387,"y":573.5556974411011,"z":"893326ee.bae438","wires":[]},{"id":"72bc9a53.a4a1c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1100.5555419921875,"y":762.5555725097656,"z":"893326ee.bae438","wires":[["f8cd13e2.ec99a"]]},{"id":"f8cd13e2.ec99a","type":"switchNode","name":"switch request-action","xml":"<switch test='`$security-zone-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1317.5555419921875,"y":762.5555725097656,"z":"893326ee.bae438","wires":[["29c24ed5.8c97a2","12034d41.71a063"]]},{"id":"29c24ed5.8c97a2","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1541.5555419921875,"y":803.5555725097656,"z":"893326ee.bae438","wires":[["c4fec971.125ad8"]]},{"id":"c4fec971.125ad8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be CreateSecurityZoneInstance for svc-action=activate\" />\n","comments":"","x":1710.5555419921875,"y":803.5555725097656,"z":"893326ee.bae438","wires":[]},{"id":"ed55d557.297dd8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1115.5555419921875,"y":851.5555725097656,"z":"893326ee.bae438","wires":[["55f7035.720defc"]]},{"id":"55f7035.720defc","type":"switchNode","name":"switch request-action","xml":"<switch test='`$security-zone-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1332.5555419921875,"y":851.5555725097656,"z":"893326ee.bae438","wires":[["94748701.276ad8","94eb145d.dbec38"]]},{"id":"94748701.276ad8","type":"other","name":"DeleteSecurityZoneInstance","xml":"<outcome value='DeleteSecurityZoneInstance'>","comments":"","outputs":1,"x":1615.2220764160156,"y":850.8889589309692,"z":"893326ee.bae438","wires":[["3e9b45b4.1ff76a"]]},{"id":"94eb145d.dbec38","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1556.5555419921875,"y":892.5555725097656,"z":"893326ee.bae438","wires":[["610782ce.0e012c"]]},{"id":"610782ce.0e012c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be DeleteSecurityZoneInstance for svc-action=deactivate\" />\n","comments":"","x":1725.5555419921875,"y":892.5555725097656,"z":"893326ee.bae438","wires":[]},{"id":"83dfb84.6c9ec48","type":"other","name":"unassign","xml":"<outcome value='unassign'>","comments":"","outputs":1,"x":914.5554046630859,"y":1019.8888998031616,"z":"893326ee.bae438","wires":[["97760e1d.874c1"]]},{"id":"97760e1d.874c1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1096.555435180664,"y":1015.8889226913452,"z":"893326ee.bae438","wires":[["d856938c.c7fcd"]]},{"id":"d856938c.c7fcd","type":"switchNode","name":"switch request-action","xml":"<switch test='`$security-zone-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1313.555435180664,"y":1015.8889226913452,"z":"893326ee.bae438","wires":[["8ba8ac96.939ac","ac3bb1cc.3a778"]]},{"id":"8ba8ac96.939ac","type":"other","name":"DeleteSecurityZoneInstance","xml":"<outcome value='DeleteSecurityZoneInstance'>","comments":"","outputs":1,"x":1594.555305480957,"y":1016.8889398574829,"z":"893326ee.bae438","wires":[["1b3b1eab.cd8bc1"]]},{"id":"ac3bb1cc.3a778","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1537.555435180664,"y":1056.8889226913452,"z":"893326ee.bae438","wires":[["cefb5d61.5cfae"]]},{"id":"cefb5d61.5cfae","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be DeleteSecurityZoneInstance for svc-action=unassign\" />\n","comments":"","x":1708.2221603393555,"y":1063.5555746555328,"z":"893326ee.bae438","wires":[]},{"id":"ec0a16a2.d398b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1864.0793266296387,"y":504.0317687988281,"z":"893326ee.bae438","wires":[["8020e36.a7e482","6c805fc8.58afb","a182697b.c45e68","c43eb58f.69d438","474a1931.cb3468","fb13eb4d.718288","beb405ab.4654d8","9bbcec2b.09769"]]},{"id":"619f5f72.2ac62","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1823.5555419921875,"y":763.5555725097656,"z":"893326ee.bae438","wires":[["c43eb58f.69d438","fb13eb4d.718288"]]},{"id":"3e9b45b4.1ff76a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1869.5555419921875,"y":853.5555725097656,"z":"893326ee.bae438","wires":[["c43eb58f.69d438","fb13eb4d.718288"]]},{"id":"1b3b1eab.cd8bc1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1853.555435180664,"y":1017.8889226913452,"z":"893326ee.bae438","wires":[["c43eb58f.69d438"]]},{"id":"8020e36.a7e482","type":"switchNode","name":"switch vlan-tag","xml":"<switch test='`$security-zone-topology-operation-input.security-zone-request-input.vlan-tag`'>\n","comments":"","outputs":1,"x":2200.174575805664,"y":377.60317516326904,"z":"893326ee.bae438","wires":[["219b4575.07624a"]]},{"id":"219b4575.07624a","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2366.1744232177734,"y":377.4127187728882,"z":"893326ee.bae438","wires":[["8270f4ae.45f928"]]},{"id":"8270f4ae.45f928","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"security-zone-topology-operation-input.security-zone-request-input.vlan-tag is a required input\" />\n","comments":"","x":2522.365135192871,"y":377.41267108917236,"z":"893326ee.bae438","wires":[]},{"id":"a182697b.c45e68","type":"switchNode","name":"switch ecomp-model-information.model-customization-uuid","xml":"<switch test='`$security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid`'>\n","comments":"","outputs":1,"x":2334.4129180908203,"y":300.5556230545044,"z":"893326ee.bae438","wires":[["d0a4dd20.c4866"]]},{"id":"d0a4dd20.c4866","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2628.412826538086,"y":301.5555639266968,"z":"893326ee.bae438","wires":[["c36cc0f.8c7124"]]},{"id":"c36cc0f.8c7124","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"security-zone-information.ecomp-model-information.model-customization-uuid is a required input\" />\n","comments":"","x":2775.841293334961,"y":301.5555639266968,"z":"893326ee.bae438","wires":[]},{"id":"e80fb296.5b5af","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":671.9126892089844,"y":1161.0555114746094,"z":"893326ee.bae438","wires":[]},{"id":"6c805fc8.58afb","type":"get-resource","name":"get-resource AR_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from ALLOTTED_RESOURCE_MODEL WHERE customization_uuid = $security-zone-topology-operation-input.allotted-resource-information.ecomp-model-information.model-customization-uuid'\n pfx='ar-model'>\n\n","comments":"","outputs":1,"x":2236.6076889038086,"y":522.0873641967773,"z":"893326ee.bae438","wires":[["dea250d4.a547c","a0f786da.b959f8"]]},{"id":"d0b05c60.619cc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":2693.690872192383,"y":502.75396156311035,"z":"893326ee.bae438","wires":[]},{"id":"dea250d4.a547c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2494.9409523010254,"y":498.111177444458,"z":"893326ee.bae438","wires":[["d0b05c60.619cc"]]},{"id":"a0f786da.b959f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2488.6909523010254,"y":530.611177444458,"z":"893326ee.bae438","wires":[["d0b05c60.619cc"]]},{"id":"3a2f6108.3a98ce","type":"other","name":"CreateSecurityZoneInstance","xml":"<outcome value='CreateSecurityZoneInstance'>","comments":"","outputs":1,"x":1038.6032104492188,"y":253.17459869384766,"z":"893326ee.bae438","wires":[["93d6c176.7fe5a"]]},{"id":"d7c95278.f68aa","type":"other","name":"DeleteSecurityZoneInstance","xml":"<outcome value='DeleteSecurityZoneInstance'>","comments":"","outputs":1,"x":1038.8888549804688,"y":290.6032180786133,"z":"893326ee.bae438","wires":[["93d6c176.7fe5a"]]},{"id":"c59cbe0b.ae17b","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":981.7936515808105,"y":371.74609756469727,"z":"893326ee.bae438","wires":[["bef0c21f.d802e"]]},{"id":"bef0c21f.d802e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid request-information.request-action \" />\n","comments":"","x":1153.2220573425293,"y":372.7461128234863,"z":"893326ee.bae438","wires":[]},{"id":"36ba5c7b.d8e654","type":"switchNode","name":"switch service-instance-id","xml":"<switch test='`$security-zone-topology-operation-input.service-information.service-instance-id`'>\n","comments":"","outputs":1,"x":739.984130859375,"y":447.41273498535156,"z":"893326ee.bae438","wires":[["d53e7631.c0fea8"]]},{"id":"d53e7631.c0fea8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":956.4127197265625,"y":448.41273498535156,"z":"893326ee.bae438","wires":[["2579090b.0e1e76"]]},{"id":"2579090b.0e1e76","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-instance-id is a required input\" />\n","comments":"","x":1114.8412475585938,"y":447.41273498535156,"z":"893326ee.bae438","wires":[]},{"id":"f0422740.d800b8","type":"other","name":"create","xml":"<outcome value='create'>","comments":"","outputs":1,"x":913.3332862854004,"y":660.4629507064819,"z":"893326ee.bae438","wires":[["46b3f2f8.0ea61c"]]},{"id":"46b3f2f8.0ea61c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1073.9522857666016,"y":659.8915205001831,"z":"893326ee.bae438","wires":[["52a155fb.f8541c"]]},{"id":"52a155fb.f8541c","type":"switchNode","name":"switch request-action","xml":"<switch test='`$security-zone-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1293.9522857666016,"y":659.8915205001831,"z":"893326ee.bae438","wires":[["533f0552.201dac","7340b4fd.0ee38c"]]},{"id":"533f0552.201dac","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1551.285779953003,"y":663.8915729522705,"z":"893326ee.bae438","wires":[["47df574e.a59c98"]]},{"id":"47df574e.a59c98","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be CreateSecurityZoneInstance for svc-action=create\" />\n","comments":"","x":1716.9522857666016,"y":663.8915405273438,"z":"893326ee.bae438","wires":[]},{"id":"7340b4fd.0ee38c","type":"other","name":"CreateSecurityZoneInstance","xml":"<outcome value='CreateSecurityZoneInstance'>","comments":"","outputs":1,"x":1623.3332061767578,"y":628.7962646484375,"z":"893326ee.bae438","wires":[["e6d64f7d.65b1e"]]},{"id":"e6d64f7d.65b1e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1859.3332061767578,"y":627.7962646484375,"z":"893326ee.bae438","wires":[["c43eb58f.69d438","fb13eb4d.718288"]]},{"id":"12034d41.71a063","type":"other","name":"CreateSecurityZoneInstance","xml":"<outcome value='CreateSecurityZoneInstance'>","comments":"","outputs":1,"x":1608.3332595825195,"y":762.1296367645264,"z":"893326ee.bae438","wires":[["619f5f72.2ac62"]]},{"id":"f1ddac97.f2155","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":926.6666564941406,"y":937.1295366287231,"z":"893326ee.bae438","wires":[["d42c764.9db5b88"]]},{"id":"d42c764.9db5b88","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1108.6666870117188,"y":933.1295595169067,"z":"893326ee.bae438","wires":[["9fad38e8.eba248"]]},{"id":"9fad38e8.eba248","type":"switchNode","name":"switch request-action","xml":"<switch test='`$security-zone-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":1325.6666870117188,"y":933.1295595169067,"z":"893326ee.bae438","wires":[["3f661399.88316c","fb7e534f.3179a"]]},{"id":"3f661399.88316c","type":"other","name":"DeleteSecurityZoneInstance","xml":"<outcome value='DeleteSecurityZoneInstance'>","comments":"","outputs":1,"x":1606.6665573120117,"y":934.1295766830444,"z":"893326ee.bae438","wires":[["18534a5c.e61196"]]},{"id":"fb7e534f.3179a","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1549.6666870117188,"y":974.1295595169067,"z":"893326ee.bae438","wires":[["c5006813.200e48"]]},{"id":"c5006813.200e48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required to be DeleteSecurityZoneInstance for svc-action=delete\" />\n","comments":"","x":1718.6666870117188,"y":974.1295595169067,"z":"893326ee.bae438","wires":[]},{"id":"18534a5c.e61196","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1865.6666870117188,"y":935.1295595169067,"z":"893326ee.bae438","wires":[["c43eb58f.69d438","fb13eb4d.718288"]]},{"id":"93d6c176.7fe5a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1254.9999656677246,"y":284.499981880188,"z":"893326ee.bae438","wires":[[]]},{"id":"c43eb58f.69d438","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\n","comments":"","outputs":1,"x":2236.349380493164,"y":148.09522247314453,"z":"893326ee.bae438","wires":[["95717a57.0e1fc8"]]},{"id":"95717a57.0e1fc8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2436.8850631713867,"y":146.66665077209473,"z":"893326ee.bae438","wires":[["7ad0865a.9d5808"]]},{"id":"7ad0865a.9d5808","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"allotted-resource-information.allotted-resource-id is a required input\" />\n","comments":"","x":2588.3135299682617,"y":145.66665077209473,"z":"893326ee.bae438","wires":[]},{"id":"474a1931.cb3468","type":"switchNode","name":"switch allotted-resource-type","xml":"<switch test='`$security-zone-topology-operation-input.allotted-resource-information.allotted-resource-type`'>\n","comments":"","outputs":1,"x":2242.7779235839844,"y":183.29363822937012,"z":"893326ee.bae438","wires":[["78aa6b52.fbc154"]]},{"id":"78aa6b52.fbc154","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2443.3134689331055,"y":181.86506843566895,"z":"893326ee.bae438","wires":[["d2e8d08f.df20e"]]},{"id":"d2e8d08f.df20e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"allotted-resource-information.allotted-resource-type is a required input\" />\n","comments":"","x":2594.7419357299805,"y":180.86506843566895,"z":"893326ee.bae438","wires":[]},{"id":"fb13eb4d.718288","type":"switchNode","name":"switch parent-service-instance-id","xml":"<switch test='`$security-zone-topology-operation-input.allotted-resource-information.parent-service-instance-id`'>\n","comments":"","outputs":1,"x":2255.63516998291,"y":219.0079231262207,"z":"893326ee.bae438","wires":[["dec9289b.c35878"]]},{"id":"dec9289b.c35878","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2471.349319458008,"y":216.1507797241211,"z":"893326ee.bae438","wires":[["45bd6332.b157fc"]]},{"id":"45bd6332.b157fc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"allotted-resource-information.parent-service-instance-id is a required input\" />\n","comments":"","x":2622.777786254883,"y":215.1507797241211,"z":"893326ee.bae438","wires":[]},{"id":"beb405ab.4654d8","type":"switchNode","name":"switch trusted-network-role","xml":"<switch test='`$security-zone-topology-operation-input.security-zone-request-input.trusted-network-role`'>\n","comments":"","outputs":1,"x":2231.984031677246,"y":412.1983833312988,"z":"893326ee.bae438","wires":[["20e7c9ab.48a486"]]},{"id":"20e7c9ab.48a486","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2494.174690246582,"y":408.5793528556824,"z":"893326ee.bae438","wires":[["a43fc0ee.20e45"]]},{"id":"a43fc0ee.20e45","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"security-zone-topology-operation-input.security-zone-request-input.trusted-network-role is a required input\" />\n","comments":"","x":2659.174835205078,"y":408.57931327819824,"z":"893326ee.bae438","wires":[]},{"id":"9bbcec2b.09769","type":"switchNode","name":"switch untrusted-network-role","xml":"<switch test='`$security-zone-topology-operation-input.security-zone-request-input.untrusted-network-role`'>\n","comments":"","outputs":1,"x":2249.2224464416504,"y":446.74599266052246,"z":"893326ee.bae438","wires":[["d404d9bd.d65288"]]},{"id":"d404d9bd.d65288","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2494.22261428833,"y":446.7459878921509,"z":"893326ee.bae438","wires":[["a2180ae0.fe41f8"]]},{"id":"a2180ae0.fe41f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"security-zone-operation-input.security-zone-request-input.untrusted-network-role is a required input\" />\n","comments":"","x":2660.651081085205,"y":446.74595737457275,"z":"893326ee.bae438","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-service-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-service-input.json
new file mode 100644
index 00000000..fa3baaa4
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-service-input.json
@@ -0,0 +1,531 @@
+[
+ {
+ "id": "d54a485.152c1b8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 167.4999901907786,
+ "y": 410.00000422341486,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "bcfa11de.2ed69",
+ "c928e0b1.6f8ba",
+ "862c95fc.9314d8",
+ "57d36230.80271c"
+ ]
+ ]
+ },
+ {
+ "id": "bcfa11de.2ed69",
+ "type": "switchNode",
+ "name": "switch svc-request-id",
+ "xml": "<switch test='`$service-topology-operation-input.sdnc-request-header.svc-request-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 454.5476303100586,
+ "y": 315.9374895095825,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "388829d5.26a2f6"
+ ]
+ ]
+ },
+ {
+ "id": "388829d5.26a2f6",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 680.2619247436523,
+ "y": 315.9374933242798,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "9ad322ba.1f5cf"
+ ]
+ ]
+ },
+ {
+ "id": "9ad322ba.1f5cf",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n",
+ "comments": "",
+ "x": 831.6904907226562,
+ "y": 315.93749141693115,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "c928e0b1.6f8ba",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 443.118993486677,
+ "y": 274.50892107827326,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "14a44603.cceb6a"
+ ]
+ ]
+ },
+ {
+ "id": "14a44603.cceb6a",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 678.8333451407298,
+ "y": 273.08031885964533,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "2dd27fa8.9909d"
+ ]
+ ]
+ },
+ {
+ "id": "2dd27fa8.9909d",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n",
+ "comments": "",
+ "x": 828.8333184378489,
+ "y": 273.0803283963885,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "862c95fc.9314d8",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$service-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 453.11904689243875,
+ "y": 358.7946361814227,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "d18a5e6f.1258e"
+ ]
+ ]
+ },
+ {
+ "id": "d18a5e6f.1258e",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 680.2619203839986,
+ "y": 358.79464708055775,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "2fcf1e47.c379d2"
+ ]
+ ]
+ },
+ {
+ "id": "2fcf1e47.c379d2",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n",
+ "comments": "",
+ "x": 831.6904863630025,
+ "y": 358.7946451732091,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "1abfff83.8ab75",
+ "type": "switchNode",
+ "name": "switch subscription-service-type",
+ "xml": "<switch test='`$service-topology-operation-input.service-information.subscription-service-type`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1005.4405844552175,
+ "y": 480.9375510896955,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "4139e9.e71e3618"
+ ]
+ ]
+ },
+ {
+ "id": "4139e9.e71e3618",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1201.1548788888113,
+ "y": 480.93754822867254,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "c6f3b245.5780c"
+ ]
+ ]
+ },
+ {
+ "id": "c6f3b245.5780c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.subscription-service-type is a required input\" />\n",
+ "comments": "",
+ "x": 1352.583429609026,
+ "y": 480.93753773825506,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "742df1ab.3ae88",
+ "type": "switchNode",
+ "name": "switch global-customer-id",
+ "xml": "<switch test='`$service-topology-operation-input.service-information.global-customer-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 985.4406378609792,
+ "y": 522.3661514009748,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "7ba07ba.47bde84"
+ ]
+ ]
+ },
+ {
+ "id": "7ba07ba.47bde84",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1201.1548865182058,
+ "y": 522.3661533083234,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "cbe8d9bd.9c8618"
+ ]
+ ]
+ },
+ {
+ "id": "cbe8d9bd.9c8618",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.global-customer-id is a required input\" />\n",
+ "comments": "",
+ "x": 1352.5834524972097,
+ "y": 522.3661514009748,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "1fcc9e4a.90b532",
+ "type": "switchNode",
+ "name": "switch model-invariant-uuid",
+ "xml": "<switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-invariant-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 991.1548560006277,
+ "y": 563.7947231020246,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "a2b56163.2eead"
+ ]
+ ]
+ },
+ {
+ "id": "a2b56163.2eead",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1201.1548636300222,
+ "y": 563.7947498049055,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "85da17f9.7b6ee8"
+ ]
+ ]
+ },
+ {
+ "id": "85da17f9.7b6ee8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.ecomp-model-information.model-invariant-uuid is a required input\" />\n",
+ "comments": "",
+ "x": 1352.583429609026,
+ "y": 563.7947478975568,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "96d57264.57088",
+ "type": "switchNode",
+ "name": "switch model-uuid",
+ "xml": "<switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 961.1549551827566,
+ "y": 605.2233367647443,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "b0c11ff.c6916e"
+ ]
+ ]
+ },
+ {
+ "id": "b0c11ff.c6916e",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1201.1549551827566,
+ "y": 605.2233195986066,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "6ef2e613.020628"
+ ]
+ ]
+ },
+ {
+ "id": "6ef2e613.020628",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.ecomp-model-information.model-uuid is a required input\" />\n",
+ "comments": "",
+ "x": 1352.5835211617605,
+ "y": 605.223317691258,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "731761a3.6eed4",
+ "type": "switchNode",
+ "name": "switch model-name",
+ "xml": "<switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 964.0120337350027,
+ "y": 646.6518474306379,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "65032b2e.022024"
+ ]
+ ]
+ },
+ {
+ "id": "65032b2e.022024",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1199.72635105678,
+ "y": 646.6518817629133,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "b67eae73.a9f6c"
+ ]
+ ]
+ },
+ {
+ "id": "b67eae73.a9f6c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.ecomp-model-information.model-name is a required input\" />\n",
+ "comments": "",
+ "x": 1351.154917035784,
+ "y": 646.6518798555646,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "fb62d34c.a0426",
+ "type": "comment",
+ "name": "Validation of required fields",
+ "info": "",
+ "comments": "",
+ "x": 603.1190032958984,
+ "y": 230.22320365905762,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "57d36230.80271c",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 438.35706329345703,
+ "y": 563.1994934082031,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "737f9c27.6f5f04"
+ ]
+ ]
+ },
+ {
+ "id": "737f9c27.6f5f04",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 600.857063293457,
+ "y": 563.1994934082031,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "9f47db00.e034a8"
+ ]
+ ]
+ },
+ {
+ "id": "9f47db00.e034a8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 755.857063293457,
+ "y": 563.1994934082031,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "1abfff83.8ab75",
+ "742df1ab.3ae88",
+ "1fcc9e4a.90b532",
+ "96d57264.57088",
+ "731761a3.6eed4",
+ "7ae25d13.e12ea4"
+ ]
+ ]
+ },
+ {
+ "id": "8465d752.ecf868",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 111.25,
+ "y": 79.91365623474121,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "9f7bd881.0481b8"
+ ]
+ ]
+ },
+ {
+ "id": "9f7bd881.0481b8",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 186.53570556640625,
+ "y": 120.15176773071289,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "15072416.3cb84c"
+ ]
+ ]
+ },
+ {
+ "id": "15072416.3cb84c",
+ "type": "method",
+ "name": "method validate-service-input",
+ "xml": "<method rpc='validate-service-input' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 175.92862701416016,
+ "y": 161.16365242004395,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "d54a485.152c1b8"
+ ]
+ ]
+ },
+ {
+ "id": "6f67c5b7.423c2c",
+ "type": "comment",
+ "name": "validate-service-input",
+ "info": "",
+ "comments": "",
+ "x": 505.59485626220703,
+ "y": 27.5,
+ "z": "42cc1159.52eec",
+ "wires": []
+ },
+ {
+ "id": "7ae25d13.e12ea4",
+ "type": "switchNode",
+ "name": "switch service-id",
+ "xml": "<switch test='`$service-topology-operation-input.service-information.service-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 957.1428375244141,
+ "y": 440.428599357605,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "e9812407.bacf48"
+ ]
+ ]
+ },
+ {
+ "id": "e9812407.bacf48",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1197.571418762207,
+ "y": 440.4285955429077,
+ "z": "42cc1159.52eec",
+ "wires": [
+ [
+ "9d9de464.0da3a8"
+ ]
+ ]
+ },
+ {
+ "id": "9d9de464.0da3a8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-id is a required input\" />\n",
+ "comments": "",
+ "x": 1348.999984741211,
+ "y": 440.4285936355591,
+ "z": "42cc1159.52eec",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vf-module-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vf-module-input.json
new file mode 100644
index 00000000..c1b4e6c2
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vf-module-input.json
@@ -0,0 +1,575 @@
+[
+ {
+ "id": "4aba34b1.1043ac",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 181.66666575840554,
+ "y": 410.83333723885676,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "2ddf201d.e6ec8",
+ "4a8dffd1.fdb7f",
+ "c90f6af4.b82b08",
+ "80d469b1.3662b8",
+ "ed9e03ed.5232b",
+ "db1345cd.afaaf8",
+ "d431fbda.2a77f8"
+ ]
+ ]
+ },
+ {
+ "id": "2ddf201d.e6ec8",
+ "type": "switchNode",
+ "name": "switch svc-request-id",
+ "xml": "<switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 464.4285752432688,
+ "y": 293.91367530822754,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "68766e97.4040d"
+ ]
+ ]
+ },
+ {
+ "id": "68766e97.4040d",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 690.1428696768626,
+ "y": 293.9136791229248,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "d9645ac2.df5c28"
+ ]
+ ]
+ },
+ {
+ "id": "d9645ac2.df5c28",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n",
+ "comments": "",
+ "x": 841.5714356558665,
+ "y": 293.9136772155762,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "4a8dffd1.fdb7f",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 452.99993841988726,
+ "y": 252.48510687691828,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "d22c2e3f.6dc6b"
+ ]
+ ]
+ },
+ {
+ "id": "d22c2e3f.6dc6b",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 688.71429007394,
+ "y": 251.05650465829035,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "341784df.8e0cbc"
+ ]
+ ]
+ },
+ {
+ "id": "341784df.8e0cbc",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n",
+ "comments": "",
+ "x": 838.7142633710591,
+ "y": 251.05651419503351,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "c90f6af4.b82b08",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 462.999991825649,
+ "y": 336.7708219800677,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "2c44e3fa.3865fc"
+ ]
+ ]
+ },
+ {
+ "id": "2c44e3fa.3865fc",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 690.1428653172088,
+ "y": 336.77083287920277,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "52c9b858.c8ebb8"
+ ]
+ ]
+ },
+ {
+ "id": "52c9b858.c8ebb8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n",
+ "comments": "",
+ "x": 841.5714312962127,
+ "y": 336.77083097185414,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "81912a48.95e3c8",
+ "type": "switchNode",
+ "name": "switch model-customization-id",
+ "xml": "<switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 994.1312157767161,
+ "y": 558.199610710144,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "6c3b4585.9f79ac"
+ ]
+ ]
+ },
+ {
+ "id": "6c3b4585.9f79ac",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1199.131215776716,
+ "y": 558.1995935440063,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "cc324c4a.16d68"
+ ]
+ ]
+ },
+ {
+ "id": "cc324c4a.16d68",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vf-module-information.ecomp-model-information.model-customization-uuid is a required input\" />\n",
+ "comments": "",
+ "x": 1350.55978175572,
+ "y": 558.1995916366577,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "dea8feff.34d7",
+ "type": "switchNode",
+ "name": "switch tenant",
+ "xml": "<switch test='`$vf-module-topology-operation-input.vf-module-request-input.tenant`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 939.9882943289622,
+ "y": 599.6281213760376,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "14d041fa.a0ae8e"
+ ]
+ ]
+ },
+ {
+ "id": "14d041fa.a0ae8e",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1197.7026116507395,
+ "y": 599.628155708313,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "3d3e09b5.333e66"
+ ]
+ ]
+ },
+ {
+ "id": "3d3e09b5.333e66",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vf-module-information.vf-module-request-input.tenant is a required input\" />\n",
+ "comments": "",
+ "x": 1349.1311776297434,
+ "y": 599.6281538009644,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "705f1093.b61a1",
+ "type": "comment",
+ "name": "Validation of required fields",
+ "info": "",
+ "comments": "",
+ "x": 612.9999482291087,
+ "y": 208.19938945770264,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "80d469b1.3662b8",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 444.9047066824778,
+ "y": 578.7947607040405,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "1fa2bfe5.f8a74"
+ ]
+ ]
+ },
+ {
+ "id": "1fa2bfe5.f8a74",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 607.4047066824778,
+ "y": 578.7947607040405,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "89cbf621.6d6368"
+ ]
+ ]
+ },
+ {
+ "id": "89cbf621.6d6368",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 762.4047066824778,
+ "y": 578.7947607040405,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "81912a48.95e3c8",
+ "dea8feff.34d7",
+ "5317edc6.907634",
+ "977a8cc7.20f92"
+ ]
+ ]
+ },
+ {
+ "id": "c0656ad0.118938",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 125.41667556762695,
+ "y": 80.7469892501831,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "e7e3fc5d.26071"
+ ]
+ ]
+ },
+ {
+ "id": "e7e3fc5d.26071",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 200.7023811340332,
+ "y": 120.98510074615479,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "53018b54.ba7fa4"
+ ]
+ ]
+ },
+ {
+ "id": "53018b54.ba7fa4",
+ "type": "method",
+ "name": "method validate-vf-module-input",
+ "xml": "<method rpc='validate-vf-module-input' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 197.76197052001953,
+ "y": 161.66364669799805,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "4aba34b1.1043ac"
+ ]
+ ]
+ },
+ {
+ "id": "69a2a002.592a6",
+ "type": "comment",
+ "name": "validate-vf-module-input",
+ "info": "",
+ "comments": "",
+ "x": 519.761531829834,
+ "y": 28.333333015441895,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "ed9e03ed.5232b",
+ "type": "switchNode",
+ "name": "switch service-instance-id",
+ "xml": "<switch test='`$vf-module-topology-operation-input.service-information.service-instance-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 476.0238227844238,
+ "y": 380.83334827423096,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "1fea5d4d.2c11e3"
+ ]
+ ]
+ },
+ {
+ "id": "1fea5d4d.2c11e3",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 688.4524040222168,
+ "y": 380.8333444595337,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "90e209ca.924dc8"
+ ]
+ ]
+ },
+ {
+ "id": "90e209ca.924dc8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-instance-id is a required input\" />\n",
+ "comments": "",
+ "x": 839.8809700012207,
+ "y": 380.83334255218506,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "db1345cd.afaaf8",
+ "type": "switchNode",
+ "name": "switch vnf-id",
+ "xml": "<switch test='`$vf-module-topology-operation-input.vnf-information.vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 433.52383204868875,
+ "y": 427.3333387374878,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "bb759f02.71463"
+ ]
+ ]
+ },
+ {
+ "id": "bb759f02.71463",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 688.8095414297923,
+ "y": 425.90477085113525,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "f0403fde.5aee9"
+ ]
+ ]
+ },
+ {
+ "id": "f0403fde.5aee9",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-information.vnf-id is a required input\" />\n",
+ "comments": "",
+ "x": 840.2381074087962,
+ "y": 425.9047689437866,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "5317edc6.907634",
+ "type": "switchNode",
+ "name": "switch aic-cloud-region",
+ "xml": "<switch test='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 969.3333756583079,
+ "y": 641.9047784805298,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "f1a01d1c.1ba65"
+ ]
+ ]
+ },
+ {
+ "id": "f1a01d1c.1ba65",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1196.0476929800852,
+ "y": 641.9048128128052,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "d4c33f5b.e0ebe"
+ ]
+ ]
+ },
+ {
+ "id": "d4c33f5b.e0ebe",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vf-module-request-input.aic-cloud-region is a required input\" />\n",
+ "comments": "",
+ "x": 1347.4762589590891,
+ "y": 641.9048109054565,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "d431fbda.2a77f8",
+ "type": "switchNode",
+ "name": "switch vf-module-id",
+ "xml": "<switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 454.33332225254617,
+ "y": 473.33331775665283,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "d102ad9b.0e3c7"
+ ]
+ ]
+ },
+ {
+ "id": "d102ad9b.0e3c7",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 688.6190316336497,
+ "y": 471.9047498703003,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "a2b8131.6eb5ff"
+ ]
+ ]
+ },
+ {
+ "id": "a2b8131.6eb5ff",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vf-module-information.vf-module-id is a required input\" />\n",
+ "comments": "",
+ "x": 840.0475976126536,
+ "y": 471.90474796295166,
+ "z": "67f5a657.693288",
+ "wires": []
+ },
+ {
+ "id": "977a8cc7.20f92",
+ "type": "switchNode",
+ "name": "switch vf-module-name",
+ "xml": "<switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 972.666642870222,
+ "y": 515.9999895095825,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "9832cc52.0a716"
+ ]
+ ]
+ },
+ {
+ "id": "9832cc52.0a716",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1198.666642870222,
+ "y": 515.9999723434448,
+ "z": "67f5a657.693288",
+ "wires": [
+ [
+ "cdbd51ca.ee45c"
+ ]
+ ]
+ },
+ {
+ "id": "cdbd51ca.ee45c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vf-module-information.vf-module-request-input.vf-module-name is a required input\" />\n",
+ "comments": "",
+ "x": 1350.0952088492259,
+ "y": 515.9999704360962,
+ "z": "67f5a657.693288",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json
new file mode 100644
index 00000000..dd81960c
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-vnf-input.json
@@ -0,0 +1,487 @@
+[
+ {
+ "id": "b38b0b37.4fbba8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 156.66665649414062,
+ "y": 414.16667597634455,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "52d79f98.236c9",
+ "db0b2c04.23c78",
+ "2090c272.2f2dae",
+ "f3ec5636.aa7578",
+ "de04dcb6.e0093",
+ "286a5aeb.cd2826"
+ ]
+ ]
+ },
+ {
+ "id": "52d79f98.236c9",
+ "type": "switchNode",
+ "name": "switch svc-request-id",
+ "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 439.4285659790039,
+ "y": 297.24701404571533,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "f9ab1dd1.ac849"
+ ]
+ ]
+ },
+ {
+ "id": "f9ab1dd1.ac849",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 665.1428604125977,
+ "y": 297.2470178604126,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "a08153b.30607b"
+ ]
+ ]
+ },
+ {
+ "id": "a08153b.30607b",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n",
+ "comments": "",
+ "x": 816.5714263916016,
+ "y": 297.24701595306396,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "db0b2c04.23c78",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 427.99992915562234,
+ "y": 255.81844561440607,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "eeea9033.66cb9"
+ ]
+ ]
+ },
+ {
+ "id": "eeea9033.66cb9",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 663.7142808096751,
+ "y": 254.38984339577814,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "d8278276.52076"
+ ]
+ ]
+ },
+ {
+ "id": "d8278276.52076",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n",
+ "comments": "",
+ "x": 813.7142541067942,
+ "y": 254.3898529325213,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "2090c272.2f2dae",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 437.99998256138406,
+ "y": 340.1041607175555,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "3462c626.b9b84a"
+ ]
+ ]
+ },
+ {
+ "id": "3462c626.b9b84a",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 665.1428560529439,
+ "y": 340.10417161669056,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "b3d88cc6.52ff2"
+ ]
+ ]
+ },
+ {
+ "id": "b3d88cc6.52ff2",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"request-information.request-action is a required input\" />\n",
+ "comments": "",
+ "x": 816.5714220319478,
+ "y": 340.10416970934193,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "e6d8c21d.71c1c",
+ "type": "switchNode",
+ "name": "switch model-customization-id",
+ "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 972.4645347595215,
+ "y": 486.53292655944824,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "de43bd69.67fda"
+ ]
+ ]
+ },
+ {
+ "id": "de43bd69.67fda",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1177.4645347595215,
+ "y": 486.53290939331055,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "4575d060.3b037"
+ ]
+ ]
+ },
+ {
+ "id": "4575d060.3b037",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-information.ecomp-model-information.model-customization-uuid is a required input\" />\n",
+ "comments": "",
+ "x": 1328.8931007385254,
+ "y": 486.5329074859619,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "689a33f6.b4cc9c",
+ "type": "switchNode",
+ "name": "switch tenant",
+ "xml": "<switch test='`$vnf-topology-operation-input.vnf-request-input.tenant`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 918.3216133117676,
+ "y": 527.9614372253418,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "238e5ffc.d0317"
+ ]
+ ]
+ },
+ {
+ "id": "238e5ffc.d0317",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1176.035930633545,
+ "y": 527.9614715576172,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "bcaf5c05.49c86"
+ ]
+ ]
+ },
+ {
+ "id": "bcaf5c05.49c86",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-information.vnf-request-input.tenant is a required input\" />\n",
+ "comments": "",
+ "x": 1327.4644966125488,
+ "y": 527.9614696502686,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "c2b4e8d1.4fcae8",
+ "type": "comment",
+ "name": "Validation of required fields",
+ "info": "",
+ "comments": "",
+ "x": 587.9999389648438,
+ "y": 211.53272819519043,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "f3ec5636.aa7578",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 423.238037109375,
+ "y": 528.7947521209717,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "2acfd81d.e2f408"
+ ]
+ ]
+ },
+ {
+ "id": "2acfd81d.e2f408",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 585.738037109375,
+ "y": 528.7947521209717,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "5a45a048.95a1d"
+ ]
+ ]
+ },
+ {
+ "id": "5a45a048.95a1d",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 740.738037109375,
+ "y": 528.7947521209717,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "e6d8c21d.71c1c",
+ "689a33f6.b4cc9c",
+ "217fcc81.9f4ba4"
+ ]
+ ]
+ },
+ {
+ "id": "a37f14a8.387e78",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 100.41666630336204,
+ "y": 84.0803279876709,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "b399deb4.255d6"
+ ]
+ ]
+ },
+ {
+ "id": "b399deb4.255d6",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 175.70237186976829,
+ "y": 124.31843948364258,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "869696da.e07a18"
+ ]
+ ]
+ },
+ {
+ "id": "869696da.e07a18",
+ "type": "method",
+ "name": "method validate-vnf-input",
+ "xml": "<method rpc='validate-vnf-input' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 151.0952933175222,
+ "y": 165.33032417297363,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "b38b0b37.4fbba8"
+ ]
+ ]
+ },
+ {
+ "id": "9789ee81.07f95",
+ "type": "comment",
+ "name": "validate-vnf-input",
+ "info": "",
+ "comments": "",
+ "x": 494.76152256556907,
+ "y": 31.666671752929688,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "de04dcb6.e0093",
+ "type": "switchNode",
+ "name": "switch service-instance-id",
+ "xml": "<switch test='`$vnf-topology-operation-input.service-information.service-instance-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 451.0238135201589,
+ "y": 384.16668701171875,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "54e9ea0e.6ae744"
+ ]
+ ]
+ },
+ {
+ "id": "54e9ea0e.6ae744",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 663.4523947579519,
+ "y": 384.1666831970215,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "d1e3ee4b.ceb14"
+ ]
+ ]
+ },
+ {
+ "id": "d1e3ee4b.ceb14",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"service-information.service-instance-id is a required input\" />\n",
+ "comments": "",
+ "x": 814.8809607369558,
+ "y": 384.16668128967285,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "286a5aeb.cd2826",
+ "type": "switchNode",
+ "name": "switch vnf-id",
+ "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 408.5238227844238,
+ "y": 427.6666774749756,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "bb28e2bc.36c43"
+ ]
+ ]
+ },
+ {
+ "id": "bb28e2bc.36c43",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 663.8095321655273,
+ "y": 426.23810958862305,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "9c9ba7cb.f1d4b8"
+ ]
+ ]
+ },
+ {
+ "id": "9c9ba7cb.f1d4b8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-information.vnf-id is a required input\" />\n",
+ "comments": "",
+ "x": 815.2380981445312,
+ "y": 426.2381076812744,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ },
+ {
+ "id": "217fcc81.9f4ba4",
+ "type": "switchNode",
+ "name": "switch aic-cloud-region",
+ "xml": "<switch test='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 947.6666946411133,
+ "y": 570.238094329834,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "30f287b7.9d1118"
+ ]
+ ]
+ },
+ {
+ "id": "30f287b7.9d1118",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1174.3810119628906,
+ "y": 570.2381286621094,
+ "z": "19ac43dc.b5de6c",
+ "wires": [
+ [
+ "44a324d9.932adc"
+ ]
+ ]
+ },
+ {
+ "id": "44a324d9.932adc",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-request-input.aic-cloud-region is a required input\" />\n",
+ "comments": "",
+ "x": 1325.8095779418945,
+ "y": 570.2381267547607,
+ "z": "19ac43dc.b5de6c",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.json
new file mode 100644
index 00000000..4362290d
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-activate.json
@@ -0,0 +1,790 @@
+[
+ {
+ "id": "b3e2f5b2.d1ec88",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 108.33332824707031,
+ "y": 85,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "dab5982.c2d8368"
+ ]
+ ]
+ },
+ {
+ "id": "dab5982.c2d8368",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 183.61903381347656,
+ "y": 125.23811149597168,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "c935cee3.ef7d4"
+ ]
+ ]
+ },
+ {
+ "id": "c935cee3.ef7d4",
+ "type": "method",
+ "name": "method vf-module-topology-operation-activate",
+ "xml": "<method rpc='vf-module-topology-operation-activate' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 221.76195526123047,
+ "y": 165,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "c8f7adca.75964"
+ ]
+ ]
+ },
+ {
+ "id": "5cec4e55.d222e",
+ "type": "comment",
+ "name": "vf-module-topology-operation-activate",
+ "info": "",
+ "comments": "",
+ "x": 502.67818450927734,
+ "y": 32.58634376525879,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "f55136c4.7d1fa8",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 511.85713958740234,
+ "y": 263.8571376800537,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "a5be9328.059ac",
+ "268e67a.bb73198"
+ ]
+ ]
+ },
+ {
+ "id": "a5be9328.059ac",
+ "type": "outcome",
+ "name": "CreateVfModuleInstance",
+ "xml": "<outcome value='CreateVfModuleInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 762.9047546386719,
+ "y": 241.0000238418579,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "e97fb6eb.1f8fb8"
+ ]
+ ]
+ },
+ {
+ "id": "268e67a.bb73198",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 706.5713996887207,
+ "y": 286.38101291656494,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "9d82fd59.8a632"
+ ]
+ ]
+ },
+ {
+ "id": "e97fb6eb.1f8fb8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 952.7619190216064,
+ "y": 241.00005531311035,
+ "z": "836e826a.3ec22",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9d82fd59.8a632",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'activate' then request-action must be 'CreateVfModuleInstance'\" />\n",
+ "comments": "",
+ "x": 971.5714073181152,
+ "y": 286.71432542800903,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "c8f7adca.75964",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 153.3333282470703,
+ "y": 493.3332939147949,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "f55136c4.7d1fa8",
+ "33462c4c.518eb4",
+ "2c1ab3ca.482e0c",
+ "979e92c5.d53fe",
+ "ea5f4c6f.d1309",
+ "aae32e5.23f3cd",
+ "98ce7a09.d3e438",
+ "41d0df4e.5c136",
+ "65dc8315.181b9c",
+ "cb036b0b.8b11c8",
+ "78ecfd34.349dc4",
+ "e0f8a4a9.becc18",
+ "c3cab201.2d1ef"
+ ]
+ ]
+ },
+ {
+ "id": "2c1ab3ca.482e0c",
+ "type": "switchNode",
+ "name": "switch service-data.vnfs.vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 556.6666564941406,
+ "y": 394.9999647140503,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "d78e72e2.ad098",
+ "224b172.962d2e8"
+ ]
+ ]
+ },
+ {
+ "id": "d78e72e2.ad098",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 797.3809280395508,
+ "y": 372.1427049636841,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "d7ea4aa1.bfcb38"
+ ]
+ ]
+ },
+ {
+ "id": "224b172.962d2e8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 797.1427688598633,
+ "y": 413.09522342681885,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "42ba44cf.9db11c"
+ ]
+ ]
+ },
+ {
+ "id": "d7ea4aa1.bfcb38",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"There are no VNFs defined in MD-SAL\" />\n",
+ "comments": "",
+ "x": 964.0475425720215,
+ "y": 371.4284601211548,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "42ba44cf.9db11c",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 959.3809127807617,
+ "y": 412.7618417739868,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "7209f5e7.76dcfc"
+ ]
+ ]
+ },
+ {
+ "id": "7209f5e7.76dcfc",
+ "type": "switchNode",
+ "name": "switch service data vnf == input vnf",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1210.7141304016113,
+ "y": 412.42852878570557,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "42a9a01e.4621d"
+ ]
+ ]
+ },
+ {
+ "id": "42a9a01e.4621d",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1440.7142219543457,
+ "y": 411.7618827819824,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "cdb3bc66.5a0d1"
+ ]
+ ]
+ },
+ {
+ "id": "33462c4c.518eb4",
+ "type": "set",
+ "name": "set vnf-index to -1",
+ "xml": "<set>\n<parameter name='vnf-index' value='-1' />\n",
+ "comments": "",
+ "x": 500.7142562866211,
+ "y": 333.09513664245605,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "717cff05.1de83",
+ "type": "set",
+ "name": "set vnf-index to idx",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1762.380859375,
+ "y": 382.7618408203125,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "979e92c5.d53fe",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 492.3809394836426,
+ "y": 459.76183891296387,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "4d87c876.5adff8"
+ ]
+ ]
+ },
+ {
+ "id": "4d87c876.5adff8",
+ "type": "outcome",
+ "name": "-1",
+ "xml": "<outcome value='-1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 670.7143249511719,
+ "y": 459.09521484375,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "f087e977.afc1b8"
+ ]
+ ]
+ },
+ {
+ "id": "f087e977.afc1b8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n",
+ "comments": "",
+ "x": 830.7142333984375,
+ "y": 458.4285182952881,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "cdb3bc66.5a0d1",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1589.0476837158203,
+ "y": 410.6815814971924,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "717cff05.1de83",
+ "ee458420.1b46d8"
+ ]
+ ]
+ },
+ {
+ "id": "ee458420.1b46d8",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 1724.047649383545,
+ "y": 432.3481674194336,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "aae32e5.23f3cd",
+ "type": "switchNode",
+ "name": "switch service-data...vf-module_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 564.9999694824219,
+ "y": 558.3333358764648,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "9b945904.62b6c8",
+ "9b02b5f9.8a49d8"
+ ]
+ ]
+ },
+ {
+ "id": "9b945904.62b6c8",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 815.7142791748047,
+ "y": 537.1427392959595,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "67892bd4.9c5464"
+ ]
+ ]
+ },
+ {
+ "id": "9b02b5f9.8a49d8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 815.4761199951172,
+ "y": 578.0952577590942,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "526cbef0.bed3f"
+ ]
+ ]
+ },
+ {
+ "id": "67892bd4.9c5464",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n",
+ "comments": "",
+ "x": 982.3808937072754,
+ "y": 536.4284944534302,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "526cbef0.bed3f",
+ "type": "for",
+ "name": "for each vf-module",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 977.7142639160156,
+ "y": 577.7618761062622,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "4f0d7647.56b958"
+ ]
+ ]
+ },
+ {
+ "id": "4f0d7647.56b958",
+ "type": "switchNode",
+ "name": "switch service data vf-module == input vf-module",
+ "xml": "<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`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1284.0474243164062,
+ "y": 577.4286117553711,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "44af7ab9.eed234"
+ ]
+ ]
+ },
+ {
+ "id": "44af7ab9.eed234",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1554.047477722168,
+ "y": 575.0952167510986,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "b035b372.13799"
+ ]
+ ]
+ },
+ {
+ "id": "ea5f4c6f.d1309",
+ "type": "set",
+ "name": "set vf-module-index to -1",
+ "xml": "<set>\n<parameter name='vf-module-index' value='-1' />\n",
+ "comments": "",
+ "x": 520.714241027832,
+ "y": 508.0951747894287,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "89c9c4bd.a873a8",
+ "type": "set",
+ "name": "set vf-module-index to idx",
+ "xml": "<set>\n<parameter name='vf-module-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1884.0475692749023,
+ "y": 546.0951957702637,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "98ce7a09.d3e438",
+ "type": "switchNode",
+ "name": "switch vf-module-index",
+ "xml": "<switch test='`$vf-module-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 517.3809432983398,
+ "y": 626.4285945892334,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "b9c45c6b.a9187"
+ ]
+ ]
+ },
+ {
+ "id": "b9c45c6b.a9187",
+ "type": "outcome",
+ "name": "-1",
+ "xml": "<outcome value='-1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 695.7143287658691,
+ "y": 625.7619705200195,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "d59bf3a9.b26b2"
+ ]
+ ]
+ },
+ {
+ "id": "d59bf3a9.b26b2",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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'`\" />\n",
+ "comments": "",
+ "x": 855.7142372131348,
+ "y": 625.0952739715576,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "b035b372.13799",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1687.3810195922852,
+ "y": 574.0149564743042,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "89c9c4bd.a873a8",
+ "520e0d13.8fb9c4"
+ ]
+ ]
+ },
+ {
+ "id": "520e0d13.8fb9c4",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 1822.3809852600098,
+ "y": 595.6815423965454,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "41d0df4e.5c136",
+ "type": "set",
+ "name": "set order-status to Created",
+ "xml": "<set>\n<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'\n value='Created' />\n<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'\n value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />\n<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'\n value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />\n",
+ "comments": "",
+ "x": 535.0000610351562,
+ "y": 945.0000171661377,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "65dc8315.181b9c",
+ "type": "switchNode",
+ "name": "switch order-status",
+ "xml": "<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`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 508.33329010009766,
+ "y": 695.6666564941406,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "6bec43cd.c6ce2c",
+ "a5ffb8bd.544748"
+ ]
+ ]
+ },
+ {
+ "id": "6bec43cd.c6ce2c",
+ "type": "outcome",
+ "name": "PendingCreate",
+ "xml": "<outcome value='PendingCreate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 720.0000343322754,
+ "y": 673.9999809265137,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "b627f4fa.590738"
+ ]
+ ]
+ },
+ {
+ "id": "a5ffb8bd.544748",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 697.0000228881836,
+ "y": 719.380952835083,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "69bb9844.70fda8"
+ ]
+ ]
+ },
+ {
+ "id": "b627f4fa.590738",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 874.8571701049805,
+ "y": 673.3333835601807,
+ "z": "836e826a.3ec22",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "69bb9844.70fda8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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'`\" />\n",
+ "comments": "",
+ "x": 894.3333206176758,
+ "y": 719.3810129165649,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "cb036b0b.8b11c8",
+ "type": "set",
+ "name": "copy input data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'\n value='$vf-module-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'\n value='$vf-module-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'\n value='$vf-module-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'\n value='$vf-module-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'\n value='$vf-module-topology-operation-input.vf-module-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'\n value='$vf-module-topology-operation-input.vf-module-request-input.' />\n\n",
+ "comments": "",
+ "x": 500,
+ "y": 896.6666622161865,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "78ecfd34.349dc4",
+ "type": "save",
+ "name": "update vf-module to Active",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"orchestration-status\" value=\"Active\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 533.3332672119141,
+ "y": 783.3332824707031,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "c27006c0.c436d8",
+ "912d9db6.973d9"
+ ]
+ ]
+ },
+ {
+ "id": "e2726395.5642b",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n",
+ "comments": "",
+ "x": 930.0000267028809,
+ "y": 806.666651725769,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "c27006c0.c436d8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 742.6905937194824,
+ "y": 763.6191215515137,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "463820fb.52f55"
+ ]
+ ]
+ },
+ {
+ "id": "912d9db6.973d9",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 751.2620239257812,
+ "y": 807.9048347473145,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "e2726395.5642b"
+ ]
+ ]
+ },
+ {
+ "id": "463820fb.52f55",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module in AAI\" />\n",
+ "comments": "",
+ "x": 932.6906204223633,
+ "y": 763.4288568496704,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "e0f8a4a9.becc18",
+ "type": "update",
+ "name": "Update EIPAM_IP_ASSIGNMENTS to ACTIVE",
+ "xml": "<update resource='SQL' force='true' plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n 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'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 596.6666564941406,
+ "y": 853.333306312561,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "d47fe482.1f7428"
+ ]
+ ]
+ },
+ {
+ "id": "d47fe482.1f7428",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 863.3333282470703,
+ "y": 851.6666460037231,
+ "z": "836e826a.3ec22",
+ "wires": [
+ [
+ "3aa8408e.a33f6"
+ ]
+ ]
+ },
+ {
+ "id": "3aa8408e.a33f6",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating EIPAM_IP_ASSIGNMENTS table\" />\n",
+ "comments": "",
+ "x": 1013.3333282470703,
+ "y": 849.9999589920044,
+ "z": "836e826a.3ec22",
+ "wires": []
+ },
+ {
+ "id": "c3cab201.2d1ef",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 494.9999694824219,
+ "y": 993.3333129882812,
+ "z": "836e826a.3ec22",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json
new file mode 100755
index 00000000..c200265a
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json
@@ -0,0 +1 @@
+[{"id":"ba18c526.d17c78","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":110,"z":"e4baa5a8.a31318","wires":[["8ba9ecd6.6d936"]]},{"id":"8ba9ecd6.6d936","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":243.85713577270508,"y":149.80953788757324,"z":"e4baa5a8.a31318","wires":[["c7127bd0.ef2fd8"]]},{"id":"c7127bd0.ef2fd8","type":"method","name":"method vf-module-topology-operation-assign","xml":"<method rpc='vf-module-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":243.42862701416016,"y":190,"z":"e4baa5a8.a31318","wires":[["79397c09.ed5274"]]},{"id":"21494016.016","type":"comment","name":"vf-module-topology-operation-assign","info":"","comments":"","x":535.3210983276367,"y":52.97569942474365,"z":"e4baa5a8.a31318","wires":[]},{"id":"624fdfec.bf7d8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":535.1905097961426,"y":365.52382230758667,"z":"e4baa5a8.a31318","wires":[["74eeaa1c.be92e4","134c69ff.005316"]]},{"id":"74eeaa1c.be92e4","type":"outcome","name":"CreateVfModuleInstance","xml":"<outcome value='CreateVfModuleInstance'>\n","comments":"","outputs":1,"x":797.2381248474121,"y":342.66670846939087,"z":"e4baa5a8.a31318","wires":[["cb01b9a9.685a48"]]},{"id":"134c69ff.005316","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":740.9047698974609,"y":388.0476975440979,"z":"e4baa5a8.a31318","wires":[["d9c8e7b5.a66ae8"]]},{"id":"cb01b9a9.685a48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":987.0952892303467,"y":342.6667399406433,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"d9c8e7b5.a66ae8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateVfModuleInstance'\" />\n","comments":"","x":1005.9047775268555,"y":388.381010055542,"z":"e4baa5a8.a31318","wires":[]},{"id":"76409cce.086344","type":"get-resource","name":"get-resource VF_MODULE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid'\n pfx='db.vf-module-model'>\n\n","comments":"","outputs":1,"x":582.5237770080566,"y":456.66677236557007,"z":"e4baa5a8.a31318","wires":[["dd68463c.c87178","d3cb4517.ac8c08"]]},{"id":"75201e32.0cf","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":1023.9521980285645,"y":481.09524488449097,"z":"e4baa5a8.a31318","wires":[]},{"id":"dd68463c.c87178","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.3094673156738,"y":437.0476031303406,"z":"e4baa5a8.a31318","wires":[["6f89e52b.bf43cc"]]},{"id":"d3cb4517.ac8c08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":856.8808975219727,"y":481.33331632614136,"z":"e4baa5a8.a31318","wires":[["75201e32.0cf"]]},{"id":"6f89e52b.bf43cc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODULE_MODEL table\" />\n","comments":"","x":1023.309398651123,"y":436.1905035972595,"z":"e4baa5a8.a31318","wires":[]},{"id":"f5aeb74d.5bf438","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":577.6190414428711,"y":665.2381076812744,"z":"e4baa5a8.a31318","wires":[["6bb339ec.749948","e28c0952.e044a8"]]},{"id":"6bb339ec.749948","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":818.3333129882812,"y":642.3808479309082,"z":"e4baa5a8.a31318","wires":[["f1f5dab6.570ce8"]]},{"id":"e28c0952.e044a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":818.0951538085938,"y":683.333366394043,"z":"e4baa5a8.a31318","wires":[["ecd3b0db.60645"]]},{"id":"79397c09.ed5274","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":184.99999237060547,"y":2359.9999599456787,"z":"e4baa5a8.a31318","wires":[["624fdfec.bf7d8","76409cce.086344","f5aeb74d.5bf438","b864bec.d46214","c6d3c332.333ff","5a02ed1a.0ee094","fcb2cab8.814f18","67c44cf7.b6baf4","478f6983.a5e0a8","b69a54c5.a45d58","c2526b9f.9838f8","b384890d.a43ff8","7ee29093.2b4b4","706746b8.19a5e8","21781bbf.a9cfb4","dac77f20.01493","f90accfc.bc38","eab0098.e0d50f8","3ec776dc.c4924a","90e381df.54c71","7d2ca2a2.73c80c","388ab739.6c4fe8","9b75b20e.4510a","e8889dec.9dd74","ac1085e3.f13938","319cf957.f6edb6","c811246.d8ba4d8","efa475b7.980ae8","a247b0d0.a589c","f833ef67.9cf92","95db0874.7fa668","b87f9fec.9ac9e","a03bb466.634808","3c8bd226.36546e","f8307ef3.44142","21f945ed.4703fa","4646e366.6582ec","fc1913b.4d832f"]]},{"id":"f1f5dab6.570ce8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"There are no VNFs defined in MD-SAL\" />\n","comments":"","x":984.999927520752,"y":641.6666030883789,"z":"e4baa5a8.a31318","wires":[]},{"id":"ecd3b0db.60645","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":980.3332977294922,"y":682.9999847412109,"z":"e4baa5a8.a31318","wires":[["1be32734.9e3679"]]},{"id":"1be32734.9e3679","type":"switchNode","name":"switch service data vnf == input vnf","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n","comments":"","outputs":1,"x":1231.6665153503418,"y":682.6666717529297,"z":"e4baa5a8.a31318","wires":[["2c5659ec.ad3dd6"]]},{"id":"2c5659ec.ad3dd6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1461.6666069030762,"y":682.0000257492065,"z":"e4baa5a8.a31318","wires":[["d38d34bf.3a83a8"]]},{"id":"b864bec.d46214","type":"set","name":"set vnf-index to -1","xml":"<set>\n<parameter name='vnf-index' value='-1' />\n","comments":"","x":526.6666641235352,"y":596.6666069030762,"z":"e4baa5a8.a31318","wires":[]},{"id":"78e4042f.0ca05c","type":"set","name":"set vnf-index to idx","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1783.3332443237305,"y":652.9999837875366,"z":"e4baa5a8.a31318","wires":[]},{"id":"c6d3c332.333ff","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":516.6666717529297,"y":733.3333034515381,"z":"e4baa5a8.a31318","wires":[["1476b5d.81c794a"]]},{"id":"1476b5d.81c794a","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":695.000057220459,"y":732.6666793823242,"z":"e4baa5a8.a31318","wires":[["ae034b1a.ea5ad8"]]},{"id":"ae034b1a.ea5ad8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n","comments":"","x":854.9999656677246,"y":731.9999828338623,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a02ed1a.0ee094","type":"switchNode","name":"switch vnf order status","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":539.6666946411133,"y":804.6667003631592,"z":"e4baa5a8.a31318","wires":[["6e55331.17400cc","31914e29.080322"]]},{"id":"6e55331.17400cc","type":"outcome","name":"Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":739.9999961853027,"y":778.3332843780518,"z":"e4baa5a8.a31318","wires":[["efaa33f.0a25bd"]]},{"id":"efaa33f.0a25bd","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":880.0000076293945,"y":778.3333263397217,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"31914e29.080322","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":736.666633605957,"y":819.9999618530273,"z":"e4baa5a8.a31318","wires":[["d09d7b5b.818158"]]},{"id":"d09d7b5b.818158","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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'`\" />\n","comments":"","x":896.666633605957,"y":819.6666488647461,"z":"e4baa5a8.a31318","wires":[]},{"id":"fcb2cab8.814f18","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":543.333381652832,"y":896.6666212081909,"z":"e4baa5a8.a31318","wires":[["9263cf35.cb3cc","a2f6c209.2980d"]]},{"id":"9263cf35.cb3cc","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":800.7143363952637,"y":863.8093948364258,"z":"e4baa5a8.a31318","wires":[["37fa8c70.964c34"]]},{"id":"37fa8c70.964c34","type":"set","name":"set vf-module-index=0","xml":"<set>\n<parameter name='vf-module-index' value='0' />\n","comments":"","x":988.3333740234375,"y":864.4761695861816,"z":"e4baa5a8.a31318","wires":[]},{"id":"a2f6c209.2980d","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":801.142879486084,"y":928.0952529907227,"z":"e4baa5a8.a31318","wires":[["db5c1b7f.efac08"]]},{"id":"632dd1f4.02485","type":"set","name":"set vf-module-index = vf-module_length","xml":"<set>\n<parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />\n","comments":"","x":1186.3334197998047,"y":908.2856483459473,"z":"e4baa5a8.a31318","wires":[]},{"id":"82872a13.5fe7f8","type":"for","name":"for each existing VF module","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1145.4285125732422,"y":952.3808784484863,"z":"e4baa5a8.a31318","wires":[["79d6fba6.5029b4"]]},{"id":"db5c1b7f.efac08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":937.8571586608887,"y":928.095178604126,"z":"e4baa5a8.a31318","wires":[["632dd1f4.02485","82872a13.5fe7f8"]]},{"id":"79d6fba6.5029b4","type":"switchNode","name":"switch vf-module-information.vf-module-id == service-data.vnfs.vnf[].vf-modules.vf-module[].vf-module-id","xml":"<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`'>\n","comments":"","outputs":1,"x":1649.0476150512695,"y":951.9522895812988,"z":"e4baa5a8.a31318","wires":[["5d658a75.3975d4"]]},{"id":"5d658a75.3975d4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2091.666664123535,"y":951.5237407684326,"z":"e4baa5a8.a31318","wires":[["421b0ac1.c08aa4"]]},{"id":"421b0ac1.c08aa4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id\n + ' 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`\" />\n","comments":"","x":2243.571544647217,"y":951.5237274169922,"z":"e4baa5a8.a31318","wires":[]},{"id":"2c370c75.fc9a44","type":"comment","name":"make sure this VF module doesn't exist already","info":"","comments":"","x":1675.4999618530273,"y":906.5797815322876,"z":"e4baa5a8.a31318","wires":[]},{"id":"67c44cf7.b6baf4","type":"set","name":"set new vf-module_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />\n","comments":"","x":548.3333206176758,"y":991.6665554046631,"z":"e4baa5a8.a31318","wires":[]},{"id":"478f6983.a5e0a8","type":"set","name":"set vf-module-topology data","xml":"<set>\n<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`' />\n<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`' />\n<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`' />\n<parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />\n<parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />\n","comments":"","x":554.8333396911621,"y":1104.1666622161865,"z":"e4baa5a8.a31318","wires":[]},{"id":"9f4a6c82.752a2","type":"set","name":"set aic-clli","xml":"<set>\n<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'\n value='`$aai-uid-split[$aai-uid-split_length - 1]`' />\n","comments":"","x":1315.7855987548828,"y":1263.4045886993408,"z":"e4baa5a8.a31318","wires":[]},{"id":"b69a54c5.a45d58","type":"switchNode","name":"switch aic-clli","xml":"<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`'>\n","comments":"","outputs":1,"x":514.8332595825195,"y":1377.3569288253784,"z":"e4baa5a8.a31318","wires":[["63670893.1e3b68"]]},{"id":"63670893.1e3b68","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":660.1189498901367,"y":1377.3569974899292,"z":"e4baa5a8.a31318","wires":[["d1949d38.26893"]]},{"id":"d1949d38.26893","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":807.2618103027344,"y":1376.9284315109253,"z":"e4baa5a8.a31318","wires":[]},{"id":"c2526b9f.9838f8","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":553.6904754638672,"y":1177.5002002716064,"z":"e4baa5a8.a31318","wires":[["2e9679c1.dabc26","556ec535.b1abec"]]},{"id":"556ec535.b1abec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":767.9366683959961,"y":1195.6510562896729,"z":"e4baa5a8.a31318","wires":[["59e25d61.85e274"]]},{"id":"59e25d61.85e274","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":942.9366416931152,"y":1195.6510925292969,"z":"e4baa5a8.a31318","wires":[]},{"id":"2e9679c1.dabc26","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":776.8652648925781,"y":1153.9367895126343,"z":"e4baa5a8.a31318","wires":[["7d7ab12a.70ec1"]]},{"id":"7d7ab12a.70ec1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":943.214542388916,"y":1153.2423667907715,"z":"e4baa5a8.a31318","wires":[]},{"id":"b384890d.a43ff8","type":"set","name":"set vf-module-parameters","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-parameters.'\n value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />\n","comments":"","x":550.595287322998,"y":1826.7860202789307,"z":"e4baa5a8.a31318","wires":[]},{"id":"7ee29093.2b4b4","type":"set","name":"set order-status to PendingCreate","xml":"<set>\n<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'\n value='PendingCreate' />\n<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'\n value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />\n<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'\n value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />\n","comments":"","x":574.9762725830078,"y":4824.6424016952515,"z":"e4baa5a8.a31318","wires":[]},{"id":"706746b8.19a5e8","type":"get-resource","name":"get-resource VF_MODULE_TO_VFC_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n 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'\n pfx='db.vf-module-to-vfc-mapping[]'>\n\n","comments":"","outputs":1,"x":623.9286880493164,"y":1880.642807006836,"z":"e4baa5a8.a31318","wires":[["c1f20ca7.f60de","10a18f7e.33e891"]]},{"id":"c1f20ca7.f60de","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":889.7143783569336,"y":1861.0236377716064,"z":"e4baa5a8.a31318","wires":[["4ecc9002.756aa"]]},{"id":"10a18f7e.33e891","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":898.2858085632324,"y":1905.3093509674072,"z":"e4baa5a8.a31318","wires":[["45ef9bd1.40c894"]]},{"id":"4ecc9002.756aa","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODULE_TO_VFC_MAPPING table\" />\n","comments":"","x":1064.7143096923828,"y":1860.1665382385254,"z":"e4baa5a8.a31318","wires":[]},{"id":"21781bbf.a9cfb4","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$db.vf-module-to-vfc-mapping_length`' >\n","comments":"","outputs":1,"x":524.0476989746094,"y":2509.6430587768555,"z":"e4baa5a8.a31318","wires":[["cabbea55.2886f8"]]},{"id":"d0795bff.bc69c8","type":"get-resource","name":"get-resource VFC_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VFC_MODEL WHERE customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n pfx='db.vfc-model'>\n\n","comments":"","outputs":1,"x":965.9524993896484,"y":2001.5477199554443,"z":"e4baa5a8.a31318","wires":[["9c63e2cb.97fb5","8d0e208f.5920d"]]},{"id":"c84a73cd.c4e67","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":1336.3808479309082,"y":2025.9761123657227,"z":"e4baa5a8.a31318","wires":[]},{"id":"9c63e2cb.97fb5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1161.7381172180176,"y":1981.9284706115723,"z":"e4baa5a8.a31318","wires":[["28822387.baf9cc"]]},{"id":"8d0e208f.5920d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1170.3095474243164,"y":2026.214183807373,"z":"e4baa5a8.a31318","wires":[["c84a73cd.c4e67"]]},{"id":"28822387.baf9cc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VFC_MODEL table\" />\n","comments":"","x":1336.7380485534668,"y":1981.0713710784912,"z":"e4baa5a8.a31318","wires":[]},{"id":"cabbea55.2886f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":715.9524917602539,"y":2508.214427947998,"z":"e4baa5a8.a31318","wires":[["d0795bff.bc69c8","eca0516a.3fa5d","f1ac110f.7a32d","1d9d491.32bd1b7","7518d7bc.8082b8","d99614b2.38ddf8","79dd1a08.432464","141da799.5b84c8"]]},{"id":"7d2ca2a2.73c80c","type":"set","name":"set vm_length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm_length'\n value='`$db.vf-module-to-vfc-mapping_length`' />\n","comments":"","x":515.833366394043,"y":1940.8334846496582,"z":"e4baa5a8.a31318","wires":[]},{"id":"eca0516a.3fa5d","type":"set","name":"set vm data","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-type`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code'\n value='`$db.vfc-model.nfc-naming-code`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type-tag'\n value='`$db.vfc-model.vm-type-tag`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":916.6667518615723,"y":2127.5001974105835,"z":"e4baa5a8.a31318","wires":[]},{"id":"d38d34bf.3a83a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1610.0000686645508,"y":680.9197244644165,"z":"e4baa5a8.a31318","wires":[["78e4042f.0ca05c","a7ac7b7.2ad2e88"]]},{"id":"a7ac7b7.2ad2e88","type":"break","name":"break","xml":"<break>\n","comments":"","x":1745.0000343322754,"y":702.5863103866577,"z":"e4baa5a8.a31318","wires":[]},{"id":"50cfe9ae.372c38","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-invariant-uuid'\n value='`$db.vf-module-model.invariant-uuid`' />\n","comments":"","x":929.1665992736816,"y":1418.7529220581055,"z":"e4baa5a8.a31318","wires":[]},{"id":"dac77f20.01493","type":"switchNode","name":"switch input model-invariant-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":573.0236740112305,"y":1441.5773658752441,"z":"e4baa5a8.a31318","wires":[["659c77e9.7f4f18","74de5833.fee938"]]},{"id":"659c77e9.7f4f18","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":778.6903457641602,"y":1418.720329284668,"z":"e4baa5a8.a31318","wires":[["50cfe9ae.372c38"]]},{"id":"74de5833.fee938","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":780.1189422607422,"y":1463.0059204101562,"z":"e4baa5a8.a31318","wires":[["a1fe0326.3a53b"]]},{"id":"a1fe0326.3a53b","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-invariant-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-invariant-uuid`' />\n","comments":"","x":934.4046783447266,"y":1462.4344925880432,"z":"e4baa5a8.a31318","wires":[]},{"id":"2dd9c208.718fae","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-uuid'\n value='`$db.vf-module-model.uuid`' />\n","comments":"","x":930.1188697814941,"y":1507.2915983200073,"z":"e4baa5a8.a31318","wires":[]},{"id":"f90accfc.bc38","type":"switchNode","name":"switch input model-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":545.642692565918,"y":1530.1161031723022,"z":"e4baa5a8.a31318","wires":[["51f29715.20d0f8","d6f024f9.949348"]]},{"id":"51f29715.20d0f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":779.6426658630371,"y":1507.2590351104736,"z":"e4baa5a8.a31318","wires":[["2dd9c208.718fae"]]},{"id":"d6f024f9.949348","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":781.0712623596191,"y":1551.544626235962,"z":"e4baa5a8.a31318","wires":[["62042fb1.77272"]]},{"id":"62042fb1.77272","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-uuid`' />\n","comments":"","x":935.3569984436035,"y":1550.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"a6bf8c48.b281b","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-version'\n value='`$db.vf-module-model.version`' />\n","comments":"","x":927.2618026733398,"y":1596.1488056182861,"z":"e4baa5a8.a31318","wires":[]},{"id":"eab0098.e0d50f8","type":"switchNode","name":"switch input model-version","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-version`'>\n","comments":"","outputs":1,"x":553.7855644226074,"y":1618.9732503890991,"z":"e4baa5a8.a31318","wires":[["4ccd7.162a832a","518ded3e.75ca04"]]},{"id":"4ccd7.162a832a","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1596.1162128448486,"z":"e4baa5a8.a31318","wires":[["a6bf8c48.b281b"]]},{"id":"518ded3e.75ca04","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1640.401803970337,"z":"e4baa5a8.a31318","wires":[["638ada17.7c2584"]]},{"id":"638ada17.7c2584","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-version'\n value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-version`' />\n","comments":"","x":932.4998817443848,"y":1639.8303761482239,"z":"e4baa5a8.a31318","wires":[]},{"id":"f4c6962e.75c988","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-name'\n value='`$db.vf-module-model.name`' />\n","comments":"","x":927.2618026733398,"y":1683.2916278839111,"z":"e4baa5a8.a31318","wires":[]},{"id":"3ec776dc.c4924a","type":"switchNode","name":"switch input model-name","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-name`'>\n","comments":"","outputs":1,"x":548.7855644226074,"y":1706.1160726547241,"z":"e4baa5a8.a31318","wires":[["7600c1a1.34774","dd561948.d52d48"]]},{"id":"7600c1a1.34774","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1683.2590351104736,"z":"e4baa5a8.a31318","wires":[["f4c6962e.75c988"]]},{"id":"dd561948.d52d48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1727.544626235962,"z":"e4baa5a8.a31318","wires":[["5381543.b5468ac"]]},{"id":"5381543.b5468ac","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-name'\n value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-name`' />\n","comments":"","x":932.4998817443848,"y":1726.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"90e381df.54c71","type":"set","name":"set model-customization-uuid","xml":"<set>\n<parameter name='tmp.vf-module-topology.ecomp-model-information.model-customization-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.ecomp-model-information.model-customization-uuid`' />\n","comments":"","x":563.2378997802734,"y":1778.6250619888306,"z":"e4baa5a8.a31318","wires":[]},{"id":"f1ac110f.7a32d","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":918.3332405090332,"y":2236.7531156539917,"z":"e4baa5a8.a31318","wires":[["8e6b243f.583508"]]},{"id":"1d9d491.32bd1b7","type":"set","name":"set vm-name-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":941.6666946411133,"y":2171.753373146057,"z":"e4baa5a8.a31318","wires":[]},{"id":"18165004.df83","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1384.761863708496,"y":2259.3722620010376,"z":"e4baa5a8.a31318","wires":[["e76d3ba1.b484f8","2a1c5abf.cc7856"]]},{"id":"e76d3ba1.b484f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1680.4761517842617,"y":2232.2295246124268,"z":"e4baa5a8.a31318","wires":[["4baa2d79.9b13e4"]]},{"id":"2a1c5abf.cc7856","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1683.8095016479492,"y":2283.896167755127,"z":"e4baa5a8.a31318","wires":[["8626bbb.4150148"]]},{"id":"1575979f.adc098","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='VM_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vm_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='VM_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-name + $db.vfc-model.nfc-naming-code`\" />\n<parameter name='generate-unique-name-input.index-length' value='3' />\n","comments":"","x":1341.4285774230957,"y":2207.7055883407593,"z":"e4baa5a8.a31318","wires":[]},{"id":"8626bbb.4150148","type":"set","name":"set generated name","xml":"<set>\n<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`' />\n","comments":"","x":1868.3332176208496,"y":2283.3721857070923,"z":"e4baa5a8.a31318","wires":[]},{"id":"4baa2d79.9b13e4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1848.3332646687832,"y":2231.6580362319946,"z":"e4baa5a8.a31318","wires":[]},{"id":"388ab739.6c4fe8","type":"set","name":"set vf-module-id","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'\n value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n","comments":"","x":516.4285469055176,"y":1047.348237991333,"z":"e4baa5a8.a31318","wires":[]},{"id":"8e6b243f.583508","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1082.738182067871,"y":2236.396019935608,"z":"e4baa5a8.a31318","wires":[["1575979f.adc098","18165004.df83"]]},{"id":"7518d7bc.8082b8","type":"get-resource","name":"get-resource VFC_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VFC_TO_NETWORK_ROLE_MAPPING WHERE vfc_customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n pfx='db.vfc-to-network-role-mapping[]'>\n\n","comments":"","outputs":1,"x":1045.595329284668,"y":2359.253088951111,"z":"e4baa5a8.a31318","wires":[["71a08ee7.14c92","7a73e707.b51298"]]},{"id":"71a08ee7.14c92","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1332.8095321655273,"y":2339.6339359283447,"z":"e4baa5a8.a31318","wires":[["42a3db7c.c4bde4"]]},{"id":"7a73e707.b51298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1341.3809623718262,"y":2383.9196491241455,"z":"e4baa5a8.a31318","wires":[["d5efedb2.7d60c"]]},{"id":"42a3db7c.c4bde4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VFC_TO_NETWORK_ROLE_MAPPING table\" />\n","comments":"","x":1507.8094635009766,"y":2338.7768363952637,"z":"e4baa5a8.a31318","wires":[]},{"id":"d99614b2.38ddf8","type":"for","name":"for each network-role","xml":"<for index='network-role-index' start='0' end='`$db.vfc-to-network-role-mapping_length`' >\n","comments":"","outputs":1,"x":938.6906204223633,"y":2670.4439306259155,"z":"e4baa5a8.a31318","wires":[["4bcabc98.ea4e24"]]},{"id":"4bcabc98.ea4e24","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1145.1190719604492,"y":2667.11043548584,"z":"e4baa5a8.a31318","wires":[["36a6c86d.097308","837f1dbf.dff44","35c5bc83.48f7c4","65409122.eeca2","da28f677.f45f78","231dd30.999172e","bdd6810f.244ea","47edc8c7.d583e8"]]},{"id":"36a6c86d.097308","type":"for","name":"for each network","xml":"<for silentFailure='true' index='idx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1354.166633605957,"y":2499.253191947937,"z":"e4baa5a8.a31318","wires":[["89e2ef85.52c62"]]},{"id":"837f1dbf.dff44","type":"set","name":"set network-index to -1","xml":"<set>\n<parameter name='network-index' value='-1' />\n","comments":"","x":1374.1667022705078,"y":2456.396188735962,"z":"e4baa5a8.a31318","wires":[]},{"id":"89e2ef85.52c62","type":"switchNode","name":"switch network-role matches","xml":"<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`'>\n","comments":"","outputs":1,"x":1582.737907409668,"y":2497.824381828308,"z":"e4baa5a8.a31318","wires":[["16b2e9a3.043416"]]},{"id":"16b2e9a3.043416","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1781.3095741271973,"y":2497.824585914612,"z":"e4baa5a8.a31318","wires":[["db944d5d.b6668"]]},{"id":"db944d5d.b6668","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1922.7381420135498,"y":2496.396014213562,"z":"e4baa5a8.a31318","wires":[["67f3ef04.c0a6c","18ca7106.b738af"]]},{"id":"67f3ef04.c0a6c","type":"set","name":"set network-index to idx","xml":"<set>\n<parameter name='network-index' value='`$idx`' />\n","comments":"","x":2101.30965423584,"y":2473.5390100479126,"z":"e4baa5a8.a31318","wires":[]},{"id":"18ca7106.b738af","type":"break","name":"break","xml":"<break>\n","comments":"","x":2049.8808937072754,"y":2519.2531900405884,"z":"e4baa5a8.a31318","wires":[]},{"id":"35c5bc83.48f7c4","type":"switchNode","name":"switch network-index","xml":"<switch test='`$network-index`'>\n","comments":"","outputs":1,"x":1366.0714721679688,"y":2548.062829017639,"z":"e4baa5a8.a31318","wires":[["170e8f83.a9e23"]]},{"id":"170e8f83.a9e23","type":"outcomeTrue","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1560.3571968078613,"y":2548.062726020813,"z":"e4baa5a8.a31318","wires":[["a6e6e9d9.38e488"]]},{"id":"a6e6e9d9.38e488","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":1717.5000457763672,"y":2546.634196281433,"z":"e4baa5a8.a31318","wires":[]},{"id":"9b75b20e.4510a","type":"for","name":"for each cloud-region relationship","xml":"<for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":575.9442901611328,"y":1266.0068836212158,"z":"e4baa5a8.a31318","wires":[["1b8a998c.af1726"]]},{"id":"1b8a998c.af1726","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":823.6228332519531,"y":1265.7568130493164,"z":"e4baa5a8.a31318","wires":[["8a817450.4b3f18"]]},{"id":"8a817450.4b3f18","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":993.0871543884277,"y":1265.1496353149414,"z":"e4baa5a8.a31318","wires":[["30bd9ac8.a95e36"]]},{"id":"5de7c2d5.2e20dc","type":"execute","name":"split related-link","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n <parameter name='ctx_memory_result_key' value='aai-uid-split' />\n <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />\n <parameter name='regex' value='/' />\n","comments":"","outputs":1,"x":1333.1823120117188,"y":1219.5782108306885,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"30bd9ac8.a95e36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1152.8490142822266,"y":1266.2449989318848,"z":"e4baa5a8.a31318","wires":[["5de7c2d5.2e20dc","e5801a20.119d08","9f4a6c82.752a2"]]},{"id":"e5801a20.119d08","type":"break","name":"break","xml":"<break>\n","comments":"","x":1302.848976135254,"y":1309.5782957077026,"z":"e4baa5a8.a31318","wires":[]},{"id":"65409122.eeca2","type":"set","name":"set network-role and tag","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role-tag'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role-tag`' />\n","comments":"","x":1375.8333549499512,"y":2644.2530155181885,"z":"e4baa5a8.a31318","wires":[]},{"id":"79dd1a08.432464","type":"set","name":"set vm-network-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length'\n value='`$db.vfc-to-network-role-mapping_length`' />\n","comments":"","x":932.4999465942383,"y":3059.2532806396484,"z":"e4baa5a8.a31318","wires":[]},{"id":"da28f677.f45f78","type":"switchNode","name":"switch ipv4-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-ip-version`'>\n","comments":"","outputs":1,"x":1368.452407836914,"y":2727.5863428115845,"z":"e4baa5a8.a31318","wires":[["ba64a787.ba4118","2e9fc1a3.0b9b9e"]]},{"id":"d7307d95.7b8c5","type":"set","name":"set network-information-index to -1","xml":"<set>\n<parameter name='network-information-index' value='-1' />\n\n","comments":"","x":1777.97603225708,"y":2692.5864477157593,"z":"e4baa5a8.a31318","wires":[]},{"id":"ba64a787.ba4118","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1545.1189270019531,"y":2692.586483001709,"z":"e4baa5a8.a31318","wires":[["d7307d95.7b8c5"]]},{"id":"2e9fc1a3.0b9b9e","type":"other","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":1543.8808784484863,"y":2758.538625717163,"z":"e4baa5a8.a31318","wires":[["8dd043b4.688fd"]]},{"id":"e6d285da.6bc2f8","type":"set","name":"set network-information-index to 0","xml":"<set>\n<parameter name='network-information-index' value='0' />\n","comments":"","x":1948.4521408081055,"y":2733.0624866485596,"z":"e4baa5a8.a31318","wires":[]},{"id":"8dd043b4.688fd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1711.0713539123535,"y":2757.872091293335,"z":"e4baa5a8.a31318","wires":[["e6d285da.6bc2f8","909b57b.c66aea8"]]},{"id":"909b57b.c66aea8","type":"set","name":"set ip-version 4, use-dhcp, and ip-count","xml":"<set>\n<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'\n value='4' />\n<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'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-use-dhcp`' />\n<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'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-count`' />\n","comments":"","x":1965.4047241210938,"y":2779.7294425964355,"z":"e4baa5a8.a31318","wires":[]},{"id":"231dd30.999172e","type":"switchNode","name":"switch ipv6-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-ip-version`'>\n","comments":"","outputs":1,"x":1368.9286041259766,"y":2854.4911251068115,"z":"e4baa5a8.a31318","wires":[["a42f90da.1aa4c","95f6b1ee.0f4d1"]]},{"id":"a42f90da.1aa4c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1547.7380981445312,"y":2824.728937149048,"z":"e4baa5a8.a31318","wires":[["8ebef5b1.d07e78"]]},{"id":"95f6b1ee.0f4d1","type":"other","name":"6","xml":"<outcome value='6'>\n","comments":"","outputs":1,"x":1549.1666526794434,"y":2889.0144939422607,"z":"e4baa5a8.a31318","wires":[["2ae9d1a1.54891e"]]},{"id":"71edbafa.5f48b4","type":"set","name":"increment network-information-index","xml":"<set>\n<parameter name='network-information-index' value='`$network-information-index + 1`' />\n","comments":"","x":1954.880744934082,"y":2863.5385236740112,"z":"e4baa5a8.a31318","wires":[]},{"id":"2ae9d1a1.54891e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1704.4048118591309,"y":2888.0622329711914,"z":"e4baa5a8.a31318","wires":[["71edbafa.5f48b4","a89d1a7f.ee0778"]]},{"id":"8ebef5b1.d07e78","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1690.404727935791,"y":2824.0625553131104,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"bdd6810f.244ea","type":"switchNode","name":"switch network-information-index","xml":"<switch test='`$network-information-index`'>\n","comments":"","outputs":1,"x":1404.166618347168,"y":2990.919370651245,"z":"e4baa5a8.a31318","wires":[["b53bbeec.db42f","b1edd581.077538"]]},{"id":"b53bbeec.db42f","type":"outcome","name":"-1","xml":"<outcome value='-1'>","comments":"","outputs":1,"x":1622.4999752044678,"y":2967.5861167907715,"z":"e4baa5a8.a31318","wires":[["ba350989.b70fd8"]]},{"id":"b1edd581.077538","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1622.2619380950928,"y":3013.5384311676025,"z":"e4baa5a8.a31318","wires":[["9b9cf9cc.6a7228"]]},{"id":"ba350989.b70fd8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1759.166690826416,"y":2965.919776916504,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"9b9cf9cc.6a7228","type":"set","name":"set network-information-item_length","xml":"<set>\n<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'\n value='`$network-information-index + 1`' />\n","comments":"","x":1850.8333053588867,"y":3010.919569015503,"z":"e4baa5a8.a31318","wires":[]},{"id":"e8889dec.9dd74","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":531,"y":3157.9194660186768,"z":"e4baa5a8.a31318","wires":[["8b116d7c.65c33"]]},{"id":"8b116d7c.65c33","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":734.5715255737305,"y":3158.1576709747314,"z":"e4baa5a8.a31318","wires":[["7e90f983.18fa18"]]},{"id":"47edc8c7.d583e8","type":"set","name":"save network-id","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id'\n value='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-id`' />\n","comments":"This isn't a node in MD-SAL, but we need to save this for later when we are doing EIPAM processing","x":1347.9761810302734,"y":2594.253023147583,"z":"e4baa5a8.a31318","wires":[]},{"id":"7e90f983.18fa18","type":"for","name":"for each network-role","xml":"<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`' >\n","comments":"","outputs":1,"x":935.999885559082,"y":3157.252721786499,"z":"e4baa5a8.a31318","wires":[["a533571e.4db208"]]},{"id":"a533571e.4db208","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1137.9047012329102,"y":3156.490758895874,"z":"e4baa5a8.a31318","wires":[["92a08557.b354a8"]]},{"id":"92a08557.b354a8","type":"for","name":"for each network-information-item","xml":"<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`' >\n","comments":"","outputs":1,"x":1382.6665725708008,"y":3156.0151510238647,"z":"e4baa5a8.a31318","wires":[["1eb5f5e8.6678ba"]]},{"id":"b1e701d0.c2cbd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":627.666633605957,"y":3361.9195766448975,"z":"e4baa5a8.a31318","wires":[["a3c5a1c.0beeb6","d65acdc0.dafd8","c7baae79.a8d3a","1445f578.93789b","c5ac535a.19e0c"]]},{"id":"a3c5a1c.0beeb6","type":"get-resource","name":"get-resource EIPAM_IP_SUBNETS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n 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\n 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'\n pfx='db.eipam-ip-subnets[]'>\n\n","comments":"","outputs":1,"x":1007.6666564941406,"y":3323.586072921753,"z":"e4baa5a8.a31318","wires":[["3976fb7d.92d3d4","959768c3.a1d588"]]},{"id":"39fae58.e71ee1a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNETS table for network ID '\n + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id\n + ' 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`\" />\n","comments":"","x":1397.6665954589844,"y":3345.2528343200684,"z":"e4baa5a8.a31318","wires":[]},{"id":"3976fb7d.92d3d4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1223.0238647460938,"y":3301.205192565918,"z":"e4baa5a8.a31318","wires":[["c635b53c.368758"]]},{"id":"959768c3.a1d588","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1231.5952949523926,"y":3345.4909057617188,"z":"e4baa5a8.a31318","wires":[["39fae58.e71ee1a"]]},{"id":"c635b53c.368758","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNETS table\" />\n","comments":"","x":1398.023796081543,"y":3300.348093032837,"z":"e4baa5a8.a31318","wires":[]},{"id":"d65acdc0.dafd8","type":"for","name":"for each record in EIPAM_IP_SUBNETS","xml":"<for index='subnets-index' start='0' end='`$db.eipam-ip-subnets_length`' >\n","comments":"","outputs":1,"x":1026.9524688720703,"y":3628.82426071167,"z":"e4baa5a8.a31318","wires":[["ff66bf7.47f1b4"]]},{"id":"ff66bf7.47f1b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1283.3810195922852,"y":3629.77654838562,"z":"e4baa5a8.a31318","wires":[["367ad5cc.c5a3fa","77c765bc.e6637c","91e102ce.d36e8","3d0c6fc4.e325","82b00d4f.93cbf"]]},{"id":"367ad5cc.c5a3fa","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $db.eipam-ip-subnets[$subnets-index].entity-id'\n pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1594.809585571289,"y":3466.205156326294,"z":"e4baa5a8.a31318","wires":[["6870a9ce.b3eae8","f0e997ff.17eb08"]]},{"id":"7945f51f.9f762c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n + $db.eipam-ip-subnets[$subnets-index].entity-id`\" />","comments":"","x":2009.809585571289,"y":3486.205156326294,"z":"e4baa5a8.a31318","wires":[]},{"id":"6870a9ce.b3eae8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1835.1668548583984,"y":3442.1575145721436,"z":"e4baa5a8.a31318","wires":[["ed0022b6.a92c"]]},{"id":"f0e997ff.17eb08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1843.7382850646973,"y":3486.4432277679443,"z":"e4baa5a8.a31318","wires":[["7945f51f.9f762c"]]},{"id":"ed0022b6.a92c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2010.1667861938477,"y":3441.3004150390625,"z":"e4baa5a8.a31318","wires":[]},{"id":"c7baae79.a8d3a","type":"set","name":"set max-level to -1","xml":"<set>\n<parameter name='max-level' value='-1' />\n","comments":"","x":955.7619323730469,"y":3389.538688659668,"z":"e4baa5a8.a31318","wires":[]},{"id":"77c765bc.e6637c","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='keys-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":1609.3334045410156,"y":3535.2529106140137,"z":"e4baa5a8.a31318","wires":[["263bb568.7e1d3a"]]},{"id":"263bb568.7e1d3a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1896.0000534057617,"y":3533.586248397827,"z":"e4baa5a8.a31318","wires":[["57db1b51.bf7814"]]},{"id":"57db1b51.bf7814","type":"switchNode","name":"switch level > max-level?","xml":"<switch test='`$db.eipam-ip-subnet-keys[$keys-index].level &gt; $max-level`'>\n","comments":"","outputs":1,"x":2112.6666717529297,"y":3533.586166381836,"z":"e4baa5a8.a31318","wires":[["d90f79d9.b32da8"]]},{"id":"d90f79d9.b32da8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2304.333599090576,"y":3533.58616065979,"z":"e4baa5a8.a31318","wires":[["743cc06c.51758"]]},{"id":"743cc06c.51758","type":"set","name":"set max-level, selected-entity-id, selected-plan-name","xml":"<set>\n<parameter name='max-level' value='`$db.eipam-ip-subnet-keys[$keys-index].level`' />\n<parameter name='selected-entity-id' value='`$db.eipam-ip-subnet-keys[$keys-index].entity-id`' />\n<parameter name='selected-plan-name' value='`$db.eipam-ip-subnets[$subnets-index].plan-name`' />\n","comments":"","x":2596.0001068115234,"y":3531.9194173812866,"z":"e4baa5a8.a31318","wires":[]},{"id":"91e102ce.d36e8","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $selected-entity-id order by level'\n pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1596.000015258789,"y":3607.157615661621,"z":"e4baa5a8.a31318","wires":[["b2349884.088788","f1532f86.e76dd"]]},{"id":"7f0c353a.7f913c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n + $selected-entity-id`\" />","comments":"","x":2011.000015258789,"y":3627.157615661621,"z":"e4baa5a8.a31318","wires":[]},{"id":"b2349884.088788","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1836.3572845458984,"y":3583.1099739074707,"z":"e4baa5a8.a31318","wires":[["70f90568.aa118c"]]},{"id":"f1532f86.e76dd","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1844.9287147521973,"y":3627.3956871032715,"z":"e4baa5a8.a31318","wires":[["7f0c353a.7f913c"]]},{"id":"70f90568.aa118c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2011.3572158813477,"y":3582.2528743743896,"z":"e4baa5a8.a31318","wires":[]},{"id":"c8da1d6e.45a7a","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='level-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":2041.9523620605469,"y":3675.729072570801,"z":"e4baa5a8.a31318","wires":[["23e299e.e960066"]]},{"id":"2364c25f.16e04e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1734.8093643188477,"y":3759.5385093688965,"z":"e4baa5a8.a31318","wires":[["c8da1d6e.45a7a","5a2be208.b22a9c","deb2167.63080e8","f568d578.388128","7ead2109.820b4"]]},{"id":"3d0c6fc4.e325","type":"for","name":"for each ip in ip-count","xml":"<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`' >\n","comments":"","outputs":1,"x":1533.142807006836,"y":3759.5401363372803,"z":"e4baa5a8.a31318","wires":[["2364c25f.16e04e"]]},{"id":"23e299e.e960066","type":"set","name":"set eipam data for level","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-name'\n value='`$db.eipam-ip-subnet-keys[$level-index].key-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-value'\n value='`$db.eipam-ip-subnet-keys[$level-index].key-value`' />\n","comments":"","x":2348.8571243286133,"y":3675.4918384552,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a2be208.b22a9c","type":"set","name":"set eipam data pools_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools_length'\n value='`$db.eipam-ip-subnet-keys_length`' />\n","comments":"","x":1988.142677307129,"y":3721.2054557800293,"z":"e4baa5a8.a31318","wires":[]},{"id":"ac1085e3.f13938","type":"set","name":"set plans-index to 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":539.7619171142578,"y":3101.8717365264893,"z":"e4baa5a8.a31318","wires":[]},{"id":"1445f578.93789b","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":971.0952224731445,"y":4020.871983528137,"z":"e4baa5a8.a31318","wires":[]},{"id":"82b00d4f.93cbf","type":"set","name":"set eipam requests_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests_length'\n 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`' />\n","comments":"","x":1543.6191711425781,"y":3901.2055082321167,"z":"e4baa5a8.a31318","wires":[]},{"id":"c5ac535a.19e0c","type":"set","name":"set eipam plan-name, address-family","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].plan-name' value='`$selected-plan-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].address-family'\n 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`' />\n","comments":"","x":1019.6666564941406,"y":3973.7284650802612,"z":"e4baa5a8.a31318","wires":[]},{"id":"319cf957.f6edb6","type":"set","name":"set eipam plans_length","xml":"<set>\n<parameter name='eipam-ip-block.plans_length' value='`$plans-index`' />\n","comments":"","x":543.4285697937012,"y":4045.919857978821,"z":"e4baa5a8.a31318","wires":[]},{"id":"c811246.d8ba4d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":511.5475769042969,"y":4917.2607316970825,"z":"e4baa5a8.a31318","wires":[]},{"id":"efa475b7.980ae8","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'\n value='$vf-module-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'\n value='$vf-module-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'\n value='$vf-module-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'\n value='$vf-module-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'\n value='$vf-module-topology-operation-input.vf-module-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'\n value='$vf-module-topology-operation-input.vf-module-request-input.' />\n\n","comments":"","x":515.8332824707031,"y":4776.990706443787,"z":"e4baa5a8.a31318","wires":[]},{"id":"a247b0d0.a589c","type":"set","name":"copy vf-module-topology data","xml":"<set>\n<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.' />\n","comments":"","x":560.7142868041992,"y":4728.776218414307,"z":"e4baa5a8.a31318","wires":[]},{"id":"f833ef67.9cf92","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />\n","comments":"","outputs":1,"x":506.42852783203125,"y":4869.49054813385,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"77ad7e3d.8e3ec","type":"execute","name":"call EIPAM assignIPAddress","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"assignIPAddress\">","comments":"","outputs":1,"x":923.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["9e574032.fe3cb"]]},{"id":"9e574032.fe3cb","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1137.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["6086477b.665d78"]]},{"id":"6086477b.665d78","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"ack-final\" value=\"Y\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while obtaining new address blocks from EIPAM.\" />\n","comments":"","x":1276.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[]},{"id":"deb2167.63080e8","type":"set","name":"set eipam client-key, mask","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].client-key'\n value='`$generate-unique-name-output.generated-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].info'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].mask'\n value='32' />\n","comments":"","x":1985.2857284545898,"y":3855.015483856201,"z":"e4baa5a8.a31318","wires":[]},{"id":"b87f9fec.9ac9e","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":523,"y":4244.252558708191,"z":"e4baa5a8.a31318","wires":[["9092afca.a3962"]]},{"id":"9092afca.a3962","type":"for","name":"for each vm-network","xml":"<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`' >\n","comments":"","outputs":1,"x":731.6666831970215,"y":4244.252884864807,"z":"e4baa5a8.a31318","wires":[["6b702819.1ea7a8"]]},{"id":"6b702819.1ea7a8","type":"for","name":"for each network-information-item","xml":"<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`' >\n","comments":"","outputs":1,"x":996.6666717529297,"y":4245.919226646423,"z":"e4baa5a8.a31318","wires":[["83b69613.7b8da8"]]},{"id":"95db0874.7fa668","type":"set","name":"set plans-index = 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":529.9999923706055,"y":4189.252646446228,"z":"e4baa5a8.a31318","wires":[]},{"id":"98047ce0.4a6e9","type":"for","name":"for each eipam request","xml":"<for index='ip-index' start='0' end='`$eipam-ip-block.plans[$plans-index].requests_length`' >\n","comments":"","outputs":1,"x":1766.6666259765625,"y":4217.586531639099,"z":"e4baa5a8.a31318","wires":[["6f14c8cc.226b88"]]},{"id":"6f14c8cc.226b88","type":"set","name":"set ip address","xml":"<set>\n<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]'\n value='`$eipam-ip-block.plans[$plans-index].requests[$ip-index].ip-prefix`' />\n","comments":"","x":1978.3332633972168,"y":4215.919702529907,"z":"e4baa5a8.a31318","wires":[]},{"id":"5aeee902.7037a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1566.6664581298828,"y":4242.586045265198,"z":"e4baa5a8.a31318","wires":[["98047ce0.4a6e9","a26fc3b8.56c3c"]]},{"id":"a26fc3b8.56c3c","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":1761.66650390625,"y":4264.252387046814,"z":"e4baa5a8.a31318","wires":[]},{"id":"3c8bd226.36546e","type":"save","name":"update vf-module","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"vf-module-name\" value=\"`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`\" />\n<parameter name=\"model-invariant-id\" value=\"`$tmp.vf-module-topology.ecomp-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" value=\"`$tmp.vf-module-topology.ecomp-model-information.model-uuid`\" />\n<parameter name=\"model-customization-id\" value=\"`$tmp.vf-module-topology.ecomp-model-information.model-customization-uuid`\" />\n<parameter name=\"selflink\" value=\"`$vf-module-object-path`\" />\n","comments":"","outputs":1,"x":524.9999694824219,"y":4389.252729415894,"z":"e4baa5a8.a31318","wires":[["fb5d5bb7.763c78","e4f07aae.f62f88"]]},{"id":"d2a1fc69.961af","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":1018.3333969116211,"y":4442.585899353027,"z":"e4baa5a8.a31318","wires":[]},{"id":"fb5d5bb7.763c78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":694.3573303222656,"y":4356.204874038696,"z":"e4baa5a8.a31318","wires":[["383193dd.97ea3c"]]},{"id":"e4f07aae.f62f88","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":702.9286842346191,"y":4418.823854446411,"z":"e4baa5a8.a31318","wires":[["bcf4c9e0.38f9c8"]]},{"id":"4c9452bf.c4605c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module in AAI\" />\n","comments":"","x":1029.3572845458984,"y":4374.348430633545,"z":"e4baa5a8.a31318","wires":[]},{"id":"a03bb466.634808","type":"set","name":"set vf-module-object-path","xml":"<set>\n<parameter name='vf-module-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $service-data.service-topology.service-topology-identifier.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vf-modules/vf-module/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n + '/vf-module-data/vf-module-topology/'`\"/>\n\n","comments":"","x":551.666633605957,"y":4314.252715110779,"z":"e4baa5a8.a31318","wires":[]},{"id":"c4679f1a.0f0a2","type":"save","name":"save vf-module relationships","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module:relationship-list\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n <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`\" />\n","comments":"","outputs":1,"x":984.3094787597656,"y":4517.975717544556,"z":"e4baa5a8.a31318","wires":[["adfe5f0b.ad89b","8c43d965.e517d8"]]},{"id":"adfe5f0b.ad89b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1209.1428108215332,"y":4478.847640037537,"z":"e4baa5a8.a31318","wires":[["be7ce494.4af018"]]},{"id":"8c43d965.e517d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1217.7142639160156,"y":4556.466782569885,"z":"e4baa5a8.a31318","wires":[["1b7e23d5.510b0c"]]},{"id":"fcd02140.3442a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module relationships in AAI\" />\n","comments":"","x":1544.1429443359375,"y":4498.657536506653,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8307ef3.44142","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":525.3095092773438,"y":4519.642220497131,"z":"e4baa5a8.a31318","wires":[["51e803ad.53b7ac"]]},{"id":"51e803ad.53b7ac","type":"for","name":"for each vm-network","xml":"<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`' >\n","comments":"","outputs":1,"x":735.9761867523193,"y":4517.976043701172,"z":"e4baa5a8.a31318","wires":[["c4679f1a.0f0a2"]]},{"id":"b89ddb3d.45f568","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":1545.9762382507324,"y":4573.642075538635,"z":"e4baa5a8.a31318","wires":[]},{"id":"a89d1a7f.ee0778","type":"set","name":"set ip-version 6, use-dhcp, and ip-count","xml":"<set>\n<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'\n value='6' />\n<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'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-use-dhcp`' />\n<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'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-count`' />\n","comments":"","x":1964.7857208251953,"y":2908.213849067688,"z":"e4baa5a8.a31318","wires":[]},{"id":"1eb5f5e8.6678ba","type":"switchNode","name":"switch use-dhcp","xml":"<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`'>\n","comments":"","outputs":1,"x":1630.500114440918,"y":3155.356598854065,"z":"e4baa5a8.a31318","wires":[["565e7fcb.5478a"]]},{"id":"565e7fcb.5478a","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1800.5000267028809,"y":3153.928201675415,"z":"e4baa5a8.a31318","wires":[["b1e701d0.c2cbd"]]},{"id":"83b69613.7b8da8","type":"switchNode","name":"switch use-dhcp","xml":"<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`'>\n","comments":"","outputs":1,"x":1237.642837524414,"y":4244.642521858215,"z":"e4baa5a8.a31318","wires":[["9fada909.4d9ca8"]]},{"id":"9fada909.4d9ca8","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1407.642749786377,"y":4243.214124679565,"z":"e4baa5a8.a31318","wires":[["5aeee902.7037a8"]]},{"id":"21f945ed.4703fa","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":524.309455871582,"y":4649.642714500427,"z":"e4baa5a8.a31318","wires":[["76ad141b.68002c"]]},{"id":"76ad141b.68002c","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":719.3094863891602,"y":4648.975722312927,"z":"e4baa5a8.a31318","wires":[["5ad6102c.c24c4"]]},{"id":"87d443e8.e1d8d","type":"save","name":"save VIPR_CONFIGURATION","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"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')\" >","comments":"","outputs":1,"x":1110.976188659668,"y":4671.643372535706,"z":"e4baa5a8.a31318","wires":[["87ac107d.fb4e7"]]},{"id":"cc126082.cba77","type":"comment","name":"Not a failure","info":"","comments":"","x":1630.976089477539,"y":4671.643377304077,"z":"e4baa5a8.a31318","wires":[]},{"id":"87ac107d.fb4e7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1320.976173400879,"y":4671.643522262573,"z":"e4baa5a8.a31318","wires":[["84e3208f.2bb34"]]},{"id":"84e3208f.2bb34","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1464.3096160888672,"y":4671.643360137939,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"7ead2109.820b4","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":2074.3094940185547,"y":3809.641947746277,"z":"e4baa5a8.a31318","wires":[["b9a9e488.2e3ce8"]]},{"id":"b9a9e488.2e3ce8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2361.6905364990234,"y":3807.4993686676025,"z":"e4baa5a8.a31318","wires":[["f309c868.34d8b8"]]},{"id":"f568d578.388128","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='EIPAM_CLIENT_KEY_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CLIENT_KEY' />\n<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 + ':'`\" />\n<parameter name='generate-unique-name-input.index-length' value='' />\n","comments":"","x":2027.6428260803223,"y":3764.6421089172363,"z":"e4baa5a8.a31318","wires":[]},{"id":"f309c868.34d8b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":2529.547649383545,"y":3806.9278802871704,"z":"e4baa5a8.a31318","wires":[]},{"id":"141da799.5b84c8","type":"switchNode","name":"switch ecomp-generated-naming == 'Y'","xml":"<switch test=\"$db.vfc-model.ecomp-generated-naming == 'Y'\">\n","comments":"","outputs":1,"x":1004.3095626831055,"y":2071.309280395508,"z":"e4baa5a8.a31318","wires":[["72f4c09e.079ae"]]},{"id":"72f4c09e.079ae","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1235.976173400879,"y":2070.3089113235474,"z":"e4baa5a8.a31318","wires":[["677921a6.61315"]]},{"id":"677921a6.61315","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":1382.6429138183594,"y":2069.6423664093018,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8d62ff8.4b7f3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1494.3097381591797,"y":4622.975073814392,"z":"e4baa5a8.a31318","wires":[["9399828b.9d988"]]},{"id":"4f27d06f.de235","type":"comment","name":"Not a failure","info":"","comments":"","x":1817.6427917480469,"y":4621.308896064758,"z":"e4baa5a8.a31318","wires":[]},{"id":"9399828b.9d988","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1640.3096733093262,"y":4622.975707054138,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"5ad6102c.c24c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":887.642879486084,"y":4647.975566864014,"z":"e4baa5a8.a31318","wires":[["d3772815.3ee328","87d443e8.e1d8d"]]},{"id":"d3772815.3ee328","type":"delete","name":"delete any pre-existing records in VIPR_CONFIGURATION","xml":"<delete plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\n AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\n AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >","comments":"","outputs":1,"x":1200.976203918457,"y":4623.309706687927,"z":"e4baa5a8.a31318","wires":[["f8d62ff8.4b7f3"]]},{"id":"5ded3d38.0d3994","type":"update","name":"update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"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\" >","comments":"","outputs":1,"x":2907.6429481506348,"y":4259.64261007309,"z":"e4baa5a8.a31318","wires":[["da3d0ab5.9d7b78"]]},{"id":"e1b11e58.18b71","type":"set","name":"set status variable","xml":"<set>\n<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`\" />\n","comments":"","x":2777.642910003662,"y":4212.9759821891785,"z":"e4baa5a8.a31318","wires":[]},{"id":"da3d0ab5.9d7b78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3212.6428565979004,"y":4257.97590970993,"z":"e4baa5a8.a31318","wires":[["9eddaf67.b6c3a"]]},{"id":"9eddaf67.b6c3a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating EIPAM_IP_ASSIGNMENTS table on rollback\" />\n","comments":"","x":3402.6428833007812,"y":4257.785645008087,"z":"e4baa5a8.a31318","wires":[]},{"id":"1f0f2297.a80cad","type":"execute","name":"execute EIPAM unassign IP addresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n","comments":"","outputs":1,"x":2842.6429176330566,"y":4304.642653942108,"z":"e4baa5a8.a31318","wires":[["764dc213.434fec"]]},{"id":"764dc213.434fec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3079.309543609619,"y":4304.642596721649,"z":"e4baa5a8.a31318","wires":[["d9d39111.ef82b"]]},{"id":"d9d39111.ef82b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in EIPAM unassign IP address on rollback\" />\n","comments":"","x":3269.3095703125,"y":4304.452332019806,"z":"e4baa5a8.a31318","wires":[]},{"id":"3972c7d8.e4e1b8","type":"comment","name":"roll back EIPAM","info":"","comments":"","x":2752.6429481506348,"y":4159.642935593923,"z":"e4baa5a8.a31318","wires":[]},{"id":"663bcdf3.7476b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2584.3095741271973,"y":4262.97610616684,"z":"e4baa5a8.a31318","wires":[["e1b11e58.18b71","5ded3d38.0d3994","1f0f2297.a80cad"]]},{"id":"383193dd.97ea3c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":852.6428985595703,"y":4355.975544929504,"z":"e4baa5a8.a31318","wires":[["4c9452bf.c4605c","f9222e19.45f49"]]},{"id":"bcf4c9e0.38f9c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":857.6428375244141,"y":4418.641888618469,"z":"e4baa5a8.a31318","wires":[["d2a1fc69.961af","f9222e19.45f49"]]},{"id":"be7ce494.4af018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1377.6428146362305,"y":4478.641909599304,"z":"e4baa5a8.a31318","wires":[["fcd02140.3442a","f9222e19.45f49"]]},{"id":"1b7e23d5.510b0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1372.642734527588,"y":4556.641750335693,"z":"e4baa5a8.a31318","wires":[["b89ddb3d.45f568","f9222e19.45f49"]]},{"id":"45ef9bd1.40c894","type":"set","name":"set vf-module-to-vfc-mapping length to 0","xml":"<set>\n<parameter name='db.vf-module-to-vfc-mapping_length' value='0' />\n","comments":"","x":1151.500099182129,"y":1904.9280138015747,"z":"e4baa5a8.a31318","wires":[]},{"id":"d5efedb2.7d60c","type":"set","name":"set vfc-to-network-role-mapping length to 0","xml":"<set>\n<parameter name='db.vfc-to-network-role-mapping_length' value='0' />\n","comments":"","x":1604.7857818603516,"y":2383.9280395507812,"z":"e4baa5a8.a31318","wires":[]},{"id":"4646e366.6582ec","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":540.5000762939453,"y":4135.356512069702,"z":"e4baa5a8.a31318","wires":[["aa74ce89.4fd3e"]]},{"id":"aa74ce89.4fd3e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":723.3572158813477,"y":4135.356721878052,"z":"e4baa5a8.a31318","wires":[["77ad7e3d.8e3ec"]]},{"id":"f9222e19.45f49","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":2231.6665000915527,"y":4262.261742115021,"z":"e4baa5a8.a31318","wires":[["2a6bae2e.123432"]]},{"id":"2a6bae2e.123432","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2414.523639678955,"y":4262.26195192337,"z":"e4baa5a8.a31318","wires":[["663bcdf3.7476b4"]]},{"id":"fc1913b.4d832f","type":"set","name":"set service-type","xml":"<set>\n<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":520.6666145324707,"y":4088.92791557312,"z":"e4baa5a8.a31318","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.json
new file mode 100644
index 00000000..046856cb
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-deactivate.json
@@ -0,0 +1,682 @@
+[
+ {
+ "id": "9308e75f.05f858",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 103.33332824707031,
+ "y": 78.33332824707031,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "878f150c.2e48d8"
+ ]
+ ]
+ },
+ {
+ "id": "878f150c.2e48d8",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 178.61903381347656,
+ "y": 118.57143974304199,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "a015909f.179d2"
+ ]
+ ]
+ },
+ {
+ "id": "a015909f.179d2",
+ "type": "method",
+ "name": "method vf-module-topology-operation-deactivate",
+ "xml": "<method rpc='vf-module-topology-operation-deactivate' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 228.42862701416016,
+ "y": 158.33332443237305,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "c7c25d58.df7b4"
+ ]
+ ]
+ },
+ {
+ "id": "b22c04d8.425a68",
+ "type": "comment",
+ "name": "vf-module-topology-operation-deactivate",
+ "info": "",
+ "comments": "",
+ "x": 497.67818450927734,
+ "y": 25.9196720123291,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "9077c4fc.db6fb8",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 506.85713958740234,
+ "y": 257.190465927124,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "36986752.8db598",
+ "ae847a12.f2ba48"
+ ]
+ ]
+ },
+ {
+ "id": "36986752.8db598",
+ "type": "outcome",
+ "name": "DeleteVfModuleInstance",
+ "xml": "<outcome value='DeleteVfModuleInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 768.9047546386719,
+ "y": 234.33335208892822,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "6bfdb413.6dba6c"
+ ]
+ ]
+ },
+ {
+ "id": "ae847a12.f2ba48",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 712.5713996887207,
+ "y": 279.71434116363525,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "840b0e33.1be94"
+ ]
+ ]
+ },
+ {
+ "id": "6bfdb413.6dba6c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 958.7619190216064,
+ "y": 234.33338356018066,
+ "z": "66718f17.55d5b",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "840b0e33.1be94",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'\" />\n",
+ "comments": "",
+ "x": 977.5714073181152,
+ "y": 280.04765367507935,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "c7c25d58.df7b4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 126.66666412353516,
+ "y": 541.666618347168,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "9077c4fc.db6fb8",
+ "bf2aa82.3dc7e58",
+ "3439a9d8.ab9236",
+ "8fb6cdcf.b16af",
+ "cd383d34.c434c",
+ "e644f473.82cda8",
+ "2f8a8aae.f43eb6",
+ "6a53a509.21c6fc",
+ "a3c6b6a0.82de08",
+ "fcd4522.e4775b",
+ "b1395859.6a0108",
+ "762c177b.08d768"
+ ]
+ ]
+ },
+ {
+ "id": "3439a9d8.ab9236",
+ "type": "switchNode",
+ "name": "switch service-data.vnfs.vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 553.3333129882812,
+ "y": 401.66664123535156,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "6917fb8.2adad04",
+ "9afc044d.1d85f8"
+ ]
+ ]
+ },
+ {
+ "id": "6917fb8.2adad04",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 794.0475845336914,
+ "y": 378.80938148498535,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "683e93db.bf1b8c"
+ ]
+ ]
+ },
+ {
+ "id": "9afc044d.1d85f8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 793.8094253540039,
+ "y": 419.7618999481201,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "93864c89.1db7a"
+ ]
+ ]
+ },
+ {
+ "id": "683e93db.bf1b8c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"There are no VNFs defined in MD-SAL\" />\n",
+ "comments": "",
+ "x": 960.7141990661621,
+ "y": 378.09513664245605,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "93864c89.1db7a",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 956.0475692749023,
+ "y": 419.4285182952881,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "816952d1.278e1"
+ ]
+ ]
+ },
+ {
+ "id": "816952d1.278e1",
+ "type": "switchNode",
+ "name": "switch service data vnf == input vnf",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1207.380786895752,
+ "y": 419.09520530700684,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "4dae753e.0c4bac"
+ ]
+ ]
+ },
+ {
+ "id": "4dae753e.0c4bac",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1437.3808784484863,
+ "y": 418.4285593032837,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "3161b7a1.0cc078"
+ ]
+ ]
+ },
+ {
+ "id": "bf2aa82.3dc7e58",
+ "type": "set",
+ "name": "set vnf-index to -1",
+ "xml": "<set>\n<parameter name='vnf-index' value='-1' />\n",
+ "comments": "",
+ "x": 502.3809356689453,
+ "y": 333.0951404571533,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "78c0e49e.7d500c",
+ "type": "set",
+ "name": "set vnf-index to idx",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1759.0475158691406,
+ "y": 389.42851734161377,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "8fb6cdcf.b16af",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 492.38094329833984,
+ "y": 469.76183700561523,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "ee9f9bc9.c74618"
+ ]
+ ]
+ },
+ {
+ "id": "ee9f9bc9.c74618",
+ "type": "outcome",
+ "name": "-1",
+ "xml": "<outcome value='-1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 670.7143287658691,
+ "y": 469.09521293640137,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "d0b968e1.02fc78"
+ ]
+ ]
+ },
+ {
+ "id": "d0b968e1.02fc78",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n",
+ "comments": "",
+ "x": 830.7142372131348,
+ "y": 468.42851638793945,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "3161b7a1.0cc078",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1585.714340209961,
+ "y": 417.34825801849365,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "78c0e49e.7d500c",
+ "d8a1c30a.67ec2"
+ ]
+ ]
+ },
+ {
+ "id": "d8a1c30a.67ec2",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 1720.7143058776855,
+ "y": 439.01484394073486,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "e644f473.82cda8",
+ "type": "switchNode",
+ "name": "switch service-data...vf-module_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 566.6666259765625,
+ "y": 591.6666660308838,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "dabca98f.b55858",
+ "d754c5bd.ecf668"
+ ]
+ ]
+ },
+ {
+ "id": "dabca98f.b55858",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 817.3809356689453,
+ "y": 570.4760694503784,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "13063c42.536de4"
+ ]
+ ]
+ },
+ {
+ "id": "d754c5bd.ecf668",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 817.1427764892578,
+ "y": 611.4285879135132,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "601e343c.8c78cc"
+ ]
+ ]
+ },
+ {
+ "id": "13063c42.536de4",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n",
+ "comments": "",
+ "x": 984.047550201416,
+ "y": 569.7618246078491,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "601e343c.8c78cc",
+ "type": "for",
+ "name": "for each vf-module",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 979.3809204101562,
+ "y": 611.0952062606812,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "8c46688e.150378"
+ ]
+ ]
+ },
+ {
+ "id": "8c46688e.150378",
+ "type": "switchNode",
+ "name": "switch service data vf-module == input vf-module",
+ "xml": "<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`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1285.7140808105469,
+ "y": 610.76194190979,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "f337ae4d.c9823"
+ ]
+ ]
+ },
+ {
+ "id": "f337ae4d.c9823",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1555.7141342163086,
+ "y": 608.4285469055176,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "4421d8b3.cc5a98"
+ ]
+ ]
+ },
+ {
+ "id": "cd383d34.c434c",
+ "type": "set",
+ "name": "set vf-module-index to -1",
+ "xml": "<set>\n<parameter name='vf-module-index' value='-1' />\n",
+ "comments": "",
+ "x": 522.3809204101562,
+ "y": 526.428503036499,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "26c56276.cbbaee",
+ "type": "set",
+ "name": "set vf-module-index to idx",
+ "xml": "<set>\n<parameter name='vf-module-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1885.714225769043,
+ "y": 579.4285259246826,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "2f8a8aae.f43eb6",
+ "type": "switchNode",
+ "name": "switch vf-module-index",
+ "xml": "<switch test='`$vf-module-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 514.0476036071777,
+ "y": 663.0952157974243,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "18ce1819.ff8848"
+ ]
+ ]
+ },
+ {
+ "id": "18ce1819.ff8848",
+ "type": "outcome",
+ "name": "-1",
+ "xml": "<outcome value='-1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 692.380989074707,
+ "y": 662.4285917282104,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "966d8d53.6b6fa"
+ ]
+ ]
+ },
+ {
+ "id": "966d8d53.6b6fa",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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'`\" />\n",
+ "comments": "",
+ "x": 852.3808975219727,
+ "y": 661.7618951797485,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "4421d8b3.cc5a98",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1689.0476760864258,
+ "y": 607.3482866287231,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "26c56276.cbbaee",
+ "8db1d4c2.4e5f98"
+ ]
+ ]
+ },
+ {
+ "id": "8db1d4c2.4e5f98",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 1824.0476417541504,
+ "y": 629.0148725509644,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "6a53a509.21c6fc",
+ "type": "set",
+ "name": "set order-status to PendingDelete",
+ "xml": "<set>\n<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'\n value='PendingDelete' />\n",
+ "comments": "",
+ "x": 550.0000305175781,
+ "y": 903.3332681655884,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "a3c6b6a0.82de08",
+ "type": "set",
+ "name": "set vf-module-status to PendingDelete",
+ "xml": "<set>\n<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' />\n",
+ "comments": "",
+ "x": 561.3333435058594,
+ "y": 725.0000095367432,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "fcd4522.e4775b",
+ "type": "save",
+ "name": "update vf-module to PendingDelete",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 551.6667175292969,
+ "y": 786.666618347168,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "1e182c2d.f61464",
+ "7c1bc2f6.54919c"
+ ]
+ ]
+ },
+ {
+ "id": "19ff43f6.90e7bc",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n",
+ "comments": "",
+ "x": 971.6667938232422,
+ "y": 811.6666450500488,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "1e182c2d.f61464",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 784.3573608398438,
+ "y": 768.6191148757935,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "b0f96d27.7ef2b"
+ ]
+ ]
+ },
+ {
+ "id": "7c1bc2f6.54919c",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 792.9287910461426,
+ "y": 812.9048280715942,
+ "z": "66718f17.55d5b",
+ "wires": [
+ [
+ "19ff43f6.90e7bc"
+ ]
+ ]
+ },
+ {
+ "id": "b0f96d27.7ef2b",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module in AAI\" />\n",
+ "comments": "",
+ "x": 974.3573875427246,
+ "y": 768.4288501739502,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "b1395859.6a0108",
+ "type": "set",
+ "name": "copy input data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'\n value='$vf-module-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'\n value='$vf-module-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'\n value='$vf-module-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'\n value='$vf-module-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'\n value='$vf-module-topology-operation-input.vf-module-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'\n value='$vf-module-topology-operation-input.vf-module-request-input.' />\n\n",
+ "comments": "",
+ "x": 489.9999694824219,
+ "y": 856.6666259765625,
+ "z": "66718f17.55d5b",
+ "wires": []
+ },
+ {
+ "id": "762c177b.08d768",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 488.33331298828125,
+ "y": 953.3333129882812,
+ "z": "66718f17.55d5b",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json
new file mode 100755
index 00000000..4265b05c
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json
@@ -0,0 +1 @@
+[{"id":"3634132b.aae9cc","type":"dgstart","name":"DGSTART","outputs":1,"x":111.42857360839844,"y":85.27079892158508,"z":"4bbef54d.3c199c","wires":[["b811bd8c.58626"]]},{"id":"b811bd8c.58626","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":226.7142791748047,"y":124.8422462940216,"z":"4bbef54d.3c199c","wires":[["903f1211.d11ba"]]},{"id":"903f1211.d11ba","type":"method","name":"method vf-module-topology-operation-unassign","xml":"<method rpc='vf-module-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":233.52387237548828,"y":165.27079510688782,"z":"4bbef54d.3c199c","wires":[["3e241fed.dce8d"]]},{"id":"4bbac542.26042c","type":"comment","name":"vf-module-topology-operation-unassign","info":"","comments":"","x":505.77342987060547,"y":32.85714268684387,"z":"4bbef54d.3c199c","wires":[]},{"id":"7d0a0f77.67fe3","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":514.9523849487305,"y":264.1279366016388,"z":"4bbef54d.3c199c","wires":[["858f056.ea102f8","69293fca.60217"]]},{"id":"858f056.ea102f8","type":"outcome","name":"DeleteVfModuleInstance","xml":"<outcome value='DeleteVfModuleInstance'>\n","comments":"","outputs":1,"x":777,"y":241.270822763443,"z":"4bbef54d.3c199c","wires":[["bd986f3d.05e4d"]]},{"id":"69293fca.60217","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":720.6666450500488,"y":286.65181183815,"z":"4bbef54d.3c199c","wires":[["4b2c39f.c1425c8"]]},{"id":"bd986f3d.05e4d","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":966.8571643829346,"y":241.27085423469543,"z":"4bbef54d.3c199c","wires":[[]]},{"id":"4b2c39f.c1425c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'\" />\n","comments":"","x":985.6666526794434,"y":286.9851243495941,"z":"4bbef54d.3c199c","wires":[]},{"id":"3e241fed.dce8d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":134.76190948486328,"y":548.6040890216827,"z":"4bbef54d.3c199c","wires":[["7d0a0f77.67fe3","4fda8279.7e1a2c","54011fb9.04278","dd0c290.fa2dfd8","cf3cb3a4.71148","c7d85a41.4cf3c8","3700f1e7.c7a0de","d32fc0f1.b0335","face273e.1dbef8","3cafd812.76e3b8","ea148e30.283d3","12418747.0556a9","177346be.1e3b89","7391d4c.0a61d2c","9e6f1a75.404bf8"]]},{"id":"54011fb9.04278","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":561.4285583496094,"y":408.60411190986633,"z":"4bbef54d.3c199c","wires":[["2f8b9c68.d88264","801d20e1.503d5"]]},{"id":"2f8b9c68.d88264","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":802.1428298950195,"y":385.7468521595001,"z":"4bbef54d.3c199c","wires":[["9a288953.c31b18"]]},{"id":"801d20e1.503d5","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":801.904670715332,"y":426.6993706226349,"z":"4bbef54d.3c199c","wires":[["b9fd5234.dea25"]]},{"id":"9a288953.c31b18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"There are no VNFs defined in MD-SAL\" />\n","comments":"","x":968.8094444274902,"y":385.0326073169708,"z":"4bbef54d.3c199c","wires":[]},{"id":"b9fd5234.dea25","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":964.1428146362305,"y":426.36598896980286,"z":"4bbef54d.3c199c","wires":[["37afdfcf.8df9b"]]},{"id":"37afdfcf.8df9b","type":"switchNode","name":"switch service data vnf == input vnf","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n","comments":"","outputs":1,"x":1215.47603225708,"y":426.0326759815216,"z":"4bbef54d.3c199c","wires":[["4d313f64.53af3"]]},{"id":"4d313f64.53af3","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1445.4761238098145,"y":425.36602997779846,"z":"4bbef54d.3c199c","wires":[["743dde83.7b049"]]},{"id":"4fda8279.7e1a2c","type":"set","name":"set vnf-index to -1","xml":"<set>\n<parameter name='vnf-index' value='-1' />\n","comments":"","x":510.47618103027344,"y":340.0326111316681,"z":"4bbef54d.3c199c","wires":[]},{"id":"955acb16.2e9198","type":"set","name":"set vnf-index to idx","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1767.1427612304688,"y":396.36598801612854,"z":"4bbef54d.3c199c","wires":[]},{"id":"dd0c290.fa2dfd8","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":500.47618865966797,"y":476.69930768013,"z":"4bbef54d.3c199c","wires":[["7a7787fa.85d6c8"]]},{"id":"7a7787fa.85d6c8","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":678.8095741271973,"y":476.03268361091614,"z":"4bbef54d.3c199c","wires":[["b1e4fb77.0ad6d8"]]},{"id":"b1e4fb77.0ad6d8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n","comments":"","x":838.8094825744629,"y":475.3659870624542,"z":"4bbef54d.3c199c","wires":[]},{"id":"743dde83.7b049","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1593.809585571289,"y":424.2857286930084,"z":"4bbef54d.3c199c","wires":[["955acb16.2e9198","227b40bb.b89e1"]]},{"id":"227b40bb.b89e1","type":"break","name":"break","xml":"<break>\n","comments":"","x":1728.8095512390137,"y":445.95231461524963,"z":"4bbef54d.3c199c","wires":[]},{"id":"c7d85a41.4cf3c8","type":"switchNode","name":"switch service-data...vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":574.7618713378906,"y":598.6041367053986,"z":"4bbef54d.3c199c","wires":[["1d3ba2f9.4d00cd","b4ccb8c5.aa3838"]]},{"id":"1d3ba2f9.4d00cd","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":825.4761810302734,"y":577.4135401248932,"z":"4bbef54d.3c199c","wires":[["f4f84ccb.bce1a"]]},{"id":"b4ccb8c5.aa3838","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":825.2380218505859,"y":618.366058588028,"z":"4bbef54d.3c199c","wires":[["f90e4678.074348"]]},{"id":"f4f84ccb.bce1a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":992.1427955627441,"y":576.6992952823639,"z":"4bbef54d.3c199c","wires":[]},{"id":"f90e4678.074348","type":"for","name":"for each vf-module","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":987.4761657714844,"y":618.0326769351959,"z":"4bbef54d.3c199c","wires":[["7b6c52f9.40101c"]]},{"id":"7b6c52f9.40101c","type":"switchNode","name":"switch service data vf-module == input vf-module","xml":"<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`'>\n","comments":"","outputs":1,"x":1293.809326171875,"y":617.6994125843048,"z":"4bbef54d.3c199c","wires":[["63e22dc4.06f384"]]},{"id":"63e22dc4.06f384","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1563.8093795776367,"y":615.3660175800323,"z":"4bbef54d.3c199c","wires":[["84f0d1b4.6509b"]]},{"id":"cf3cb3a4.71148","type":"set","name":"set vf-module-index to -1","xml":"<set>\n<parameter name='vf-module-index' value='-1' />\n","comments":"","x":530.4761657714844,"y":533.3659737110138,"z":"4bbef54d.3c199c","wires":[]},{"id":"feddd314.78bc1","type":"set","name":"set vf-module-index to idx","xml":"<set>\n<parameter name='vf-module-index' value='`$idx`' />\n","comments":"","x":1893.809471130371,"y":586.3659965991974,"z":"4bbef54d.3c199c","wires":[]},{"id":"3700f1e7.c7a0de","type":"switchNode","name":"switch vf-module-index","xml":"<switch test='`$vf-module-index`'>\n","comments":"","outputs":1,"x":522.1428489685059,"y":670.0326864719391,"z":"4bbef54d.3c199c","wires":[["30d75429.dce6dc"]]},{"id":"30d75429.dce6dc","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":700.4762344360352,"y":669.3660624027252,"z":"4bbef54d.3c199c","wires":[["dc3fcd3f.7fb5a"]]},{"id":"dc3fcd3f.7fb5a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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'`\" />\n","comments":"","x":860.4761428833008,"y":668.6993658542633,"z":"4bbef54d.3c199c","wires":[]},{"id":"84f0d1b4.6509b","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1697.142921447754,"y":614.2857573032379,"z":"4bbef54d.3c199c","wires":[["feddd314.78bc1","bb579fe6.15d06"]]},{"id":"bb579fe6.15d06","type":"break","name":"break","xml":"<break>\n","comments":"","x":1832.1428871154785,"y":635.9523432254791,"z":"4bbef54d.3c199c","wires":[]},{"id":"d32fc0f1.b0335","type":"switchNode","name":"switch order-status","xml":"<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`'>\n","comments":"","outputs":1,"x":511.42855072021484,"y":738.6041233539581,"z":"4bbef54d.3c199c","wires":[["a6a4bb26.1f3248","3d378319.cd568c"]]},{"id":"a6a4bb26.1f3248","type":"outcome","name":"Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":689.7619361877441,"y":713.604165315628,"z":"4bbef54d.3c199c","wires":[["586d3384.e6473c"]]},{"id":"3d378319.cd568c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":686.428539276123,"y":758.6041061878204,"z":"4bbef54d.3c199c","wires":[["9f24bb12.d8e6c8"]]},{"id":"586d3384.e6473c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Order status must not be Created\" />\n","comments":"","x":858.0951766967773,"y":713.6040947437286,"z":"4bbef54d.3c199c","wires":[]},{"id":"9f24bb12.d8e6c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":861.4285507202148,"y":758.2707817554474,"z":"4bbef54d.3c199c","wires":[[]]},{"id":"3cafd812.76e3b8","type":"update","name":"update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"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\" >","comments":"","outputs":1,"x":638.0952758789062,"y":855.2707741260529,"z":"4bbef54d.3c199c","wires":[["29a4dd2c.571cc2"]]},{"id":"face273e.1dbef8","type":"set","name":"set status variable","xml":"<set>\n<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`\" />\n","comments":"","x":508.0952453613281,"y":808.6041061878204,"z":"4bbef54d.3c199c","wires":[]},{"id":"29a4dd2c.571cc2","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":943.0951843261719,"y":853.6040737628937,"z":"4bbef54d.3c199c","wires":[["7b359e3e.4af98"]]},{"id":"7b359e3e.4af98","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating EIPAM_IP_ASSIGNMENTS table\" />\n","comments":"","x":1133.0952110290527,"y":853.4138090610504,"z":"4bbef54d.3c199c","wires":[]},{"id":"7391d4c.0a61d2c","type":"execute","name":"execute EIPAM unassign IP addresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n","comments":"","outputs":1,"x":571.4285736083984,"y":950.2707951068878,"z":"4bbef54d.3c199c","wires":[["f775a31f.14032"]]},{"id":"f775a31f.14032","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":808.0951995849609,"y":950.2707378864288,"z":"4bbef54d.3c199c","wires":[["fbea9023.f0a21"]]},{"id":"fbea9023.f0a21","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in EIPAM unassign IP address\" />\n","comments":"","x":998.0952262878418,"y":950.0804731845856,"z":"4bbef54d.3c199c","wires":[]},{"id":"ea148e30.283d3","type":"for","name":"for each vm-type","xml":"<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`' >\n","comments":"","outputs":1,"x":503.09523010253906,"y":995.2707560062408,"z":"4bbef54d.3c199c","wires":[["dd94f1e3.ff795"]]},{"id":"dd94f1e3.ff795","type":"for","name":"for each vm","xml":"<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`' >\n","comments":"","outputs":1,"x":698.0952606201172,"y":994.6037638187408,"z":"4bbef54d.3c199c","wires":[["ec57ffa3.2de6d"]]},{"id":"5d88eeac.72f3c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1446.4289016723633,"y":992.9364054203033,"z":"4bbef54d.3c199c","wires":[["6706540e.3756bc"]]},{"id":"cd37cc6b.08ecc","type":"comment","name":"Not a failure","info":"","comments":"","x":1769.7619552612305,"y":991.2702276706696,"z":"4bbef54d.3c199c","wires":[]},{"id":"6706540e.3756bc","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1592.4288368225098,"y":992.9370386600494,"z":"4bbef54d.3c199c","wires":[[]]},{"id":"ec57ffa3.2de6d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":866.428653717041,"y":993.6036083698273,"z":"4bbef54d.3c199c","wires":[["6b0a27e8.69d2a8"]]},{"id":"6b0a27e8.69d2a8","type":"delete","name":"delete any records in VIPR_CONFIGURATION","xml":"<delete plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\n AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\n 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]' >","comments":"","outputs":1,"x":1153.0953674316406,"y":993.2710382938385,"z":"4bbef54d.3c199c","wires":[["5d88eeac.72f3c"]]},{"id":"e25e36f2.2bb898","type":"for","name":"for each vf module","xml":"<for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1079.2696990966797,"y":1083.6039497852325,"z":"4bbef54d.3c199c","wires":[["50854db5.0c09d4"]]},{"id":"54369fbe.68bda","type":"comment","name":"Remove VF Module from service data","info":"","comments":"","x":458.09519958496094,"y":1038.8423902988434,"z":"4bbef54d.3c199c","wires":[]},{"id":"50854db5.0c09d4","type":"set","name":"move vf module to remove one","xml":"<set>\n\t<parameter name=\"tmpidx\" value=\"`$idx - 1`\"/>\n\t<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].\" />\n\t\n","comments":"","x":1322.8608322143555,"y":1082.6279156208038,"z":"4bbef54d.3c199c","wires":[]},{"id":"12418747.0556a9","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":525.5276184082031,"y":1094.9456207752228,"z":"4bbef54d.3c199c","wires":[["96160dc8.1f5f6","66823801.7689b8"]]},{"id":"96160dc8.1f5f6","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":720.8609848022461,"y":1045.8502275943756,"z":"4bbef54d.3c199c","wires":[["12a46b54.143dd5"]]},{"id":"12a46b54.143dd5","type":"set","name":"Remove vf modules","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.\" value=\"\"/>\n\n","comments":"","x":892.8607559204102,"y":1045.8503468036652,"z":"4bbef54d.3c199c","wires":[]},{"id":"66823801.7689b8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":719.5277404785156,"y":1140.6120369434357,"z":"4bbef54d.3c199c","wires":[["2bcfe8b8.486238"]]},{"id":"e9f7f8ad.ae21a8","type":"set","name":"set new vf module length","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length\" value=\"`$lastidx`\"/>\n\n\t\n","comments":"","x":1098.1572341918945,"y":1211.326426744461,"z":"4bbef54d.3c199c","wires":[]},{"id":"74efe5f4.b4841c","type":"set","name":"Remove the last vf module in the list","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx].\" value=\"\"/>\n","comments":"","x":1133.8608474731445,"y":1167.4375641345978,"z":"4bbef54d.3c199c","wires":[]},{"id":"2bcfe8b8.486238","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":876.7656707763672,"y":1139.850038766861,"z":"4bbef54d.3c199c","wires":[["e25e36f2.2bb898","74efe5f4.b4841c","e9f7f8ad.ae21a8","97e35dd8.d7e27"]]},{"id":"177346be.1e3b89","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":498.09523010253906,"y":1271.4612438678741,"z":"4bbef54d.3c199c","wires":[]},{"id":"9e6f1a75.404bf8","type":"set","name":"set service-type","xml":"<set>\n<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":499.7618865966797,"y":901.1904366016388,"z":"4bbef54d.3c199c","wires":[]},{"id":"97e35dd8.d7e27","type":"set","name":"set lastidx","xml":"<set>\n<parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":1052.000015258789,"y":1123.8422634601593,"z":"4bbef54d.3c199c","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation.json
new file mode 100644
index 00000000..bc4869c3
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation.json
@@ -0,0 +1,271 @@
+[
+ {
+ "id": "95a3ee2.905f31",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 98.33332824707031,
+ "y": 85,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "cb0de0b2.53b5e"
+ ]
+ ]
+ },
+ {
+ "id": "cb0de0b2.53b5e",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 173.61903381347656,
+ "y": 125.23811149597168,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "88f9b16e.fd717"
+ ]
+ ]
+ },
+ {
+ "id": "88f9b16e.fd717",
+ "type": "method",
+ "name": "method vf-module-topology-operation",
+ "xml": "<method rpc='vf-module-topology-operation' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 187.76195526123047,
+ "y": 164.9999942779541,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "cc0d87ea.42e588"
+ ]
+ ]
+ },
+ {
+ "id": "504658a3.49bd28",
+ "type": "comment",
+ "name": "vf-module-topology-operation",
+ "info": "",
+ "comments": "",
+ "x": 492.67818450927734,
+ "y": 32.58634376525879,
+ "z": "6872ec11.8012f4",
+ "wires": []
+ },
+ {
+ "id": "cc0d87ea.42e588",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 161.16670989990234,
+ "y": 349.36017322540283,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "fa856f03.28331",
+ "7676bb7a.aad3e4",
+ "ed140240.696ee"
+ ]
+ ]
+ },
+ {
+ "id": "fa856f03.28331",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 453.3333320617676,
+ "y": 531.1909055709839,
+ "z": "6872ec11.8012f4",
+ "wires": []
+ },
+ {
+ "id": "7676bb7a.aad3e4",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 460.9047088623047,
+ "y": 367.5714159011841,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "865715e6.66c8a8",
+ "60defca7.7eed64",
+ "e80f4202.f64da",
+ "933b1870.467508",
+ "2ee18070.6515e"
+ ]
+ ]
+ },
+ {
+ "id": "865715e6.66c8a8",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 673.7142486572266,
+ "y": 292.85723400115967,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "176e8d1f.b28273"
+ ]
+ ]
+ },
+ {
+ "id": "60defca7.7eed64",
+ "type": "outcome",
+ "name": "unassign",
+ "xml": "<outcome value='unassign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 682.0952339172363,
+ "y": 439.0479259490967,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "b794ebfe.90b468"
+ ]
+ ]
+ },
+ {
+ "id": "933b1870.467508",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 673.8094635009766,
+ "y": 488.57139110565186,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "65cfc979.37f8c8"
+ ]
+ ]
+ },
+ {
+ "id": "65cfc979.37f8c8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n",
+ "comments": "",
+ "x": 857.9999084472656,
+ "y": 488.57145595550537,
+ "z": "6872ec11.8012f4",
+ "wires": []
+ },
+ {
+ "id": "ed140240.696ee",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:validate-vf-module-input",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-vf-module-input' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 583.4166107177734,
+ "y": 242.3810567855835,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "176e8d1f.b28273",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vf-module-topology-operation-assign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1035.8571014404297,
+ "y": 292.4286947250366,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d080b6cc.baf0a8",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vf-module-topology-operation-deactivate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-deactivate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1047.8570594787598,
+ "y": 389.0953378677368,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b794ebfe.90b468",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vf-module-topology-operation-unassign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-unassign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1042.190330505371,
+ "y": 438.7620573043823,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "e80f4202.f64da",
+ "type": "outcome",
+ "name": "deactivate",
+ "xml": "<outcome value='deactivate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 686.1903266906738,
+ "y": 389.7620153427124,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "d080b6cc.baf0a8"
+ ]
+ ]
+ },
+ {
+ "id": "6dfc037a.3d846c",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vf-module-topology-operation-activate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-activate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1048.3333053588867,
+ "y": 339.9999837875366,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2ee18070.6515e",
+ "type": "outcome",
+ "name": "activate",
+ "xml": "<outcome value='activate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 678.3332710266113,
+ "y": 340.6666650772095,
+ "z": "6872ec11.8012f4",
+ "wires": [
+ [
+ "6dfc037a.3d846c"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-activate.json
new file mode 100644
index 00000000..ff8d2b05
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-activate.json
@@ -0,0 +1,452 @@
+[
+ {
+ "id": "ebd3636c.7419d",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 99.99999237060547,
+ "y": 81.66666412353516,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "197d48ee.598fa7"
+ ]
+ ]
+ },
+ {
+ "id": "197d48ee.598fa7",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 175.28569793701172,
+ "y": 121.90477561950684,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "e1950959.592288"
+ ]
+ ]
+ },
+ {
+ "id": "e1950959.592288",
+ "type": "method",
+ "name": "method vnf-topology-operation-activate",
+ "xml": "<method rpc='vnf-topology-operation-activate' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 196.42861938476562,
+ "y": 161.66666412353516,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "e344a3c.e6f6f6"
+ ]
+ ]
+ },
+ {
+ "id": "e9d65a3e.e8fb48",
+ "type": "comment",
+ "name": "vnf-topology-operation-activate",
+ "info": "",
+ "comments": "",
+ "x": 494.3448486328125,
+ "y": 29.253007888793945,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "68902cc2.2a12a4",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 503.5238037109375,
+ "y": 260.52380180358887,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "a0b4d245.da80d",
+ "ad7ffb1a.cd9d28"
+ ]
+ ]
+ },
+ {
+ "id": "a0b4d245.da80d",
+ "type": "outcome",
+ "name": "CreateVnfInstance",
+ "xml": "<outcome value='CreateVnfInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 721.9047660827637,
+ "y": 237.66668605804443,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "27d2abcf.c98e94"
+ ]
+ ]
+ },
+ {
+ "id": "ad7ffb1a.cd9d28",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 685.9047317504883,
+ "y": 283.38101387023926,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "9aea2bb8.636f48"
+ ]
+ ]
+ },
+ {
+ "id": "27d2abcf.c98e94",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 908.7618942260742,
+ "y": 237.66671562194824,
+ "z": "28c16236.105dde",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9aea2bb8.636f48",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'activate' then request-action must be 'CreateVnfInstance'\" />\n",
+ "comments": "",
+ "x": 925.9047393798828,
+ "y": 283.38097190856934,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "e344a3c.e6f6f6",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 176.66665649414062,
+ "y": 383.33333587646484,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "68902cc2.2a12a4",
+ "d49c04f8.2ace98",
+ "788d0909.b021c8",
+ "99811d90.fc82c",
+ "7caed7a8.2e9948",
+ "2fbd1822.35aeb8",
+ "88b94012.df3c5",
+ "20178755.68db48",
+ "5ee26c61.c95f04"
+ ]
+ ]
+ },
+ {
+ "id": "d49c04f8.2ace98",
+ "type": "switchNode",
+ "name": "switch vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 489.9999771118164,
+ "y": 330.0000276565552,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "85207fdf.7da98"
+ ]
+ ]
+ },
+ {
+ "id": "85207fdf.7da98",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 676.6666564941406,
+ "y": 329.33332538604736,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "589c9a44.2b5c64"
+ ]
+ ]
+ },
+ {
+ "id": "589c9a44.2b5c64",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"There are no VNFs in MD-SAL\" />\n",
+ "comments": "",
+ "x": 858.3332824707031,
+ "y": 329.33332538604736,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "788d0909.b021c8",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 471.6666564941406,
+ "y": 378.333345413208,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "2e4255db.76c61a"
+ ]
+ ]
+ },
+ {
+ "id": "2e4255db.76c61a",
+ "type": "switchNode",
+ "name": "switch this vnf-id == input vnf-id",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 726.6667442321777,
+ "y": 377.00001335144043,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "e8e4ee61.d7a57"
+ ]
+ ]
+ },
+ {
+ "id": "e8e4ee61.d7a57",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 965.0000305175781,
+ "y": 375.99999141693115,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "bd084402.ebd418"
+ ]
+ ]
+ },
+ {
+ "id": "bd084402.ebd418",
+ "type": "set",
+ "name": "set vnf-index",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1133.3332252502441,
+ "y": 376.00001335144043,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "99811d90.fc82c",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 483.3333206176758,
+ "y": 425.00001525878906,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "cb5737d1.883a28"
+ ]
+ ]
+ },
+ {
+ "id": "cb5737d1.883a28",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 664.9999389648438,
+ "y": 424.333345413208,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "4eb36fef.c52b2"
+ ]
+ ]
+ },
+ {
+ "id": "4eb36fef.c52b2",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'\" />\n",
+ "comments": "",
+ "x": 831.6666259765625,
+ "y": 423.9999713897705,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "88b94012.df3c5",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 478.33325958251953,
+ "y": 686.6666707992554,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "2fbd1822.35aeb8",
+ "type": "set",
+ "name": "set vnf-level-oper-status to Created",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />\n<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`' />\n<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`' />\n",
+ "comments": "",
+ "x": 540.8133697509766,
+ "y": 639.0037975311279,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "7caed7a8.2e9948",
+ "type": "set",
+ "name": "copy input data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n",
+ "comments": "",
+ "x": 481.66651153564453,
+ "y": 594.999979019165,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "20178755.68db48",
+ "type": "switchNode",
+ "name": "switch current vnf-level-oper-status == PendingCreate",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'PendingCreate'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 605.0000305175781,
+ "y": 468.33330059051514,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "133f13c9.d4c06c"
+ ]
+ ]
+ },
+ {
+ "id": "133f13c9.d4c06c",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 891.3333740234375,
+ "y": 467.9999485015869,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "866ab955.d849b8"
+ ]
+ ]
+ },
+ {
+ "id": "866ab955.d849b8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Order status must be PendingCreate, but is currently '\n + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`\" />\n",
+ "comments": "",
+ "x": 1049.666648864746,
+ "y": 467.33327293395996,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "6bd0646e.4cf91c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n",
+ "comments": "",
+ "x": 994.9999961853027,
+ "y": 555.6665868759155,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "71f47c8b.cb4564",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 826.0238952636719,
+ "y": 511.9523983001709,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "5e0a685d.6799c8"
+ ]
+ ]
+ },
+ {
+ "id": "16014f9b.9ff89",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 834.5953254699707,
+ "y": 556.2381114959717,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "6bd0646e.4cf91c"
+ ]
+ ]
+ },
+ {
+ "id": "5e0a685d.6799c8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n",
+ "comments": "",
+ "x": 997.6905899047852,
+ "y": 512.4287919998169,
+ "z": "28c16236.105dde",
+ "wires": []
+ },
+ {
+ "id": "5ee26c61.c95f04",
+ "type": "save",
+ "name": "update generic-vnf prov-status to NVTPROV",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"prov-status\" value=\"NVTPROV\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 573.3333206176758,
+ "y": 531.666654586792,
+ "z": "28c16236.105dde",
+ "wires": [
+ [
+ "71f47c8b.cb4564",
+ "16014f9b.9ff89"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json
new file mode 100755
index 00000000..a6281304
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json
@@ -0,0 +1 @@
+[{"id":"8241aacb.08cdd8","type":"dgstart","name":"DGSTART","outputs":1,"x":115,"y":90,"z":"5083bb91.cbb384","wires":[["6555006a.2f30f"]]},{"id":"6555006a.2f30f","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":228.61902618408203,"y":130.2381134033203,"z":"5083bb91.cbb384","wires":[["eeb39a2.ad04a68"]]},{"id":"eeb39a2.ad04a68","type":"method","name":"method vnf-topology-operation-assign","xml":"<method rpc='vnf-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":206.42862701416016,"y":170,"z":"5083bb91.cbb384","wires":[["6a42140c.de8f7c"]]},{"id":"34ceabd.5e7b554","type":"comment","name":"vnf-topology-operation-assign","info":"","comments":"","x":509.34485626220703,"y":37.58634376525879,"z":"5083bb91.cbb384","wires":[]},{"id":"77d708f5.8001e8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":516.8571395874023,"y":367.19043922424316,"z":"5083bb91.cbb384","wires":[["b5d89b76.8690d8","3602a403.88e53c"]]},{"id":"b5d89b76.8690d8","type":"outcome","name":"CreateVnfInstance","xml":"<outcome value='CreateVnfInstance'>\n","comments":"","outputs":1,"x":770.5714340209961,"y":344.3333206176758,"z":"5083bb91.cbb384","wires":[["2f2a6b54.bc4ad4"]]},{"id":"3602a403.88e53c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":732.5713996887207,"y":390.0476484298706,"z":"5083bb91.cbb384","wires":[["9d45573f.a70cf8"]]},{"id":"2f2a6b54.bc4ad4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":955.4285621643066,"y":344.3333501815796,"z":"5083bb91.cbb384","wires":[[]]},{"id":"9d45573f.a70cf8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateVnfInstance'\" />\n","comments":"","x":972.5714073181152,"y":390.0476064682007,"z":"5083bb91.cbb384","wires":[]},{"id":"6a42140c.de8f7c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":145.11905670166016,"y":1701.7857055664062,"z":"5083bb91.cbb384","wires":[["77d708f5.8001e8","aa948e3b.dc6f4","70905004.44daf","db6678a0.606738","a8c695f6.0babf8","b4d76448.66e818","d6dc9daa.dab27","d09af1c.f6ecc1","59e68b20.a9f1d4","ee6fbe81.c9b8d","e15d873e.f3a578","859c6fc2.42cc1","161882c2.0524bd","e0aec656.73c228","fb26450c.7d69d8","8fe9a7cd.91ae28","92cd0a7d.aee888","b405840f.b908e8","555188e7.5bae08","c7f99789.bdf418","ed2bee8b.f19af","10b2b5e7.5b556a","b6894e3b.427f7","7eb11b41.3e53d4","76228b8.6690274","bf0a4f73.3427c","780bff7b.fe23","b4297c00.0fc6b8","74cb887a.748ed8","83344e86.aa812","a6739756.d975f8","b3f8a06f.e304d"]]},{"id":"aa948e3b.dc6f4","type":"get-resource","name":"get-resource VF_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODEL WHERE customization_uuid = $vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid'\n pfx='db.vf-model'>\n\n","comments":"","outputs":1,"x":529.1904449462891,"y":458.333309173584,"z":"5083bb91.cbb384","wires":[["fd105869.f2cd08","af0a7eb5.ee8e2"]]},{"id":"ec0cf350.8477c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No model found for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid`\" />\n","comments":"","x":970.6189231872559,"y":481.7617950439453,"z":"5083bb91.cbb384","wires":[]},{"id":"fd105869.f2cd08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":729.9761428833008,"y":438.7141466140747,"z":"5083bb91.cbb384","wires":[["12a688b3.3440a7"]]},{"id":"af0a7eb5.ee8e2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":738.5475730895996,"y":482.9998598098755,"z":"5083bb91.cbb384","wires":[["ec0cf350.8477c"]]},{"id":"12a688b3.3440a7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODEL table\" />\n","comments":"","x":969.9761238098145,"y":436.85705375671387,"z":"5083bb91.cbb384","wires":[]},{"id":"70905004.44daf","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":559.2857131958008,"y":648.5714282989502,"z":"5083bb91.cbb384","wires":[["84321624.bc90b8","e6e198eb.7d5308"]]},{"id":"84321624.bc90b8","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":785.0000419616699,"y":615.7142162322998,"z":"5083bb91.cbb384","wires":[["df34205c.2330c"]]},{"id":"df34205c.2330c","type":"set","name":"set vnf-index=0","xml":"<set>\n<parameter name='vnf-index' value='0' />\n","comments":"","x":949.2857627868652,"y":614.7142944335938,"z":"5083bb91.cbb384","wires":[]},{"id":"e6e198eb.7d5308","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":786.4286041259766,"y":680.0000343322754,"z":"5083bb91.cbb384","wires":[["910f819c.16efe"]]},{"id":"e34a45aa.608f38","type":"set","name":"set vnf-index = vnf_length","xml":"<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n","comments":"","x":1125.285758972168,"y":658.285722732544,"z":"5083bb91.cbb384","wires":[]},{"id":"4446fa6b.76c4b4","type":"for","name":"for each existing VNF","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":1110.7142715454102,"y":704.2856616973877,"z":"5083bb91.cbb384","wires":[["9e71792a.51a8b8"]]},{"id":"910f819c.16efe","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":922.1428642272949,"y":680,"z":"5083bb91.cbb384","wires":[["e34a45aa.608f38","4446fa6b.76c4b4"]]},{"id":"9e71792a.51a8b8","type":"switchNode","name":"switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n","comments":"","outputs":1,"x":1465.0000381469727,"y":703.857141494751,"z":"5083bb91.cbb384","wires":[["ca44cc94.301af"]]},{"id":"ca44cc94.301af","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1759.2857475280762,"y":703.4286136627197,"z":"5083bb91.cbb384","wires":[["e7127b80.39ffd8"]]},{"id":"e7127b80.39ffd8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n","comments":"","x":1907.8571548461914,"y":703.4285736083984,"z":"5083bb91.cbb384","wires":[]},{"id":"2ca7efa9.3b66e","type":"comment","name":"make sure this VNF doesn't exist already","info":"","comments":"","x":1452.1427688598633,"y":661.4285717010498,"z":"5083bb91.cbb384","wires":[]},{"id":"db6678a0.606738","type":"set","name":"set vnf-topology data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id'\n value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type'\n value='`$vnf-topology-operation-input.vnf-information.vnf-type`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type'\n value='`$db.vf-model.nf-type`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role'\n value='`$db.vf-model.nf-role`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function'\n value='`$db.vf-model.nf-function`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code'\n value='`$db.vf-model.nf-code`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.tenant'\n value='`$vnf-topology-operation-input.vnf-request-input.tenant`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-cloud-region'\n value='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`' />\n \n","comments":"","x":514.9999694824219,"y":810.238115310669,"z":"5083bb91.cbb384","wires":[]},{"id":"a8c695f6.0babf8","type":"switchNode","name":"switch input vnf-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>\n","comments":"","outputs":1,"x":521.4285507202148,"y":1052.8571615219116,"z":"5083bb91.cbb384","wires":[["487e7f2b.8ad47","68310aa2.d2de84"]]},{"id":"487e7f2b.8ad47","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":789.6427726745605,"y":975.8333864212036,"z":"5083bb91.cbb384","wires":[["c340356a.783268"]]},{"id":"429caac2.6d56a4","type":"switchNode","name":"switch ecomp-generated-naming","xml":"<switch test='`$db.vf-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1206.071662902832,"y":882.5002059936523,"z":"5083bb91.cbb384","wires":[["2e7aef6.82a371","9b8210cc.7778e","8ab384c2.20be78"]]},{"id":"c340356a.783268","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":935.3572692871094,"y":975.833498954773,"z":"5083bb91.cbb384","wires":[["9fd7e5b5.625518","ed228289.17a95","429caac2.6d56a4"]]},{"id":"9b8210cc.7778e","type":"outcome","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1455.357322692871,"y":884.404914855957,"z":"5083bb91.cbb384","wires":[["1d994a90.016b85"]]},{"id":"1d994a90.016b85","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"No vnf-name was received but ecomp-generated-naming is not Y\" />\n","comments":"","x":1609.64310836792,"y":902.9763593673706,"z":"5083bb91.cbb384","wires":[]},{"id":"2e7aef6.82a371","type":"outcome","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1455.3572883605957,"y":840.1192359924316,"z":"5083bb91.cbb384","wires":[["45a6a073.f42c1"]]},{"id":"8ab384c2.20be78","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1455.357250213623,"y":930.119234085083,"z":"5083bb91.cbb384","wires":[["1d994a90.016b85"]]},{"id":"45a6a073.f42c1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1592.5002326965332,"y":840.1192359924316,"z":"5083bb91.cbb384","wires":[[]]},{"id":"68310aa2.d2de84","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":792.2144546508789,"y":1122.119125366211,"z":"5083bb91.cbb384","wires":[["e79898f0.209a58"]]},{"id":"9ffe9f0c.29d4f","type":"set","name":"set tmp.vnf-name","xml":"<set>\n<parameter name='tmp.vnf-name' value=\"`$vnf-topology-operation-input.vnf-request-input.vnf-name`\" />\n","comments":"","x":1751.0715306599936,"y":1189.5476417541504,"z":"5083bb91.cbb384","wires":[]},{"id":"9fd7e5b5.625518","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1274.4763259887695,"y":1048.8333959579468,"z":"5083bb91.cbb384","wires":[["d8e6a254.be4f7","6860527.6c3eeac"]]},{"id":"d8e6a254.be4f7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1570.1906140645347,"y":1021.6906585693359,"z":"5083bb91.cbb384","wires":[["6bce88ea.dd4c08"]]},{"id":"6860527.6c3eeac","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1573.5239639282227,"y":1073.3573017120361,"z":"5083bb91.cbb384","wires":[["ec3565fb.6ebb98"]]},{"id":"ed228289.17a95","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='VNF_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`'z' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + $db.vf-model.nf-code`\" />\n<parameter name='generate-unique-name-input.index-length' value='2' />\n","comments":"","x":1231.1430130004883,"y":997.1668043136597,"z":"5083bb91.cbb384","wires":[]},{"id":"ec3565fb.6ebb98","type":"set","name":"set tmp.vnf-name to generated name","xml":"<set>\n<parameter name='tmp.vnf-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1814.7143491109214,"y":1073.8333930969238,"z":"5083bb91.cbb384","wires":[]},{"id":"6bce88ea.dd4c08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1738.0477269490561,"y":1021.1191701889038,"z":"5083bb91.cbb384","wires":[]},{"id":"e79898f0.209a58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":940.1429824829102,"y":1120.7858123779297,"z":"5083bb91.cbb384","wires":[["1af0159f.6f1e5a","5ec1ca2.9ad0934"]]},{"id":"5ec1ca2.9ad0934","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1270.1429824829102,"y":1168.7858123779297,"z":"5083bb91.cbb384","wires":[["2aa25520.67d72a","37668d9a.952f52"]]},{"id":"2aa25520.67d72a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1568.7143987019858,"y":1138.785837173462,"z":"5083bb91.cbb384","wires":[["ab10d68f.515008"]]},{"id":"37668d9a.952f52","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1572.0477485656738,"y":1190.452480316162,"z":"5083bb91.cbb384","wires":[["9ffe9f0c.29d4f"]]},{"id":"1af0159f.6f1e5a","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />\n<parameter name='generate-unique-name-input.supplied-name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-name`' />\n","comments":"","x":1226.8096542358398,"y":1117.1191844940186,"z":"5083bb91.cbb384","wires":[]},{"id":"ab10d68f.515008","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1736.5715115865073,"y":1138.2143487930298,"z":"5083bb91.cbb384","wires":[]},{"id":"b4d76448.66e818","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='0'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":543.5714492797852,"y":1730.8569984436035,"z":"5083bb91.cbb384","wires":[["63136ca0.2aa6a4","38b39166.261e2e"]]},{"id":"38b39166.261e2e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":768.8176422119141,"y":1749.00785446167,"z":"5083bb91.cbb384","wires":[["c8785277.db74c"]]},{"id":"c8785277.db74c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":943.8176155090332,"y":1749.007890701294,"z":"5083bb91.cbb384","wires":[]},{"id":"63136ca0.2aa6a4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":777.7462387084961,"y":1707.2935876846313,"z":"5083bb91.cbb384","wires":[["734e45d0.a54dbc"]]},{"id":"734e45d0.a54dbc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":944.095516204834,"y":1706.5991649627686,"z":"5083bb91.cbb384","wires":[]},{"id":"d6dc9daa.dab27","type":"get-resource","name":"get-resource VF_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_TO_NETWORK_ROLE_MAPPING WHERE vf_customization_uuid = $vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid'\n pfx='db.vf-network-role-mapping[]'>\n\n","comments":"","outputs":1,"x":608.8095321655273,"y":2041.9045181274414,"z":"5083bb91.cbb384","wires":[["fb8ff7f3.9c6578","21c9fd46.cdb8b2"]]},{"id":"2a8c3297.b95dbe","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in VF_TO_NETWORK_ROLE_MAPPING for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid`\" />\n","comments":"","x":1344.5237121582031,"y":2059.618698120117,"z":"5083bb91.cbb384","wires":[]},{"id":"fb8ff7f3.9c6578","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":904.5952033996582,"y":2020.6186828613281,"z":"5083bb91.cbb384","wires":[["3531361a.0233ba"]]},{"id":"21c9fd46.cdb8b2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":913.166633605957,"y":2064.904396057129,"z":"5083bb91.cbb384","wires":[["bf344dbf.57e7d"]]},{"id":"3531361a.0233ba","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_TO_NETWORK_ROLE_MAPPING table\" />\n","comments":"","x":1079.5951843261719,"y":2020.4283332824707,"z":"5083bb91.cbb384","wires":[]},{"id":"e1fffb5d.139e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":709.5715866088867,"y":2490.71391582489,"z":"5083bb91.cbb384","wires":[["611b38f2.51f0b8","37408b0a.59aa74","8956c374.edb43","fbd0fea8.b0301","dd0ec04d.0901","c56cd3a7.e3e8d","8d1a1df.f9acde","1905c415.59545c"]]},{"id":"8956c374.edb43","type":"get-resource","name":"get-resource l3-network","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"l3-networks\" \n\t\tkey=\"l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role\"\n pfx='aai.l3-network' local-only='false'\n>\n","comments":"","outputs":1,"x":942.4286041259766,"y":2169.999779701233,"z":"5083bb91.cbb384","wires":[["c79e82cf.08146","59d32d05.f01e74"]]},{"id":"59d32d05.f01e74","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1146.476318359375,"y":2192.1426191329956,"z":"5083bb91.cbb384","wires":[["7d74e0ae.ec3dc"]]},{"id":"7d74e0ae.ec3dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving l3-network from AAI\" />\n","comments":"","x":1321.4762916564941,"y":2192.1426553726196,"z":"5083bb91.cbb384","wires":[]},{"id":"c79e82cf.08146","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1155.404914855957,"y":2150.428352355957,"z":"5083bb91.cbb384","wires":[["a3dc9d39.f743"]]},{"id":"a3dc9d39.f743","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No active l3-network found in AAI with cloud_region_id '\n + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '\n + $db.vf-network-role-mapping[$network-index].network-role`\" />\n","comments":"","x":1321.754192352295,"y":2149.7339296340942,"z":"5083bb91.cbb384","wires":[]},{"id":"611b38f2.51f0b8","type":"set","name":"set vnf-network data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'\n value='`$db.vf-network-role-mapping[$role-index].network-role`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'\n value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'\n value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'\n value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'\n value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />\n","comments":"","x":931.6191940307617,"y":2657.0000228881836,"z":"5083bb91.cbb384","wires":[]},{"id":"e15d873e.f3a578","type":"for","name":"for each cloud-region availability zone","xml":"<for index='idx' start='0' end='`$aai.az.availability-zone_length`' >\n","comments":"","outputs":1,"x":543.3335571289062,"y":3071.618803024292,"z":"5083bb91.cbb384","wires":[["e9252ccb.d2705"]]},{"id":"b1db1f98.d448e","type":"set","name":"set availability-zone","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[$idx]'\n value='`$aai.az.availability-zone[$idx].availability-zone-name`' />\n","comments":"","x":1005.0002403259277,"y":3040.952217102051,"z":"5083bb91.cbb384","wires":[]},{"id":"859c6fc2.42cc1","type":"set","name":"set vnf-parameters-data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.'\n value='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.' />\n","comments":"","x":502.9524841308594,"y":2921.5711631774902,"z":"5083bb91.cbb384","wires":[]},{"id":"15c078e.5c6e387","type":"save","name":"save generic-vnf l3-network relationships","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n <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`\" />\n","comments":"","outputs":1,"x":969.5240173339844,"y":3215.381015777588,"z":"5083bb91.cbb384","wires":[["8c9a1ab5.ce5b08","e70903d4.4bb15"]]},{"id":"fb26450c.7d69d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":466.0953674316406,"y":3602.1901140213013,"z":"5083bb91.cbb384","wires":[]},{"id":"e0aec656.73c228","type":"set","name":"set vnf-level-oper-status to PendingCreate","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />\n<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`' />\n<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`' />\n","comments":"","x":555.9088134765625,"y":3504.527594566345,"z":"5083bb91.cbb384","wires":[]},{"id":"59e68b20.a9f1d4","type":"for","name":"for each network-role","xml":"<for index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'>","comments":"","outputs":1,"x":492.90489196777344,"y":2490.7141189575195,"z":"5083bb91.cbb384","wires":[["e1fffb5d.139e58"]]},{"id":"d09af1c.f6ecc1","type":"set","name":"set network-index = 0","xml":"<set>\n<parameter name='network-index' value='0' />\n","comments":"","x":511.2380676269531,"y":2108.8094577789307,"z":"5083bb91.cbb384","wires":[]},{"id":"37408b0a.59aa74","type":"set","name":"increment network-index","xml":"<set>\n<parameter name='network-index' value='`$network-index + 1`' />\n","comments":"","x":941.9525146484375,"y":2794.6189250946045,"z":"5083bb91.cbb384","wires":[]},{"id":"ee6fbe81.c9b8d","type":"set","name":"set vnf-network_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'\n value='`$network-index`' />\n","comments":"","x":501.8095703125,"y":2871.571207046509,"z":"5083bb91.cbb384","wires":[]},{"id":"161882c2.0524bd","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n","comments":"","x":471.4286422729492,"y":3452.1904258728027,"z":"5083bb91.cbb384","wires":[]},{"id":"8fe9a7cd.91ae28","type":"for","name":"for each vnf-network","xml":"<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`' >\n","comments":"","outputs":1,"x":492.52392578125,"y":3214.380931854248,"z":"5083bb91.cbb384","wires":[["e79df5e2.3bfb98"]]},{"id":"e79df5e2.3bfb98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":696.1905670166016,"y":3214.380892753601,"z":"5083bb91.cbb384","wires":[["15c078e.5c6e387"]]},{"id":"92cd0a7d.aee888","type":"set","name":"set new vnf_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n","comments":"","x":507.0952491760254,"y":764.7619781494141,"z":"5083bb91.cbb384","wires":[]},{"id":"b405840f.b908e8","type":"for","name":"for each cloud-region relationship","xml":"<for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":556.4285736083984,"y":1818.0951700210571,"z":"5083bb91.cbb384","wires":[["c203a95d.692928"]]},{"id":"c203a95d.692928","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":804.1071166992188,"y":1817.8450994491577,"z":"5083bb91.cbb384","wires":[["f1cc745c.42f608"]]},{"id":"f1cc745c.42f608","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":973.5714378356934,"y":1817.2379217147827,"z":"5083bb91.cbb384","wires":[["7ed2b7fb.548078"]]},{"id":"d747b0d7.af821","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli'\n value='`$aai-uid-split[$aai-uid-split_length - 1]`' />\n","comments":"","x":1294.2857360839844,"y":1816.9045791625977,"z":"5083bb91.cbb384","wires":[]},{"id":"555188e7.5bae08","type":"switchNode","name":"switch aic-clli","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli`'>\n","comments":"","outputs":1,"x":492.3333511352539,"y":1974.0474872589111,"z":"5083bb91.cbb384","wires":[["20f33836.314ae8"]]},{"id":"20f33836.314ae8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":640.4761848449707,"y":1974.0474700927734,"z":"5083bb91.cbb384","wires":[["dd195a67.9e4528"]]},{"id":"dd195a67.9e4528","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <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`\" />\n","comments":"","x":787.6190452575684,"y":1973.6189041137695,"z":"5083bb91.cbb384","wires":[]},{"id":"3b4ed31b.2aa0ec","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-invariant-uuid'\n value='`$db.vf-model.invariant-uuid`' />\n","comments":"","x":915.9287452697754,"y":1290.0475587844849,"z":"5083bb91.cbb384","wires":[]},{"id":"84e4b6d4.cddc08","type":"for","name":"for each l3-network","xml":"<for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >\n","comments":"","outputs":1,"x":1049.8811492919922,"y":2413.571388244629,"z":"5083bb91.cbb384","wires":[["6477f1c9.11cbd"]]},{"id":"6477f1c9.11cbd","type":"switchNode","name":"switch orchestration-status","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>\n","comments":"","outputs":1,"x":1278.452350616455,"y":2412.142815589905,"z":"5083bb91.cbb384","wires":[["2d02e762.92bf68","a48ca1a4.9260d","b6321bf9.9a57b8","a22ac71b.7c92f8","f6d8dcbb.95d7e"]]},{"id":"2d02e762.92bf68","type":"outcome","name":"Pending Delete","xml":"<outcome value='Pending Delete'>\n","comments":"","outputs":1,"x":1515.1192626953125,"y":2457.8095235824585,"z":"5083bb91.cbb384","wires":[["a5e2243e.79eec8"]]},{"id":"a48ca1a4.9260d","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1487.9764022827148,"y":2508.809504508972,"z":"5083bb91.cbb384","wires":[["6842d9dd.26f8c8"]]},{"id":"1bfffb3d.8635e5","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>\n","comments":"","outputs":1,"x":1853.6907539367676,"y":2507.3808450698853,"z":"5083bb91.cbb384","wires":[["105409f.8c324f6"]]},{"id":"6842d9dd.26f8c8","type":"for","name":"for each relationship","xml":"<for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":1657.9763145446777,"y":2508.3808813095093,"z":"5083bb91.cbb384","wires":[["1bfffb3d.8635e5"]]},{"id":"105409f.8c324f6","type":"outcome","name":"cloud-region","xml":"<outcome value='cloud-region'>\n","comments":"","outputs":1,"x":2027.9763946533203,"y":2506.9522914886475,"z":"5083bb91.cbb384","wires":[["8c0fac20.7b6d4"]]},{"id":"8c0fac20.7b6d4","type":"for","name":"for each relationship data","xml":"<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`' >\n","comments":"","outputs":1,"x":2225.119094848633,"y":2507.380759239197,"z":"5083bb91.cbb384","wires":[["23b4c525.ad999a"]]},{"id":"23b4c525.ad999a","type":"switchNode","name":"switch relationship-key","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>\n","comments":"","outputs":1,"x":2456.547695159912,"y":2506.9521341323853,"z":"5083bb91.cbb384","wires":[["ad4b7c5c.5ff53"]]},{"id":"ad4b7c5c.5ff53","type":"outcome","name":"cloud-region.cloud-region-id","xml":"<outcome value='cloud-region.cloud-region-id'>\n","comments":"","outputs":1,"x":2697.9762268066406,"y":2506.95223903656,"z":"5083bb91.cbb384","wires":[["8b527005.34699"]]},{"id":"8b527005.34699","type":"switchNode","name":"switch relationship-value == cloud-region-id","xml":"<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`'>\n","comments":"","outputs":1,"x":3002.2621459960938,"y":2506.8092947006226,"z":"5083bb91.cbb384","wires":[["1ee4a77a.9542e9"]]},{"id":"1ee4a77a.9542e9","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3242.262176513672,"y":2506.9522399902344,"z":"5083bb91.cbb384","wires":[["ea9b8e4a.f0362"]]},{"id":"fbd0fea8.b0301","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":888.0953330993652,"y":2481.4284858703613,"z":"5083bb91.cbb384","wires":[["84e4b6d4.cddc08","640fc2e9.3ee98c"]]},{"id":"640fc2e9.3ee98c","type":"returnSuccess","name":"CATCH BREAK","xml":"<return status='success'>\n\n","comments":"","x":1039.4287414550781,"y":2554.7617197036743,"z":"5083bb91.cbb384","wires":[]},{"id":"c702789.b589088","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":3543.095157623291,"y":2524.761643409729,"z":"5083bb91.cbb384","wires":[]},{"id":"dd0ec04d.0901","type":"set","name":"set l3-network-id = -1","xml":"<set>\n<parameter name='l3-network-id' value='-1' />\n","comments":"","x":932.4287033081055,"y":2284.7616996765137,"z":"5083bb91.cbb384","wires":[]},{"id":"ea9b8e4a.f0362","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3388.0951538085938,"y":2506.4283485412598,"z":"5083bb91.cbb384","wires":[["d78ad9d8.5d8c78","c702789.b589088"]]},{"id":"d78ad9d8.5d8c78","type":"set","name":"set l3-network-id = this l3-network","xml":"<set>\n<parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />\n","comments":"","x":3624.7618255615234,"y":2481.4283475875854,"z":"5083bb91.cbb384","wires":[]},{"id":"c56cd3a7.e3e8d","type":"switchNode","name":"switch l3-network-id","xml":"<switch test='`$l3-network-id`'>\n","comments":"","outputs":1,"x":929.4286270141602,"y":2608.428741455078,"z":"5083bb91.cbb384","wires":[["36280e92.ad7cb2"]]},{"id":"36280e92.ad7cb2","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1099.4285774230957,"y":2608.428497314453,"z":"5083bb91.cbb384","wires":[["3be921aa.df808e"]]},{"id":"3be921aa.df808e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`\" />\n","comments":"","x":1247.7619400024414,"y":2608.4286346435547,"z":"5083bb91.cbb384","wires":[]},{"id":"c7f99789.bdf418","type":"switchNode","name":"switch input model-invariant-uuid","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":559.7858200073242,"y":1312.8720026016235,"z":"5083bb91.cbb384","wires":[["47b49582.d69f7c","c9c231d.a31acd"]]},{"id":"47b49582.d69f7c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":765.4524917602539,"y":1290.0149660110474,"z":"5083bb91.cbb384","wires":[["3b4ed31b.2aa0ec"]]},{"id":"c9c231d.a31acd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":766.8810882568359,"y":1334.3005571365356,"z":"5083bb91.cbb384","wires":[["d6283c1d.df5e5"]]},{"id":"d6283c1d.df5e5","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-invariant-uuid'\n value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-invariant-uuid`' />\n","comments":"","x":921.1668243408203,"y":1333.7291293144226,"z":"5083bb91.cbb384","wires":[]},{"id":"1204474.d3b3db9","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-uuid'\n value='`$db.vf-model.uuid`' />\n","comments":"","x":916.8810157775879,"y":1378.5862350463867,"z":"5083bb91.cbb384","wires":[]},{"id":"ed2bee8b.f19af","type":"switchNode","name":"switch input model-uuid","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":532.4048385620117,"y":1401.4107398986816,"z":"5083bb91.cbb384","wires":[["2399ff70.6432c","2e93ac0a.a66e94"]]},{"id":"2399ff70.6432c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":766.4048118591309,"y":1378.553671836853,"z":"5083bb91.cbb384","wires":[["1204474.d3b3db9"]]},{"id":"2e93ac0a.a66e94","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":767.8334083557129,"y":1422.8392629623413,"z":"5083bb91.cbb384","wires":[["79226175.2b687"]]},{"id":"79226175.2b687","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-uuid'\n value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-uuid`' />\n","comments":"","x":922.1191444396973,"y":1422.2678351402283,"z":"5083bb91.cbb384","wires":[]},{"id":"83a56bac.491658","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-version'\n value='`$db.vf-model.version`' />\n","comments":"","x":914.0239486694336,"y":1467.4434423446655,"z":"5083bb91.cbb384","wires":[]},{"id":"10b2b5e7.5b556a","type":"switchNode","name":"switch input model-version","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-version`'>\n","comments":"","outputs":1,"x":540.5477104187012,"y":1490.2678871154785,"z":"5083bb91.cbb384","wires":[["2f9db03f.c491c","1978d9cb.d98de6"]]},{"id":"2f9db03f.c491c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":763.5476951599121,"y":1467.410849571228,"z":"5083bb91.cbb384","wires":[["83a56bac.491658"]]},{"id":"1978d9cb.d98de6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.9762916564941,"y":1511.6964406967163,"z":"5083bb91.cbb384","wires":[["7d30ca25.4b3c44"]]},{"id":"7d30ca25.4b3c44","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-version'\n value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-version`' />\n","comments":"","x":919.2620277404785,"y":1511.1250128746033,"z":"5083bb91.cbb384","wires":[]},{"id":"30711380.8e3a9c","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-name'\n value='`$db.vf-model.name`' />\n","comments":"","x":914.0239486694336,"y":1554.5862646102905,"z":"5083bb91.cbb384","wires":[]},{"id":"b6894e3b.427f7","type":"switchNode","name":"switch input model-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-name`'>\n","comments":"","outputs":1,"x":535.5477104187012,"y":1577.4107093811035,"z":"5083bb91.cbb384","wires":[["d278d695.c74378","48c0ba5a.c19a64"]]},{"id":"d278d695.c74378","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":763.5476951599121,"y":1554.553671836853,"z":"5083bb91.cbb384","wires":[["30711380.8e3a9c"]]},{"id":"48c0ba5a.c19a64","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.9762916564941,"y":1598.8392629623413,"z":"5083bb91.cbb384","wires":[["a7528ae.1a9da78"]]},{"id":"a7528ae.1a9da78","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-name'\n value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-name`' />\n","comments":"","x":919.2620277404785,"y":1598.2678351402283,"z":"5083bb91.cbb384","wires":[]},{"id":"a5e2243e.79eec8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.3333549499512,"y":2458.586400985718,"z":"5083bb91.cbb384","wires":[[]]},{"id":"f6d8dcbb.95d7e","type":"outcome","name":"PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":1512.9999961853027,"y":2413.5863151550293,"z":"5083bb91.cbb384","wires":[["9951c6e.9aa9138"]]},{"id":"9951c6e.9aa9138","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2414.3631925582886,"z":"5083bb91.cbb384","wires":[[]]},{"id":"a22ac71b.7c92f8","type":"outcome","name":"Pending Create","xml":"<outcome value='Pending Create'>\n","comments":"","outputs":1,"x":1514.9999961853027,"y":2370.2528190612793,"z":"5083bb91.cbb384","wires":[["6fce3bd5.f4e834"]]},{"id":"6fce3bd5.f4e834","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2371.0296964645386,"z":"5083bb91.cbb384","wires":[[]]},{"id":"b6321bf9.9a57b8","type":"outcome","name":"PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":1514.9999961853027,"y":2326.9195671081543,"z":"5083bb91.cbb384","wires":[["b2172720.159c18"]]},{"id":"b2172720.159c18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2327.6964445114136,"z":"5083bb91.cbb384","wires":[[]]},{"id":"8d1a1df.f9acde","type":"for","name":"for each A&AI subnet","xml":"<for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >\n","comments":"","outputs":1,"x":931.6667633056641,"y":2701.919626235962,"z":"5083bb91.cbb384","wires":[["38d73ded.fd6fe2"]]},{"id":"38d73ded.fd6fe2","type":"set","name":"set subnet data","xml":"<set>\n<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'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`' />\n<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'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />\n","comments":"","x":1129.9999389648438,"y":2700.2532052993774,"z":"5083bb91.cbb384","wires":[]},{"id":"1905c415.59545c","type":"set","name":"set subnet_length","xml":"<set>\n<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'\n value='`$aai.l3-network.l3-network[0].subnets.subnet_length`' />\n","comments":"","x":920.3333282470703,"y":2746.919708251953,"z":"5083bb91.cbb384","wires":[]},{"id":"7eb11b41.3e53d4","type":"set","name":"set availability-zones.max-count and length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.max-count'\n value='`$db.vf-model.avail-zone-max-count`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length'\n value='`$aai.az.availability-zone_length`' />\n","comments":"","x":563.0000610351562,"y":3159.6342582702637,"z":"5083bb91.cbb384","wires":[]},{"id":"76228b8.6690274","type":"set","name":"set vnf-name","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name'\n value='`$tmp.vnf-name`' />\n","comments":"","x":496.66663360595703,"y":1246.9197664260864,"z":"5083bb91.cbb384","wires":[]},{"id":"bf0a4f73.3427c","type":"save","name":"update generic-vnf","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"vnf-name\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name`\" />\n<parameter name=\"prov-status\" value=\"PREPROV\" />\n<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n<parameter name=\"equipment-role\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`\" />\n<parameter name=\"model-invariant-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-uuid`\" />\n<parameter name=\"model-customization-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-customization-uuid`\" />\n<parameter name=\"selflink\" value=\"`$vnf-object-path`\" />\n","comments":"","outputs":1,"x":483.3333282470703,"y":3369.300033569336,"z":"5083bb91.cbb384","wires":[["69da107b.fb799","7a401d78.a37844"]]},{"id":"780bff7b.fe23","type":"set","name":"set vnf-object-path","xml":"<set>\n<parameter name='vnf-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vnf-topology'`\"/>\n\n","comments":"","x":483.33336639404297,"y":3299.30051612854,"z":"5083bb91.cbb384","wires":[]},{"id":"b4297c00.0fc6b8","type":"set","name":"set vnf-id","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'\n value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n","comments":"","x":484.9999771118164,"y":1198.5863094329834,"z":"5083bb91.cbb384","wires":[]},{"id":"74cb887a.748ed8","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-viprend.log' />\n","comments":"","outputs":1,"x":461.00009536743164,"y":3550.967363357544,"z":"5083bb91.cbb384","wires":[[]]},{"id":"9b1367c3.3e1fd8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":1406.666805267334,"y":3235.9671211242676,"z":"5083bb91.cbb384","wires":[]},{"id":"8c9a1ab5.ce5b08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1219.3573722839355,"y":3192.919590950012,"z":"5083bb91.cbb384","wires":[["3dcbea4.1096316"]]},{"id":"e70903d4.4bb15","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1227.9288024902344,"y":3237.205304145813,"z":"5083bb91.cbb384","wires":[["9b1367c3.3e1fd8"]]},{"id":"3dcbea4.1096316","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n","comments":"","x":1409.3573989868164,"y":3192.729326248169,"z":"5083bb91.cbb384","wires":[]},{"id":"31bdedf0.2bef82","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":886.6667442321777,"y":3390.967043876648,"z":"5083bb91.cbb384","wires":[]},{"id":"69da107b.fb799","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":699.3573112487793,"y":3347.9195137023926,"z":"5083bb91.cbb384","wires":[["b5e15cb2.cab62"]]},{"id":"7a401d78.a37844","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":707.9287414550781,"y":3392.2052268981934,"z":"5083bb91.cbb384","wires":[["31bdedf0.2bef82"]]},{"id":"b5e15cb2.cab62","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating selflink in generic-vnf in AAI\" />\n","comments":"","x":889.3573379516602,"y":3347.7292490005493,"z":"5083bb91.cbb384","wires":[]},{"id":"83344e86.aa812","type":"set","name":"set model-customization-uuid","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.ecomp-model-information.model-customization-uuid'\n value='`$vnf-topology-operation-input.vnf-information.ecomp-model-information.model-customization-uuid`' />\n","comments":"","x":548.3332977294922,"y":1650.2529134750366,"z":"5083bb91.cbb384","wires":[]},{"id":"f66871af.e5692","type":"execute","name":"split related-link","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n <parameter name='ctx_memory_result_key' value='aai-uid-split' />\n <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />\n <parameter name='regex' value='/' />\n","comments":"","outputs":1,"x":1313.6665954589844,"y":1771.6664972305298,"z":"5083bb91.cbb384","wires":[[]]},{"id":"7ed2b7fb.548078","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1133.3332977294922,"y":1818.333285331726,"z":"5083bb91.cbb384","wires":[["f66871af.e5692","d747b0d7.af821","399a4263.6a360e"]]},{"id":"399a4263.6a360e","type":"break","name":"break","xml":"<break>\n","comments":"","x":1283.3332595825195,"y":1861.666582107544,"z":"5083bb91.cbb384","wires":[]},{"id":"e9252ccb.d2705","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":795,"y":3070.7143869400024,"z":"5083bb91.cbb384","wires":[["b1db1f98.d448e","d45ddc40.768c2"]]},{"id":"d45ddc40.768c2","type":"save","name":"save generic-vnf availability-zone relationship","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"availability-zone\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"att-aic\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"availability-zone.availability-zone-name\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$aai.az.availability-zone[$idx].availability-zone-name`\" />\n","comments":"","outputs":1,"x":1086.9048156738281,"y":3094.0478343963623,"z":"5083bb91.cbb384","wires":[["a2d3128e.390bf","8b3808e2.f32948"]]},{"id":"a97c0980.2d72a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":1540.47607421875,"y":3117.9671936035156,"z":"5083bb91.cbb384","wires":[]},{"id":"a2d3128e.390bf","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1353.1666412353516,"y":3074.9196634292603,"z":"5083bb91.cbb384","wires":[["e7b70608.415b38"]]},{"id":"8b3808e2.f32948","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1361.7380714416504,"y":3119.205376625061,"z":"5083bb91.cbb384","wires":[["a97c0980.2d72a8"]]},{"id":"e7b70608.415b38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n","comments":"","x":1543.1666679382324,"y":3074.729398727417,"z":"5083bb91.cbb384","wires":[]},{"id":"bf344dbf.57e7d","type":"set","name":"set mapping rows to 0","xml":"<set>\n<parameter name='db.vf-network-role-mapping_length' value='0' />\n","comments":"","x":1107.1427688598633,"y":2064.52388381958,"z":"5083bb91.cbb384","wires":[]},{"id":"a6739756.d975f8","type":"switchNode","name":"switch AAI availability-zone_length","xml":"<switch test='`$aai.az.availability-zone_length`'>\n","comments":"","outputs":1,"x":535.7142868041992,"y":2974.523973464966,"z":"5083bb91.cbb384","wires":[["2876e97f.ae3916"]]},{"id":"2876e97f.ae3916","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":754.2857055664062,"y":2974.0953826904297,"z":"5083bb91.cbb384","wires":[["32c7e4de.36637c"]]},{"id":"ea591bcc.24cec8","type":"set","name":"set availability-zone_length to 0","xml":"<set>\n<parameter name='aai.az.availability-zone_length' value='0' />\n","comments":"","x":1355.7143478393555,"y":2992.6666202545166,"z":"5083bb91.cbb384","wires":[]},{"id":"32c7e4de.36637c","type":"switchNode","name":"switch AZ max count > 0","xml":"<switch test='`$db.vf-model.avail-zone-max-count &gt; 0`'>\n","comments":"","outputs":1,"x":942.857177734375,"y":2974.5236945152283,"z":"5083bb91.cbb384","wires":[["a4226dd4.17547","29731a8a.ed2356"]]},{"id":"a4226dd4.17547","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1145.7142848968506,"y":2948.8094444274902,"z":"5083bb91.cbb384","wires":[["7e365163.fc36a"]]},{"id":"29731a8a.ed2356","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1147.1429061889648,"y":2993.0951919555664,"z":"5083bb91.cbb384","wires":[["ea591bcc.24cec8"]]},{"id":"7e365163.fc36a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No availability zones found in AAI for cloud region '\n + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n","comments":"","x":1297.142822265625,"y":2948.5238494873047,"z":"5083bb91.cbb384","wires":[]},{"id":"b3f8a06f.e304d","type":"get-resource","name":"get-resource availability zones","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"availability-zones\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='0'\"\n pfx='aai.az' local-only='false' >\n\n","comments":"","outputs":1,"x":545.7143096923828,"y":1901.4286441802979,"z":"5083bb91.cbb384","wires":[["c6cdd578.1d9f88"]]},{"id":"c6cdd578.1d9f88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":770.9605255126953,"y":1900.829496383667,"z":"5083bb91.cbb384","wires":[["450c32ab.82b7bc"]]},{"id":"450c32ab.82b7bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving availability zones from AAI\" />\n","comments":"","x":944.7104644775391,"y":1899.5796184539795,"z":"5083bb91.cbb384","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.json
new file mode 100644
index 00000000..a123659e
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.json
@@ -0,0 +1,408 @@
+[
+ {
+ "id": "704d0b14.d5c684",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 98.33332824707031,
+ "y": 90.74698829650879,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "72e4c75c.02dbd8"
+ ]
+ ]
+ },
+ {
+ "id": "72e4c75c.02dbd8",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 173.61903381347656,
+ "y": 130.98509979248047,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "cf8e6aa3.702178"
+ ]
+ ]
+ },
+ {
+ "id": "cf8e6aa3.702178",
+ "type": "method",
+ "name": "method vnf-topology-operation-deactivate",
+ "xml": "<method rpc='vnf-topology-operation-deactivate' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 200.76195526123047,
+ "y": 170.7469882965088,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "cb96d310.99dca"
+ ]
+ ]
+ },
+ {
+ "id": "95de4493.48a0c8",
+ "type": "comment",
+ "name": "vnf-topology-operation-deactivate",
+ "info": "",
+ "comments": "",
+ "x": 492.67818450927734,
+ "y": 38.33333206176758,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "163c9760.9a9a79",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 501.85713958740234,
+ "y": 269.6041259765625,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "80b90203.c142f",
+ "3890f05d.c33f7"
+ ]
+ ]
+ },
+ {
+ "id": "80b90203.c142f",
+ "type": "outcome",
+ "name": "DeleteVnfInstance",
+ "xml": "<outcome value='DeleteVnfInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 728.5714149475098,
+ "y": 245.08034229278564,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "df5429cb.487c88"
+ ]
+ ]
+ },
+ {
+ "id": "3890f05d.c33f7",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 692.5713806152344,
+ "y": 290.79467010498047,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "d4e21439.6c2c68"
+ ]
+ ]
+ },
+ {
+ "id": "df5429cb.487c88",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 915.4285430908203,
+ "y": 245.08037185668945,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d4e21439.6c2c68",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'\" />\n",
+ "comments": "",
+ "x": 932.5713882446289,
+ "y": 290.79462814331055,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "cb96d310.99dca",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 174.99999237060547,
+ "y": 392.4136600494385,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "163c9760.9a9a79",
+ "791aad2d.6402d4",
+ "5fe470c0.6326b",
+ "314e05bd.fd765a",
+ "2ee980dc.3023e",
+ "c5ae4e0b.ba491",
+ "2cdd37b1.513c28",
+ "b687fc0c.6ee0d"
+ ]
+ ]
+ },
+ {
+ "id": "791aad2d.6402d4",
+ "type": "switchNode",
+ "name": "switch vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 488.33331298828125,
+ "y": 339.0803518295288,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "69686a76.3c1234"
+ ]
+ ]
+ },
+ {
+ "id": "69686a76.3c1234",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 674.9999923706055,
+ "y": 338.413649559021,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "6713d6bd.53f838"
+ ]
+ ]
+ },
+ {
+ "id": "6713d6bd.53f838",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"There are no VNFs in MD-SAL\" />\n",
+ "comments": "",
+ "x": 856.666618347168,
+ "y": 338.413649559021,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "5fe470c0.6326b",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 469.99999237060547,
+ "y": 387.41366958618164,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "813eeeef.71253"
+ ]
+ ]
+ },
+ {
+ "id": "813eeeef.71253",
+ "type": "switchNode",
+ "name": "switch this vnf-id == input vnf-id",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 725.0000801086426,
+ "y": 386.08033752441406,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "3f5d6dbd.824612"
+ ]
+ ]
+ },
+ {
+ "id": "3f5d6dbd.824612",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 963.333366394043,
+ "y": 385.0803155899048,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "92e2ba42.5870e8"
+ ]
+ ]
+ },
+ {
+ "id": "92e2ba42.5870e8",
+ "type": "set",
+ "name": "set vnf-index",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1131.666561126709,
+ "y": 385.08033752441406,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "314e05bd.fd765a",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 481.6666488647461,
+ "y": 434.08033895492554,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "dc4d0087.64549"
+ ]
+ ]
+ },
+ {
+ "id": "dc4d0087.64549",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 663.3332748413086,
+ "y": 433.41366958618164,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "815b45d5.3c6cc8"
+ ]
+ ]
+ },
+ {
+ "id": "815b45d5.3c6cc8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'\" />\n",
+ "comments": "",
+ "x": 829.9999618530273,
+ "y": 433.08029556274414,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "2ee980dc.3023e",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 474.9999771118164,
+ "y": 654.0803279876709,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "c5ae4e0b.ba491",
+ "type": "set",
+ "name": "set vnf-level-oper-status to PendingDelete",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<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`' />\n<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`' />\n",
+ "comments": "",
+ "x": 562.4800567626953,
+ "y": 609.7507572174072,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "2cdd37b1.513c28",
+ "type": "set",
+ "name": "copy input data",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n",
+ "comments": "",
+ "x": 476.6665573120117,
+ "y": 567.4136371612549,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "4fa6056b.b7de5c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n",
+ "comments": "",
+ "x": 1028.3332710266113,
+ "y": 520.0000114440918,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "142a1a7a.ff7cd6",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 859.3571701049805,
+ "y": 476.28582286834717,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "ec70e2bc.1d824"
+ ]
+ ]
+ },
+ {
+ "id": "20247378.f063bc",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 867.9286003112793,
+ "y": 520.571536064148,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "4fa6056b.b7de5c"
+ ]
+ ]
+ },
+ {
+ "id": "ec70e2bc.1d824",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n",
+ "comments": "",
+ "x": 1031.0238647460938,
+ "y": 476.76221656799316,
+ "z": "31f1f0b7.be812",
+ "wires": []
+ },
+ {
+ "id": "b687fc0c.6ee0d",
+ "type": "save",
+ "name": "update generic-vnf orch-status to PendingDelete",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 583.3332366943359,
+ "y": 496.00005054473877,
+ "z": "31f1f0b7.be812",
+ "wires": [
+ [
+ "142a1a7a.ff7cd6",
+ "20247378.f063bc"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json
new file mode 100644
index 00000000..fbc5faf1
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json
@@ -0,0 +1,588 @@
+[
+ {
+ "id": "96001a8c.4d0748",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 101.66666412353516,
+ "y": 81.66666412353516,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "7c64b7f3.ff25c8"
+ ]
+ ]
+ },
+ {
+ "id": "7c64b7f3.ff25c8",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 176.9523696899414,
+ "y": 121.90477561950684,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "e77f5801.4ec068"
+ ]
+ ]
+ },
+ {
+ "id": "e77f5801.4ec068",
+ "type": "method",
+ "name": "method vnf-topology-operation-unassign",
+ "xml": "<method rpc='vnf-topology-operation-unassign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 200.0952911376953,
+ "y": 161.66666412353516,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "3346143.6ec13ec"
+ ]
+ ]
+ },
+ {
+ "id": "97471b5d.533f18",
+ "type": "comment",
+ "name": "vnf-topology-operation-unassign",
+ "info": "",
+ "comments": "",
+ "x": 496.0115203857422,
+ "y": 29.253007888793945,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "7ffc5961.3c2bf8",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 505.1904754638672,
+ "y": 260.52380180358887,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "88a6a6b8.f339b8",
+ "bae1be9d.b2504"
+ ]
+ ]
+ },
+ {
+ "id": "88a6a6b8.f339b8",
+ "type": "outcome",
+ "name": "DeleteVnfInstance",
+ "xml": "<outcome value='DeleteVnfInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 758.9047698974609,
+ "y": 237.66668319702148,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "69c905eb.131a1c"
+ ]
+ ]
+ },
+ {
+ "id": "bae1be9d.b2504",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 720.9047355651855,
+ "y": 283.3810110092163,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "3461fef6.36d722"
+ ]
+ ]
+ },
+ {
+ "id": "69c905eb.131a1c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 943.7618980407715,
+ "y": 237.6667127609253,
+ "z": "ff974913.290918",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3461fef6.36d722",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'\" />\n",
+ "comments": "",
+ "x": 960.9047431945801,
+ "y": 283.3809690475464,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "3346143.6ec13ec",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 180,
+ "y": 554.9999980926514,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "7ffc5961.3c2bf8",
+ "c3ee1f54.e9c49",
+ "6f08ad34.331214",
+ "f989a9a8.a235a8",
+ "51b5c082.75d5f",
+ "6b1e8937.811c58",
+ "796a94e1.89abac",
+ "9a9f9c4c.fbd22"
+ ]
+ ]
+ },
+ {
+ "id": "c3ee1f54.e9c49",
+ "type": "switchNode",
+ "name": "switch vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 491.6666488647461,
+ "y": 330.0000276565552,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "14653468.3f5d1c"
+ ]
+ ]
+ },
+ {
+ "id": "14653468.3f5d1c",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 678.3333282470703,
+ "y": 329.33332538604736,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "15374e8a.9b3331"
+ ]
+ ]
+ },
+ {
+ "id": "15374e8a.9b3331",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"There are no VNFs in MD-SAL\" />\n",
+ "comments": "",
+ "x": 859.9999542236328,
+ "y": 329.33332538604736,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "6b1e8937.811c58",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 473.3333282470703,
+ "y": 378.333345413208,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "ac39155f.e69998"
+ ]
+ ]
+ },
+ {
+ "id": "ac39155f.e69998",
+ "type": "switchNode",
+ "name": "switch this vnf-id == input vnf-id",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 728.3334159851074,
+ "y": 377.00001335144043,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "2a9affc9.05758"
+ ]
+ ]
+ },
+ {
+ "id": "2a9affc9.05758",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 966.6667022705078,
+ "y": 375.99999141693115,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "f089091c.aad928"
+ ]
+ ]
+ },
+ {
+ "id": "f089091c.aad928",
+ "type": "set",
+ "name": "set vnf-index",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1134.9998970031738,
+ "y": 376.00001335144043,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "796a94e1.89abac",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 484.99999237060547,
+ "y": 425.00001525878906,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "7c43e234.9e600c"
+ ]
+ ]
+ },
+ {
+ "id": "7c43e234.9e600c",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 666.6666107177734,
+ "y": 424.333345413208,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "54a44960.3d1bc8"
+ ]
+ ]
+ },
+ {
+ "id": "54a44960.3d1bc8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'\" />\n",
+ "comments": "",
+ "x": 833.3332977294922,
+ "y": 423.9999713897705,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "6f08ad34.331214",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 476.3333168029785,
+ "y": 843.3332319259644,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "28425fad.bcfa3",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 999.1126251220703,
+ "y": 683.3332605361938,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "95eae07b.ee605"
+ ]
+ ]
+ },
+ {
+ "id": "fcd23488.435248",
+ "type": "comment",
+ "name": "Remove VNF from service data",
+ "info": "",
+ "comments": "",
+ "x": 441.2713928222656,
+ "y": 641.9049129486084,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "95eae07b.ee605",
+ "type": "set",
+ "name": "move vnf to remove one",
+ "xml": "<set>\n\t<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n",
+ "comments": "",
+ "x": 1232.703758239746,
+ "y": 682.3572120666504,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "51b5c082.75d5f",
+ "type": "switchNode",
+ "name": "switch vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 485.37048721313477,
+ "y": 684.9128894805908,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "7b55138b.dcab3c",
+ "75e73554.80932c"
+ ]
+ ]
+ },
+ {
+ "id": "7b55138b.dcab3c",
+ "type": "outcome",
+ "name": "1",
+ "xml": "<outcome value='1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 662.3705291748047,
+ "y": 645.5794763565063,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "4cc25dc3.e0aa74"
+ ]
+ ]
+ },
+ {
+ "id": "4cc25dc3.e0aa74",
+ "type": "set",
+ "name": "Remove vnfs",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n",
+ "comments": "",
+ "x": 826.0370254516602,
+ "y": 645.5795755386353,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "75e73554.80932c",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 661.0372734069824,
+ "y": 728.9127492904663,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "ac4d3a04.d29a88"
+ ]
+ ]
+ },
+ {
+ "id": "9a214120.4a1eb",
+ "type": "set",
+ "name": "set new vnf length",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n",
+ "comments": "",
+ "x": 1018.6667137145996,
+ "y": 773.9128341674805,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "4989e0b1.ae7b3",
+ "type": "set",
+ "name": "Remove the last vnf in the list",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1].\" value=\"\"/>\n\n",
+ "comments": "",
+ "x": 1054.3703689575195,
+ "y": 729.0238552093506,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "ac4d3a04.d29a88",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 829.7037620544434,
+ "y": 729.5793962478638,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "28425fad.bcfa3",
+ "4989e0b1.ae7b3",
+ "9a214120.4a1eb"
+ ]
+ ]
+ },
+ {
+ "id": "9a9f9c4c.fbd22",
+ "type": "switchNode",
+ "name": "switch current vnf-level-oper-status == Created",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'Created'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 584.3333053588867,
+ "y": 470.6666851043701,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "11283b53.5e5e25"
+ ]
+ ]
+ },
+ {
+ "id": "11283b53.5e5e25",
+ "type": "outcomeFalse",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 889.0000228881836,
+ "y": 470.33332443237305,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "54f5d0c9.b7a0e"
+ ]
+ ]
+ },
+ {
+ "id": "54f5d0c9.b7a0e",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cannot delete a VNF in a Created state\" />\n",
+ "comments": "",
+ "x": 1047.3332977294922,
+ "y": 469.6666488647461,
+ "z": "ff974913.290918",
+ "wires": []
+ },
+ {
+ "id": "f989a9a8.a235a8",
+ "type": "switchNode",
+ "name": "switch current vf-module_length",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 534.6666488647461,
+ "y": 556.6666507720947,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "5339c0a3.6e70e",
+ "4bffbedb.077b6",
+ "58060ac1.258e84"
+ ]
+ ]
+ },
+ {
+ "id": "5339c0a3.6e70e",
+ "type": "outcome",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 763.3332901000977,
+ "y": 513.3332920074463,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "8ae2c8.5df55d38"
+ ]
+ ]
+ },
+ {
+ "id": "4bffbedb.077b6",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.9047012329102,
+ "y": 554.7619495391846,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "8ae2c8.5df55d38"
+ ]
+ ]
+ },
+ {
+ "id": "8ae2c8.5df55d38",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 910.4762153625488,
+ "y": 534.7619504928589,
+ "z": "ff974913.290918",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "58060ac1.258e84",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.9047508239746,
+ "y": 596.1905374526978,
+ "z": "ff974913.290918",
+ "wires": [
+ [
+ "90982233.8ef03"
+ ]
+ ]
+ },
+ {
+ "id": "90982233.8ef03",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cannot delete the VNF because there are VFs defined\" />\n",
+ "comments": "",
+ "x": 929.0476455688477,
+ "y": 595.7619256973267,
+ "z": "ff974913.290918",
+ "wires": []
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json
new file mode 100644
index 00000000..bfb38e5c
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation.json
@@ -0,0 +1,271 @@
+[
+ {
+ "id": "7fb1a187.9549f",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 96.66666412353516,
+ "y": 86.66666412353516,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "c2b8a7b8.a5e428"
+ ]
+ ]
+ },
+ {
+ "id": "c2b8a7b8.a5e428",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<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}'>",
+ "outputs": 1,
+ "x": 171.9523696899414,
+ "y": 126.90477561950684,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "89a5ce6c.8a947"
+ ]
+ ]
+ },
+ {
+ "id": "89a5ce6c.8a947",
+ "type": "method",
+ "name": "method vnf-topology-operation",
+ "xml": "<method rpc='vnf-topology-operation' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 165.0952911376953,
+ "y": 166.66665840148926,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "baea3ff6.bd225"
+ ]
+ ]
+ },
+ {
+ "id": "435f3efd.64ab3",
+ "type": "comment",
+ "name": "vnf-topology-operation",
+ "info": "",
+ "comments": "",
+ "x": 491.0115203857422,
+ "y": 34.253007888793945,
+ "z": "dcb795e3.12ddb8",
+ "wires": []
+ },
+ {
+ "id": "baea3ff6.bd225",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 177.8333740234375,
+ "y": 334.36017417907715,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "f2687cfc.01d4c",
+ "b4265d07.b24f2",
+ "b14b13c7.baa14"
+ ]
+ ]
+ },
+ {
+ "id": "f2687cfc.01d4c",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
+ "comments": "",
+ "x": 470.3333282470703,
+ "y": 484.52420711517334,
+ "z": "dcb795e3.12ddb8",
+ "wires": []
+ },
+ {
+ "id": "b4265d07.b24f2",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 473.23804473876953,
+ "y": 332.5714178085327,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "76164f7d.903b1",
+ "117347a9.8b7218",
+ "e07500fb.cff53",
+ "9b91fc07.60be4",
+ "bc77aaba.4aabe8"
+ ]
+ ]
+ },
+ {
+ "id": "76164f7d.903b1",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 672.0475540161133,
+ "y": 265.1905632019043,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "5ec13553.7c0efc"
+ ]
+ ]
+ },
+ {
+ "id": "117347a9.8b7218",
+ "type": "outcome",
+ "name": "unassign",
+ "xml": "<outcome value='unassign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 676.0951766967773,
+ "y": 395.38128662109375,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "9d96816e.64ca5"
+ ]
+ ]
+ },
+ {
+ "id": "9b91fc07.60be4",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 670.8094024658203,
+ "y": 439.57136249542236,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "2717cc4c.7bccc4"
+ ]
+ ]
+ },
+ {
+ "id": "2717cc4c.7bccc4",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n",
+ "comments": "",
+ "x": 856.9998474121094,
+ "y": 439.5714273452759,
+ "z": "dcb795e3.12ddb8",
+ "wires": []
+ },
+ {
+ "id": "b14b13c7.baa14",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:validate-vnf-input",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 579.0832977294922,
+ "y": 224.04770278930664,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "5ec13553.7c0efc",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-assign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1014.1904067993164,
+ "y": 264.76202392578125,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3e660d10.204032",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-deactivate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.5236740112305,
+ "y": 349.0953722000122,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9d96816e.64ca5",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-unassign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1021.1902732849121,
+ "y": 395.0954179763794,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "e07500fb.cff53",
+ "type": "outcome",
+ "name": "deactivate",
+ "xml": "<outcome value='deactivate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 681.190315246582,
+ "y": 349.76204776763916,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "3e660d10.204032"
+ ]
+ ]
+ },
+ {
+ "id": "1d805763.8f6c79",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:vnf-topology-operation-activate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1018.333251953125,
+ "y": 306.6666555404663,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "bc77aaba.4aabe8",
+ "type": "outcome",
+ "name": "activate",
+ "xml": "<outcome value='activate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 674.9998931884766,
+ "y": 307.33333110809326,
+ "z": "dcb795e3.12ddb8",
+ "wires": [
+ [
+ "1d805763.8f6c79"
+ ]
+ ]
+ }
+]
diff --git a/platform-logic/generic-resource-api/src/main/json/SUBNET-API_managed-network-notification.json b/platform-logic/generic-resource-api/src/main/json/SUBNET-API_managed-network-notification.json
new file mode 100644
index 00000000..177fd4d5
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/SUBNET-API_managed-network-notification.json
@@ -0,0 +1 @@
+[{"id":"1d697de8.1c8bd2","type":"dgstart","name":"DGSTART","outputs":1,"x":92.85714721679688,"y":84.33332824707031,"z":"fe1687cb.6748b8","wires":[["738f4ec8.3ebfb"]]},{"id":"738f4ec8.3ebfb","type":"service-logic","name":"SUBNET-API ${project.version}","module":"SUBNET-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":406.6905059814453,"y":85.33332824707031,"z":"fe1687cb.6748b8","wires":[["b53de678.5aad68"]]},{"id":"634eb01d.99ae1","type":"execute","name":"execute EIPAM activatesubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"activateSubnet\">\n\n","outputs":1,"x":650.5477447509766,"y":323.7619323730469,"z":"fe1687cb.6748b8","wires":[["c72da6f0.5e41e8","74dfc0f7.c1b15"]]},{"id":"c72da6f0.5e41e8","type":"success","name":"outcome: success","xml":"<outcome value=\"success\">","comments":"","outputs":1,"x":928.0714569091797,"y":201.4285888671875,"z":"fe1687cb.6748b8","wires":[["bcd2c580.735ef8"]]},{"id":"74dfc0f7.c1b15","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":912.1667938232422,"y":452.8094787597656,"z":"fe1687cb.6748b8","wires":[["e9a87b58.c5a9f8"]]},{"id":"a713f47b.c8cca8","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n <parameter name=\"error-code\" value=\"3000\" />\n <parameter name=\"error-message\" value=\"ActivateSubnet failure, need to manually activate in EIPAM\" />\n","comments":"","x":1420.2615509033203,"y":609.6665649414062,"z":"fe1687cb.6748b8","wires":[]},{"id":"7ad0948d.fae1dc","type":"save","name":"save: EIPAM IP Subnets Active","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n <parameter name=\"status\" value=\"ACTIVE\" />\n \n","outputs":1,"x":1470.7381744384766,"y":52.42860412597656,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"69ddb424.aac11c","type":"comment","name":"MANAGED-NETWORK-NOTIFICATION","info":"","x":472.55714416503906,"y":20,"z":"fe1687cb.6748b8","wires":[]},{"id":"b53de678.5aad68","type":"method","name":"managed-network-notification","xml":"<method rpc='managed-network-notification' mode='sync'>\n","outputs":1,"x":772.5571899414062,"y":84.19999694824219,"z":"fe1687cb.6748b8","wires":[["aae4bb44.e823e8"]]},{"id":"aae4bb44.e823e8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":151.55712890625,"y":149.1999969482422,"z":"fe1687cb.6748b8","wires":[["87f499a7.89d588","63a281f0.52912"]]},{"id":"87f499a7.89d588","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"managed-network-notification\"/>\n<parameter name=\"field3\" value=\"`$managed-network-notification-input.request-id`\"/>\n<parameter name=\"field4\" value=\"`$managed-network-notification-input.managed-network-status.status.code`\"/>\n<parameter name=\"field5\" value=\"`$managed-network-notification-input.managed-network-status.status.description`\"/>\n<parameter name=\"field6\" value=\"`$managed-network-notification-input.managed-network-status.final-notification-indicator`\"/>\n\n","comments":"","outputs":1,"x":352.1286163330078,"y":150.0614776611328,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"5eb284fa.4e019c","type":"returnSuccess","name":"return success","xml":" <return status=\"success\">\n \n","x":1427.0713806152344,"y":293.7618827819824,"z":"fe1687cb.6748b8","wires":[]},{"id":"22f650d9.d8db3","type":"set","name":"set: status = Active","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ACTIVE\" />","x":1432.3717193603516,"y":101.79519653320312,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"21eddabf.11f436","type":"save","name":"save: status = Active","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ACTIVE\" />","outputs":1,"x":1440.0382232666016,"y":150.1285400390625,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"bcd2c580.735ef8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1129.4046783447266,"y":201.09521484375,"z":"fe1687cb.6748b8","wires":[["7ad0948d.fae1dc","22f650d9.d8db3","21eddabf.11f436","5eb284fa.4e019c","cb0701c6.2633d","7b60262a.6e15b8"]]},{"id":"e9a87b58.c5a9f8","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1127.1666412353516,"y":452.8095397949219,"z":"fe1687cb.6748b8","wires":[["a713f47b.c8cca8","9989a7a9.198118","704cf48a.cb80ac","30ca370b.971358","4be470e7.693da","d998050.b2340f8"]]},{"id":"63a281f0.52912","type":"switchNode","name":"switch: status Successful","xml":"<switch test=\"`$managed-network-notification-input.managed-network-status.status.code`\">\n\n","outputs":1,"x":149.55712890625,"y":269.2000274658203,"z":"fe1687cb.6748b8","wires":[["b9ae7f80.7ea4c","e0cc590d.ec4548"]]},{"id":"b9ae7f80.7ea4c","type":"success","name":"outcome: Success","xml":"<outcome value=\"Success\">","outputs":1,"x":410.55711364746094,"y":269.20001220703125,"z":"fe1687cb.6748b8","wires":[["634eb01d.99ae1"]]},{"id":"e0cc590d.ec4548","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">","outputs":1,"x":327.5570983886719,"y":472.1999969482422,"z":"fe1687cb.6748b8","wires":[["2aa26002.ad155"]]},{"id":"2aa26002.ad155","type":"execute","name":"execute EIPAM deallocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deallocateSubnet\">\n\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":315.0419616699219,"y":697.8561706542969,"z":"fe1687cb.6748b8","wires":[["5d00b0bf.3d073","fa532c4.fd22ed"]]},{"id":"5fe6bc2a.78ee84","type":"save","name":"save: EIPAM IP Subnets DEALLOCATED","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n <parameter name=\"status\" value=\"DEALLOCATED\" />\n \n","comments":"","outputs":1,"x":1741.9998321533203,"y":865.7842407226562,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"5ee29eaa.01846","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1708.1887969970703,"y":914.9341735839844,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"60bc6aba.ddb804","type":"save","name":"save: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","outputs":1,"x":1710.1889190673828,"y":962.7120971679688,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"2d6b5fe.839f2a","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":1474.7672271728516,"y":865.9460144042969,"z":"fe1687cb.6748b8","wires":[["5fe6bc2a.78ee84","5ee29eaa.01846","60bc6aba.ddb804","743bfc5f.f7aad4","5a06f6a5.be2ce8","b4e34055.70014"]]},{"id":"743bfc5f.f7aad4","type":"returnFailure","name":"return failure ","xml":" <return status=\"failure\">\n <parameter name=\"error-code\" value=\"1000\" />\n <parameter name=\"error-message\" value=\"Failure from NCS and deletePool failed in EIPAM, need to manually delete.\" />\n","comments":"","x":1684.7671661376953,"y":1104.5015563964844,"z":"fe1687cb.6748b8","wires":[]},{"id":"9989a7a9.198118","type":"save","name":"save: EIPAM IP Subnets ERROR","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n <parameter name=\"status\" value=\"ERROR\" />\n \n","outputs":1,"x":1484.5823516845703,"y":373.6729736328125,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"704cf48a.cb80ac","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1444.8826446533203,"y":421.48956298828125,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"30ca370b.971358","type":"save","name":"save: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","outputs":1,"x":1449.8827056884766,"y":470.48956298828125,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"5d00b0bf.3d073","type":"success","name":"outcome: success","xml":"<outcome value=\"success\">","comments":"","outputs":1,"x":628.9261627197266,"y":703.2610778808594,"z":"fe1687cb.6748b8","wires":[["585b522e.fbe72c"]]},{"id":"5a06f6a5.be2ce8","type":"save","name":"Update AAI: SDN_C_BACKOUT_ERROR, PREPROV","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"vpe\" \n\t\tkey=\"vnf-id = $data-change-notification-input.key-data[0].key-value\" pfx=\"vpe-after\">\n\t<parameter name=\"operational-state\" value=\"SDN_C_BACKOUT_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n\t","comments":"","outputs":1,"x":1811.8571319580078,"y":1059.8334655761719,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"4be470e7.693da","type":"save","name":"Update AAI: EIPAM_ERROR, PREPROV","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"vpe\" \n\t\tkey=\"vnf-id = $data-change-notification-input.key-data[0].key-value\" pfx=\"vpe-after\">\n\t<parameter name=\"operational-state\" value=\"EIPAM_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n\t","comments":"","outputs":1,"x":1508.0238189697266,"y":561.0832214355469,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"cb0701c6.2633d","type":"save","name":"Update AAI: SDNC_COMPLETED","xml":"<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\">\n\t<parameter name=\"operational-state\" value=\"SDNC_COMPLETED\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n","comments":"","outputs":1,"x":1483.0237731933594,"y":247.5000114440918,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"b4e34055.70014","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"Failure from NCS and deletePool failed in EIPAM, need to manually delete.\"/>","comments":"","outputs":1,"x":1778.8571319580078,"y":1010.0834655761719,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"d998050.b2340f8","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"ActivateSubnet failure, need to manually activate in EIPAM.\"/>","comments":"","outputs":1,"x":1511.8572540283203,"y":515.5832824707031,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"7b60262a.6e15b8","type":"execute","name":"execute: set aai-summary-status-message with timestamp","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"SUCCESS: eipam-ip-block.status is ACTIVE.\"/>","comments":"","outputs":1,"x":1555.8572540283203,"y":199.08334350585938,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"fa532c4.fd22ed","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":602.5057067871094,"y":1134.633544921875,"z":"fe1687cb.6748b8","wires":[["c5dee3e7.cdd41"]]},{"id":"585b522e.fbe72c","type":"execute","name":"execute EIPAM deletePool","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePool\">\n\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":913.5058288574219,"y":712.6335601806641,"z":"fe1687cb.6748b8","wires":[["d384c427.925d78","6f76ee0b.cd146"]]},{"id":"98bded5a.99026","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n <parameter name=\"error-code\" value=\"2000\" />\n <parameter name=\"error-message\" value=\"Failure from NCS and deleted pool/subnet in EIPAM\"/>\n \n","comments":"","x":1524.7760772705078,"y":806.6335754394531,"z":"fe1687cb.6748b8","wires":[]},{"id":"85368279.ecf69","type":"set","name":"set: status = Deleted","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"DELETED\" />","comments":"","x":1549.8167266845703,"y":667.0675354003906,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"d384c427.925d78","type":"success","name":"outcome: success","xml":"<outcome value=\"success\">","comments":"","outputs":1,"x":1165.367446899414,"y":714.0281066894531,"z":"fe1687cb.6748b8","wires":[["5e92b424.f60bec"]]},{"id":"5e92b424.f60bec","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1362.9116973876953,"y":714.9361267089844,"z":"fe1687cb.6748b8","wires":[["85368279.ecf69","98bded5a.99026","a6e3d85b.a8fe78","165124ec.ec08eb"]]},{"id":"a6e3d85b.a8fe78","type":"save","name":"Update AAI: SDN_C_BACKOUT_ERROR, PREPROV","xml":"<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\">\n\t<parameter name=\"operational-state\" value=\"SDN_C_BACKOUT_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n","comments":"","outputs":1,"x":1651.2985382080078,"y":761.8501892089844,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"165124ec.ec08eb","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"Failure from NCS and deleted pool/subnet in EIPAM.\"/>","comments":"","outputs":1,"x":1619.2985382080078,"y":714.3502807617188,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"6f76ee0b.cd146","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":1155.0883483886719,"y":868.6335601806641,"z":"fe1687cb.6748b8","wires":[["2d6b5fe.839f2a"]]},{"id":"221af66d.6cc54a","type":"save","name":"save: EIPAM IP Subnets ERROR","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n <parameter name=\"status\" value=\"ERROR\" />\n \n","outputs":1,"x":1111.7639770507812,"y":1135.8977355957031,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"66787785.d87018","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1077.9529418945312,"y":1185.0476684570312,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"f85cd896.2992c8","type":"save","name":"save: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","outputs":1,"x":1079.9530639648438,"y":1232.8255920410156,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"c5dee3e7.cdd41","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":844.5313720703125,"y":1133.0594177246094,"z":"fe1687cb.6748b8","wires":[["221af66d.6cc54a","66787785.d87018","f85cd896.2992c8","5a7001d8.ef0f6","918cc60e.942f48","2eaa51b4.b221be"]]},{"id":"5a7001d8.ef0f6","type":"returnFailure","name":"return failure ","xml":" <return status=\"failure\">\n <parameter name=\"error-code\" value=\"1000\" />\n <parameter name=\"error-message\" value=\"Failure from NCS and deletePool failed in EIPAM, need to manually delete.\" />\n","comments":"","x":1054.5313110351562,"y":1374.6150512695312,"z":"fe1687cb.6748b8","wires":[]},{"id":"918cc60e.942f48","type":"save","name":"Update AAI: SDN_C_BACKOUT_ERROR, PREPROV","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"vpe\" \n\t\tkey=\"vnf-id = $data-change-notification-input.key-data[0].key-value\" pfx=\"vpe-after\">\n\t<parameter name=\"operational-state\" value=\"SDN_C_BACKOUT_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n\t","comments":"","outputs":1,"x":1181.6212768554688,"y":1329.9469604492188,"z":"fe1687cb.6748b8","wires":[[]]},{"id":"2eaa51b4.b221be","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"Failure from NCS and deletePool failed in EIPAM, need to manually delete.\"/>","comments":"","outputs":1,"x":1148.6212768554688,"y":1280.1969604492188,"z":"fe1687cb.6748b8","wires":[[]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/SUBNET-API_subnet-allocated-notification.json b/platform-logic/generic-resource-api/src/main/json/SUBNET-API_subnet-allocated-notification.json
new file mode 100755
index 00000000..0cb27689
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/SUBNET-API_subnet-allocated-notification.json
@@ -0,0 +1 @@
+[{"id":"a9213005.00cca","type":"dgstart","name":"DGSTART","outputs":1,"x":98.5714340209961,"y":81.42857360839844,"z":"27680826.c34468","wires":[["65d9132d.dd809c"]]},{"id":"e622bdcc.42acc","type":"success","name":"outcome success","xml":"<outcome value=\"success\">\n","outputs":1,"x":666.2379531860352,"y":195.70635223388672,"z":"27680826.c34468","wires":[["3f075783.e441e8"]]},{"id":"82f4ac79.53fcc","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":659.2380752563477,"y":344.5952682495117,"z":"27680826.c34468","wires":[["5356707.3c69f9"]]},{"id":"7e9ea036.3fddd","type":"returnSuccess","name":"return success","xml":" <return status=\"success\">\n \n","x":1179.7378616333008,"y":257.4286117553711,"z":"27680826.c34468","wires":[]},{"id":"ed648022.197df","type":"save","name":"save: EIPAM IP Subnets PendingActive","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n <parameter name=\"status\" value=\"PENDING-ACTIVE\" />\n \n","outputs":1,"x":1623.688247680664,"y":115.29525184631348,"z":"27680826.c34468","wires":[[]]},{"id":"dd2ccccd.fbd74","type":"method","name":"subnet-allocated-notification","xml":"<method rpc='subnet-allocated-notification' mode='sync'>\n","comments":"","outputs":1,"x":668.4381484985352,"y":81.29524612426758,"z":"27680826.c34468","wires":[["1d020804.ffe728"]]},{"id":"1d020804.ffe728","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":122.68812561035156,"y":169.7952480316162,"z":"27680826.c34468","wires":[["710e1c1e.4120b4","c02428aa.992358"]]},{"id":"710e1c1e.4120b4","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":277.8310012817383,"y":172.38293743133545,"z":"27680826.c34468","wires":[[]]},{"id":"1fe611b1.8156ae","type":"configure","name":"configure ncs SNIIR ","xml":"<configure adaptor=\"com.att.sdnctl.sli.adaptor.ncs.ncsAdaptor\" key=\"SNIIR\" activate=\"true\">\n\t<parameter name=\"input.request-id\" value=\"`$eipam-ip-block.request-id`\" />\n\t<parameter name=\"input.source\" value=\"SDNC\" />\n\t<parameter name=\"input.ptnii-name\" value=\"`$eipam-ip-block.ptnii-name`\" />\n\t<parameter name=\"input.ip-address\" value=\"`$eipam-ip-block.ip-address`\" />\n\t<parameter name=\"input.mask\" value=\"`$eipam-ip-block.prefix-length`\" />","outputs":1,"x":416.7381057739258,"y":274.3452682495117,"z":"27680826.c34468","wires":[["e622bdcc.42acc","82f4ac79.53fcc"]]},{"id":"22ec13a0.6a868c","type":"save","name":"save: EIPAM IP Subnets ERROR","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n <parameter name=\"status\" value=\"ERROR\" />\n \n","outputs":1,"x":1675.2381210327148,"y":479.78968620300293,"z":"27680826.c34468","wires":[[]]},{"id":"3f075783.e441e8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":880.5713577270508,"y":195.23967742919922,"z":"27680826.c34468","wires":[["57e63c8f.0955b4","26b12811.2f48c8","7e9ea036.3fddd","4939e504.9f364c"]]},{"id":"57e63c8f.0955b4","type":"set","name":"set: status = Pending Active","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"PENDING-ACTIVE\" />","x":1212.0381546020508,"y":165.79524993896484,"z":"27680826.c34468","wires":[]},{"id":"26b12811.2f48c8","type":"save","name":"save: status = Pending Active","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"PENDING-ACTIVE\" />","outputs":1,"x":1221.0380935668945,"y":211.79521942138672,"z":"27680826.c34468","wires":[[]]},{"id":"dd7e082.29230f8","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1304.538459777832,"y":516.6062850952148,"z":"27680826.c34468","wires":[]},{"id":"197a8f9d.0aba4","type":"save","name":"save: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","outputs":1,"x":1309.538703918457,"y":564.6062850952148,"z":"27680826.c34468","wires":[[]]},{"id":"65d9132d.dd809c","type":"service-logic","name":"SUBNET-API ${project.version}","module":"SUBNET-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":336.5214614868164,"y":81.74525833129883,"z":"27680826.c34468","wires":[["dd2ccccd.fbd74"]]},{"id":"ed7e5b43.0a4c88","type":"comment","name":"ChangeLog","info":"1.0.0: Release 1504\n2.0.0: Release 1507 - Remove Update Inventory\n9/16: update record node format\nRelease 1710 - update to include VIPR & SRIOV address plans","comments":"","x":84.52143096923828,"y":28.745243072509766,"z":"27680826.c34468","wires":[]},{"id":"5356707.3c69f9","type":"execute","name":"execute EIPAM deletePool","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePool\">\n\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":878.0896682739258,"y":344.0625534057617,"z":"27680826.c34468","wires":[["b4c80bc2.8ed758","c3cd7f2c.ff58b"]]},{"id":"d7bb127f.ac3d1","type":"set","name":"set: status = Deleted","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"DELETED\" />","comments":"","x":1569.089485168457,"y":278.50691986083984,"z":"27680826.c34468","wires":[]},{"id":"b4c80bc2.8ed758","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":1163.6450881958008,"y":398.39583587646484,"z":"27680826.c34468","wires":[["4a9084e7.17a3fc"]]},{"id":"4a9084e7.17a3fc","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":1064.0055618286133,"y":493.5070114135742,"z":"27680826.c34468","wires":[["dd7e082.29230f8","197a8f9d.0aba4","737ff142.6bf88","6586b53f.f980cc","268c791.e069e86","f38846a2.f8b938"]]},{"id":"737ff142.6bf88","type":"returnFailure","name":"return failure ","xml":" <return status=\"failure\">\n <parameter name=\"error-code\" value=\"1000\" />\n <parameter name=\"error-message\" value=\"IpBlockInstall failure and deletePool failed in EIPAM, need to manually delete\" />\n","comments":"","x":1276.339012145996,"y":707.3958234786987,"z":"27680826.c34468","wires":[]},{"id":"c3cd7f2c.ff58b","type":"success","name":"outcome success","xml":"<outcome value=\"success\">\n","outputs":1,"x":1172.8146438598633,"y":345.5396041870117,"z":"27680826.c34468","wires":[["ab627f0f.dca16"]]},{"id":"eba669ea.07a7f8","type":"returnFailure","name":"return failure ","xml":" <return status=\"failure\">\n <parameter name=\"error-code\" value=\"1000\" />\n <parameter name=\"error-message\" value=\"IpBlockInstall failure and deletePool deleted in EIPAM\" />\n","comments":"","x":1543.7034378051758,"y":423.76171112060547,"z":"27680826.c34468","wires":[]},{"id":"ab627f0f.dca16","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1369.919734954834,"y":345.3755683898926,"z":"27680826.c34468","wires":[["d7bb127f.ac3d1","eba669ea.07a7f8","ea42344d.d237c8","d02d0150.a724a"]]},{"id":"ea42344d.d237c8","type":"save","name":"Update AAI: NCS_IP_SUBNET_INSTALL_ERROR, PREPROV","xml":"<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\">\n\t<parameter name=\"operational-state\" value=\"NCS_IP_SUBNET_INSTALL_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n","comments":"","outputs":1,"x":1697.8214797973633,"y":377.8452682495117,"z":"27680826.c34468","wires":[[]]},{"id":"6586b53f.f980cc","type":"save","name":"Update AAI: NCS_IP_SUBNET_INSTALL_ERROR, PREPROV","xml":"<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\">\n\t<parameter name=\"operational-state\" value=\"NCS_IP_SUBNET_INSTALL_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n","comments":"","outputs":1,"x":1430.738166809082,"y":658.4285507202148,"z":"27680826.c34468","wires":[[]]},{"id":"d02d0150.a724a","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"IpBlockInstall failure and pool deleted in EIPAM.\"/>\n","comments":"","outputs":1,"x":1639.9047927856445,"y":328.42858123779297,"z":"27680826.c34468","wires":[[]]},{"id":"268c791.e069e86","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"IpBlockInstall failure and pool deletion failed in EIPAM, need to manually delete.\"/>","comments":"","outputs":1,"x":1369.9047927856445,"y":612.4285507202148,"z":"27680826.c34468","wires":[[]]},{"id":"c02428aa.992358","type":"switchNode","name":"switch: ptnii_name","xml":"<switch test=\"`$eipam-ip-block.ptnii-name`\">","comments":"Need to know which ipv version to get the plan name from the network-model.","outputs":1,"x":133.75003814697266,"y":365.0000057220459,"z":"27680826.c34468","wires":[["4235b5fd.e7ef8c","ff5e0fec.f83"]]},{"id":"ff5e0fec.f83","type":"other","name":"Null","xml":"<outcome value=''>","comments":"If no ptnii-name, check if VIPR or SRIOV","outputs":1,"x":216.25000381469727,"y":903.7500133514404,"z":"27680826.c34468","wires":[["16b88750.f9c8d9"]]},{"id":"4235b5fd.e7ef8c","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"If there's ptnii-name, then it's Gamma service","outputs":1,"x":307.5,"y":370,"z":"27680826.c34468","wires":[["1fe611b1.8156ae"]]},{"id":"16b88750.f9c8d9","type":"execute","name":"execute plan-name startsWith AIC","xml":"<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils\" method=\"startsWith\" emitsOutcome='true' >\n<parameter name=\"source\" value=\"`toUpperCase($eipam-ip-block.plan-name)`\" />\n<parameter name=\"target\" value=\"AIC_\" />\n\n","comments":"","outputs":1,"x":426.25,"y":905.0000133514404,"z":"27680826.c34468","wires":[["c12a3c05.77a7e","dc94ae1a.b883b"]]},{"id":"dc94ae1a.b883b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":638.7500076293945,"y":948.7500143051147,"z":"27680826.c34468","wires":[["f33c279d.2febe8"]]},{"id":"c12a3c05.77a7e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":640.0000076293945,"y":906.0000143051147,"z":"27680826.c34468","wires":[["31d3b5fe.60650a"]]},{"id":"f33c279d.2febe8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":786.25,"y":950,"z":"27680826.c34468","wires":[["a8cc4566.2651c8","38234086.77091","4224697.a835298","f328336d.7aa25","e0a23068.1cd1d","8c266346.4aa95","b6ace914.73b9d8","f442ffc.02fce","c5fea6e2.5cab28","b04c73f0.45b0b","d2892fb8.7bfeb","1af2e25b.5fee7e","fd184fae.e89c8","26a134a2.70c20c","ae651bed.d8efd8","96859417.102828","68692ef8.36ba2","9248d319.32eca","24a55a09.887c56","13340fb3.29bbe","2de8cdee.c921f2","56727955.005b28","d5474dab.60238"]]},{"id":"31d3b5fe.60650a","type":"returnFailure","name":"return failure ","xml":" <return status=\"failure\">\n <parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Unknown Address Plan - not supported!\" />\n","comments":"","x":781.25,"y":907.5,"z":"27680826.c34468","wires":[]},{"id":"a8cc4566.2651c8","type":"get-resource","name":"get-resource - validate pool exists already","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"SELECT * FROM EIPAM_IP_POOLS where plan_name = $eipam-ip-block.plan-name and level = 2 and key_value = $tmp.level2-key-value ;\"\n pfx='tmp.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":1047.500015258789,"y":951.2500133514404,"z":"27680826.c34468","wires":[["e188d1ab.f8a76","eda35d93.e4aa6"]]},{"id":"eda35d93.e4aa6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1313.8618354797363,"y":904.0000133514404,"z":"27680826.c34468","wires":[["8d68e84b.5f04d8"]]},{"id":"e188d1ab.f8a76","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1321.1119575500488,"y":979.2500143051147,"z":"27680826.c34468","wires":[["c4feedd0.1551e"]]},{"id":"3076888e.6800b8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"This record is not found in DB!\"/>","comments":"","outputs":1,"x":1676.2500228881836,"y":950.0000143051147,"z":"27680826.c34468","wires":[[]]},{"id":"9f5f51a3.da836","type":"returnFailure","name":"return failure ","xml":" <return status=\"failure\">\n \t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n \t\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Unknown EIPAM pool - not found in DB!\" />\n","comments":"","x":1695.0000267028809,"y":988.7500143051147,"z":"27680826.c34468","wires":[]},{"id":"c4feedd0.1551e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1498.7500228881836,"y":980.0000143051147,"z":"27680826.c34468","wires":[["3076888e.6800b8","9f5f51a3.da836"]]},{"id":"a2822b09.e97578","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"Failed to find this record in DB!\"/>\n\n","comments":"","outputs":1,"x":1676.2500228881836,"y":871.2500162124634,"z":"27680826.c34468","wires":[[]]},{"id":"f8a866d.2dd3298","type":"returnFailure","name":"return failure ","xml":" <return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n <parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Unknown EIPAM pool - not found in DB!\" />\n","comments":"","x":1695.0000267028809,"y":910.0000162124634,"z":"27680826.c34468","wires":[]},{"id":"8d68e84b.5f04d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1498.7500228881836,"y":901.2500162124634,"z":"27680826.c34468","wires":[["a2822b09.e97578","f8a866d.2dd3298"]]},{"id":"38234086.77091","type":"get-resource","name":"get-resource - validate if initial level 2 subnet exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='pfx.eipam-initial-subnet'>\n\n","comments":"initial subnet should exists","outputs":1,"x":1073.750015258789,"y":1016.2500152587891,"z":"27680826.c34468","wires":[["aa455c78.415d6","9927da1b.afdbe8"]]},{"id":"38b7e10f.3fa15e","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1495.9999771118164,"y":1014.5000057220459,"z":"27680826.c34468","wires":[]},{"id":"aa455c78.415d6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1344.3618392944336,"y":1019.0000152587891,"z":"27680826.c34468","wires":[["38b7e10f.3fa15e"]]},{"id":"9927da1b.afdbe8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1344.611904144287,"y":1053.5000095367432,"z":"27680826.c34468","wires":[["38b75ce1.66d3e4"]]},{"id":"5e22e900.93b228","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":2347.5,"y":952.5,"z":"27680826.c34468","wires":[[]]},{"id":"f328336d.7aa25","type":"save","name":"insert new EIPAM_IP_SUBNETS for level 2","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNETS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n service_type = $pfx.eipam-initial-subnet.service-type ,\n ip_address = $eipam-ip-block.ip-prefix ,\n prefix_length = $eipam-ip-block.mask ,\n plan_name = $eipam-ip-block.plan-name ,\n status = 'PENDING_ACTIVE' ,\n pool_id = $pfx.eipam-initial-subnet.pool-id ,\n address_family = $pfx.eipam-initial-subnet.address-family ,\n network_id = $pfx.eipam-initial-subnet.network-id ; \"\n force='true'\n pfx='pfx.eipam-new-subnet'>\n","comments":"","outputs":1,"x":1058.750015258789,"y":1280.0000457763672,"z":"27680826.c34468","wires":[["48e1df43.58257","e6d53458.acac88"]]},{"id":"e0a23068.1cd1d","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 1","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level1-key-name ,\n key_value = $tmp.level1-key-value ,\n level = 1 ; \"\n force='true'\n pfx='pfx.eipam-subnet-level1'>\n","comments":"","outputs":1,"x":1073.7498321533203,"y":1321.9999885559082,"z":"27680826.c34468","wires":[["e6d53458.acac88","b1ea1da0.31a88"]]},{"id":"8c266346.4aa95","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 2","xml":"<save\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n key=\"INSERT EIPAM_IP_SUBNET_KEYS\n SET\n entity_id = $eipam-ip-block.entity-id ,\n key_name = $tmp.level2-key-name ,\n key_value = $tmp.level2-key-value ,\n level = 2 ; \"\n force='true'\n pfx='pfx.eipam-subnet-level2'>\n","comments":"","outputs":1,"x":1072.7499542236328,"y":1368.0000190734863,"z":"27680826.c34468","wires":[["e6d53458.acac88","b1ea1da0.31a88"]]},{"id":"48e1df43.58257","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1394.0333442687988,"y":1293.5000448226929,"z":"27680826.c34468","wires":[["c2fa8922.5c3898"]]},{"id":"e6d53458.acac88","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1394.8762969970703,"y":1331.150188446045,"z":"27680826.c34468","wires":[[]]},{"id":"b1ea1da0.31a88","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1395.5894966125488,"y":1367.0000457763672,"z":"27680826.c34468","wires":[["8f8cdbf1.ac7df8"]]},{"id":"4224697.a835298","type":"get-resource","name":"get-resource - validate if subnet with same ip exists","xml":"<get-resource\n plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n resource='SQL'\n 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 ; \"\n pfx='pfx.eipam-subnet-with-same-ip'>\n\n","comments":"check if new subnet already exists, possibly from previous attempt.","outputs":1,"x":1077.5000305175781,"y":1092.5000171661377,"z":"27680826.c34468","wires":[["1079d4f3.12d78b","31bcf812.d665c8"]]},{"id":"1bfe7dc9.67a752","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1501.0000953674316,"y":1090.7500066757202,"z":"27680826.c34468","wires":[]},{"id":"1079d4f3.12d78b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1349.3619575500488,"y":1095.2500162124634,"z":"27680826.c34468","wires":[["1bfe7dc9.67a752"]]},{"id":"31bcf812.d665c8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1360.8620529174805,"y":1137.2500276565552,"z":"27680826.c34468","wires":[[]]},{"id":"5be1f04e.3c946","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1391.2500839233398,"y":1436.2500324249268,"z":"27680826.c34468","wires":[["a49fec09.f6009"]]},{"id":"a49fec09.f6009","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<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'\" />","comments":"","x":1554.444480895996,"y":1436.3612537384033,"z":"27680826.c34468","wires":[]},{"id":"b6ace914.73b9d8","type":"get-resource","name":"get AnAI - l3-network subnet by network-id and subnet-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\"\n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.aai-initial-subnet\">\n","comments":"","outputs":1,"x":1094.7221374511719,"y":1444.4846668243408,"z":"27680826.c34468","wires":[["5be1f04e.3c946","1ef3bc16.d15f44"]]},{"id":"1ef3bc16.d15f44","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1383.9721908569336,"y":1474.7346363067627,"z":"27680826.c34468","wires":[["e393bf01.64fed"]]},{"id":"e393bf01.64fed","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'\" />","comments":"","x":1536.0832748413086,"y":1474.956865310669,"z":"27680826.c34468","wires":[]},{"id":"38b75ce1.66d3e4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Initial subnet not found, cannot auto extend.\" />\n\t","comments":"","x":1498.7499694824219,"y":1052.5000076293945,"z":"27680826.c34468","wires":[]},{"id":"c2fa8922.5c3898","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Insert to DB table EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1531.25,"y":1296.2500267028809,"z":"27680826.c34468","wires":[]},{"id":"8f8cdbf1.ac7df8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Insert to DB table EIPAM_IP_SUBNET_KEYS failed.\" />\n\t","comments":"","x":1535,"y":1365.0000267028809,"z":"27680826.c34468","wires":[]},{"id":"599ea898.d06128","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1264.590389251709,"y":1860.2259755134583,"z":"27680826.c34468","wires":[["e6406ac5.f60e88"]]},{"id":"6669d1c3.d883c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1273.313533782959,"y":1897.8691639900208,"z":"27680826.c34468","wires":[[]]},{"id":"f442ffc.02fce","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$pfx.eipam-initial-subnet.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$eipam-ip-block.entity-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet.subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$eipam-ip-block.ip-prefix`\" />\n<parameter name=\"cidr-mask\" value=\"`$eipam-ip-block.prefix-length`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.version`\" />\n<parameter name=\"dhcp-start\" value=\"`$tmp.l3-network.subnet.dhcp-start`\" />\n<parameter name=\"dhcp-end\" value=\"`$tmp.l3-network.subnet.dhcp-end`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet.dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1005.111400604248,"y":1877.2617650032043,"z":"27680826.c34468","wires":[["6669d1c3.d883c","599ea898.d06128"]]},{"id":"b5c88c1d.637ad","type":"call","name":"call GENERIC-RESOURCE-API:create-l3-subnet","xml":"<call module='GENERIC-RESOURCE-API' rpc='create-l3-subnet' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":1802.500015258789,"y":1472.5000495910645,"z":"27680826.c34468","wires":[[]]},{"id":"9664fc27.56f38","type":"comment","name":"Get service_type from initial subnet","info":"","comments":"","x":787.5,"y":1062.5,"z":"27680826.c34468","wires":[]},{"id":"7df8a691.f40778","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='true' />\n<parameter name='tmp.l3-network.subnet.dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />\n<parameter name='tmp.l3-network.subnet.dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />\n\n\n","comments":"","x":1661.2500495910645,"y":1776.2500457763672,"z":"27680826.c34468","wires":[]},{"id":"c5fea6e2.5cab28","type":"execute","name":"execute getSubnetAddresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getSubnetAddresses\">\n\t<parameter name=\"ipAddress\" value=\"`$eipam-ip-block.ip-prefix`\" />\n\t<parameter name=\"ipVersion\" value=\"`tmp.version`\" />\n\t<parameter name=\"subnet\" value=\"`$eipam-ip-block.prefix-length`\" />\n\t<parameter name=\"ctxGateway\" value=\"tmp.return.generate.gateway-address\" />\n\t<parameter name=\"ctxDhcpStart\" value=\"tmp.return.generate.dhcp-start-address\" />\n\t<parameter name=\"ctxDhcpEnd\" value=\"tmp.return.generate.dhcp-end-address\" />\n\n","comments":"","outputs":1,"x":1014.1072311401367,"y":1704.5357484817505,"z":"27680826.c34468","wires":[["3f5f9dcf.9a0822"]]},{"id":"1af2e25b.5fee7e","type":"switchNode","name":"switch tmp.aai-initial-subnet.dhcp-enabled","xml":"<switch test='`$tmp.aai-initial-subnet.dhcp-enabled`'>\n","comments":"","outputs":1,"x":1045.7582550048828,"y":1767.6151399612427,"z":"27680826.c34468","wires":[["6800941e.557aac","bc0c9d86.36f89"]]},{"id":"6800941e.557aac","type":"other","name":"Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1301.4722843170166,"y":1777.6151151657104,"z":"27680826.c34468","wires":[["af454cc5.3dff4"]]},{"id":"af454cc5.3dff4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1461.9485206604004,"y":1777.61510181427,"z":"27680826.c34468","wires":[["7df8a691.f40778"]]},{"id":"3f5f9dcf.9a0822","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1246.0226211547852,"y":1704.308232307434,"z":"27680826.c34468","wires":[["81b31e6.00a07e"]]},{"id":"81b31e6.00a07e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to generate gateway addresses using IpAddressTools\" />","comments":"","x":1417.6891708374023,"y":1704.308232307434,"z":"27680826.c34468","wires":[]},{"id":"83d25c76.606f4","type":"set","name":"set l3network.subnet","xml":"<set>\n<parameter name='tmp.l3-network.subnet.subnet-name' value=\"`$aai.l3-network.network-name + '_S' + $aai.l3-network.subnets.subnet_length`\" />\n","comments":"","x":1407.9010620117188,"y":1587.6151309013367,"z":"27680826.c34468","wires":[]},{"id":"bc0c9d86.36f89","type":"other","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1304.012077331543,"y":1813.3293962478638,"z":"27680826.c34468","wires":[["b0650ab4.c65d58"]]},{"id":"3cc8bc14.294884","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='false' />\n<parameter name='tmp.l3-network.subnet.dhcp-start' value='' />\n<parameter name='tmp.l3-network.subnet.dhcp-end' value='' />\n\n\n","comments":"","x":1664.012077331543,"y":1811.9008378982544,"z":"27680826.c34468","wires":[]},{"id":"b0650ab4.c65d58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1464.710548400879,"y":1813.2658939361572,"z":"27680826.c34468","wires":[["3cc8bc14.294884"]]},{"id":"4c9ac4aa.90bf8c","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1296.9642486572266,"y":1177.1428413391113,"z":"27680826.c34468","wires":[["acd17d5f.d00c1"]]},{"id":"b04c73f0.45b0b","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":1061.6863555908203,"y":1181.6274452209473,"z":"27680826.c34468","wires":[["4c9ac4aa.90bf8c","7fda0cb.614c2f4"]]},{"id":"7fda0cb.614c2f4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1289.6863555908203,"y":1215.6274452209473,"z":"27680826.c34468","wires":[["9af11c3.0761ce"]]},{"id":"d2892fb8.7bfeb","type":"switchNode","name":"switch get current # of subnets","xml":"<switch test='`$aai.l3-network.subnets.subnet_length`'>\n","comments":"","outputs":1,"x":1028.0000534057617,"y":1550.5000176429749,"z":"27680826.c34468","wires":[["137556cc.df0609","9df4adf.d74095"]]},{"id":"137556cc.df0609","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1251.7500610351562,"y":1549.2500176429749,"z":"27680826.c34468","wires":[["f751331c.00143"]]},{"id":"9df4adf.d74095","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1237.7500457763672,"y":1588.0000224113464,"z":"27680826.c34468","wires":[["83d25c76.606f4"]]},{"id":"9af11c3.0761ce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'from AnAI'\" />","comments":"","x":1440.7142715454102,"y":1217.142864227295,"z":"27680826.c34468","wires":[]},{"id":"acd17d5f.d00c1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'Not found in AnAI'\" />","comments":"","x":1453.2142486572266,"y":1175.8928413391113,"z":"27680826.c34468","wires":[]},{"id":"f751331c.00143","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'No subnets found in AAI for network-id=' + $pfx.eipam-initial-subnet.network-id\" />","comments":"","x":1418.7500610351562,"y":1548.7499871253967,"z":"27680826.c34468","wires":[]},{"id":"e6406ac5.f60e88","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'\" />","comments":"","x":1407.500057220459,"y":1860.000020980835,"z":"27680826.c34468","wires":[]},{"id":"fd184fae.e89c8","type":"execute","name":"execute Contrail API create subnet","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='subnet' />\n<parameter name='api-action' value='add' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />\n<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='ip-prefix-len' value='`$eipam-ip-block.prefix-length`' />\n<parameter name='dns-server-address' value='0.0.0.0' />\n<parameter name='enable-dhcp' value='`$tmp.l3-network.subnet.dhcp-enabled`' />\n<parameter name='default-gateway' value='`$tmp.return.generate.gateway-address`' />\n<parameter name='subnet-name' value='`$tmp.l3-network.subnet.subnet-name`' />\n<parameter name='start' value='`$tmp.l3-network.subnet.dhcp-start`' />\n<parameter name='end' value='`$tmp.l3-network.subnet.dhcp-end`' />\n","comments":"","outputs":1,"x":1025.0000762939453,"y":1993.7500295639038,"z":"27680826.c34468","wires":[["281bfd7.8f87a02","d85d1e3.00c05e"]]},{"id":"281bfd7.8f87a02","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1330.1309204101562,"y":1970.6422888375819,"z":"27680826.c34468","wires":[["72da5ff6.7162b"]]},{"id":"d85d1e3.00c05e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1328.2262420654297,"y":2003.642228603363,"z":"27680826.c34468","wires":[["69394ab1.5080c4"]]},{"id":"7bb00cdc.52f324","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1625.6310081481934,"y":2142.9756145477295,"z":"27680826.c34468","wires":[]},{"id":"72da5ff6.7162b","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1482.321403503418,"y":1971.3090138435364,"z":"27680826.c34468","wires":[[]]},{"id":"26a134a2.70c20c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Added an entry for subnet-allocated-notification in EIPAM_IP_SUBNETS and EIPAM_IP_SUBNET_KEYS\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":961.25,"y":1406.2500267028809,"z":"27680826.c34468","wires":[[]]},{"id":"ae651bed.d8efd8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Added a subnetin AAI\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":935.0000381469727,"y":1927.4999928474426,"z":"27680826.c34468","wires":[[]]},{"id":"96859417.102828","type":"set","name":"set request-id","xml":"<set>\n<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n","comments":"","x":1004.4642639160156,"y":1229.642858505249,"z":"27680826.c34468","wires":[]},{"id":"68692ef8.36ba2","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Added a subnet in Contrail\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":933.7500381469727,"y":2054.9999928474426,"z":"27680826.c34468","wires":[[]]},{"id":"69394ab1.5080c4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1452.5000228881836,"y":2030.0000305175781,"z":"27680826.c34468","wires":[["8d827339.1c42b","464fd495.cf609c","a20fd9fb.925b28","7bb00cdc.52f324","7b0ec3aa.9f133c"]]},{"id":"13340fb3.29bbe","type":"execute","name":"execute EIPAM activateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"activateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":914.9999847412109,"y":2392.5000524520874,"z":"27680826.c34468","wires":[["e36e1b6d.7c89a8"]]},{"id":"e36e1b6d.7c89a8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1125.000015258789,"y":2393.8904180526733,"z":"27680826.c34468","wires":[["ada6dfba.c5e93"]]},{"id":"ada6dfba.c5e93","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while activating subnet in EIPAM.\" />\n\t","comments":"","x":1288.9999961853027,"y":2392.6047105789185,"z":"27680826.c34468","wires":[]},{"id":"2de8cdee.c921f2","type":"save","name":"Update subnet to Active in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n SET status = 'ACTIVE'\n WHERE entity_id = $eipam-ip-block.entity-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":913.5714874267578,"y":2432.4999990463257,"z":"27680826.c34468","wires":[["5f8cd719.040538","cc0e8d04.1dd76","1175c433.7e6f8c"]]},{"id":"26c7656e.af300a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1282.1428680419922,"y":2439.6428747177124,"z":"27680826.c34468","wires":[]},{"id":"1175c433.7e6f8c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1132.7144622802734,"y":2507.6428451538086,"z":"27680826.c34468","wires":[[]]},{"id":"5f8cd719.040538","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1133.0047454833984,"y":2441.6428747177124,"z":"27680826.c34468","wires":[["26c7656e.af300a"]]},{"id":"cc0e8d04.1dd76","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1133.8618545532227,"y":2475.9285953342915,"z":"27680826.c34468","wires":[["e27f3250.a90fd"]]},{"id":"e27f3250.a90fd","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1281.142707824707,"y":2471.9286258518696,"z":"27680826.c34468","wires":[]},{"id":"56727955.005b28","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<parameter name=\"orchestration-status\" value=\"Created\" />\n\t\t","comments":"","outputs":1,"x":891.9642696380615,"y":2568.5515909194946,"z":"27680826.c34468","wires":[["4e91d6f8.33a8a8","8dbce961.ba9108"]]},{"id":"614081e5.693ec","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.\" />\n\t","comments":"","x":1283.7104396820068,"y":2558.3928356170654,"z":"27680826.c34468","wires":[]},{"id":"2a7aff42.09c3d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1134.282033920288,"y":2626.3928060531616,"z":"27680826.c34468","wires":[["3e75f1f6.c1d44e"]]},{"id":"4e91d6f8.33a8a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1123.1436805725098,"y":2564.678565979004,"z":"27680826.c34468","wires":[["614081e5.693ec"]]},{"id":"8dbce961.ba9108","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1135.4294261932373,"y":2594.6785562336445,"z":"27680826.c34468","wires":[["20ed0c21.a3cea4"]]},{"id":"3e75f1f6.c1d44e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1286.9961223602295,"y":2627.8214263916016,"z":"27680826.c34468","wires":[[]]},{"id":"20ed0c21.a3cea4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet. Subnet not found.\" />\n\t","comments":"","x":1282.7102794647217,"y":2590.6785867512226,"z":"27680826.c34468","wires":[]},{"id":"d5474dab.60238","type":"returnSuccess","name":"return success","xml":" <return status=\"success\">\n \t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n","comments":"","x":871.2500114440918,"y":2653.750039100647,"z":"27680826.c34468","wires":[]},{"id":"8d827339.1c42b","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n SET status = 'ERROR'\n WHERE entity_id = $eipam-ip-block.entity-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1645,"y":2030,"z":"27680826.c34468","wires":[["8cbeccd1.f9f09","8f247d12.836b4"]]},{"id":"762b5c85.0a9c64","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":2013.5713806152344,"y":2037.1428756713867,"z":"27680826.c34468","wires":[]},{"id":"8cbeccd1.f9f09","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1864.4332580566406,"y":2039.1428756713867,"z":"27680826.c34468","wires":[["762b5c85.0a9c64"]]},{"id":"8f247d12.836b4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1865.2903671264648,"y":2073.428596287966,"z":"27680826.c34468","wires":[["a0381945.6d59b8"]]},{"id":"a0381945.6d59b8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":2012.5712203979492,"y":2069.428626805544,"z":"27680826.c34468","wires":[]},{"id":"464fd495.cf609c","type":"delete","name":"delete subnet from AAI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\">","comments":"","outputs":1,"x":1620.0000228881836,"y":2072.500030517578,"z":"27680826.c34468","wires":[[]]},{"id":"a20fd9fb.925b28","type":"save","name":"save MDSAL: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","comments":"","outputs":1,"x":1648.7500305175781,"y":2108.7500324249268,"z":"27680826.c34468","wires":[[]]},{"id":"9248d319.32eca","type":"save","name":"update AnAI - subnet with status Created","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n\t<parameter name=\"orchestration-status\" value=\"Created\" />\n\t\t","comments":"","outputs":1,"x":987.5,"y":2148.75,"z":"27680826.c34468","wires":[["e721afd8.6b7fd","a840e96b.b77e58"]]},{"id":"e721afd8.6b7fd","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1218.750015258789,"y":2146.2500324249268,"z":"27680826.c34468","wires":[["6b63f80c.bf9f48"]]},{"id":"a840e96b.b77e58","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1222.473159790039,"y":2107.6430988311768,"z":"27680826.c34468","wires":[[]]},{"id":"254d88c0.e33728","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<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'\" />","comments":"","x":1501.8383026123047,"y":2387.630959510803,"z":"27680826.c34468","wires":[]},{"id":"49bd89dd.347df8","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n SET status = 'ERROR'\n WHERE entity_id = $eipam-ip-block.entity-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1548.7500228881836,"y":2206.250032901764,"z":"27680826.c34468","wires":[["d689da68.0fe738","c156daaa.557638"]]},{"id":"674a1d7e.5ff8a4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":1917.321403503418,"y":2213.3929085731506,"z":"27680826.c34468","wires":[]},{"id":"d689da68.0fe738","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1768.1832809448242,"y":2215.3929085731506,"z":"27680826.c34468","wires":[["674a1d7e.5ff8a4"]]},{"id":"c156daaa.557638","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1769.0403900146484,"y":2249.6786291897297,"z":"27680826.c34468","wires":[["ea4dac01.f7adf"]]},{"id":"ea4dac01.f7adf","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":1916.3212432861328,"y":2245.678659707308,"z":"27680826.c34468","wires":[]},{"id":"7aee0fd2.86834","type":"delete","name":"delete subnet from AAI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\">","comments":"","outputs":1,"x":1523.7500457763672,"y":2248.750063419342,"z":"27680826.c34468","wires":[[]]},{"id":"ceb28977.cdbe68","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Update status to Created failed in AAI\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":1467.5000076293945,"y":2169.999999523163,"z":"27680826.c34468","wires":[[]]},{"id":"6b63f80c.bf9f48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1333.7500190734863,"y":2170.0000324249268,"z":"27680826.c34468","wires":[["ceb28977.cdbe68","49bd89dd.347df8","7aee0fd2.86834","254d88c0.e33728","ea9252e3.5d502","51cffb75.2a5354"]]},{"id":"ea9252e3.5d502","type":"execute","name":"execute Contrail API delete subnet","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='subnet' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />\n<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n","comments":"","outputs":1,"x":1555,"y":2292.5,"z":"27680826.c34468","wires":[["384875a9.cdbcaa"]]},{"id":"384875a9.cdbcaa","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1770,"y":2288.75,"z":"27680826.c34468","wires":[["5e6cec1c.8f8184"]]},{"id":"5e6cec1c.8f8184","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to delete subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1926.25,"y":2290,"z":"27680826.c34468","wires":[]},{"id":"24a55a09.887c56","type":"save","name":"Update subnet to CREATED in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n SET status = 'CREATED'\n WHERE entity_id = $eipam-ip-block.entity-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":922.5,"y":2258.75,"z":"27680826.c34468","wires":[["1e94d227.4eeefe","ef4471e5.aa12e"]]},{"id":"37c7ceb5.4681d2","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to CREATED in mysql.\" />\n\t","comments":"","x":1291.0713806152344,"y":2265.8928756713867,"z":"27680826.c34468","wires":[]},{"id":"1e94d227.4eeefe","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1141.9332580566406,"y":2267.8928756713867,"z":"27680826.c34468","wires":[["37c7ceb5.4681d2"]]},{"id":"ef4471e5.aa12e","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1142.7903671264648,"y":2302.178596287966,"z":"27680826.c34468","wires":[["f2e46833.bbd3f8"]]},{"id":"f2e46833.bbd3f8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to CREATED in mysql.\" />\n\t","comments":"","x":1290.0712203979492,"y":2298.178626805544,"z":"27680826.c34468","wires":[]},{"id":"4939e504.9f364c","type":"save","name":"Update subnet to PENDING-ACTIVE in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n SET status = 'PENDING-ACTIVE'\n WHERE entity_id = $eipam-ip-block.entity-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1227.5,"y":112.5,"z":"27680826.c34468","wires":[[]]},{"id":"f38846a2.f8b938","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n SET status = 'ERROR'\n WHERE entity_id = $eipam-ip-block.entity-id ; \"\n force='true'\n pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1337.142822265625,"y":471.4285888671875,"z":"27680826.c34468","wires":[[]]},{"id":"7b0ec3aa.9f133c","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1647.1429138183594,"y":1992.8571271896362,"z":"27680826.c34468","wires":[]},{"id":"51cffb75.2a5354","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1517.142822265625,"y":2338.571533203125,"z":"27680826.c34468","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/resources/graph.versions b/platform-logic/generic-resource-api/src/main/resources/graph.versions
new file mode 100644
index 00000000..ef313474
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/resources/graph.versions
@@ -0,0 +1,51 @@
+GENERIC-RESOURCE-API contrail-route-topology-operation ${project.version} sync
+GENERIC-RESOURCE-API contrail-route-topology-operation-activate ${project.version} sync
+GENERIC-RESOURCE-API contrail-route-topology-operation-assign ${project.version} sync
+GENERIC-RESOURCE-API contrail-route-topology-operation-create ${project.version} sync
+GENERIC-RESOURCE-API contrail-route-topology-operation-deactivate ${project.version} sync
+GENERIC-RESOURCE-API contrail-route-topology-operation-delete ${project.version} sync
+GENERIC-RESOURCE-API contrail-route-topology-operation-unassign ${project.version} sync
+GENERIC-RESOURCE-API create-l3-subnet ${project.version} sync
+GENERIC-RESOURCE-API eipam-allocate-network-role-subnet ${project.version} sync
+GENERIC-RESOURCE-API eipam-create-network-role-pool ${project.version} sync
+GENERIC-RESOURCE-API generate-l3network-network-id ${project.version} sync
+GENERIC-RESOURCE-API generate-panorama-name ${project.version} sync
+GENERIC-RESOURCE-API generate-unique-name ${project.version} sync
+GENERIC-RESOURCE-API network-topology-operation-activate ${project.version} sync
+GENERIC-RESOURCE-API network-topology-operation-assign ${project.version} sync
+GENERIC-RESOURCE-API network-topology-operation-deactivate ${project.version} sync
+GENERIC-RESOURCE-API network-topology-operation-unassign ${project.version} sync
+GENERIC-RESOURCE-API network-topology-operation ${project.version} sync
+GENERIC-RESOURCE-API policy-update-notify-operation ${project.version} sync
+GENERIC-RESOURCE-API policy-manager-create-policy ${project.version} sync
+GENERIC-RESOURCE-API policy-manager-delete-policy ${project.version} sync
+GENERIC-RESOURCE-API process-eipam-pools ${project.version} sync
+GENERIC-RESOURCE-API security-zone-topology-operation ${project.version} sync
+GENERIC-RESOURCE-API security-zone-topology-operation-activate ${project.version} sync
+GENERIC-RESOURCE-API security-zone-topology-operation-assign ${project.version} sync
+GENERIC-RESOURCE-API security-zone-topology-operation-create ${project.version} sync
+GENERIC-RESOURCE-API security-zone-topology-operation-deactivate ${project.version} sync
+GENERIC-RESOURCE-API security-zone-topology-operation-delete ${project.version} sync
+GENERIC-RESOURCE-API security-zone-topology-operation-unassign ${project.version} sync
+GENERIC-RESOURCE-API service-topology-operation-assign ${project.version} sync
+GENERIC-RESOURCE-API service-topology-operation-deactivate ${project.version} sync
+GENERIC-RESOURCE-API service-topology-operation-delete ${project.version} sync
+GENERIC-RESOURCE-API service-topology-operation ${project.version} sync
+GENERIC-RESOURCE-API validate-contrail-route-input ${project.version} sync
+GENERIC-RESOURCE-API validate-network-input ${project.version} sync
+GENERIC-RESOURCE-API validate-security-zone-input ${project.version} sync
+GENERIC-RESOURCE-API validate-service-input ${project.version} sync
+GENERIC-RESOURCE-API validate-vf-module-input ${project.version} sync
+GENERIC-RESOURCE-API validate-vnf-input ${project.version} sync
+GENERIC-RESOURCE-API vf-module-topology-operation-activate ${project.version} sync
+GENERIC-RESOURCE-API vf-module-topology-operation-assign ${project.version} sync
+GENERIC-RESOURCE-API vf-module-topology-operation-deactivate ${project.version} sync
+GENERIC-RESOURCE-API vf-module-topology-operation-unassign ${project.version} sync
+GENERIC-RESOURCE-API vf-module-topology-operation ${project.version} sync
+GENERIC-RESOURCE-API vnf-topology-operation-activate ${project.version} sync
+GENERIC-RESOURCE-API vnf-topology-operation-assign ${project.version} sync
+GENERIC-RESOURCE-API vnf-topology-operation-deactivate ${project.version} sync
+GENERIC-RESOURCE-API vnf-topology-operation-unassign ${project.version} sync
+GENERIC-RESOURCE-API vnf-topology-operation ${project.version} sync
+SUBNET-API managed-network-notification ${project.version} sync
+SUBNET-API subnet-allocated-notification ${project.version} sync
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>
diff --git a/platform-logic/pom.xml b/platform-logic/pom.xml
index df48229d..e36a0503 100644
--- a/platform-logic/pom.xml
+++ b/platform-logic/pom.xml
@@ -26,6 +26,7 @@
<modules>
<module>asdc-api</module>
+ <module>generic-resource-api</module>
<module>sliapi</module>
<module>vnfapi</module>
<module>installer</module>