aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/vnfapi/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/vnfapi/src/main')
-rw-r--r--platform-logic/vnfapi/src/main/json/generate-l3network-network-id.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/generate-subnets-subnet-id.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/network-topology-assign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/network-topology-changeassign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/network-topology-delete.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/network-topology-operation.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/network-topology-rollback.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/preload-network-topology-operation.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/preload-vf-module-topology-operation.json3
-rw-r--r--platform-logic/vnfapi/src/main/json/preload-vnf-instance-topology-operation.json3
-rw-r--r--platform-logic/vnfapi/src/main/json/preload-vnf-topology-operation.json3
-rw-r--r--platform-logic/vnfapi/src/main/json/vf-module-topology-activate.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vf-module-topology-assign-vnf-networks.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vf-module-topology-assign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vf-module-topology-changeassign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vf-module-topology-delete.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vf-module-topology-operation.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vf-module-topology-rollback.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-instance-topology-activate.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign-vnf-networks.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-instance-topology-changeassign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-instance-topology-delete.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-instance-topology-operation.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-instance-topology-rollback.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-activate.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-assign-vfmodule.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-assign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-changeassign.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-changedelete.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-delete.json3
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-operation.json4
-rw-r--r--platform-logic/vnfapi/src/main/json/vnf-topology-rollback.json4
-rw-r--r--platform-logic/vnfapi/src/main/resources/graph.versions33
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-generate-l3network-network-id.xml48
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-generate-subnets-subnet-id.xml49
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-network-topology-assign.xml358
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-network-topology-changeassign.xml525
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-network-topology-delete.xml75
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-network-topology-operation.xml109
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-network-topology-rollback.xml75
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-preload-network-topology-operation.xml55
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-preload-vf-module-topology-operation.xml63
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-preload-vnf-instance-topology-operation.xml63
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-preload-vnf-topology-operation.xml76
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-activate.xml45
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign-vnf-networks.xml129
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign.xml63
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-changeassign.xml85
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-delete.xml35
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-operation.xml90
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-rollback.xml35
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-activate.xml42
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign-vnf-networks.xml130
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign.xml58
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-changeassign.xml80
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-delete.xml35
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-operation.xml65
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-rollback.xml35
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-activate.xml65
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign-vfmodule.xml148
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign.xml72
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changeassign.xml100
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changedelete.xml53
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-delete.xml74
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-operation.xml131
-rw-r--r--platform-logic/vnfapi/src/main/xml/dg-vnf-topology-rollback.xml46
67 files changed, 3273 insertions, 0 deletions
diff --git a/platform-logic/vnfapi/src/main/json/generate-l3network-network-id.json b/platform-logic/vnfapi/src/main/json/generate-l3network-network-id.json
new file mode 100644
index 00000000..6a881f68
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/generate-l3network-network-id.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"dd70f366.d125c","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":508.75,"y":337.5,"z":"d1ec70b0.44ebb","wires":[["f9cd5358.f88ee"]]},{"id":"f9cd5358.f88ee","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":704.5000076293945,"y":337.5,"z":"d1ec70b0.44ebb","wires":[["8a954bff.6fab18"]]},{"id":"8a954bff.6fab18","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":869.5000076293945,"y":337.74999713897705,"z":"d1ec70b0.44ebb","wires":[]},{"id":"e113a5e5.a5dc38","type":"get-resource","name":"Query AnAI - l3-network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.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":634.0000076293945,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["8852c700.cf1728","49979ca4.27c0b4","414c6b14.1afed4","5312fbfe.635864"]]},{"id":"5c1d01b6.e9f5e","type":"for","name":"for n: true","xml":"<for atomic=\"true\" index=\"n\" start=\"0\" end=\"1\" >","comments":"","outputs":1,"x":458.00000762939453,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["e113a5e5.a5dc38"]]},{"id":"8852c700.cf1728","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":838.5000076293945,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["8e45d485.7ae718"]]},{"id":"49979ca4.27c0b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":834.5000076293945,"y":508.74999713897705,"z":"d1ec70b0.44ebb","wires":[["9c34c546.317498"]]},{"id":"414c6b14.1afed4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":843.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[["6b739598.b52fcc"]]},{"id":"9c34c546.317498","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":1001.0000152587891,"y":533.750002861023,"z":"d1ec70b0.44ebb","wires":[]},{"id":"8e45d485.7ae718","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":996.5000076293945,"y":428.74999713897705,"z":"d1ec70b0.44ebb","wires":[["2b4a6d59.a9d4b2","401c414.4d08ac"]]},{"id":"2b4a6d59.a9d4b2","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":"","outputs":1,"x":1214.0000610351562,"y":428.75000286102295,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"401c414.4d08ac","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":1207.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[["2afa9dc4.53e492"]]},{"id":"2afa9dc4.53e492","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1394.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[["34a04552.d8838a"]]},{"id":"34a04552.d8838a","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":1548.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[]},{"id":"6b739598.b52fcc","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":974.5000076293945,"y":468.74999713897705,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"437c334.fa9bacc","type":"dgstart","name":"DGSTART","outputs":1,"x":215.00000381469727,"y":24.999996185302734,"z":"d1ec70b0.44ebb","wires":[["d0d787ad.11a628"]]},{"id":"d0d787ad.11a628","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":239,"y":71.24999618530273,"z":"d1ec70b0.44ebb","wires":[["b3eba119.c492f"]]},{"id":"b3eba119.c492f","type":"method","name":"method generate-l3network-network-id","xml":"<method rpc=\"generate-l3network-network-id\" mode=\"sync\">","comments":"","outputs":1,"x":324.75,"y":123.74999618530273,"z":"d1ec70b0.44ebb","wires":[["f616b569.f578f8"]]},{"id":"bd83e429.00ab68","type":"comment","name":"VNF-API: GENERATE-L3NETWORK-NETWORK-ID","info":"","comments":"","x":766.5000152587891,"y":31.2499942779541,"z":"d1ec70b0.44ebb","wires":[]},{"id":"f616b569.f578f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":276.50000762939453,"y":248.74999713897705,"z":"d1ec70b0.44ebb","wires":[["dd70f366.d125c","5c1d01b6.e9f5e","b4996f5b.9e931","60de1533.5bb86c"]]},{"id":"2ec4eee9.2ac6b2","type":"comment","name":"LOOP UNTIL GENERATED NETWORK-ID ISN'T FOUND IN A&AI","info":"","comments":"","x":677.75,"y":385.0000009536743,"z":"d1ec70b0.44ebb","wires":[]},{"id":"5ce6ee54.fd9d2","type":"comment","name":"GENERATE A NETWORK-ID","info":"","comments":"","x":541.5,"y":294.9999990463257,"z":"d1ec70b0.44ebb","wires":[]},{"id":"b4996f5b.9e931","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":"","outputs":1,"x":527.5000076293945,"y":248.74999713897705,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"a706e0b1.9117a","type":"comment","name":"CLEANUP LOCAL VARIABLES TO BE USED","info":"","comments":"","x":611.75,"y":204.99999809265137,"z":"d1ec70b0.44ebb","wires":[]},{"id":"a0f4690f.efa0d8","type":"comment","name":"GLOBAL VARIABLES USED","info":"// RETURN VALUES\nerror-message.generate-generic-vnf-id\ntmp.return.generate-generic-vnf-id.uuid\n\n// LOCAL VARIABLES (erased at beginning & end of DG)\ntmp.local-variables.generate-generic-vnf-id.*\ntmp.local-variables.generate-generic-vnf-id.GENERIC_VNF.*","comments":"","x":753.0000305175781,"y":71.2499942779541,"z":"d1ec70b0.44ebb","wires":[]},{"id":"60de1533.5bb86c","type":"set","name":"unset: local-variables & return","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.\" value=\"\" />","comments":"","outputs":1,"x":527.5000076293945,"y":528.749997138977,"z":"d1ec70b0.44ebb","wires":[[]]},{"id":"39e8f5d1.20ee3a","type":"comment","name":"CLEANUP LOCAL VARIABLES","info":"","comments":"","x":569,"y":486.25000190734863,"z":"d1ec70b0.44ebb","wires":[]},{"id":"5312fbfe.635864","type":"other","name":"Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":834.5000076293945,"y":548.749997138977,"z":"d1ec70b0.44ebb","wires":[["9c34c546.317498"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/generate-subnets-subnet-id.json b/platform-logic/vnfapi/src/main/json/generate-subnets-subnet-id.json
new file mode 100644
index 00000000..9e526f64
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/generate-subnets-subnet-id.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"aaa6ff4b.724ea","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-subnets-subnet-id.uuid\" />","comments":"","outputs":1,"x":412.8571472167969,"y":357.1428527832031,"z":"212bebba.daa304","wires":[["5dbe3d08.2b3ac4"]]},{"id":"5dbe3d08.2b3ac4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":608.6071548461914,"y":357.1428527832031,"z":"212bebba.daa304","wires":[["e14fcee.4b28f3"]]},{"id":"e14fcee.4b28f3","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":773.6071548461914,"y":357.3928499221802,"z":"212bebba.daa304","wires":[]},{"id":"a4f5c20.aaf894","type":"get-resource","name":"Query AnAI - subnets","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\n\tresource=\"subnet\"\n\t\tkey=\"l3-network.network-id = $tmp.local.network-id \n\t\t\tAND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid\"\n\t\tlocal-only=\"false\"\n\t\tpfx=\"tmp.local-variables.generate-subnets-subnet-id.SUBNETS\" >","comments":"","outputs":1,"x":538.1071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["7566b0aa.23333","41541145.8f2fe","f04ddaec.babb98","53fa760f.b1d208"]]},{"id":"6e3cbfaa.cae83","type":"for","name":"for s: true","xml":"<for atomic=\"true\" index=\"s\" start=\"0\" end=\"1\" >","comments":"","outputs":1,"x":362.1071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["a4f5c20.aaf894"]]},{"id":"7566b0aa.23333","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":742.6071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["a7ff3de0.89a3b"]]},{"id":"41541145.8f2fe","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":738.6071548461914,"y":528.3928499221802,"z":"212bebba.daa304","wires":[["f6eee8f.2de7c18"]]},{"id":"f04ddaec.babb98","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":747.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[["ef8307c7.c73008"]]},{"id":"f6eee8f.2de7c18","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-subnets-subnet-id\" value=\"`'An error occured while checking if a generated subnets-subnet-id was unique. subnet-id = ' + $tmp.local-variables.generate-subnets-subnet-id.uuid`\" />","comments":"","x":905.1071624755859,"y":553.3928556442261,"z":"212bebba.daa304","wires":[]},{"id":"a7ff3de0.89a3b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":900.6071548461914,"y":448.3928499221802,"z":"212bebba.daa304","wires":[["bde977bc.984908","a44a8681.7894a8"]]},{"id":"bde977bc.984908","type":"set","name":"set: ...local...is-unique = 0","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-subnets-subnet-id.is-unique\" value=\"0\" />","comments":"","outputs":1,"x":1118.1072082519531,"y":448.3928556442261,"z":"212bebba.daa304","wires":[[]]},{"id":"a44a8681.7894a8","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-subnets-subnet-id.uuid\" />","comments":"","outputs":1,"x":1111.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[["87ba26d4.c54c58"]]},{"id":"87ba26d4.c54c58","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1298.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[["22793b05.dbc9f4"]]},{"id":"22793b05.dbc9f4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-subnets-subnet-id\" value=\"An error occured while generating a UUID for SUBNETS.\" />","comments":"","x":1452.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[]},{"id":"ef8307c7.c73008","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":878.6071548461914,"y":488.3928499221802,"z":"212bebba.daa304","wires":[[]]},{"id":"514ace13.73fbc","type":"dgstart","name":"DGSTART","outputs":1,"x":119.10715103149414,"y":44.64284896850586,"z":"212bebba.daa304","wires":[["1b1cc085.47687f"]]},{"id":"1b1cc085.47687f","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":143.10714721679688,"y":90.89284896850586,"z":"212bebba.daa304","wires":[["d99b1637.7ed018"]]},{"id":"d99b1637.7ed018","type":"method","name":"method generate-subnets-subnet-id","xml":"<method rpc=\"generate-subnets-subnet-id\" mode=\"sync\">","comments":"","outputs":1,"x":228.85714721679688,"y":143.39284896850586,"z":"212bebba.daa304","wires":[["11287140.bdd92f"]]},{"id":"c84b6b4.9fc4398","type":"comment","name":"VNF-API: GENERATE-SUBNETS-SUBNET-ID","info":"","comments":"","x":670.6071624755859,"y":50.89284706115723,"z":"212bebba.daa304","wires":[]},{"id":"11287140.bdd92f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":180.6071548461914,"y":268.3928499221802,"z":"212bebba.daa304","wires":[["aaa6ff4b.724ea","a5490895.039508","41976a7f.5999d4","6e3cbfaa.cae83"]]},{"id":"6ab42343.db7f8c","type":"comment","name":"LOOP UNTIL GENERATED NETWORK-ID ISN'T FOUND IN A&AI","info":"","comments":"","x":581.8571472167969,"y":404.64285373687744,"z":"212bebba.daa304","wires":[]},{"id":"b9ed64f0.37f1d8","type":"comment","name":"GENERATE A SUBNET-ID","info":"","comments":"","x":445.6071472167969,"y":314.6428518295288,"z":"212bebba.daa304","wires":[]},{"id":"a5490895.039508","type":"set","name":"unset: local-variables & return","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-subnets-subnet-id.\" value=\"\" />\n\t<parameter name=\"tmp.return.generate-subnets-subnet-id.\" value=\"\" />","comments":"","outputs":1,"x":431.6071548461914,"y":268.3928499221802,"z":"212bebba.daa304","wires":[[]]},{"id":"60c2bbdc.ec4e64","type":"comment","name":"CLEANUP LOCAL VARIABLES TO BE USED","info":"","comments":"","x":515.8571472167969,"y":224.6428508758545,"z":"212bebba.daa304","wires":[]},{"id":"71172ef4.cf0d8","type":"comment","name":"GLOBAL VARIABLES USED","info":"// RETURN VALUES\nerror-message.generate-generic-vnf-id\ntmp.return.generate-generic-vnf-id.uuid\n\n// LOCAL VARIABLES (erased at beginning & end of DG)\ntmp.local-variables.generate-generic-vnf-id.*\ntmp.local-variables.generate-generic-vnf-id.GENERIC_VNF.*","comments":"","x":657.107177734375,"y":90.89284706115723,"z":"212bebba.daa304","wires":[]},{"id":"41976a7f.5999d4","type":"set","name":"unset: local-variables & return","xml":"<set>\n\t<parameter name=\"tmp.local-variables.generate-subnets-subnet-id.\" value=\"\" />","comments":"","outputs":1,"x":431.6071548461914,"y":548.3928499221802,"z":"212bebba.daa304","wires":[[]]},{"id":"57f68649.0093a8","type":"comment","name":"CLEANUP LOCAL VARIABLES","info":"","comments":"","x":473.1071472167969,"y":505.89285469055176,"z":"212bebba.daa304","wires":[]},{"id":"53fa760f.b1d208","type":"other","name":"Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":738.6071548461914,"y":568.3928499221802,"z":"212bebba.daa304","wires":[["f6eee8f.2de7c18"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-assign.json b/platform-logic/vnfapi/src/main/json/network-topology-assign.json
new file mode 100644
index 00000000..351376ec
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"761cf409.e7fe2c","type":"method","name":"method network-topology-assign","xml":"<method rpc=\"network-topology-assign\" mode=\"sync\">","comments":"","outputs":1,"x":220,"y":88.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["f32f7d99.8e885"]]},{"id":"2cc42ce.d3a7dd4","type":"service-logic","name":"VNF-API 3.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":295.4444351196289,"y":37.238101959228516,"z":"f9c6b4d6.c89d48","wires":[["761cf409.e7fe2c"]]},{"id":"d4150291.a47c7","type":"dgstart","name":"DGSTART","outputs":1,"x":131.33332061767578,"y":37.238101959228516,"z":"f9c6b4d6.c89d48","wires":[["2cc42ce.d3a7dd4"]]},{"id":"f32f7d99.8e885","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":185.76110458374023,"y":160.88003540039062,"z":"f9c6b4d6.c89d48","wires":[["e6608c59.2d82d","d54bce56.12186","7c655566.f8d98c","d18455b2.897038","9683e1d.b26132","fdec3d96.4fe6c","aec67243.3085b","b25a8a99.44e208","d1f10746.e56058","6a95cc4c.004c34","cced61c2.cb78b","d30ff142.3546e","eec55dc8.09816","d92a7574.cd1b58","f5d35022.8ff6","30dd8358.aaaadc","830f1b88.627bf8","d045d509.c8ec58","4330f5b6.e6251c"]]},{"id":"e6608c59.2d82d","type":"save","name":"save AnAI - l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n<parameter name=\"network-name\" value=\"`$network-topology-operation-input.network-request-information.network-name`\" />\n<parameter name=\"network-type\" value=\"`$network-topology-operation-input.network-request-information.network-type`\" />\n<parameter name=\"network-role\" value=\"`$preload-data.network-topology-information.network-topology-identifier.network-role`\" />\n<parameter name=\"network-technology\" value=\"`$preload-data.network-topology-information.network-topology-identifier.network-technology`\" />\n<parameter name=\"service-id\" value=\"`$network-topology-operation-input.service-information.service-id`\" />\n<parameter name=\"tenant-id\" value=\"`$network-topology-operation-input.network-request-information.tenant`\" />\n<parameter name=\"network-role-instance\" value=\"0\" />\n<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":436.1934051513672,"y":454.1977233886719,"z":"f9c6b4d6.c89d48","wires":[["9de98ca4.f462","8cf9ad87.65dd7"]]},{"id":"d54bce56.12186","type":"for","name":"for loop i - PRELOAD subnets","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":457.9034957885742,"y":640.8798131942749,"z":"f9c6b4d6.c89d48","wires":[["4ae47500.3fa4ac"]]},{"id":"7c655566.f8d98c","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":375.84381103515625,"y":2471.0271310806274,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d18455b2.897038","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":399.12740325927734,"y":2422.105136871338,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"9de98ca4.f462","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":628.4765625,"y":454.213041305542,"z":"f9c6b4d6.c89d48","wires":[["c0b37f94.55c04"]]},{"id":"4ae47500.3fa4ac","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":672.9021148681641,"y":640.8888244628906,"z":"f9c6b4d6.c89d48","wires":[["d2b530e1.e4e06","a4bddbdd.384ca8","b441c359.b1ed5","a461de0f.d6093","bbec29a5.4081f8","69434546.6b177c"]]},{"id":"c0b37f94.55c04","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":829.254035949707,"y":453.9908256530762,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"bf4af859.d229c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1152.2541790008545,"y":868.8520412445068,"z":"f9c6b4d6.c89d48","wires":[["78a54b4f.f2a264"]]},{"id":"c5f09568.abd408","type":"set","name":"set tmp.dhcpEnabled.boolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":1419.9320831298828,"y":682.2393565177917,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"27c769b5.ca3316","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":1418.2495880126953,"y":641.1758060455322,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d2b530e1.e4e06","type":"switchNode","name":"switch: PRELOAD dhcp-enabled","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`\">","comments":"","outputs":1,"x":944.2495880126953,"y":640.6820316314697,"z":"f9c6b4d6.c89d48","wires":[["1d57866b.dc0d9a","1656d8a4.c39f97"]]},{"id":"1d57866b.dc0d9a","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1201.4719314575195,"y":640.9043521881104,"z":"f9c6b4d6.c89d48","wires":[["27c769b5.ca3316"]]},{"id":"1656d8a4.c39f97","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1201.3766021728516,"y":682.7455735206604,"z":"f9c6b4d6.c89d48","wires":[["c5f09568.abd408"]]},{"id":"9683e1d.b26132","type":"for","name":"for loop i - PRELOAD vpn-bindings","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.vpn-bindings_length`\">\n","comments":"","outputs":1,"x":470.5514221191406,"y":1153.222297668457,"z":"f9c6b4d6.c89d48","wires":[["547d693b.b05e78"]]},{"id":"547d693b.b05e78","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":712.3292007446289,"y":1153.4722995758057,"z":"f9c6b4d6.c89d48","wires":[["26c6c645.1a9d3a","239555fc.bdbfaa","36380a8c.5dc166","300d9dbd.6d58a2"]]},{"id":"42bfa7b6.ab68a8","type":"save","name":"save relationship: vpn_bindings","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-binding\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-binding.vpn-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.vpn-binding-id`\" />","comments":"","outputs":1,"x":1053.856918334961,"y":1378.4445276260376,"z":"f9c6b4d6.c89d48","wires":[["80139c48.11b38","cd3c019c.f3ce1","188bd49e.885fbb"]]},{"id":"d1f10746.e56058","type":"call","name":"call: generate-l3network-network-id","xml":"<call module=\"VNF-API\" rpc=\"generate-l3network-network-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":474.26195526123047,"y":407.761869430542,"z":"f9c6b4d6.c89d48","wires":[["d51eccf4.b117b"]]},{"id":"d51eccf4.b117b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":697.0119400024414,"y":408.0118598937988,"z":"f9c6b4d6.c89d48","wires":[["8780710c.05f27"]]},{"id":"8780710c.05f27","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 in generating l3-network.network-id in SDNC'/>","comments":"","x":853.7894134521484,"y":407.789644241333,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"fdec3d96.4fe6c","type":"switchNode","name":"switch ... PRELOAD vpn-bindings[]","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings_length`\">","comments":"","outputs":1,"x":470.92886522081153,"y":1109.8036111195884,"z":"f9c6b4d6.c89d48","wires":[["33a85e7a.541aa2"]]},{"id":"33a85e7a.541aa2","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":691.3733155992295,"y":1109.5813468297324,"z":"f9c6b4d6.c89d48","wires":[["8f10e90b.9b56a8"]]},{"id":"8f10e90b.9b56a8","type":"set","name":"set vpn-bindings[] = 0","xml":"<set>\n<parameter name=\"preload-data.network-topology-information.vpn-bindings_length\" value=\"0\" />\n","comments":"","x":885.9289245605469,"y":1109.5813674926758,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"b25a8a99.44e208","type":"switchNode","name":"switch ... PRELOAD network-policy[]","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy_length`\">","comments":"","outputs":1,"x":452.0991668701172,"y":1523.0717792510986,"z":"f9c6b4d6.c89d48","wires":[["b82095af.08bfb8"]]},{"id":"b82095af.08bfb8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":681.5436172485352,"y":1522.8495149612427,"z":"f9c6b4d6.c89d48","wires":[["91c9b9db.ea94b8"]]},{"id":"91c9b9db.ea94b8","type":"set","name":"set network-policy[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />\n","comments":"","x":876.0992262098525,"y":1522.849535624186,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"a4bddbdd.384ca8","type":"switchNode","name":"switch test: PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].gateway-address`\">","comments":"","outputs":1,"x":968.646915435791,"y":735.6547451019287,"z":"f9c6b4d6.c89d48","wires":[["919f40fc.c3bd9"]]},{"id":"919f40fc.c3bd9","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1212.146915435791,"y":735.6547451019287,"z":"f9c6b4d6.c89d48","wires":[["82d44a1c.206d88"]]},{"id":"21deb593.226d7a","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":1609.39693069458,"y":735.4047527313232,"z":"f9c6b4d6.c89d48","wires":[[]]},{"id":"82d44a1c.206d88","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1362.8969230651855,"y":735.6547555923462,"z":"f9c6b4d6.c89d48","wires":[["21deb593.226d7a","144c19a.8fa82e6"]]},{"id":"b441c359.b1ed5","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.network-topology-information.subnets[$i].gateway-address`\" />\n","comments":"","x":922.1469306945801,"y":688.9047517776489,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"144c19a.8fa82e6","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":1575.89693069458,"y":777.4047546386719,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"26c6c645.1a9d3a","type":"switchNode","name":"switch: PRELOAD route-target != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`\" >","comments":"","outputs":1,"x":975.5635833740234,"y":1244.8216018676758,"z":"f9c6b4d6.c89d48","wires":[["57a4fb2.f593104"]]},{"id":"57a4fb2.f593104","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1212.0635833740234,"y":1245.0716018676758,"z":"f9c6b4d6.c89d48","wires":[["fc2001b2.ee9d2"]]},{"id":"fc2001b2.ee9d2","type":"save","name":"query AnAI - vpn-bindings","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.vpn-binding\">","comments":"","outputs":1,"x":1411.5635795593262,"y":1244.82160282135,"z":"f9c6b4d6.c89d48","wires":[["9d2982aa.7ea2a","c4a0a4b9.d67758","67b5caf1.ddebd4"]]},{"id":"9d2982aa.7ea2a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1621.8135795593262,"y":1325.0716037750244,"z":"f9c6b4d6.c89d48","wires":[["55368e8d.0d27b"]]},{"id":"78a54b4f.f2a264","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1351.6470069885254,"y":868.4881591796875,"z":"f9c6b4d6.c89d48","wires":[["5157a0f1.40c66","7598ed5f.703d44"]]},{"id":"5157a0f1.40c66","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 l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`\"/>","comments":"","x":1553.7465476989746,"y":868.23805809021,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"e4f1cfec.80ca7","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\">","comments":"","outputs":1,"x":1525.530288696289,"y":2284.034454345703,"z":"f9c6b4d6.c89d48","wires":[[]]},{"id":"2b7509e.d0964f6","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-netework - ' + $tmp.error-message`\"/>","comments":"","x":1512.4676208496094,"y":2327.230498313904,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"c4a0a4b9.d67758","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1627.3135833740234,"y":1284.57160282135,"z":"f9c6b4d6.c89d48","wires":[["55368e8d.0d27b"]]},{"id":"7598ed5f.703d44","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1335.7065505981445,"y":2284.2860431671143,"z":"f9c6b4d6.c89d48","wires":[["e4f1cfec.80ca7","2b7509e.d0964f6"]]},{"id":"55368e8d.0d27b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1774.8135833740234,"y":1324.8216047286987,"z":"f9c6b4d6.c89d48","wires":[["7756b135.e6c4b","7598ed5f.703d44"]]},{"id":"7756b135.e6c4b","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=\"`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`\"/>","comments":"","x":1996.9131240844727,"y":1324.5715036392212,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"239555fc.bdbfaa","type":"switchNode","name":"switch: PRELOAD vpn-binding-id","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\">","comments":"","outputs":1,"x":955.8135871887207,"y":1200.3215417861938,"z":"f9c6b4d6.c89d48","wires":[["ea26c779.e30328"]]},{"id":"ea26c779.e30328","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1169.3135948181152,"y":1200.0715427398682,"z":"f9c6b4d6.c89d48","wires":[["d6658c61.93f25"]]},{"id":"d6658c61.93f25","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\" />\n","comments":"","x":1351.8135948181152,"y":1200.0715436935425,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"67b5caf1.ddebd4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1622.8135795593262,"y":1244.82160282135,"z":"f9c6b4d6.c89d48","wires":[["93380f51.982a9"]]},{"id":"6fc7931.d198c6c","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$tmp.AnAI.vpn-binding.vpn-id`\" />\n","comments":"","x":2277.0636291503906,"y":1243.571678161621,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"80139c48.11b38","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1278.9297943115234,"y":1377.920114517212,"z":"f9c6b4d6.c89d48","wires":[["4dce9a6d.462e74"]]},{"id":"4dce9a6d.462e74","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1466.8226737976074,"y":1377.556221961975,"z":"f9c6b4d6.c89d48","wires":[["d7897aa2.314cd8","7598ed5f.703d44"]]},{"id":"d7897aa2.314cd8","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 vpn-id = ' + $tmp.vpn-binding-id`\"/>","comments":"","x":1679.9222145080566,"y":1378.3061208724976,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"aec67243.3085b","type":"for","name":"for loop i - PRELOAD network-policy","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.network-policy_length`\">\n","comments":"","outputs":1,"x":451.45642852783203,"y":1568.6431703567505,"z":"f9c6b4d6.c89d48","wires":[["9591c346.1a1b4"]]},{"id":"efde88cf.9b8748","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.network-policy.network-policy-id`\" />","comments":"","outputs":1,"x":2268.0121154785156,"y":1701.1154356002808,"z":"f9c6b4d6.c89d48","wires":[["61a477bc.3c1228","70ae584f.c14f98"]]},{"id":"9591c346.1a1b4","type":"switchNode","name":"switch: PRELOAD network-policy-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != ''`\">","comments":"","outputs":1,"x":807.7186872694228,"y":1568.9924284617105,"z":"f9c6b4d6.c89d48","wires":[["28c23efe.60d8c2"]]},{"id":"28c23efe.60d8c2","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1073.4686872694228,"y":1569.2424284617105,"z":"f9c6b4d6.c89d48","wires":[["9a67180c.7e8c88"]]},{"id":"9a67180c.7e8c88","type":"save","name":"query AnAI - network-policy","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.network-policy\">","comments":"","outputs":1,"x":1282.71869108412,"y":1569.2424284617105,"z":"f9c6b4d6.c89d48","wires":[["86e4182d.175af8","3ac39ea5.f66bf2","36636bd5.8e92b4"]]},{"id":"86e4182d.175af8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1490.71877500746,"y":1610.2424379984536,"z":"f9c6b4d6.c89d48","wires":[["19951b2e.af9645"]]},{"id":"3ac39ea5.f66bf2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1496.2187788221572,"y":1568.7424370447793,"z":"f9c6b4d6.c89d48","wires":[["19951b2e.af9645"]]},{"id":"19951b2e.af9645","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1660.7187788221572,"y":1609.992438952128,"z":"f9c6b4d6.c89d48","wires":[["1be79b78.b46515","7598ed5f.703d44"]]},{"id":"1be79b78.b46515","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=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":1869.8183195326064,"y":1609.7423378626504,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"61a477bc.3c1228","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2491.084991455078,"y":1700.591022491455,"z":"f9c6b4d6.c89d48","wires":[["905198df.a2e8e8"]]},{"id":"905198df.a2e8e8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2670.977870941162,"y":1700.2271299362183,"z":"f9c6b4d6.c89d48","wires":[["3c4f721c.b157ae","7598ed5f.703d44"]]},{"id":"3c4f721c.b157ae","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 network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`\"/>","comments":"","x":2894.0774116516113,"y":1700.9770288467407,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"a461de0f.d6093","type":"call","name":"call: generate-subnets-subnet-id","xml":"<call module=\"VNF-API\" rpc=\"generate-subnets-subnet-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":941.7618713378906,"y":822.5118942260742,"z":"f9c6b4d6.c89d48","wires":[["6a268e02.7bf99"]]},{"id":"6a268e02.7bf99","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1239.5118560791016,"y":822.761884689331,"z":"f9c6b4d6.c89d48","wires":[["7598ed5f.703d44"]]},{"id":"6a95cc4c.004c34","type":"save","name":"save relationship: tenant and cloud-region","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" \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-information.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-information.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-information.aic-cloud-region`\" />","comments":"","outputs":1,"x":495.5635681152344,"y":953.7380905151367,"z":"f9c6b4d6.c89d48","wires":[["94d20436.9f5a98","5c4aab8f.7f8844"]]},{"id":"94d20436.9f5a98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":743.5635681152344,"y":953.7380905151367,"z":"f9c6b4d6.c89d48","wires":[["9bdd4cad.3259a"]]},{"id":"9bdd4cad.3259a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":931.9563961029053,"y":953.3742084503174,"z":"f9c6b4d6.c89d48","wires":[["9e720f57.6429d","7598ed5f.703d44"]]},{"id":"9e720f57.6429d","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 clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":1136.0559368133545,"y":953.1241073608398,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"36380a8c.5dc166","type":"switchNode","name":"switch: tmp.vpn-binding-id != NULL","xml":"<switch test=\"`$tmp.vpn-binding-id != ''`\">","comments":"","outputs":1,"x":962.8135833740234,"y":1291.7381057739258,"z":"f9c6b4d6.c89d48","wires":[["2a156ae6.84e5a6"]]},{"id":"2a156ae6.84e5a6","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1182.5635681152344,"y":1291.7380905151367,"z":"f9c6b4d6.c89d48","wires":[["42bfa7b6.ab68a8"]]},{"id":"bbec29a5.4081f8","type":"set","name":"set tmp.local.network-id","xml":"<set>\n<parameter name=\"tmp.local.network-id\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n","comments":"","x":917.5714569091797,"y":778.9999885559082,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"69434546.6b177c","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid \n\t\t\tAND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n<parameter name=\"subnet-name\" value=\"`$preload-data.network-topology-information.subnets[$i].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n<parameter name=\"dhcp-start\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`\" />\n<parameter name=\"dhcp-end\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\" />\n\t\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":940.6379051208496,"y":868.5035381317139,"z":"f9c6b4d6.c89d48","wires":[["bf4af859.d229c8","91ca1bcf.ce5e18"]]},{"id":"cced61c2.cb78b","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $network-topology-operation-input.network-request-information.network-name\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network.existed\">\n\n","comments":"","outputs":1,"x":458,"y":254.42857360839844,"z":"f9c6b4d6.c89d48","wires":[["442f4dcc.0db234","b16ddddf.00d98"]]},{"id":"442f4dcc.0db234","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":684.25,"y":296.6786346435547,"z":"f9c6b4d6.c89d48","wires":[["6a2fcf8c.18eb8"]]},{"id":"202129b8.5c0ed6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying whether l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already exists in AnAI'`\"/>\n","comments":"","x":832.7457580566406,"y":254.89673042297363,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"b16ddddf.00d98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":679.5235358344185,"y":254.89673042297363,"z":"f9c6b4d6.c89d48","wires":[["202129b8.5c0ed6"]]},{"id":"6a2fcf8c.18eb8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'A l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already existed in AnAI with network-id = ' + $tmp.AnAI.l3network.existed.network-id`\" />\n","comments":"","x":835.4286193847656,"y":296.42857360839844,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d30ff142.3546e","type":"set","name":"set: tmp.error-message to \"\"","xml":"<set>\n\t<parameter name=\"tmp.error-message\" value=\"\"/>","comments":"","x":451.5714111328125,"y":362.67857360839844,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"300d9dbd.6d58a2","type":"set","name":"unset tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"\" />\n","comments":"","x":929.8888931274414,"y":1154.015875339508,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"36636bd5.8e92b4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1493.24998304579,"y":1654.5715109507241,"z":"f9c6b4d6.c89d48","wires":[["ce9859f8.9238e8"]]},{"id":"cd3c019c.f3ce1","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1282.5872650146484,"y":1464.777780532837,"z":"f9c6b4d6.c89d48","wires":[["b9331242.105a7"]]},{"id":"b9331242.105a7","type":"set","name":"set tmp.is-bound-to-vpn","xml":"<set>\n<parameter name=\"tmp.is-bound-to-vpn\" value=\"true\" />\n","comments":"","x":1473.0872650146484,"y":1464.777780532837,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"dfebf1ef.060d1","type":"save","name":"update AnAI - l3-network","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"is-bound-to-vpn\" value=\"true\" />","comments":"","outputs":1,"x":655.3016128540039,"y":1956.206524848938,"z":"f9c6b4d6.c89d48","wires":[["e1336583.4cd0d8","8f30eaa4.9bde48"]]},{"id":"e1336583.4cd0d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":851.5847702026367,"y":1956.221842765808,"z":"f9c6b4d6.c89d48","wires":[["f55c1f6d.ea9aa"]]},{"id":"eec55dc8.09816","type":"switchNode","name":"switch ... tmp.is-bound-to-vpn","xml":"<switch test=\"`$tmp.is-bound-to-vpn`\">","comments":"","outputs":1,"x":424.44444274902344,"y":1891.3493671417236,"z":"f9c6b4d6.c89d48","wires":[["34d11c70.e8f384"]]},{"id":"34d11c70.e8f384","type":"outcome","name":"true","xml":"<outcome value=\"true\">","comments":"","outputs":1,"x":643.8888931274414,"y":1891.1271028518677,"z":"f9c6b4d6.c89d48","wires":[["dfebf1ef.060d1"]]},{"id":"f55c1f6d.ea9aa","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1063.694450378418,"y":1956.5993690490723,"z":"f9c6b4d6.c89d48","wires":[["36e75acf.f931c6","7598ed5f.703d44"]]},{"id":"36e75acf.f931c6","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 updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":1282.194435119629,"y":1956.349347114563,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"8cf9ad87.65dd7","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":636.5714111328125,"y":497.57141304016113,"z":"f9c6b4d6.c89d48","wires":[["c0b37f94.55c04"]]},{"id":"91ca1bcf.ce5e18","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1160.5714111328125,"y":909.5714130401611,"z":"f9c6b4d6.c89d48","wires":[["78a54b4f.f2a264"]]},{"id":"5c4aab8f.7f8844","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":751.5714111328125,"y":995.5714130401611,"z":"f9c6b4d6.c89d48","wires":[["9bdd4cad.3259a"]]},{"id":"188bd49e.885fbb","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1287.0157318115234,"y":1420.5713863372803,"z":"f9c6b4d6.c89d48","wires":[["4dce9a6d.462e74"]]},{"id":"8f30eaa4.9bde48","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":859.071403503418,"y":1997.3214921951294,"z":"f9c6b4d6.c89d48","wires":[["f55c1f6d.ea9aa"]]},{"id":"70ae584f.c14f98","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2498.8214433458115,"y":1743.071546872457,"z":"f9c6b4d6.c89d48","wires":[["905198df.a2e8e8"]]},{"id":"93380f51.982a9","type":"switchNode","name":"switch: tmp.AnAI.vpn-binding.vpn-id","xml":"<switch test=\"`$tmp.AnAI.vpn-binding.vpn-id`\" >","comments":"","outputs":1,"x":1830.8214416503906,"y":1244.3214302062988,"z":"f9c6b4d6.c89d48","wires":[["eff41a9e.00afa8","5bc2956f.787c5c"]]},{"id":"b76ca92c.0ed578","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2253.5714416503906,"y":1283.3214302062988,"z":"f9c6b4d6.c89d48","wires":[["bb1b9631.658388","7598ed5f.703d44"]]},{"id":"5bc2956f.787c5c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2088.5714416503906,"y":1283.8214302062988,"z":"f9c6b4d6.c89d48","wires":[["b76ca92c.0ed578"]]},{"id":"eff41a9e.00afa8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2088.5714111328125,"y":1243.8214130401611,"z":"f9c6b4d6.c89d48","wires":[["6fc7931.d198c6c"]]},{"id":"bb1b9631.658388","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=\"`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target + '. It is likely that the same global-route-target points to more than one vpn-binding objects in AnAI.'`\"/>","comments":"","x":2469.0714111328125,"y":1283.3214130401611,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"ce9859f8.9238e8","type":"switchNode","name":"switch: tmp.AnAI.network-policy.network-policy-id","xml":"<switch test=\"`$tmp.AnAI.network-policy.network-policy-id`\" >","comments":"","outputs":1,"x":1771.3292541503906,"y":1654.0713682174683,"z":"f9c6b4d6.c89d48","wires":[["3c3f8072.e88a9","d073d6e1.0db6e8"]]},{"id":"3c3f8072.e88a9","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2045.0792541503906,"y":1653.5713682174683,"z":"f9c6b4d6.c89d48","wires":[["78fb0dee.396224"]]},{"id":"78fb0dee.396224","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2210.0792541503906,"y":1653.0713682174683,"z":"f9c6b4d6.c89d48","wires":[["7598ed5f.703d44","c12525bf.5dfe18"]]},{"id":"b7a4e2fe.7602c","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=\"`'Failed to query route-table-reference from AnAI where route-table-reference-fqdn = ' + $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn + '. It is likely that the same route-table-reference-fqdn points to more than one route-table-reference objects in AnAI.'`\"/>","comments":"","x":2636.912660386827,"y":1851.404614766439,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d073d6e1.0db6e8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2044.5714111328125,"y":1700.8214664459229,"z":"f9c6b4d6.c89d48","wires":[["efde88cf.9b8748"]]},{"id":"d92a7574.cd1b58","type":"save","name":"update AnAI - l3-network.provider-network-information","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"physical-network-name\" value=\"`$preload-data.network-topology-information.provider-network-information.physical-network-name`\" />\n<parameter name=\"is-provider-network\" value=\"`$preload-data.network-topology-information.provider-network-information.is-provider-network`\" />\n<parameter name=\"is-shared-network\" value=\"`$preload-data.network-topology-information.provider-network-information.is-shared-network`\" />\n<parameter name=\"is-external-network\" value=\"`$preload-data.network-topology-information.provider-network-information.is-external-network`\" />","comments":"","outputs":1,"x":534.7499847412109,"y":541.3214206695557,"z":"f9c6b4d6.c89d48","wires":[["8d65ff4.75283","a6764a00.4418a8"]]},{"id":"8d65ff4.75283","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.2831344604492,"y":541.3367395401001,"z":"f9c6b4d6.c89d48","wires":[["19a0604d.6fffb"]]},{"id":"19a0604d.6fffb","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1060.3928146362305,"y":541.7142658233643,"z":"f9c6b4d6.c89d48","wires":[["bfc1c864.dda818","7598ed5f.703d44"]]},{"id":"bfc1c864.dda818","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 updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`\"/>","comments":"","x":1278.8927993774414,"y":541.464243888855,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"a6764a00.4418a8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":855.7697677612305,"y":582.4363889694214,"z":"f9c6b4d6.c89d48","wires":[["19a0604d.6fffb"]]},{"id":"f5d35022.8ff6","type":"switchNode","name":"switch ... PRELOAD route-table-reference[]","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference_length`\">","comments":"","outputs":1,"x":469.74998474121094,"y":1721.5714130401611,"z":"f9c6b4d6.c89d48","wires":[["4f951dff.ce2564"]]},{"id":"4f951dff.ce2564","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":725.1944351196289,"y":1721.3491487503052,"z":"f9c6b4d6.c89d48","wires":[["d46faf09.e831"]]},{"id":"d46faf09.e831","type":"set","name":"set route-table-reference[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />\n","comments":"","x":930.7500440809463,"y":1721.3491694132485,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"30dd8358.aaaadc","type":"for","name":"for loop i - PRELOAD route-table-reference","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.route-table-reference_length`\">\n","comments":"","outputs":1,"x":468.1072463989258,"y":1769.142804145813,"z":"f9c6b4d6.c89d48","wires":[["9bc7e123.4762e"]]},{"id":"75664f84.1ae09","type":"save","name":"save relationship: route-table-reference","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.route-table-reference.route-table-reference-id`\" />","comments":"","outputs":1,"x":2454.9962632921006,"y":1900.9483931859336,"z":"f9c6b4d6.c89d48","wires":[["4d7f2cce.5452f4","5883ac21.585844"]]},{"id":"9bc7e123.4762e","type":"switchNode","name":"switch: PRELOAD network-policy-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != ''`\">","comments":"","outputs":1,"x":853.7028350830078,"y":1768.8253860473633,"z":"f9c6b4d6.c89d48","wires":[["209cfc0f.7ee064"]]},{"id":"209cfc0f.7ee064","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1119.4528350830078,"y":1769.0753860473633,"z":"f9c6b4d6.c89d48","wires":[["4c6ed27c.d3899c"]]},{"id":"4c6ed27c.d3899c","type":"save","name":"query AnAI - route-table-reference","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"route-table-reference\" \n\t\tkey=\"route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn\" \n\t\tpfx=\"tmp.AnAI.route-table-reference\">","comments":"","outputs":1,"x":1348.702838897705,"y":1769.0753860473633,"z":"f9c6b4d6.c89d48","wires":[["32be05d4.ef453a","d31265a9.dd2a68","fc3f6dcc.3ffa5"]]},{"id":"32be05d4.ef453a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1574.702922821045,"y":1810.0753955841064,"z":"f9c6b4d6.c89d48","wires":[["c7025ab3.2465e8"]]},{"id":"d31265a9.dd2a68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1580.2029266357422,"y":1768.5753946304321,"z":"f9c6b4d6.c89d48","wires":[["c7025ab3.2465e8"]]},{"id":"c7025ab3.2465e8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1744.7029266357422,"y":1809.8253965377808,"z":"f9c6b4d6.c89d48","wires":[["a84e07a3.02c778"]]},{"id":"a84e07a3.02c778","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=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":1953.8024673461914,"y":1809.5752954483032,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"4d7f2cce.5452f4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2710.069139268663,"y":1900.423980077108,"z":"f9c6b4d6.c89d48","wires":[["7402c469.9e6bcc"]]},{"id":"7402c469.9e6bcc","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2889.962018754747,"y":1900.060087521871,"z":"f9c6b4d6.c89d48","wires":[["75091979.f14b18","7598ed5f.703d44"]]},{"id":"75091979.f14b18","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 route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`\"/>","comments":"","x":3114.061586168077,"y":1899.8100102742515,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"fc3f6dcc.3ffa5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1577.234130859375,"y":1854.404468536377,"z":"f9c6b4d6.c89d48","wires":[["b4dd51b0.f58dd"]]},{"id":"5883ac21.585844","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2717.8055911593965,"y":1942.9045044581098,"z":"f9c6b4d6.c89d48","wires":[["7402c469.9e6bcc"]]},{"id":"b4dd51b0.f58dd","type":"switchNode","name":"switch: tmp.AnAI.route-table-reference.route-table-reference-id","xml":"<switch test=\"`$tmp.AnAI.route-table-referencey.route-table-reference-id`\" >","comments":"","outputs":1,"x":1895.3134019639756,"y":1853.904325803121,"z":"f9c6b4d6.c89d48","wires":[["caa62ee1.0e628","70a311b7.2883a"]]},{"id":"caa62ee1.0e628","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2222.0634019639756,"y":1853.404325803121,"z":"f9c6b4d6.c89d48","wires":[["6ccdc09b.5108b"]]},{"id":"6ccdc09b.5108b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2387.0634019639756,"y":1852.904325803121,"z":"f9c6b4d6.c89d48","wires":[["b7a4e2fe.7602c"]]},{"id":"c12525bf.5dfe18","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=\"`'Failed to query newtork-policy from AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn + '. It is likely that the same network-policy-fqdn points to more than one network-policy objects in AnAI.'`\"/>","comments":"","x":2455.229965209961,"y":1652.5709247589111,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"70a311b7.2883a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2221.5555589463975,"y":1900.6544240315757,"z":"f9c6b4d6.c89d48","wires":[["75664f84.1ae09"]]},{"id":"830f1b88.627bf8","type":"save","name":"save relationship: service-instance","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\" >\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=\"`$network-topology-operation-input.service-information.subscriber-name`\" />\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=\"`$network-topology-operation-input.service-information.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=\"`$network-topology-operation-input.service-information.service-instance-id`\" />","comments":"","outputs":1,"x":449.74998474121094,"y":2092.571413040161,"z":"f9c6b4d6.c89d48","wires":[["862cdb1e.cf3978","29684e7c.4d3332"]]},{"id":"862cdb1e.cf3978","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":704.8228607177734,"y":2092.0469999313354,"z":"f9c6b4d6.c89d48","wires":[["a91510cb.75d29"]]},{"id":"a91510cb.75d29","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":884.7157402038574,"y":2091.6831073760986,"z":"f9c6b4d6.c89d48","wires":[["c6dc81e.9bba78","7598ed5f.703d44"]]},{"id":"c6dc81e.9bba78","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 service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`\"/>","comments":"","x":1122.8153076171875,"y":2091.433030128479,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"29684e7c.4d3332","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":712.5593126085068,"y":2134.5275243123374,"z":"f9c6b4d6.c89d48","wires":[["a91510cb.75d29"]]},{"id":"4330f5b6.e6251c","type":"switchNode","name":"switch: INPUT service-type","xml":"<switch test=\"`$network-topology-operation-input.service-information.service-type`\">","comments":"","outputs":1,"x":447.75,"y":160.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["a00be1d.7bd562"]]},{"id":"a00be1d.7bd562","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":653.75,"y":160.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["84d2b076.55161"]]},{"id":"84d2b076.55161","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='service-type, aka AnAI subscription-service-type, is required.'/>","comments":"","x":811.75,"y":160.57142639160156,"z":"f9c6b4d6.c89d48","wires":[]},{"id":"d045d509.c8ec58","type":"switchNode","name":"switch: INPUT subscriber-name","xml":"<switch test=\"`$network-topology-operation-input.service-information.subscriber-name`\">","comments":"","outputs":1,"x":461.75,"y":206.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["5efbbb28.950c14"]]},{"id":"5efbbb28.950c14","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":683.75,"y":206.57142639160156,"z":"f9c6b4d6.c89d48","wires":[["d57a3c68.3825d"]]},{"id":"d57a3c68.3825d","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='subscriber-name, aka AnAI global-customer-id, is required.'/>","comments":"","x":841.75,"y":206.57142639160156,"z":"f9c6b4d6.c89d48","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/network-topology-changeassign.json
new file mode 100644
index 00000000..5a3beb49
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"adccb6.8424d348","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":178.7500114440918,"y":167.50000190734863,"z":"b24c83f7.abbc6","wires":[["c7828b0a.e799e8","2212dd2d.8e7942","2dfb355b.d5d24a","313c1584.4f97fa","6c413597.876f3c","34af06b5.07d33a","59c57e09.0c9bd","c10e73d.da8889","bb8ce764.d17888","b16ab5f2.35a148","f15dac05.a23f","10056ed4.c3d191","b4cd1414.581b48","e456340c.466478","eca5ffa4.23d73","bd2d9b6e.b5c1d8"]]},{"id":"c7828b0a.e799e8","type":"get-resource","name":"get AnAI - l3-network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":424.80941009521484,"y":168.38485431671143,"z":"b24c83f7.abbc6","wires":[["812ba46c.1b8558","8ace8ce6.55a0e"]]},{"id":"2212dd2d.8e7942","type":"switchNode","name":"switch: AnAI == PRELOAD - network-name","xml":"<switch test=\"`$tmp.AnAI.l3network.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`\">","comments":"","outputs":1,"x":493.2222099304199,"y":340.5555057525635,"z":"b24c83f7.abbc6","wires":[["f97c22c3.bd33d"]]},{"id":"2dfb355b.d5d24a","type":"for","name":"for loop k - tmp.AnAI.l3network.subnets.subnet","xml":"<for index=\"k\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":499.5236930847168,"y":515.6143531799316,"z":"b24c83f7.abbc6","wires":[["4dd3576.8062ba8"]]},{"id":"99484323.6781e","type":"for","name":"for loop i - PRELOAD subnets","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":847.464298248291,"y":1611.5709714889526,"z":"b24c83f7.abbc6","wires":[["caf58dc4.3309b"]]},{"id":"313c1584.4f97fa","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":284.05884170532227,"y":6246.302718162537,"z":"b24c83f7.abbc6","wires":[]},{"id":"812ba46c.1b8558","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":611.7143592834473,"y":209.57915782928467,"z":"b24c83f7.abbc6","wires":[["90e7717c.4ff42"]]},{"id":"90e7717c.4ff42","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: ' + $network-topology-operation-input.network-request-information.network-id + 'not found in AnAI'`\" />","comments":"","x":774.3531341552734,"y":209.4681453704834,"z":"b24c83f7.abbc6","wires":[]},{"id":"6a707f17.e585d","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":641.8493194580078,"y":654.6338815689087,"z":"b24c83f7.abbc6","wires":[["e1540d8d.4554a","15930eb5.9d2c61"]]},{"id":"c69a9fad.d395d","type":"set","name":"initialize tmp.start-address-match = 0","xml":"<set>\n<parameter name='tmp.start-address-match' value='0' />\n","comments":"","x":714.3761596679688,"y":563.1682300567627,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cb84ba2b.90bd48","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":549.4607391357422,"y":1776.8211612701416,"z":"b24c83f7.abbc6","wires":[["766397f9.d8d1f8","9f8d35e4.e55ae8"]]},{"id":"7945c8d8.383a58","type":"set","name":"initialize tmp.start-address-match = 0","xml":"<set>\n<parameter name=\"tmp.start-address-match\" value=\"0\" />\n","comments":"","x":738.2764015197754,"y":1709.0573635101318,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e1540d8d.4554a","type":"for","name":"for loop n PRELOAD subnets","xml":"<for index=\"n\" start=\"0\" end=\"`$preload-data.network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":874.579891204834,"y":655.1577501296997,"z":"b24c83f7.abbc6","wires":[["94c41929.7cf038"]]},{"id":"4fd8628d.a08a8c","type":"switchNode","name":"switch: tmp.start-address-match = 0","xml":"<switch test=\"`$tmp.start-address-match == 0`\">","comments":"","outputs":1,"x":989.4622459411621,"y":1282.7005062103271,"z":"b24c83f7.abbc6","wires":[["d695fd69.34476"]]},{"id":"766397f9.d8d1f8","type":"for","name":"for loop j - AnAI l3subnet","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":770.6567459106445,"y":1777.2368459701538,"z":"b24c83f7.abbc6","wires":[["a27e439b.1f5f7"]]},{"id":"d695fd69.34476","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1226.8745765686035,"y":1282.2680130004883,"z":"b24c83f7.abbc6","wires":[["df441732.5a6038"]]},{"id":"e08b1d05.35c67","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":933.4417266845703,"y":1831.371304512024,"z":"b24c83f7.abbc6","wires":[["f26659b9.bdc948"]]},{"id":"94c41929.7cf038","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n start-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].network-start-address == $preload-data.network-topology-information.subnets[$n].start-address`\">","comments":"","outputs":1,"x":887.6592407226562,"y":706.0110673904419,"z":"b24c83f7.abbc6","wires":[["5c5db431.fc380c"]]},{"id":"a27e439b.1f5f7","type":"switchNode","name":"switch: PRELOAD-i == AnAI-j start-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].start-address == $tmp.AnAI.l3network.subnets.subnet[$j].network-start-address`\">","comments":"","outputs":1,"x":1084.7081756591797,"y":1777.8203172683716,"z":"b24c83f7.abbc6","wires":[["c4c3be7b.c7a1b"]]},{"id":"f26659b9.bdc948","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1113.581069946289,"y":1831.8419494628906,"z":"b24c83f7.abbc6","wires":[["8fd779af.d8ec98","b1a240fe.72ecb","bdf792c0.b5a28","2340601b.c0fbc","84c3d0d1.e984c","754d89e8.1de998"]]},{"id":"5c5db431.fc380c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1154.7284240722656,"y":706.2167139053345,"z":"b24c83f7.abbc6","wires":[["b5badb50.692f18"]]},{"id":"df441732.5a6038","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id\" >\n<parameter name=\"orchestration-status\" value=\"pending-delete\" />\n\t\t","comments":"","outputs":1,"x":1410.3694496154785,"y":1281.6625576019287,"z":"b24c83f7.abbc6","wires":[["b8c75959.a07998","e5068dd8.d58d5","150db709.87fab9"]]},{"id":"c4c3be7b.c7a1b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1335.9098434448242,"y":1777.2601118087769,"z":"b24c83f7.abbc6","wires":[["b390fee8.578a3"]]},{"id":"b8c75959.a07998","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1603.3452911376953,"y":1281.5433139801025,"z":"b24c83f7.abbc6","wires":[["c6b0d6cd.d0a058"]]},{"id":"272c0e65.707422","type":"comment","name":"foreach AnAI l3subnet not found in PRELOAD, set pending-delete","info":"","comments":"","x":1032.8700065612793,"y":1158.146183013916,"z":"b24c83f7.abbc6","wires":[]},{"id":"661025a8.9e175c","type":"comment","name":"foreach PRELOAD subnet not found in AnAI l3subnet, create subnet in AnAI","info":"","comments":"","x":626.5205192565918,"y":1534.1595935821533,"z":"b24c83f7.abbc6","wires":[]},{"id":"5138e1dc.f8066","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n cidr-mask","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].cidr-mask == $preload-data.network-topology-information.subnets[$n].cidr-mask`\">","comments":"","outputs":1,"x":1588.1782608032227,"y":467.1387405395508,"z":"b24c83f7.abbc6","wires":[["da70def2.76425"]]},{"id":"5bb8c4e2.6d08bc","type":"set","name":"set tmp.start-address-match = 1","xml":"<set>\n<parameter name='tmp.start-address-match' value='1' />\n","comments":"","x":1560.4662246704102,"y":418.6142053604126,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"b5badb50.692f18","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1304.9099044799805,"y":706.583779335022,"z":"b24c83f7.abbc6","wires":[["5bb8c4e2.6d08bc","5138e1dc.f8066","f67b8249.bf0ed","49957628.a77588","c6be995.0b46868","e67b0a35.1d06e8","aa1015d0.f81c38","cf30dbbc.caf468","ef8f189e.13e928"]]},{"id":"28694ef.e6d40b2","type":"comment","name":"start-addr matched, compare other subnet attrs","info":"","comments":"","x":1184.274257659912,"y":560.822154045105,"z":"b24c83f7.abbc6","wires":[]},{"id":"da70def2.76425","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1834.7589530944824,"y":467.59263038635254,"z":"b24c83f7.abbc6","wires":[["90858a29.37fc08"]]},{"id":"17ed7289.814ddd","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id\" >\n\t<!-- Update l3network.subnet -->\n\t<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\"/>\n\t<parameter name=\"subnet-name\" value=\"`$preload-data.network-topology-information.subnets[$n].subnet-name`\"/>\n\t<parameter name=\"cidr-mask\" value=\"`$preload-data.network-topology-information.subnets[$n].cidr-mask`\"/>\n\t<parameter name=\"dhcp-start\" value=\"`$preload-data.network-topology-information.subnets[$n].dhcp-start-address`\"/>\n\t<parameter name=\"dhcp-end\" value=\"`$preload-data.network-topology-information.subnets[$n].dhcp-end-address`\"/>\n\t<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\"/>\n\t<parameter name=\"orchestration-status\" value=\"pending-update\" />\n\t\t","comments":"","outputs":1,"x":1941.5383796691895,"y":1026.5579977035522,"z":"b24c83f7.abbc6","wires":[["2d5ecb94.1f2404","80e40fc7.91291","c9c8378e.07a4c8"]]},{"id":"bfe3db0b.73f948","type":"comment","name":"foreach AnAI subnet attr different from PRELOAD, update AnAI and set pending-update","info":"","comments":"","x":1908.5912628173828,"y":365.12071228027344,"z":"b24c83f7.abbc6","wires":[]},{"id":"cf30dbbc.caf468","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n dhcp-enabled.boolean","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-enabled == $tmp.dhcpEnabled.boolean`\">","comments":"","outputs":1,"x":1625.5838432312012,"y":829.0172414779663,"z":"b24c83f7.abbc6","wires":[["7321a40b.545eac"]]},{"id":"7321a40b.545eac","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1908.4177474975586,"y":828.9894180297852,"z":"b24c83f7.abbc6","wires":[["1bcbd50a.81742b"]]},{"id":"8fd779af.d8ec98","type":"switchNode","name":"switch : PRELOAD dhcp-enabled","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`\">","comments":"","outputs":1,"x":1376.659194946289,"y":1831.488842010498,"z":"b24c83f7.abbc6","wires":[["d1241924.ed09f8","7227226.f5b7ddc"]]},{"id":"7227226.f5b7ddc","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1624.2147521972656,"y":1832.4095478057861,"z":"b24c83f7.abbc6","wires":[["2a420bce.572e64"]]},{"id":"d1241924.ed09f8","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1624.881492614746,"y":1878.8540449142456,"z":"b24c83f7.abbc6","wires":[["797eb8ae.317378"]]},{"id":"67602934.d76d68","type":"set","name":"set tmp.dhcpEnabled.bolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":2016.2388725280762,"y":738.6499919891357,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"25a34e9f.ba3cb2","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":2017.8779106140137,"y":780.1221618652344,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"aa1015d0.f81c38","type":"switchNode","name":"switch : PRELOAD-n dhcp-enabled","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$n].dhcp-enabled`\">","comments":"","outputs":1,"x":1567.1460990905762,"y":738.4153118133545,"z":"b24c83f7.abbc6","wires":[["d4a0bbfd.813968","7c02b1e6.66023"]]},{"id":"7c02b1e6.66023","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1797.2017631530762,"y":738.6931438446045,"z":"b24c83f7.abbc6","wires":[["67602934.d76d68"]]},{"id":"d4a0bbfd.813968","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1796.618564605713,"y":779.8876571655273,"z":"b24c83f7.abbc6","wires":[["25a34e9f.ba3cb2"]]},{"id":"4dd3576.8062ba8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":452.6436080932617,"y":563.4527454376221,"z":"b24c83f7.abbc6","wires":[["c69a9fad.d395d","6a707f17.e585d","d6ebf8bb.4c2de8"]]},{"id":"d6ebf8bb.4c2de8","type":"set","name":"initialize tmp.subnetUpdate = 0","xml":"<set>\n<parameter name='tmp.subnetUpdate' value='0' />\n","comments":"","x":695.1359634399414,"y":608.8260974884033,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"f67b8249.bf0ed","type":"switchNode","name":"switch: tmp.subnetUpdate = 1","xml":"<switch test=\"`$tmp.subnetUpdate == 1`\">","comments":"","outputs":1,"x":1548.4172706604004,"y":1027.1630268096924,"z":"b24c83f7.abbc6","wires":[["b0b528dc.173918"]]},{"id":"b0b528dc.173918","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1756.4172706604004,"y":1026.8297748565674,"z":"b24c83f7.abbc6","wires":[["17ed7289.814ddd"]]},{"id":"caf58dc4.3309b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":476.2505073547363,"y":1709.036449432373,"z":"b24c83f7.abbc6","wires":[["7945c8d8.383a58","cb84ba2b.90bd48"]]},{"id":"d922f181.c8317","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name=\"tmp.l3networkUpdate\" value=\"1\" />\n","comments":"","x":2512.298324584961,"y":1271.3373107910156,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e5068dd8.d58d5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1610.0681495666504,"y":1435.3452835083008,"z":"b24c83f7.abbc6","wires":[["87593b73.e592d8"]]},{"id":"b0faff93.2dd14","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1640.504550933838,"y":2245.03267288208,"z":"b24c83f7.abbc6","wires":[["ee66f92b.ccfb18"]]},{"id":"f20c0bb3.0d7af8","type":"set","name":"set tmp.subnetRollback: orchestraton-status","xml":"<set>\n <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>\n <parameter name=\"tmp.subnetRollback[$x].orchestration-status\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].orchestration-status`\" />\n <parameter name=\"tmp.subnetRollback[$x].type\" value = \"delete\" />\n \n\n\n","comments":"","x":2054.0706214904785,"y":1434.5365447998047,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"87593b73.e592d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1746.9279098510742,"y":1435.1081132888794,"z":"b24c83f7.abbc6","wires":[["f20c0bb3.0d7af8","8f7fc73c.e2c3d8","3eceba12.f5d206"]]},{"id":"ee66f92b.ccfb18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1782.9489860534668,"y":2244.078380584717,"z":"b24c83f7.abbc6","wires":[["eaaa5901.98e238","29738f0c.0d796","3b6d36e2.4f5b5a"]]},{"id":"eaaa5901.98e238","type":"set","name":"set tmp.subnetRollback for create","xml":"<set>\n <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n <parameter name=\"tmp.subnetRollback[$x].type\" value = \"create\" />","comments":"","x":2019.2348937988281,"y":2244.792977333069,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"8f7fc73c.e2c3d8","type":"set","name":"$x++","xml":"<set>\n <parameter name=\"x\" value = \"`$x + 1`\" />\n\n","comments":"","x":1937.775577545166,"y":1480.5871963500977,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"29738f0c.0d796","type":"set","name":"$x++","xml":"<set>\n <parameter name=\"x\" value = \"`$x + 1`\" />\n\n","comments":"","x":1936.1711730957031,"y":2290.3573427200317,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"49957628.a77588","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] dhcp-start","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-start == $preload-data.network-topology-information.subnets[$n].dhcp-start-address`\">","comments":"","outputs":1,"x":1627.2202644348145,"y":877.0411176681519,"z":"b24c83f7.abbc6","wires":[["a485a10d.6f0aa"]]},{"id":"a485a10d.6f0aa","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1908.1367721557617,"y":876.7633323669434,"z":"b24c83f7.abbc6","wires":[["ca9a6174.d3216"]]},{"id":"c6be995.0b46868","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] dhcp-end","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-end == $preload-data.network-topology-information.subnets[$n].dhcp-end-address`\">","comments":"","outputs":1,"x":1624.4424324035645,"y":924.3744916915894,"z":"b24c83f7.abbc6","wires":[["b7005098.53ee7"]]},{"id":"b7005098.53ee7","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1907.3589401245117,"y":924.0967063903809,"z":"b24c83f7.abbc6","wires":[["292eb234.c8484e"]]},{"id":"e25fc8a9.1116e8","type":"method","name":"method network-topology-changeassign","xml":"<method rpc=\"network-topology-changeassign\" mode=\"sync\">","comments":"","outputs":1,"x":228.1150665283203,"y":109.55552768707275,"z":"b24c83f7.abbc6","wires":[["adccb6.8424d348"]]},{"id":"202a3e03.4ddbf2","type":"service-logic","name":"VNF-API 3.1.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":282.5594940185547,"y":53.22220325469971,"z":"b24c83f7.abbc6","wires":[["e25fc8a9.1116e8"]]},{"id":"570ef049.e5ed1","type":"dgstart","name":"DGSTART","outputs":1,"x":118.44837951660156,"y":53.22220325469971,"z":"b24c83f7.abbc6","wires":[["202a3e03.4ddbf2"]]},{"id":"8ace8ce6.55a0e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":604.6705780029297,"y":168.77773571014404,"z":"b24c83f7.abbc6","wires":[["77d4339b.2c77fc"]]},{"id":"77d4339b.2c77fc","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":763.7816619873047,"y":168.9999647140503,"z":"b24c83f7.abbc6","wires":[]},{"id":"540da71a.6c5d78","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.network-topology-information.subnets[$n].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.network-topology-information.subnets[$n].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.network-topology-information.subnets[$n].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":2190.293586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"66b36d53.f585d4","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":2807.043712615967,"y":588.9523363113403,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e67b0a35.1d06e8","type":"switchNode","name":"switch : PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$n].gateway-address`\">","comments":"","outputs":1,"x":1575.543586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[["8b3b77a0.09f798","4ab20367.f03b6c"]]},{"id":"8b3b77a0.09f798","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1809.543586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[["4d8feb3a.3484b4"]]},{"id":"4ab20367.f03b6c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1811.543586730957,"y":569.952335357666,"z":"b24c83f7.abbc6","wires":[["6708d473.7fb07c"]]},{"id":"6708d473.7fb07c","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n gateway-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $preload-data.network-topology-information.subnets[$n].gateway-address`\">","comments":"","outputs":1,"x":2044.543743133545,"y":648.6666088104248,"z":"b24c83f7.abbc6","wires":[["263829a0.412d26","9e7603e8.19f05"]]},{"id":"263829a0.412d26","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2321.043743133545,"y":648.9166088104248,"z":"b24c83f7.abbc6","wires":[["ac91a48c.df4748"]]},{"id":"d3078aa9.d0b7f8","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.network-topology-information.subnets[$n].gateway-address`\" />\n","comments":"","x":2808.0437049865723,"y":647.0594596862793,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"4d8feb3a.3484b4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1949.543586730957,"y":525.952335357666,"z":"b24c83f7.abbc6","wires":[["540da71a.6c5d78","e9310489.7af568"]]},{"id":"ac91a48c.df4748","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2460.043743133545,"y":648.9166088104248,"z":"b24c83f7.abbc6","wires":[["d3078aa9.d0b7f8","9d0c9a84.7d8738"]]},{"id":"6e1e477.31893b8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2527.4322395324707,"y":1113.436484336853,"z":"b24c83f7.abbc6","wires":[]},{"id":"f97c22c3.bd33d","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":747.4722099304199,"y":340.55950260162354,"z":"b24c83f7.abbc6","wires":[["5b49a928.5702a8"]]},{"id":"5b49a928.5702a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'No preload network found with network-name = ' + $tmp.AnAI.l3network.network-name + ' in SDNC'`\" />","comments":"","x":910.1109848022461,"y":340.44849014282227,"z":"b24c83f7.abbc6","wires":[]},{"id":"cd77a967.3c6308","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2295.138832092285,"y":1026.595251083374,"z":"b24c83f7.abbc6","wires":[["6e1e477.31893b8","fcfd2600.488c78","5d6b7d0.b989584"]]},{"id":"2d5ecb94.1f2404","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2127.6016120910645,"y":1026.3078203201294,"z":"b24c83f7.abbc6","wires":[["cd77a967.3c6308"]]},{"id":"80e40fc7.91291","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2135.163372039795,"y":1181.254093170166,"z":"b24c83f7.abbc6","wires":[["3fce51fa.fd9e2e"]]},{"id":"c1d7a122.2a287","type":"set","name":"set tmp.subnetRollback: keys","xml":"<set>\n <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>\n <parameter name=\"tmp.subnetRollback[$x].type\" value = \"update\"/>\n \n\n\n","comments":"","x":2511.4268836975098,"y":1181.4888858795166,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3fce51fa.fd9e2e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2273.662322998047,"y":1181.2392616271973,"z":"b24c83f7.abbc6","wires":[["c1d7a122.2a287","61057541.26debc","d922f181.c8317"]]},{"id":"61057541.26debc","type":"set","name":"$x++","xml":"<set>\n <parameter name=\"x\" value = \"`$x + 1`\" />\n\n","comments":"","x":2441.1170692443848,"y":1227.039545059204,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3d2b0a50.3a8f56","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2039.186595916748,"y":1368.3451623916626,"z":"b24c83f7.abbc6","wires":[]},{"id":"84c3d0d1.e984c","type":"save","name":"save AnAI - l3-network.subnets.subnet","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid\" >\n\t<!-- Create l3-network object -->\n\t<parameter name=\"network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n\t<parameter name=\"subnet-id\" value=\"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n\t<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\" />\n\t<parameter name=\"subnet-name\" value=\"`$preload-data.network-topology-information.subnets[$i].subnet-name`\" />\t\t\n\t<parameter name=\"network-start-address\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"cidr-mask\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ip-version\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"dhcp-start\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`\" />\n\t<parameter name=\"dhcp-end\" value=\"`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`\" />\n\t<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\" />\n\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":1392.1628170013428,"y":2104.321937561035,"z":"b24c83f7.abbc6","wires":[["ddd8c8e2.0b4288","b0faff93.2dd14","92778af8.befa68"]]},{"id":"ddd8c8e2.0b4288","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1634.7790908813477,"y":2104.670440673828,"z":"b24c83f7.abbc6","wires":[["8dabdae5.57ab58"]]},{"id":"bdf792c0.b5a28","type":"switchNode","name":"switch : PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.network-topology-information.subnets[$i].gateway-address`\">","comments":"","outputs":1,"x":1391.028793334961,"y":1969.615735054016,"z":"b24c83f7.abbc6","wires":[["b4dd1568.7deed8"]]},{"id":"b4dd1568.7deed8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1614.528793334961,"y":1969.615735054016,"z":"b24c83f7.abbc6","wires":[["cbdcd1c2.b3ed5"]]},{"id":"a0138d79.73728","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":1987.77880859375,"y":1969.3657426834106,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cbdcd1c2.b3ed5","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1756.2788009643555,"y":1969.6157455444336,"z":"b24c83f7.abbc6","wires":[["a0138d79.73728","c95c4bf2.a7bd28"]]},{"id":"b1a240fe.72ecb","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name='tmp.gateway-address' value='`$preload-data.network-topology-information.subnets[$i].gateway-address`' />\n","comments":"","x":1353.52880859375,"y":1925.8657417297363,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"c95c4bf2.a7bd28","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":1954.27880859375,"y":2011.3657445907593,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"2340601b.c0fbc","type":"call","name":"call generate-subnets-subnet-id","xml":"<call module=\"VNF-API\" rpc=\"generate-subnets-subnet-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1371.1437721252441,"y":2057.4728574752808,"z":"b24c83f7.abbc6","wires":[["8589e64d.6294f8"]]},{"id":"8589e64d.6294f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1634.893756866455,"y":2057.7228479385376,"z":"b24c83f7.abbc6","wires":[["8dabdae5.57ab58"]]},{"id":"c6b0d6cd.d0a058","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1807.6506958007812,"y":1281.8093757629395,"z":"b24c83f7.abbc6","wires":[["3d2b0a50.3a8f56","eea3a1e.e88116","1623f021.c2b9"]]},{"id":"2a420bce.572e64","type":"set","name":"set tmp.dhcpEnabled.bolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":1848.3532104492188,"y":1831.9525032043457,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"797eb8ae.317378","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":1850.1350021362305,"y":1878.5675792694092,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9117f581.49cd58","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2045.3016777038574,"y":2193.504596710205,"z":"b24c83f7.abbc6","wires":[]},{"id":"8dabdae5.57ab58","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1834.5158653259277,"y":2104.3617782592773,"z":"b24c83f7.abbc6","wires":[["9117f581.49cd58","a6fad29a.1da73","ca78be2.35c6c4"]]},{"id":"a6fad29a.1da73","type":"set","name":"set i, j max + 1","xml":"<set>\n\t<parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />\n\t<parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' />","comments":"","x":2009.0159034729004,"y":2104.361795425415,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"da60e97d.0ede68","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 updating l3-network in AnAI with network-id = ' + $tmp.AnAI.l3network.network-id + ' - ' + $tmp.error-message + ' - ' + $tmp.rollback.error-message`\"/>","comments":"","x":669.991397857666,"y":6073.796445846558,"z":"b24c83f7.abbc6","wires":[]},{"id":"6c413597.876f3c","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":347.87683486938477,"y":6179.523144721985,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3b6d36e2.4f5b5a","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name='tmp.l3networkUpdate' value='1' />\n","comments":"","x":2005.5675163269043,"y":2336.881452560425,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"4ab836fd.f49d78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1271.8109970092773,"y":4664.159008979797,"z":"b24c83f7.abbc6","wires":[["b682bac.b292748"]]},{"id":"80e7eee4.21ab2","type":"switchNode","name":"switch : tmp.l3networkUpdate = 1","xml":"<switch test=\"`$tmp.l3networkUpdate == 1`\">\n","comments":"","outputs":1,"x":518.019718170166,"y":4664.275115013123,"z":"b24c83f7.abbc6","wires":[["b8e556ef.dde5f8"]]},{"id":"b8e556ef.dde5f8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":731.6863822937012,"y":4664.052649497986,"z":"b24c83f7.abbc6","wires":[["e53a9499.9d4d28"]]},{"id":"e53a9499.9d4d28","type":"save","name":"update AnAI - l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"pending-update\" />","comments":"","outputs":1,"x":986.7340812683105,"y":4664.179589271545,"z":"b24c83f7.abbc6","wires":[["4ab836fd.f49d78","b3df03dc.e1fb8","40f41704.9cc688"]]},{"id":"b682bac.b292748","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1446.8769569396973,"y":4664.4650774002075,"z":"b24c83f7.abbc6","wires":[["277621ff.2d16fe","2e3c7ba2.d21b54"]]},{"id":"277621ff.2d16fe","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 updating l3-network.orchestration-status in AnAI\"/>","comments":"","x":1694.02103805542,"y":4664.2675523757935,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"ea36d758.4a9288","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":493.1831245422363,"y":2314.7121753692627,"z":"b24c83f7.abbc6","wires":[["50318e70.387a9","6f14f693.d5a4e8"]]},{"id":"70d1080b.b08868","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":459.1587104797363,"y":3271.960355758667,"z":"b24c83f7.abbc6","wires":[["85ca29b3.1bb488","67e9507e.488ea"]]},{"id":"7d587fe3.3f132","type":"save","name":"Rollback AnAI - l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.orchestration-status`\" />","comments":"","outputs":1,"x":1280.6508178710938,"y":5976.617420196533,"z":"b24c83f7.abbc6","wires":[["d11dd828.7802a8","81ba8fb7.9e498"]]},{"id":"ae8d6ec6.39e21","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2313.293930053711,"y":828.4881381988525,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3eceba12.f5d206","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name=\"tmp.l3networkUpdate\" value=\"1\" />\n","comments":"","x":2005.543643951416,"y":1525.7023010253906,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9f8d35e4.e55ae8","type":"switchNode","name":"switch: tmp.start-address-match = 0","xml":"<switch test=\"`$tmp.start-address-match == 0`\">","comments":"","outputs":1,"x":693.8650512695312,"y":1831.6666650772095,"z":"b24c83f7.abbc6","wires":[["e08b1d05.35c67"]]},{"id":"b390fee8.578a3","type":"set","name":"set tmp.start-address-match = 1","xml":"<set>\n<parameter name='tmp.start-address-match' value='1' />\n","comments":"","x":1557.3650588989258,"y":1776.9166612625122,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"50318e70.387a9","type":"save","name":"delete relationship: vpn_binding","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\tAND related-to = vpn-binding\" >","comments":"","outputs":1,"x":764.8055114746094,"y":2315.0001096725464,"z":"b24c83f7.abbc6","wires":[["30ff2667.471baa"]]},{"id":"c4f81359.003b8","type":"for","name":"for loop i - PRELOAD vpn-bindings","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.vpn-bindings_length`\">\n","comments":"","outputs":1,"x":862.5317022535537,"y":2543.666758219401,"z":"b24c83f7.abbc6","wires":[["7c3e0805.40af68"]]},{"id":"7c3e0805.40af68","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1101.309480879042,"y":2543.9167601267495,"z":"b24c83f7.abbc6","wires":[["678f44ab.ea50ac","1598e5df.565bea","36a2784d.cf59e8","236011f6.f5e4be"]]},{"id":"d17665c3.e234d8","type":"save","name":"save relationship: vpn_bindings","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.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=\"`$tmp.vpn-binding-id`\" />","comments":"","outputs":1,"x":1557.5039176940918,"y":2921.8888416290283,"z":"b24c83f7.abbc6","wires":[["cc145aed.800d88","e2c85fda.7c9cd","49306a1.5c79894"]]},{"id":"a47b8b14.1829d8","type":"switchNode","name":"switch ... PRELOAD vpn-bindings[]","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings_length`\">","comments":"","outputs":1,"x":862.9091453552246,"y":2500.248071670532,"z":"b24c83f7.abbc6","wires":[["4801868f.077cf8"]]},{"id":"4801868f.077cf8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1089.3535957336426,"y":2500.0258073806763,"z":"b24c83f7.abbc6","wires":[["a35d2b.e1e2b2d8"]]},{"id":"a35d2b.e1e2b2d8","type":"set","name":"set vpn-bindings[] = 0","xml":"<set>\n<parameter name=\"preload-data.network-topology-information.vpn-bindings_length\" value=\"0\" />\n","comments":"","x":1277.90920469496,"y":2500.0258280436196,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"6940ee9d.942ff","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1604.0438635084365,"y":2637.5160624186196,"z":"b24c83f7.abbc6","wires":[["96fde5e9.4b32b8"]]},{"id":"96fde5e9.4b32b8","type":"save","name":"query AnAI - vpn-bindings","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target\" \n\t\tpfx=\"tmp.AnAI.vpn-binding\">","comments":"","outputs":1,"x":1808.5438596937393,"y":2637.266063372294,"z":"b24c83f7.abbc6","wires":[["3c316751.c18568","f1e8d85f.221188","804fc820.1767b8"]]},{"id":"3c316751.c18568","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2016.293897840712,"y":2684.766030947367,"z":"b24c83f7.abbc6","wires":[["30521316.33fc5c"]]},{"id":"f1e8d85f.221188","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2021.7939016554092,"y":2637.266029993693,"z":"b24c83f7.abbc6","wires":[["30521316.33fc5c"]]},{"id":"30521316.33fc5c","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2169.293901655409,"y":2684.5160319010415,"z":"b24c83f7.abbc6","wires":[["c83277b8.bca398","69801ad3.b07ae4"]]},{"id":"c83277b8.bca398","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=\"`'Failed to query vpn-bindings n AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`\"/>","comments":"","x":2410.3934423658584,"y":2684.265930811564,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"678f44ab.ea50ac","type":"switchNode","name":"switch: PRELOAD vpn-binding-id","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\">","comments":"","outputs":1,"x":1346.7938673231338,"y":2591.7660023371377,"z":"b24c83f7.abbc6","wires":[["49c99c5d.db6104"]]},{"id":"49c99c5d.db6104","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1567.2938749525283,"y":2591.516003290812,"z":"b24c83f7.abbc6","wires":[["dc650ff6.6a37a"]]},{"id":"dc650ff6.6a37a","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`\" />\n","comments":"","x":1762.7938749525283,"y":2591.5160042444863,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"804fc820.1767b8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2021.7107429504395,"y":2785.932608604431,"z":"b24c83f7.abbc6","wires":[["d43a1da1.801f4"]]},{"id":"d43a1da1.801f4","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$tmp.AnAI.vpn-binding.vpn-id`\" />\n","comments":"","x":2212.2107429504395,"y":2785.932608604431,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cc145aed.800d88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1817.5767936706543,"y":2921.3644285202026,"z":"b24c83f7.abbc6","wires":[["bd84c069.9f407"]]},{"id":"bd84c069.9f407","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1974.4696731567383,"y":2921.000535964966,"z":"b24c83f7.abbc6","wires":[["d0bc0241.16643","67a32bcf.a45a94","d62cda9.c225228"]]},{"id":"d0bc0241.16643","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 l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.vpn-binding-id`\"/>","comments":"","x":2194.5692138671875,"y":2920.7504348754883,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"d8a1ae30.7e241","type":"switchNode","name":"switch: tmp.vpn-binding-id != NULL","xml":"<switch test=\"`$tmp.vpn-binding-id != ''`\">","comments":"","outputs":1,"x":1387.5438346862793,"y":2816.9325428009033,"z":"b24c83f7.abbc6","wires":[["35e2cab.1320636"]]},{"id":"35e2cab.1320636","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1609.7938385009766,"y":2816.9325428009033,"z":"b24c83f7.abbc6","wires":[["d17665c3.e234d8"]]},{"id":"9dcafbd2.180118","type":"switchNode","name":"switch ... PRELOAD network-policy[]","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy_length`\">","comments":"","outputs":1,"x":815.2102928161621,"y":3497.8329753875732,"z":"b24c83f7.abbc6","wires":[["9a549469.8cf168"]]},{"id":"9a549469.8cf168","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1044.65474319458,"y":3497.6107110977173,"z":"b24c83f7.abbc6","wires":[["626b2924.e714b8"]]},{"id":"626b2924.e714b8","type":"set","name":"set network-policy[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />\n","comments":"","x":1239.2103521558975,"y":3497.6107317606607,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"f4907fd3.a65","type":"for","name":"for loop i - PRELOAD network-policy","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.network-policy_length`\">\n","comments":"","outputs":1,"x":814.567554473877,"y":3543.404366493225,"z":"b24c83f7.abbc6","wires":[["c8c91878.a06a48"]]},{"id":"74c62ee.c142ad","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.network-policy.network-policy-id`\" />","comments":"","outputs":1,"x":2095.9804649353027,"y":3742.5910663604736,"z":"b24c83f7.abbc6","wires":[["961c1793.845838","cd9366f0.221d18","c3c189a0.4ccb58"]]},{"id":"c8c91878.a06a48","type":"switchNode","name":"switch: PRELOAD network-policy-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != NULL`\">","comments":"","outputs":1,"x":1173.0797521803115,"y":3543.5036207834873,"z":"b24c83f7.abbc6","wires":[["b83dfff2.e2be5"]]},{"id":"b83dfff2.e2be5","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1453.8297521803115,"y":3543.7536207834873,"z":"b24c83f7.abbc6","wires":[["72405702.54bef8"]]},{"id":"72405702.54bef8","type":"save","name":"query AnAI - network-policy","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn\" \n\t\tpfx=\"tmp.AnAI.network-policy\" >","comments":"","outputs":1,"x":1653.8297882080078,"y":3543.753540992737,"z":"b24c83f7.abbc6","wires":[["9106f450.700d08","d7e04886.f0b1b8","38bde268.aac7fe"]]},{"id":"9106f450.700d08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1865.8298204210068,"y":3584.503463109335,"z":"b24c83f7.abbc6","wires":[["8bf9d679.d0ee98"]]},{"id":"d7e04886.f0b1b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1871.329824235704,"y":3544.0034621556606,"z":"b24c83f7.abbc6","wires":[["8bf9d679.d0ee98"]]},{"id":"8bf9d679.d0ee98","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2020.829824235704,"y":3584.2534640630092,"z":"b24c83f7.abbc6","wires":[["e5a86167.920af","338842a2.95efee"]]},{"id":"e5a86167.920af","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=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":2236.9293649461533,"y":3584.0033629735317,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"961c1793.845838","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2322.0533409118652,"y":3742.066653251648,"z":"b24c83f7.abbc6","wires":[["9f43abef.bd4728"]]},{"id":"9f43abef.bd4728","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2462.946220397949,"y":3741.702760696411,"z":"b24c83f7.abbc6","wires":[["d2d1e07.7cfa32","133667f2.eb77f8"]]},{"id":"d2d1e07.7cfa32","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 l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`\"/>","comments":"","x":2694.0457611083984,"y":3741.4526596069336,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"85ca29b3.1bb488","type":"save","name":"delete relationship: network-policy","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t AND related-to = network-policy\" >","comments":"","outputs":1,"x":747.372989654541,"y":3271.769684076309,"z":"b24c83f7.abbc6","wires":[["e8183966.f88478"]]},{"id":"754d89e8.1de998","type":"set","name":"set tmp.local.network-id","xml":"<set>\n<parameter name=\"tmp.local.network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n","comments":"","x":1350.7499885559082,"y":2012.642957687378,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"7ffa62de.33fecc","type":"comment","name":"query l3-network gets all the subnets and relationships for free","info":"","comments":"","x":1084.7022819519043,"y":164.40476989746094,"z":"b24c83f7.abbc6","wires":[]},{"id":"1598e5df.565bea","type":"switchNode","name":"switch: PRELOAD route-target != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`\" >","comments":"","outputs":1,"x":1368.130941602919,"y":2637.071567217509,"z":"b24c83f7.abbc6","wires":[["6940ee9d.942ff"]]},{"id":"34af06b5.07d33a","type":"set","name":"initialize tmp variables, x, tmp.error-message, tmp.l3networkUpdate, execute_failure","xml":"<set>\n\t<parameter name='x' value='0' />\n\t<parameter name='tmp.error-message' value='' />\n\t<parameter name='execute_failure' value='false' />\n\t<parameter name='tmp.l3networkUpdate' value='0' />","comments":"","x":617.3453178405762,"y":428.8214406967163,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e9310489.7af568","type":"switchNode","name":"switch: AnAI-k == tmp.return.generate.gateway-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $tmp.return.generate.gateway-address`\">","comments":"","outputs":1,"x":2155.7498893737793,"y":588.8214159011841,"z":"b24c83f7.abbc6","wires":[["fd638c90.7772"]]},{"id":"fd638c90.7772","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2440.3215827941895,"y":588.2857179641724,"z":"b24c83f7.abbc6","wires":[["8a95056c.8243a8"]]},{"id":"8a95056c.8243a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2585.0000495910645,"y":588.7222108840942,"z":"b24c83f7.abbc6","wires":[["66b36d53.f585d4","9d0c9a84.7d8738"]]},{"id":"1bcbd50a.81742b","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2045.7501602172852,"y":829.2222023010254,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]},{"id":"ca9a6174.d3216","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2045.0001602172852,"y":876.222204208374,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]},{"id":"292eb234.c8484e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2044.5001602172852,"y":924.4722051620483,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]},{"id":"38bde268.aac7fe","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1870.595417022705,"y":3742.094934463501,"z":"b24c83f7.abbc6","wires":[["74c62ee.c142ad"]]},{"id":"36a2784d.cf59e8","type":"set","name":"unset tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"\" />\n","comments":"","x":1320.9166776869033,"y":2544.0001236597695,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"30ff2667.471baa","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":996.0833282470703,"y":2314.5833377838135,"z":"b24c83f7.abbc6","wires":[["e69d9ede.c998c"]]},{"id":"e69d9ede.c998c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1155.8201026916504,"y":2315.2746753692627,"z":"b24c83f7.abbc6","wires":[["7c0a1390.80c06c","2f44a8dd.3b2668"]]},{"id":"7c0a1390.80c06c","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 deleting l3-network vpn-binding relationship from AnAI\"/>","comments":"","x":1374.500072479248,"y":2315.5835123062134,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e8183966.f88478","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":971.5079612731934,"y":3271.3528950214386,"z":"b24c83f7.abbc6","wires":[["fc52b15.447615"]]},{"id":"fc52b15.447615","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1148.2447357177734,"y":3271.044232606888,"z":"b24c83f7.abbc6","wires":[["18b5ade9.0299e2","8aeb103.23b59f"]]},{"id":"18b5ade9.0299e2","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 deleting l3-network network-policy relationship from AnAI in preparation to regenerate the network-policy relationship from PRELOAD.\"/>","comments":"","x":1372.2579612731934,"y":3271.3528950214386,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"28badb43.5ee5d4","type":"switchNode","name":"switch : tmp.l3network.status.updated = 1","xml":"<switch test=\"`$tmp.l3network.status.updated == 1`\">\n","comments":"","outputs":1,"x":764.6190795898438,"y":5976.534414291382,"z":"b24c83f7.abbc6","wires":[["d6b5f392.672a4"]]},{"id":"d6b5f392.672a4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1017.2857131958008,"y":5976.812002182007,"z":"b24c83f7.abbc6","wires":[["7d587fe3.3f132"]]},{"id":"7d8628e3.bfb0d8","type":"set","name":"set tmp.l3network.status.updated = 1","xml":"<set>\n<parameter name='tmp.l3network.status.updated' value='1' />\n","comments":"","x":1527.988193511963,"y":4767.8097858428955,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"b3df03dc.e1fb8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1275.9168281555176,"y":4768.083599090576,"z":"b24c83f7.abbc6","wires":[["7d8628e3.bfb0d8"]]},{"id":"f2214172.a1643","type":"for","name":"for loop z - tmp.AnAI.l3network.relationship-list.relationship[]","xml":"<for index=\"z\" start=\"0\" end=\"`$tmp.AnAI.l3network.relationship-list.relationship_length`\">\n","comments":"","outputs":1,"x":824.3810005187988,"y":4983.3337116241455,"z":"b24c83f7.abbc6","wires":[["40b39fed.993b8"]]},{"id":"40b39fed.993b8","type":"switchNode","name":"switch: relationship[].related-to","xml":"<switch test=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].related-to`\">","comments":"","outputs":1,"x":901.1309394836426,"y":5074.583716392517,"z":"b24c83f7.abbc6","wires":[["445af20b.efd5dc","7e1ce913.d1ada8","63a30c32.764734"]]},{"id":"445af20b.efd5dc","type":"other","name":"vpn-binding","xml":"<outcome value='vpn-binding'>\n","comments":"","outputs":1,"x":1130.6309394836426,"y":5074.833716392517,"z":"b24c83f7.abbc6","wires":[["3307d5fd.2423fa"]]},{"id":"fb5a4fe8.b156b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":491.38093185424805,"y":4982.8337116241455,"z":"b24c83f7.abbc6","wires":[["f2214172.a1643","30cb9475.50352c","28badb43.5ee5d4","da60e97d.0ede68"]]},{"id":"befdd7ed.7d6be8","type":"save","name":"Rollback to save relationship: vpn_binding","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.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=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":1294.21431350708,"y":5133.833827018738,"z":"b24c83f7.abbc6","wires":[["a9924139.29c5e","d4b57fb0.f24f4"]]},{"id":"a9924139.29c5e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1547.2871894836426,"y":5133.309413909912,"z":"b24c83f7.abbc6","wires":[["3a4aef64.3150d"]]},{"id":"3a4aef64.3150d","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1787.2795906066895,"y":5132.695249557495,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9cd29c09.984bd","type":"set","name":"set tmp.network-policy.updated = 1","xml":"<set>\n<parameter name='tmp.network-policy.updated' value='1' />\n","comments":"","x":2567.38090133667,"y":3832.2736530303955,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"e0cc74f6.cef2e8","type":"set","name":"set tmp.vpn-binding.updated = 1","xml":"<set>\n<parameter name='tmp.vpn-binding.updated' value='1' />\n","comments":"","x":2044.4286079406738,"y":3063.916700363159,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cd9366f0.221d18","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2328.63090133667,"y":3832.5236530303955,"z":"b24c83f7.abbc6","wires":[["9cd29c09.984bd"]]},{"id":"e2c85fda.7c9cd","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1820.6786003112793,"y":3063.916700363159,"z":"b24c83f7.abbc6","wires":[["e0cc74f6.cef2e8"]]},{"id":"7e1ce913.d1ada8","type":"other","name":"network-policy","xml":"<outcome value='network-policy'>\n","comments":"","outputs":1,"x":1141.583209991455,"y":5223.654871940613,"z":"b24c83f7.abbc6","wires":[["163697ef.53ddb8"]]},{"id":"a1822be9.e1be18","type":"save","name":"Rollback to save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":1309.16646194458,"y":5282.988368034363,"z":"b24c83f7.abbc6","wires":[["cde96a1a.b38188","c5b6850b.08be08"]]},{"id":"cde96a1a.b38188","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1569.2393379211426,"y":5282.463954925537,"z":"b24c83f7.abbc6","wires":[["de78af5a.c6912"]]},{"id":"de78af5a.c6912","type":"set","name":"tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1785.2316627502441,"y":5282.849543571472,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"163697ef.53ddb8","type":"switchNode","name":"switch: tmp.network-policy.updated == 1","xml":"<switch test=\"`$tmp.network-policy.updated == 1`\">","comments":"","outputs":1,"x":1412.9166984558105,"y":5223.655074119568,"z":"b24c83f7.abbc6","wires":[["7a01074a.f70308"]]},{"id":"3307d5fd.2423fa","type":"switchNode","name":"switch: tmp.vpn-binding.updated == 1","xml":"<switch test=\"`$tmp.vpn-binding.updated == 1`\">","comments":"","outputs":1,"x":1372.916706085205,"y":5074.655116081238,"z":"b24c83f7.abbc6","wires":[["462a22ce.3cdbbc"]]},{"id":"462a22ce.3cdbbc","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1606.916706085205,"y":5074.655116081238,"z":"b24c83f7.abbc6","wires":[["befdd7ed.7d6be8"]]},{"id":"7a01074a.f70308","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1657.916706085205,"y":5223.655116081238,"z":"b24c83f7.abbc6","wires":[["a1822be9.e1be18"]]},{"id":"70aa977b.fe30d8","type":"for","name":"for loop i - tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":1018.5593681335449,"y":5636.50013256073,"z":"b24c83f7.abbc6","wires":[["e51d6a24.425c98"]]},{"id":"56134ac0.df0084","type":"switchNode","name":"switch: tmp.subnetRollback[].type","xml":"<switch test=\"`$tmp.subnetRollback[$j].type`\">","comments":"","outputs":1,"x":1265.3325576782227,"y":5719.288496017456,"z":"b24c83f7.abbc6","wires":[["cab697cd.251568","d0693ac4.d5ac18"]]},{"id":"cab697cd.251568","type":"outcomeTrue","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":1504.0470352172852,"y":5719.137134552002,"z":"b24c83f7.abbc6","wires":[["74fc00ec.dc13f"]]},{"id":"d0693ac4.d5ac18","type":"outcomeTrue","name":"update","xml":"<outcome value='update'>\n","comments":"","outputs":1,"x":1505.6183624267578,"y":5764.709531784058,"z":"b24c83f7.abbc6","wires":[["32bdc1c1.96f2ee"]]},{"id":"74fc00ec.dc13f","type":"save","name":"Rollback AnAI delete - l3network.subnets.subnet","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id\" >\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\" />\n\t\t","comments":"","outputs":1,"x":1786.475700378418,"y":5718.710096359253,"z":"b24c83f7.abbc6","wires":[["d50c1822.8cb098","ad551bbf.58fcc8"]]},{"id":"76cbcff8.a7aa9","type":"outcomeTrue","name":"create","xml":"<outcome value='create'>\n","comments":"","outputs":1,"x":1657.0249366760254,"y":5868.8378829956055,"z":"b24c83f7.abbc6","wires":[["5e8f2f9e.a1436"]]},{"id":"5e8f2f9e.a1436","type":"delete","name":"Rollback AnAI create - l3-network.subnets.subnet","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id\" >","comments":"","outputs":1,"x":1943.310344696045,"y":5867.815706253052,"z":"b24c83f7.abbc6","wires":[["eb93aa28.0b07f8","c1cf86f2.493818"]]},{"id":"30cb9475.50352c","type":"for","name":"for loop j - subnetRollback[]","xml":"<for index=\"j\" start=\"0\" end=\"`$x`\">\n","comments":"","outputs":1,"x":728.845157623291,"y":5525.070099830627,"z":"b24c83f7.abbc6","wires":[["dad835c6.d0c618"]]},{"id":"e51d6a24.425c98","type":"switchNode","name":"switch: subnet-id tmp.AnAI.l3network.subnets.subnet[] == tmp.subnetRollback[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-id == $tmp.subnetRollback[$j].subnet-id`\">","comments":"","outputs":1,"x":1521.5595359802246,"y":5636.785568237305,"z":"b24c83f7.abbc6","wires":[["f63c8882.16f8c8"]]},{"id":"f63c8882.16f8c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1899.2739334106445,"y":5637.213930130005,"z":"b24c83f7.abbc6","wires":[["7bc44cc3.686514"]]},{"id":"32bdc1c1.96f2ee","type":"save","name":"rollback AnAI update - l3-network.subnets.subnet ","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$j].subnet-id\" >\n<parameter name=\"subnet-name\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name`\"/>\n<parameter name=\"gateway-address\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].gateway-address`\"/>\n<parameter name=\"cidr-mask\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].cidr-mask`\"/>\n<parameter name=\"dhcp-start\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-start`\"/>\n<parameter name=\"dhcp-end\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-end`\"/>\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-enabled`\"/>\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\" />\n\t\t","comments":"","outputs":1,"x":1788.274269104004,"y":5764.070308685303,"z":"b24c83f7.abbc6","wires":[["1f2ad8bc.a55ac7","e61b880e.096858"]]},{"id":"90858a29.37fc08","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2039.7500114440918,"y":467.30952644348145,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"2e3c7ba2.d21b54","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1703.5237846374512,"y":4707.786193847656,"z":"b24c83f7.abbc6","wires":[]},{"id":"8ecdb1d7.aea0c","type":"outcomeTrue","name":"true","xml":"<outcome value=\"true\">","outputs":1,"x":626.4760551452637,"y":4866.821534156799,"z":"b24c83f7.abbc6","wires":[["fb5a4fe8.b156b"]]},{"id":"59c57e09.0c9bd","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":420.53577041625977,"y":1611.0597400665283,"z":"b24c83f7.abbc6","wires":[["41ca0932.f48da8"]]},{"id":"41ca0932.f48da8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":623.2500190734863,"y":1611.059762954712,"z":"b24c83f7.abbc6","wires":[["99484323.6781e"]]},{"id":"15930eb5.9d2c61","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":822.3214836120605,"y":1218.0238513946533,"z":"b24c83f7.abbc6","wires":[["13aa477e.313a59"]]},{"id":"13aa477e.313a59","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1028.035732269287,"y":1218.023874282837,"z":"b24c83f7.abbc6","wires":[["4fd8628d.a08a8c"]]},{"id":"eea3a1e.e88116","type":"set","name":"set k, n max + 1","xml":"<set>\n\t<parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />\n\t<parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' />","comments":"","x":2009.035930633545,"y":1281.0239906311035,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"fcfd2600.488c78","type":"set","name":"set k, n max + 1","xml":"<set>\n\t<parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />\n\t<parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' />","comments":"","x":2495.2500495910645,"y":1026.416687965393,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"f15dac05.a23f","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":417.50002670288086,"y":2252.666706085205,"z":"b24c83f7.abbc6","wires":[["aae89695.f77e48"]]},{"id":"aae89695.f77e48","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":620.2142753601074,"y":2252.6667289733887,"z":"b24c83f7.abbc6","wires":[["ea36d758.4a9288"]]},{"id":"b16ab5f2.35a148","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":419.91669845581055,"y":4867.2497272491455,"z":"b24c83f7.abbc6","wires":[["8ecdb1d7.aea0c"]]},{"id":"bb8ce764.d17888","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":426.8452568054199,"y":4584.21407699585,"z":"b24c83f7.abbc6","wires":[["4b1ed48a.23e81c"]]},{"id":"4b1ed48a.23e81c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":629.5595054626465,"y":4584.214099884033,"z":"b24c83f7.abbc6","wires":[["80e7eee4.21ab2"]]},{"id":"c10e73d.da8889","type":"switchNode","name":"switch: texecute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":441.80556869506836,"y":3195.333309173584,"z":"b24c83f7.abbc6","wires":[["452cff0a.34b71"]]},{"id":"452cff0a.34b71","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":644.5198173522949,"y":3195.3333320617676,"z":"b24c83f7.abbc6","wires":[["70d1080b.b08868"]]},{"id":"6f14f693.d5a4e8","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":748.750057220459,"y":2416.8331909179688,"z":"b24c83f7.abbc6","wires":[["4f7b45c9.8320cc"]]},{"id":"4f7b45c9.8320cc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":951.4643058776855,"y":2416.8332138061523,"z":"b24c83f7.abbc6","wires":[["1cdf3f9f.d8ad9"]]},{"id":"1cdf3f9f.d8ad9","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":575.4166831970215,"y":2500.1666870117188,"z":"b24c83f7.abbc6","wires":[["a47b8b14.1829d8","c4f81359.003b8"]]},{"id":"2f44a8dd.3b2668","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1379.3213157653809,"y":2357.7857484817505,"z":"b24c83f7.abbc6","wires":[]},{"id":"69801ad3.b07ae4","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2416.083438873291,"y":2728.4998531341553,"z":"b24c83f7.abbc6","wires":[]},{"id":"236011f6.f5e4be","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":1326.7500114440918,"y":2731.1666736602783,"z":"b24c83f7.abbc6","wires":[["a714abe2.f5c9e8"]]},{"id":"a714abe2.f5c9e8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1529.4642601013184,"y":2731.166696548462,"z":"b24c83f7.abbc6","wires":[["d8a1ae30.7e241"]]},{"id":"67a32bcf.a45a94","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2201.1783409118652,"y":3006.547595977783,"z":"b24c83f7.abbc6","wires":[]},{"id":"d62cda9.c225228","type":"set","name":"set i = max + 1","xml":"<set>\n <parameter name=\"i\" value = \"`$preload-data.network-topology-information.vpn-bindings_length + 1`\" />\n\n","comments":"","x":2168.321300506592,"y":2963.452346801758,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"67e9507e.488ea","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":722.6388664245605,"y":3411.7224493026733,"z":"b24c83f7.abbc6","wires":[["24fa2743.255dc8"]]},{"id":"24fa2743.255dc8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":925.3531150817871,"y":3411.722472190857,"z":"b24c83f7.abbc6","wires":[["abcc1298.8b121"]]},{"id":"abcc1298.8b121","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":551.5277671813965,"y":3498.1664628982544,"z":"b24c83f7.abbc6","wires":[["9dcafbd2.180118","f4907fd3.a65"]]},{"id":"8aeb103.23b59f","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1377.8608665466309,"y":3317.5153970718384,"z":"b24c83f7.abbc6","wires":[]},{"id":"338842a2.95efee","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2245.4166526794434,"y":3628.166793823242,"z":"b24c83f7.abbc6","wires":[]},{"id":"133667f2.eb77f8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2704.7027473449707,"y":3785.4525051116943,"z":"b24c83f7.abbc6","wires":[]},{"id":"9d0c9a84.7d8738","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2812.464214324951,"y":697.5952434539795,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"9e7603e8.19f05","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2322.178722381592,"y":693.7380847930908,"z":"b24c83f7.abbc6","wires":[["17af6854.693e78"]]},{"id":"17af6854.693e78","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.network-topology-information.subnets[$n].gateway-address`\" />\n","comments":"","x":2518.035655975342,"y":693.8809680938721,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"dad835c6.d0c618","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":728.4644050598145,"y":5585.832514762878,"z":"b24c83f7.abbc6","wires":[["70aa977b.fe30d8","e3487ebb.a5939","153987c7.1a4048"]]},{"id":"f6fe6422.4322c8","type":"set","name":"set: tmp.rollbck.match = 1","xml":"<set>\n\t<parameter name=\"tmp.rollback.match\" value=\"1\"/>","comments":"","x":1242.6072006225586,"y":5804.118718147278,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"7bc44cc3.686514","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":996.6070785522461,"y":5719.1187171936035,"z":"b24c83f7.abbc6","wires":[["56134ac0.df0084","f6fe6422.4322c8"]]},{"id":"e3487ebb.a5939","type":"switchNode","name":"switch: tmp.rollback.match == 0","xml":"<switch test=\"`$tmp.rollback.match == 0`\">","comments":"","outputs":1,"x":970.8927803039551,"y":5869.405124664307,"z":"b24c83f7.abbc6","wires":[["97427759.0023b8"]]},{"id":"44553355.40997c","type":"switchNode","name":"switch: tmp.subnetRollback[].type","xml":"<switch test=\"`$tmp.subnetRollback[$j].type`\">","comments":"","outputs":1,"x":1423.607120513916,"y":5868.690284729004,"z":"b24c83f7.abbc6","wires":[["76cbcff8.a7aa9"]]},{"id":"d50c1822.8cb098","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2076.3214721679688,"y":5718.976065635681,"z":"b24c83f7.abbc6","wires":[["abd6e5ca.0f7378"]]},{"id":"abd6e5ca.0f7378","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback the subnet.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":2341.3138847351074,"y":5718.36167049408,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"a1bcb891.4f80b8","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback the subnet attributes update in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":2344.1787719726562,"y":5763.833457946777,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"602727b5.9746c8","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback to delete subnet from AnAI where subnet-id = ' + $tmp.subnetRollback[$j].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":2462.321430206299,"y":5867.9756507873535,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"1f2ad8bc.a55ac7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2076.3212890625,"y":5764.11878490448,"z":"b24c83f7.abbc6","wires":[["a1bcb891.4f80b8"]]},{"id":"eb93aa28.0b07f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2231.4643592834473,"y":5867.404291152954,"z":"b24c83f7.abbc6","wires":[["602727b5.9746c8"]]},{"id":"cdfeb5ff.d63b08","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback l3network.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1794.464267730713,"y":5975.404790878296,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"d11dd828.7802a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1556.6071968078613,"y":5975.8334312438965,"z":"b24c83f7.abbc6","wires":[["cdfeb5ff.d63b08"]]},{"id":"d02a826d.205fd","type":"comment","name":"---- ROLLBACK STARTS HERE ----","info":"","comments":"","x":484.1071357727051,"y":4820.047375679016,"z":"b24c83f7.abbc6","wires":[]},{"id":"ca78be2.35c6c4","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 new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`\"/>","comments":"","x":2037.1785850524902,"y":2146.595244407654,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"1623f021.c2b9","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 updating subnet status to pending-delete in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>","comments":"","x":2030.3214073181152,"y":1323.7380981445312,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"5d6b7d0.b989584","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 updating subnet attributes in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>","comments":"","x":2519.464366912842,"y":1069.880968093872,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"153987c7.1a4048","type":"set","name":"set: tmp.rollbck.match = 0","xml":"<set>\n\t<parameter name=\"tmp.rollback.match\" value=\"0\"/>","comments":"","x":950.8928108215332,"y":5586.119483947754,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"92778af8.befa68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1643.0358047485352,"y":2149.9285049438477,"z":"b24c83f7.abbc6","wires":[["8dabdae5.57ab58"]]},{"id":"150db709.87fab9","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1612.1785697937012,"y":1325.3571643829346,"z":"b24c83f7.abbc6","wires":[["c6b0d6cd.d0a058"]]},{"id":"c9c8378e.07a4c8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2135.8928031921387,"y":1069.928575515747,"z":"b24c83f7.abbc6","wires":[["cd77a967.3c6308"]]},{"id":"49306a1.5c79894","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1826.6071586608887,"y":2964.214220046997,"z":"b24c83f7.abbc6","wires":[["bd84c069.9f407"]]},{"id":"c3c189a0.4ccb58","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2330.6071586608887,"y":3788.071397781372,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"40f41704.9cc688","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1280.1071510314941,"y":4706.237885475159,"z":"b24c83f7.abbc6","wires":[["b682bac.b292748"]]},{"id":"10056ed4.c3d191","type":"switchNode","name":"switch: AnAI == INPUT - network-name","xml":"<switch test=\"`$tmp.AnAI.l3network.network-name == $network-topology-operation-input.network-request-information.network-name`\">","comments":"","outputs":1,"x":482.1785697937012,"y":250.93650436401367,"z":"b24c83f7.abbc6","wires":[["9ed8a698.ef15c8"]]},{"id":"9ed8a698.ef15c8","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":729.4285697937012,"y":250.94050121307373,"z":"b24c83f7.abbc6","wires":[["669252c9.4ba83c"]]},{"id":"669252c9.4ba83c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'The input network-name,' + network-topology-operation-input.network-request-information.network-name + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":892.0673446655273,"y":250.82948875427246,"z":"b24c83f7.abbc6","wires":[]},{"id":"b4cd1414.581b48","type":"switchNode","name":"switch: AnAI == INPUT - network-type","xml":"<switch test=\"`$tmp.AnAI.l3network.network-type == $network-topology-operation-input.network-request-information.network-type`\">","comments":"","outputs":1,"x":475.892822265625,"y":294.22220611572266,"z":"b24c83f7.abbc6","wires":[["4ad1dbfd.e57f94"]]},{"id":"4ad1dbfd.e57f94","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":730.142822265625,"y":294.2262029647827,"z":"b24c83f7.abbc6","wires":[["3522894b.36b6e6"]]},{"id":"3522894b.36b6e6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'The input network-type,' + network-topology-operation-input.network-request-information.network-type + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":892.7815971374512,"y":294.11519050598145,"z":"b24c83f7.abbc6","wires":[]},{"id":"e456340c.466478","type":"switchNode","name":"switch: AnAI == PRELOAD - network-type","xml":"<switch test=\"`$tmp.AnAI.l3network.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`\">","comments":"","outputs":1,"x":491.0357475280762,"y":384.22219944000244,"z":"b24c83f7.abbc6","wires":[["9cd473e1.2c58a"]]},{"id":"9cd473e1.2c58a","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":747.2857475280762,"y":384.2261962890625,"z":"b24c83f7.abbc6","wires":[["6893351b.74b03c"]]},{"id":"6893351b.74b03c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'No preload network found with network-type = ' + $tmp.AnAI.l3network.network-type + ' in SDNC'`\" />","comments":"","x":909.9245223999023,"y":384.11518383026123,"z":"b24c83f7.abbc6","wires":[]},{"id":"97427759.0023b8","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1190.7143287658691,"y":5869.460375785828,"z":"b24c83f7.abbc6","wires":[["44553355.40997c"]]},{"id":"c5b6850b.08be08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1577.4998817443848,"y":5322.082991600037,"z":"b24c83f7.abbc6","wires":[["de78af5a.c6912"]]},{"id":"d4b57fb0.f24f4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1554.4998817443848,"y":5173.749495506287,"z":"b24c83f7.abbc6","wires":[["3a4aef64.3150d"]]},{"id":"ad551bbf.58fcc8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2084.333240509033,"y":5673.749419212341,"z":"b24c83f7.abbc6","wires":[["abd6e5ca.0f7378"]]},{"id":"e61b880e.096858","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2083.9998664855957,"y":5809.082915306091,"z":"b24c83f7.abbc6","wires":[["a1bcb891.4f80b8"]]},{"id":"c1cf86f2.493818","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2239.999988555908,"y":5909.749419212341,"z":"b24c83f7.abbc6","wires":[["602727b5.9746c8"]]},{"id":"81ba8fb7.9e498","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1564.3332405090332,"y":6018.082915306091,"z":"b24c83f7.abbc6","wires":[["cdfeb5ff.d63b08"]]},{"id":"eca5ffa4.23d73","type":"switchNode","name":"switch ... tmp.AnAI.l3network.subnets.subnet[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":499.1785697937012,"y":470.35716438293457,"z":"b24c83f7.abbc6","wires":[["48a25cc2.387cb4"]]},{"id":"48a25cc2.387cb4","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":769.6230201721191,"y":470.1349000930786,"z":"b24c83f7.abbc6","wires":[["8ba49ed0.9ad3c"]]},{"id":"8ba49ed0.9ad3c","type":"set","name":"set tmp.AnAI.l3network.subnets.subnet[] = 0","xml":"<set>\n<parameter name=\"tmp.AnAI.l3network.subnets.subnet_length\" value=\"0\" />\n","comments":"","x":1027.1786291334365,"y":470.134920756022,"z":"b24c83f7.abbc6","wires":[]},{"id":"95ceb957.e7a948","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":463.0356864929199,"y":4019.404680252075,"z":"b24c83f7.abbc6","wires":[["c3dd4c7f.8ca1e","af6b3c9b.97c77"]]},{"id":"2d4379bf.6ca416","type":"switchNode","name":"switch ... PRELOAD route-table-reference[]","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference_length`\">","comments":"","outputs":1,"x":837.8372917175293,"y":4245.277545928955,"z":"b24c83f7.abbc6","wires":[["7688d6b7.3bce68"]]},{"id":"7688d6b7.3bce68","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1094.5317192077637,"y":4245.0550355911255,"z":"b24c83f7.abbc6","wires":[["26a757db.f17628"]]},{"id":"26a757db.f17628","type":"set","name":"set route-table-reference[] = 0","xml":"<set>\n<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />\n","comments":"","x":1309.087328169081,"y":4245.055056254068,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"3fbe4ceb.b0e5e4","type":"for","name":"for loop i - PRELOAD route-table-reference","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.network-topology-information.route-table-reference_length`\">\n","comments":"","outputs":1,"x":837.4445457458496,"y":4290.848835945129,"z":"b24c83f7.abbc6","wires":[["6b695bb.39906a4"]]},{"id":"e761c57c.044408","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.route-table-reference.route-table-reference-id`\" />","comments":"","outputs":1,"x":2229.8574409484863,"y":4490.035390853882,"z":"b24c83f7.abbc6","wires":[["5628f36a.55c77c","a92d1865.c2b648","3e5fe722.9f7198"]]},{"id":"6b695bb.39906a4","type":"switchNode","name":"switch: PRELOAD route-table-reference-fqdn != NULL","xml":"<switch test=\"`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != NULL`\">","comments":"","outputs":1,"x":1248.2067527770996,"y":4290.947957038879,"z":"b24c83f7.abbc6","wires":[["8696f734.56d0f8"]]},{"id":"8696f734.56d0f8","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1533.9567604064941,"y":4291.197957038879,"z":"b24c83f7.abbc6","wires":[["c3ff1f7e.223f6"]]},{"id":"c3ff1f7e.223f6","type":"save","name":"query AnAI - route-table-reference","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"route-table-reference\" \n\t\tkey=\"route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn\" \n\t\tpfx=\"tmp.AnAI.route-table-reference\">","comments":"","outputs":1,"x":1760.7067642211914,"y":4291.197865486145,"z":"b24c83f7.abbc6","wires":[["c5a368f6.5d1388","4611ee89.1d504","1c257c97.0acec3"]]},{"id":"c5a368f6.5d1388","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1999.7067964341904,"y":4331.947787602743,"z":"b24c83f7.abbc6","wires":[["c1256682.7b8998"]]},{"id":"4611ee89.1d504","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2005.2068002488877,"y":4291.447786649069,"z":"b24c83f7.abbc6","wires":[["c1256682.7b8998"]]},{"id":"c1256682.7b8998","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2154.7068002488877,"y":4331.697788556417,"z":"b24c83f7.abbc6","wires":[["daaddd41.3513f","dabc25b1.2558b8"]]},{"id":"daaddd41.3513f","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=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":2370.806340959337,"y":4331.44768746694,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"5628f36a.55c77c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2455.930316925049,"y":4489.510977745056,"z":"b24c83f7.abbc6","wires":[["e1c99ca6.e00f4"]]},{"id":"e1c99ca6.e00f4","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2596.823196411133,"y":4489.147085189819,"z":"b24c83f7.abbc6","wires":[["e0fe20d7.e6c28","6b785063.e94b4"]]},{"id":"e0fe20d7.e6c28","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 l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`\"/>","comments":"","x":2827.922737121582,"y":4488.896984100342,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"c3dd4c7f.8ca1e","type":"save","name":"delete relationship: route-table-reference","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t AND related-to = route-table-reference\" >","comments":"","outputs":1,"x":751.2499656677246,"y":4019.2140085697174,"z":"b24c83f7.abbc6","wires":[["593b5e06.7f9d3"]]},{"id":"1c257c97.0acec3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2004.4723930358887,"y":4489.539258956909,"z":"b24c83f7.abbc6","wires":[["e761c57c.044408"]]},{"id":"593b5e06.7f9d3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1044.384937286377,"y":4018.797219514847,"z":"b24c83f7.abbc6","wires":[["72f7191.61f2fe8"]]},{"id":"72f7191.61f2fe8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1221.121711730957,"y":4018.488557100296,"z":"b24c83f7.abbc6","wires":[["35c5090a.a6a506","9f95b6ef.410b58"]]},{"id":"35c5090a.a6a506","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 deleting l3-network route-table-reference relationship from AnAI prior to regenerate the route-table-reference relationship from PRELOAD.\"/>","comments":"","x":1445.134937286377,"y":4018.797219514847,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"b1f0d10d.9422f","type":"set","name":"set tmp.route-table-reference.updated = 1","xml":"<set>\n<parameter name='tmp.route-table-reference.updated' value='1' />\n","comments":"","x":2701.2578773498535,"y":4579.717977523804,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"a92d1865.c2b648","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2462.5078773498535,"y":4579.967977523804,"z":"b24c83f7.abbc6","wires":[["b1f0d10d.9422f"]]},{"id":"bd2d9b6e.b5c1d8","type":"switchNode","name":"switch: texecute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":441.6825370788574,"y":3942.777727127075,"z":"b24c83f7.abbc6","wires":[["3e54549b.21c4cc"]]},{"id":"3e54549b.21c4cc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":648.3967933654785,"y":3942.777656555176,"z":"b24c83f7.abbc6","wires":[["95ceb957.e7a948"]]},{"id":"af6b3c9b.97c77","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":726.5158424377441,"y":4159.1667737960815,"z":"b24c83f7.abbc6","wires":[["96f82eb1.4c085"]]},{"id":"96f82eb1.4c085","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":929.2300910949707,"y":4159.166796684265,"z":"b24c83f7.abbc6","wires":[["ab2bfb98.61b8f8"]]},{"id":"ab2bfb98.61b8f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":555.4047431945801,"y":4245.610787391663,"z":"b24c83f7.abbc6","wires":[["2d4379bf.6ca416","3fbe4ceb.b0e5e4"]]},{"id":"9f95b6ef.410b58","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1450.7378425598145,"y":4064.9597215652466,"z":"b24c83f7.abbc6","wires":[]},{"id":"dabc25b1.2558b8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2379.293628692627,"y":4375.61111831665,"z":"b24c83f7.abbc6","wires":[]},{"id":"6b785063.e94b4","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2838.5797233581543,"y":4532.8968296051025,"z":"b24c83f7.abbc6","wires":[]},{"id":"3e5fe722.9f7198","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2464.4841346740723,"y":4535.51572227478,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"63a30c32.764734","type":"other","name":"route-table-reference","xml":"<outcome value='route-table-reference'>\n","comments":"","outputs":1,"x":1136.785717010498,"y":5378.57142829895,"z":"b24c83f7.abbc6","wires":[["cb6e6d5b.fb8fc"]]},{"id":"e64e8959.22cce8","type":"save","name":"Rollback to save relationship: route-table-reference","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":1304.368968963623,"y":5437.9049243927,"z":"b24c83f7.abbc6","wires":[["daa92ca8.40a27","751ffeff.5a4d2"]]},{"id":"daa92ca8.40a27","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1564.4418449401855,"y":5437.3805112838745,"z":"b24c83f7.abbc6","wires":[["5bbb5aa9.dd0a84"]]},{"id":"5bbb5aa9.dd0a84","type":"set","name":"tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":1780.434169769287,"y":5437.76609992981,"z":"b24c83f7.abbc6","wires":[[]]},{"id":"cb6e6d5b.fb8fc","type":"switchNode","name":"switch: tmp.route-table-reference.updated == 1","xml":"<switch test=\"`$tmp.route-table-reference.updated == 1`\">","comments":"","outputs":1,"x":1408.1192054748535,"y":5378.571630477905,"z":"b24c83f7.abbc6","wires":[["43ccda4d.49fa94"]]},{"id":"43ccda4d.49fa94","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1653.119213104248,"y":5378.571672439575,"z":"b24c83f7.abbc6","wires":[["e64e8959.22cce8"]]},{"id":"751ffeff.5a4d2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1572.7023887634277,"y":5476.999547958374,"z":"b24c83f7.abbc6","wires":[["5bbb5aa9.dd0a84"]]},{"id":"ef8f189e.13e928","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-name == $preload-data.network-topology-information.subnets[$n].subnet-name`\">","comments":"","outputs":1,"x":1637.285717010498,"y":971.0714282989502,"z":"b24c83f7.abbc6","wires":[["abf8f55e.ce71d8"]]},{"id":"abf8f55e.ce71d8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1937.2022247314453,"y":970.7936429977417,"z":"b24c83f7.abbc6","wires":[["a89a0d2d.9ab2c"]]},{"id":"a89a0d2d.9ab2c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2075.3434448242188,"y":971.1691417694092,"z":"b24c83f7.abbc6","wires":[["ae8d6ec6.39e21"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-delete.json b/platform-logic/vnfapi/src/main/json/network-topology-delete.json
new file mode 100644
index 00000000..3c2ca1dd
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-delete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"9a85f16b.d93cd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1144,"y":667.2234153747559,"z":"78f26cc2.346884","wires":[["97b09ce.37e6a6","3e48845d.1dee8c","7a75947e.dc19cc"]]},{"id":"97b09ce.37e6a6","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":1376.1924362182617,"y":716.0835227966309,"z":"78f26cc2.346884","wires":[[]]},{"id":"3e48845d.1dee8c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"networkId\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1355.73929977417,"y":766.4465789794922,"z":"78f26cc2.346884","wires":[]},{"id":"7a75947e.dc19cc","type":"delete","name":"delete AnAI - l3-network","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >","comments":"","outputs":1,"x":1381.7546920776367,"y":668.0158958435059,"z":"78f26cc2.346884","wires":[[]]},{"id":"6426b1cc.4346d","type":"switchNode","name":"switch: INPUT network-id","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-id`\">","comments":"","outputs":1,"x":262.6510238647461,"y":236.66913223266602,"z":"78f26cc2.346884","wires":[["9751ef82.d9c77","bf204584.cdc938","1b3cf9d1.1a1ed6"]]},{"id":"7698e3d.ad1ef1c","type":"switchNode","name":"switch: INPUT network-name","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-name`\">","comments":"","outputs":1,"x":700.6512680053711,"y":410.12323570251465,"z":"78f26cc2.346884","wires":[["c217c4b3.588c08","5789e661.35e1f8"]]},{"id":"28116afa.ade786","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"DisconnectNetworkRequest requires network-id or network-name \"/>","comments":"","x":1085.651268005371,"y":409.12323570251465,"z":"78f26cc2.346884","wires":[]},{"id":"28abb006.b3f25","type":"get-resource","name":"get AnAI - l3-network by network-name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $network-topology-operation-input.network-request-information.network-name\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1168.1371955871582,"y":453.1300859451294,"z":"78f26cc2.346884","wires":[["b4715be3.bcd0c8","5d878005.c41e6","89e70fc0.287a2"]]},{"id":"6a7fc7cc.ee76d8","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":718.0410385131836,"y":237.04998779296875,"z":"78f26cc2.346884","wires":[["690d7e4b.60bd3","b9af04da.c023e8","47d05050.d96c3"]]},{"id":"690d7e4b.60bd3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":947.9980697631836,"y":236.52020263671875,"z":"78f26cc2.346884","wires":[["2ebce416.bdfaac"]]},{"id":"2ebce416.bdfaac","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"Failed to query AAI by network-id\"/>","comments":"","x":1111.9981002807617,"y":236.51995849609375,"z":"78f26cc2.346884","wires":[]},{"id":"b4715be3.bcd0c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1404.1373176574707,"y":453.1300859451294,"z":"78f26cc2.346884","wires":[["b96fe1bf.ab29e"]]},{"id":"b96fe1bf.ab29e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"Failed to query AAI by network-name\"/>","comments":"","x":1568.1373481750488,"y":453.1298418045044,"z":"78f26cc2.346884","wires":[]},{"id":"1b3cf9d1.1a1ed6","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":496.7481002807617,"y":237.15521240234375,"z":"78f26cc2.346884","wires":[["6a7fc7cc.ee76d8"]]},{"id":"9751ef82.d9c77","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":496.6369857788086,"y":320.26629638671875,"z":"78f26cc2.346884","wires":[["7698e3d.ad1ef1c"]]},{"id":"bf204584.cdc938","type":"other","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":496.7481002807617,"y":278.15521240234375,"z":"78f26cc2.346884","wires":[["7698e3d.ad1ef1c"]]},{"id":"c217c4b3.588c08","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":924.4981002807617,"y":409.65546226501465,"z":"78f26cc2.346884","wires":[["28116afa.ade786"]]},{"id":"5789e661.35e1f8","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":923.4981384277344,"y":453.655478477478,"z":"78f26cc2.346884","wires":[["28abb006.b3f25"]]},{"id":"b9af04da.c023e8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":955.9980697631836,"y":281.22381591796875,"z":"78f26cc2.346884","wires":[["59b0c026.b692a"]]},{"id":"5d878005.c41e6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1412.137134552002,"y":499.8349199295044,"z":"78f26cc2.346884","wires":[["9de2063e.c41718"]]},{"id":"59b0c026.b692a","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id` not found\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1122.9980697631836,"y":281.22381591796875,"z":"78f26cc2.346884","wires":[]},{"id":"9de2063e.c41718","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"augmentation\" value=\"`$network-topology-operation-input.network-request-information.network-name` not found\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1574.137134552002,"y":499.8349199295044,"z":"78f26cc2.346884","wires":[]},{"id":"47d05050.d96c3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":952.3224105834961,"y":325.90545654296875,"z":"78f26cc2.346884","wires":[["9a85f16b.d93cd"]]},{"id":"89e70fc0.287a2","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1407.461353302002,"y":547.5165605545044,"z":"78f26cc2.346884","wires":[["9a85f16b.d93cd"]]},{"id":"bcbd8a.ad7d6278","type":"method","name":"method network-topology-delete","xml":"<method rpc=\"network-topology-delete\" mode=\"sync\">","comments":"","outputs":1,"x":212.60881805419922,"y":109.03170585632324,"z":"78f26cc2.346884","wires":[["acd387f9.1c0658"]]},{"id":"eaea2109.ba78e","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":299.2754669189453,"y":47.142822265625,"z":"78f26cc2.346884","wires":[["bcbd8a.ad7d6278"]]},{"id":"93281b43.a28d38","type":"dgstart","name":"DGSTART","outputs":1,"x":135.1643524169922,"y":47.142822265625,"z":"78f26cc2.346884","wires":[["eaea2109.ba78e"]]},{"id":"acd387f9.1c0658","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":171.02154541015625,"y":172.30953216552734,"z":"78f26cc2.346884","wires":[["6426b1cc.4346d"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-operation.json b/platform-logic/vnfapi/src/main/json/network-topology-operation.json
new file mode 100644
index 00000000..edffef6d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"31cafe01.9adca2","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$network-topology-operation-input.request-information.request-action`\">\n","comments":"","outputs":1,"x":371.4285888671875,"y":270.0613708496094,"z":"77e6e7e2.0c2078","wires":[["20cf373a.361a98","1e0fc860.39fab8","1be0c7c8.9720a8"]]},{"id":"20cf373a.361a98","type":"other","name":"NetworkActivateRequest","xml":"<outcome value='NetworkActivateRequest'>","comments":"","outputs":1,"x":632.0319213867188,"y":269.2359848022461,"z":"77e6e7e2.0c2078","wires":[["d5087218.fb661"]]},{"id":"15061e2c.b35542","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":154.1070327758789,"y":184.20634078979492,"z":"77e6e7e2.0c2078","wires":[["31cafe01.9adca2","577eb935.6138d8"]]},{"id":"577eb935.6138d8","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"network-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$network-topology-operation-input.service-information.service-id`\"/>\n<parameter name=\"field6\" value=\"`$network-topology-operation-input.service-information.service-type`\"/>\n<parameter name=\"field7\" value=\"`$network-topology-operation-input.service-information.subscriber-name`\"/>\n<parameter name=\"field8\" value=\"`$network-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field9\" value=\"`$network-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field10\" value=\"`$network-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field11\" value=\"`$network-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field12\" value=\"`$network-topology-operation-input.network-request-information.network-name`\"/>\n<parameter name=\"field13\" value=\"`$network-topology-operation-input.network-request-information.network-type`\"/>\n<parameter name=\"field14\" value=\"`$network-topology-operation-input.network-request-information.tenant`\"/>\n<parameter name=\"field15\" value=\"`$network-topology-operation-input.network-request-information.aic-cloud-region`\"/>\n<parameter name=\"field16\" value=\"`$network-topology-operation-input.network-request-information.aic-clli`\"/>\n<parameter name=\"field17\" value=\"`$network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","outputs":1,"x":327.53912353515625,"y":183.33685493469238,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"4283a1fe.970e","type":"method","name":"method network-topology-operation","xml":"<method rpc=\"network-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":215.6626205444336,"y":132.76189613342285,"z":"77e6e7e2.0c2078","wires":[["15061e2c.b35542"]]},{"id":"8c257c9.b4a768","type":"service-logic","name":"VNF-API 3.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":291.1070556640625,"y":81.4285717010498,"z":"77e6e7e2.0c2078","wires":[["4283a1fe.970e"]]},{"id":"1888b70.5a9a849","type":"dgstart","name":"DGSTART","outputs":1,"x":126.99594116210938,"y":81.4285717010498,"z":"77e6e7e2.0c2078","wires":[["8c257c9.b4a768"]]},{"id":"2eb8cf98.68207","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":1295.6823081970215,"y":764.8134984970093,"z":"77e6e7e2.0c2078","wires":[["55a1785.811b488"]]},{"id":"183ebb2.55cc445","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1275.5392951965332,"y":680.3813581466675,"z":"77e6e7e2.0c2078","wires":[["bed5b432.c78528"]]},{"id":"bed5b432.c78528","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action is not found'/>","comments":"","x":1430.8725471496582,"y":680.2385053634644,"z":"77e6e7e2.0c2078","wires":[]},{"id":"b3ce277.8bbe0d8","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":1275.900478363037,"y":825.8095054626465,"z":"77e6e7e2.0c2078","wires":[["b70577da.72cbd8"]]},{"id":"1e0fc860.39fab8","type":"other","name":"DisconnectNetworkRequest","xml":"<outcome value='DisconnectNetworkRequest'>","comments":"","outputs":1,"x":633.9988098144531,"y":866.2646436691284,"z":"77e6e7e2.0c2078","wires":[["d5bba27d.129ba"]]},{"id":"d5bba27d.129ba","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$network-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":1053.1556777954102,"y":866.0714836120605,"z":"77e6e7e2.0c2078","wires":[["c42c53f4.a698e","bbac4b77.98a938","b3ce277.8bbe0d8"]]},{"id":"c42c53f4.a698e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1273.327880859375,"y":907.3238182067871,"z":"77e6e7e2.0c2078","wires":[["e9be7005.8afb1"]]},{"id":"bbac4b77.98a938","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":1273.097999572754,"y":866.6927261352539,"z":"77e6e7e2.0c2078","wires":[["ca6df125.11a36"]]},{"id":"1be0c7c8.9720a8","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":588.8092346191406,"y":1034.5774583816528,"z":"77e6e7e2.0c2078","wires":[["19650673.dc91ba"]]},{"id":"19650673.dc91ba","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='request-action is not found'/>","comments":"","x":777.1857681274414,"y":1034.2418870925903,"z":"77e6e7e2.0c2078","wires":[]},{"id":"e0fbbcbd.94887","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$network-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":1062.7933540344238,"y":680.813473701477,"z":"77e6e7e2.0c2078","wires":[["183ebb2.55cc445","4694c88.93afa38","2eb8cf98.68207","b3ce277.8bbe0d8"]]},{"id":"4694c88.93afa38","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":1274.5710906982422,"y":722.0357122421265,"z":"77e6e7e2.0c2078","wires":[["d2be8e97.44cde"]]},{"id":"d2be8e97.44cde","type":"call","name":"call network-topology-assign","xml":"<call module=\"VNF-API\" rpc=\"network-topology-assign\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1479.015712738037,"y":721.7023401260376,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"55a1785.811b488","type":"call","name":"call network-topology-changeassign","xml":"<call module=\"VNF-API\" rpc=\"network-topology-changeassign\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1542.3489036560059,"y":764.702374458313,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"ca6df125.11a36","type":"call","name":"call network-topology-delete","xml":"<call module=\"VNF-API\" rpc=\"network-topology-delete\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1487.011703491211,"y":866.4483852386475,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"b70577da.72cbd8","type":"call","name":"call network-topology-rollback","xml":"<call module=\"VNF-API\" rpc=\"network-topology-rollback\" mode=\"sync\" >\n","comments":"","outputs":1,"x":1493.678394317627,"y":825.6983976364136,"z":"77e6e7e2.0c2078","wires":[[]]},{"id":"e9be7005.8afb1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action is not found'/>","comments":"","x":1440.2337760925293,"y":907.654748916626,"z":"77e6e7e2.0c2078","wires":[]},{"id":"f8ae8d90.96fb9","type":"switchNode","name":"switch: INPUT tenant","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.tenant`\">","comments":"","outputs":1,"x":1072.9252319335938,"y":592.666690826416,"z":"77e6e7e2.0c2078","wires":[["28fb3d78.eb0af2"]]},{"id":"93bb40f4.7ba4f","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":1103.6630859375,"y":549.5674476623535,"z":"77e6e7e2.0c2078","wires":[["13cb6d46.7a9153"]]},{"id":"13cb6d46.7a9153","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1323.6630859375,"y":549.5674476623535,"z":"77e6e7e2.0c2078","wires":[["ff46b0fc.13c06"]]},{"id":"ff46b0fc.13c06","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='aic-cloud-region is required.'/>","comments":"","x":1481.6630859375,"y":549.5674476623535,"z":"77e6e7e2.0c2078","wires":[]},{"id":"e5a3480f.852ad8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='tenant is required.'/>","comments":"","x":1420.6630859375,"y":592.5674476623535,"z":"77e6e7e2.0c2078","wires":[]},{"id":"28fb3d78.eb0af2","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1261.6630859375,"y":592.5674476623535,"z":"77e6e7e2.0c2078","wires":[["e5a3480f.852ad8"]]},{"id":"4d3b388f.6b7b98","type":"switchNode","name":"switch: INPUT service-id","xml":"<switch test=\"`$network-topology-operation-input.service-information.service-id`\">","comments":"","outputs":1,"x":1083.0402221679688,"y":636.6785926818848,"z":"77e6e7e2.0c2078","wires":[["9466e4e0.c54e58"]]},{"id":"9466e4e0.c54e58","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1280.0402221679688,"y":636.6785926818848,"z":"77e6e7e2.0c2078","wires":[["d80af115.ca6c7"]]},{"id":"d80af115.ca6c7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='service-id is required.'/>","comments":"","x":1438.0402221679688,"y":636.6785926818848,"z":"77e6e7e2.0c2078","wires":[]},{"id":"d5087218.fb661","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":850.1785926818848,"y":268.6446952819824,"z":"77e6e7e2.0c2078","wires":[["93bb40f4.7ba4f","f8ae8d90.96fb9","4d3b388f.6b7b98","e0fbbcbd.94887","6c34a2d6.99642c","ec4123bf.eee3b","ff6a348f.ffa388"]]},{"id":"6c34a2d6.99642c","type":"switchNode","name":"switch test: INPUT network-name","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-name`\">","comments":"","outputs":1,"x":1107.4744110107422,"y":269.53583812713623,"z":"77e6e7e2.0c2078","wires":[["80a2e828.b1ec78","c1ab4aa6.364898"]]},{"id":"80a2e828.b1ec78","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1332.9188079833984,"y":269.5358238220215,"z":"77e6e7e2.0c2078","wires":[["4b7119ee.fa71d8"]]},{"id":"c1ab4aa6.364898","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1332.7124862670898,"y":315.1866683959961,"z":"77e6e7e2.0c2078","wires":[["81af9fea.61ea4"]]},{"id":"4b7119ee.fa71d8","type":"switchNode","name":"switch test: PRELOAD network-name","xml":"<switch test=\"`$preload-data.network-topology-information.network-topology-identifier.network-name`\">","comments":"","outputs":1,"x":1570.5422401428223,"y":269.7703857421875,"z":"77e6e7e2.0c2078","wires":[["4d1bddd5.84a7d4","d843d3b9.82fae"]]},{"id":"81af9fea.61ea4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-name is required from input'/>","comments":"","x":1491.9902648925781,"y":315.1033058166504,"z":"77e6e7e2.0c2078","wires":[]},{"id":"4d1bddd5.84a7d4","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1826.3633117675781,"y":269.20250034332275,"z":"77e6e7e2.0c2078","wires":[["7a6d0faa.240a7"]]},{"id":"d843d3b9.82fae","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1826.823631286621,"y":310.7421703338623,"z":"77e6e7e2.0c2078","wires":[["53c2ee9e.fca61"]]},{"id":"7a6d0faa.240a7","type":"switchNode","name":"switch: network-name INPUT == PRELOAD","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`\">","comments":"","outputs":1,"x":2089.620864868164,"y":269.8973398208618,"z":"77e6e7e2.0c2078","wires":[["6a236a9f.8b8514"]]},{"id":"53c2ee9e.fca61","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-name not found from preload-data'/>","comments":"","x":1988.3235702514648,"y":310.76990699768066,"z":"77e6e7e2.0c2078","wires":[]},{"id":"6a236a9f.8b8514","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2356.030086517334,"y":269.2027349472046,"z":"77e6e7e2.0c2078","wires":[["89b3fea6.2f7df"]]},{"id":"89b3fea6.2f7df","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'No preload-data found to match input network-name = ' + $network-topology-operation-input.network-request-information.network-name`\"/>","comments":"","x":2523.5856323242188,"y":268.5358238220215,"z":"77e6e7e2.0c2078","wires":[]},{"id":"ec4123bf.eee3b","type":"switchNode","name":"switch test: INPUT network-type","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-type`\">","comments":"","outputs":1,"x":1108.5715026855469,"y":390.0613555908203,"z":"77e6e7e2.0c2078","wires":[["951992a5.361","6668c754.77fdc8"]]},{"id":"951992a5.361","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1334.0158996582031,"y":390.06134128570557,"z":"77e6e7e2.0c2078","wires":[["d03cda02.c26cc8"]]},{"id":"6668c754.77fdc8","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1333.8095779418945,"y":435.7121858596802,"z":"77e6e7e2.0c2078","wires":[["3fbf5322.83e6dc"]]},{"id":"d03cda02.c26cc8","type":"switchNode","name":"switch test: PRELOAD network-type","xml":"<switch test=\"`$preload-data.network-topology-information.network-topology-identifier.network-type`\">","comments":"","outputs":1,"x":1571.639331817627,"y":390.2959032058716,"z":"77e6e7e2.0c2078","wires":[["5d7fef2e.5cba","52bcb.31e0b435c"]]},{"id":"3fbf5322.83e6dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-type is required from input'/>","comments":"","x":1493.0873565673828,"y":435.6288232803345,"z":"77e6e7e2.0c2078","wires":[]},{"id":"5d7fef2e.5cba","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1827.4604034423828,"y":389.72801780700684,"z":"77e6e7e2.0c2078","wires":[["79120c5d.b5e044"]]},{"id":"52bcb.31e0b435c","type":"other","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1827.9207229614258,"y":431.2676877975464,"z":"77e6e7e2.0c2078","wires":[["8087d80e.4b69e8"]]},{"id":"79120c5d.b5e044","type":"switchNode","name":"switch: network-type INPUT == PRELOAD","xml":"<switch test=\"`$network-topology-operation-input.network-request-information.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`\">","comments":"","outputs":1,"x":2090.7179565429688,"y":390.4228572845459,"z":"77e6e7e2.0c2078","wires":[["d8519067.4d8bf"]]},{"id":"8087d80e.4b69e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='network-type not found from preload-data'/>","comments":"","x":1989.4206619262695,"y":431.29542446136475,"z":"77e6e7e2.0c2078","wires":[]},{"id":"d8519067.4d8bf","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2357.1271781921387,"y":389.7282524108887,"z":"77e6e7e2.0c2078","wires":[["642b9594.3cd29c"]]},{"id":"642b9594.3cd29c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'No preload-data found to match input network-type = ' + $network-topology-operation-input.network-request-information.network-type`\"/>","comments":"","x":2524.6827239990234,"y":389.06134128570557,"z":"77e6e7e2.0c2078","wires":[]},{"id":"ff6a348f.ffa388","type":"switchNode","name":"switch: INPUT service-instance-id","xml":"<switch test=\"`$network-topology-operation-input.service-information.service-instance-id`\">","comments":"","outputs":1,"x":1111.4285888671875,"y":498.5714416503906,"z":"77e6e7e2.0c2078","wires":[["339b56d0.67aada"]]},{"id":"339b56d0.67aada","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1331.4285888671875,"y":498.5714416503906,"z":"77e6e7e2.0c2078","wires":[["dafca54f.6d6618"]]},{"id":"dafca54f.6d6618","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='service-instance-id is required.'/>","comments":"","x":1489.4285888671875,"y":498.5714416503906,"z":"77e6e7e2.0c2078","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/network-topology-rollback.json b/platform-logic/vnfapi/src/main/json/network-topology-rollback.json
new file mode 100644
index 00000000..6ba2b668
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/network-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"ed874a4d.fd8fa8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":205.71429443359375,"y":164.2857208251953,"z":"16a5084d.6904d8","wires":[["24d7124b.287cae","6f5f0903.600f88","56187c49.06fa54","34867ac.18cfc86"]]},{"id":"be439a72.253938","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":688.7422180175781,"y":164.44003295898438,"z":"16a5084d.6904d8","wires":[["b0ac9e35.109ef"]]},{"id":"b0ac9e35.109ef","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'l3-network not found in AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":851.9366149902344,"y":164.55125427246094,"z":"16a5084d.6904d8","wires":[]},{"id":"24d7124b.287cae","type":"switchNode","name":"switch: l3-network.orchestration_status","xml":"<switch test=\"`$tmp.AnAI.l3network.orchestration-status`\">","comments":"","outputs":1,"x":463.72552490234375,"y":272.89379501342773,"z":"16a5084d.6904d8","wires":[["2c75bd76.80f6d2","4c028d7d.749944","ba62e3d9.12a4"]]},{"id":"2c75bd76.80f6d2","type":"other","name":"pending-create","xml":"<outcome value='pending-create'>\n","comments":"","outputs":1,"x":747.4795608520508,"y":273.5526599884033,"z":"16a5084d.6904d8","wires":[["d89faa07.866668"]]},{"id":"ba62e3d9.12a4","type":"other","name":"pending-update","xml":"<outcome value='pending-update'>\n","comments":"","outputs":1,"x":750.0867538452148,"y":383.1594228744507,"z":"16a5084d.6904d8","wires":[["924236c2.8eb018"]]},{"id":"4c028d7d.749944","type":"other","name":"pending-delete","xml":"<outcome value='pending-delete'>\n","comments":"","outputs":1,"x":747.2295074462891,"y":328.2672004699707,"z":"16a5084d.6904d8","wires":[["d63de22c.d6ac3"]]},{"id":"d63de22c.d6ac3","type":"save","name":"update AnAI: l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" >\n<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":1029.535385131836,"y":328.9064884185791,"z":"16a5084d.6904d8","wires":[["30ace356.607a3c"]]},{"id":"30ace356.607a3c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1282.0407447814941,"y":328.19105052948,"z":"16a5084d.6904d8","wires":[["65d58e38.14597"]]},{"id":"65d58e38.14597","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","x":1440.5405006408691,"y":327.69105052948,"z":"16a5084d.6904d8","wires":[]},{"id":"56187c49.06fa54","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":387.8685607910156,"y":810.4369297027588,"z":"16a5084d.6904d8","wires":[]},{"id":"6f5f0903.600f88","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":411.8686218261719,"y":763.4369297027588,"z":"16a5084d.6904d8","wires":[[]]},{"id":"924236c2.8eb018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":934.9215087890625,"y":383.1720905303955,"z":"16a5084d.6904d8","wires":[["ddbaf6a3.157138","b17a76ed.0f85b8","601ab575.5ab91c"]]},{"id":"ddbaf6a3.157138","type":"for","name":"for loop i - tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":1257.5074462890625,"y":437.3375072479248,"z":"16a5084d.6904d8","wires":[["3a9492ae.aa26ae"]]},{"id":"3a9492ae.aa26ae","type":"switchNode","name":"switch : l3subnet.orchestration-status","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\">","comments":"","outputs":1,"x":1308.7061004638672,"y":534.154951095581,"z":"16a5084d.6904d8","wires":[["dcb0b0f5.3edc8","3c0ecb2f.7fa144"]]},{"id":"dcb0b0f5.3edc8","type":"other","name":"pending-create","xml":"<outcome value='pending-create'>\n","comments":"","outputs":1,"x":1579.3409118652344,"y":533.6986665725708,"z":"16a5084d.6904d8","wires":[["4b483612.3e69e8"]]},{"id":"3c0ecb2f.7fa144","type":"other","name":"pending-delete","xml":"<outcome value='pending-delete'>\n","comments":"","outputs":1,"x":1581.5910339355469,"y":580.4486694335938,"z":"16a5084d.6904d8","wires":[["262c9783.799c48"]]},{"id":"ce707857.7d5938","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1483.0867156982422,"y":644.0207948684692,"z":"16a5084d.6904d8","wires":[["105e0afc.2b75f5"]]},{"id":"105e0afc.2b75f5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to rollback l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","x":1648.9435691833496,"y":644.0206813812256,"z":"16a5084d.6904d8","wires":[]},{"id":"7560895d.bec338","type":"method","name":"method network-topology-rollback","xml":"<method rpc=\"network-topology-rollback\" mode=\"sync\">","comments":"","outputs":1,"x":254.35324096679688,"y":104.81352615356445,"z":"16a5084d.6904d8","wires":[["ed874a4d.fd8fa8"]]},{"id":"22f704b1.4b00ac","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":308.79766845703125,"y":48.480201721191406,"z":"16a5084d.6904d8","wires":[["7560895d.bec338"]]},{"id":"14e828b3.f5f857","type":"dgstart","name":"DGSTART","outputs":1,"x":144.68655395507812,"y":48.480201721191406,"z":"16a5084d.6904d8","wires":[["22f704b1.4b00ac"]]},{"id":"34867ac.18cfc86","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":453.4643249511719,"y":164.9246368408203,"z":"16a5084d.6904d8","wires":[["be439a72.253938","d84ea22f.e407c"]]},{"id":"d84ea22f.e407c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":681.4643249511719,"y":207.9246368408203,"z":"16a5084d.6904d8","wires":[["42ccb0c4.44987"]]},{"id":"42ccb0c4.44987","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 occurred while querying l3-network from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":833.5754089355469,"y":208.14686584472656,"z":"16a5084d.6904d8","wires":[]},{"id":"262c9783.799c48","type":"save","name":"update AnAI - subnet.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id\" >\n\t<parameter name=\"orchestration-status\" value=\"active\" />\n\t\t","comments":"","outputs":1,"x":1862.6230087280273,"y":580.6667499542236,"z":"16a5084d.6904d8","wires":[["c9eebef.d2d794"]]},{"id":"d89faa07.866668","type":"delete","name":"delete AnAI - l3-network","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" >","comments":"","outputs":1,"x":968.1071929931641,"y":273.78178787231445,"z":"16a5084d.6904d8","wires":[["9ce56dcb.c4e3b"]]},{"id":"9ce56dcb.c4e3b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1159.857177734375,"y":273.5317840576172,"z":"16a5084d.6904d8","wires":[["119f926b.f22d8e"]]},{"id":"119f926b.f22d8e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to delete l3-network from AAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\"/>","comments":"","x":1318.3570355589,"y":273.0320094249846,"z":"16a5084d.6904d8","wires":[]},{"id":"4b483612.3e69e8","type":"delete","name":"delete l3-network.subnet","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id\" >","comments":"","outputs":1,"x":1808.6865310668945,"y":533.5754108428955,"z":"16a5084d.6904d8","wires":[["88c83fbb.cfade"]]},{"id":"b17a76ed.0f85b8","type":"save","name":"update AnAI - l3-network.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\" >\n<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":1219.020034790039,"y":644.4007987976074,"z":"16a5084d.6904d8","wires":[["ce707857.7d5938"]]},{"id":"88c83fbb.cfade","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2002.8293075561523,"y":533.5754375457764,"z":"16a5084d.6904d8","wires":[["ad6689b7.9adf18"]]},{"id":"ad6689b7.9adf18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Failed to rollback to delete subnet from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":2150.9403915405273,"y":533.7976665496826,"z":"16a5084d.6904d8","wires":[]},{"id":"c9eebef.d2d794","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2115.6864852905273,"y":580.4325847625732,"z":"16a5084d.6904d8","wires":[["b2f04093.c9348"]]},{"id":"b2f04093.c9348","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Failed to rollback subnet orchestration-status from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":2263.7975692749023,"y":580.6548137664795,"z":"16a5084d.6904d8","wires":[]},{"id":"601ab575.5ab91c","type":"switchNode","name":"switch ... tmp.AnAI.l3network.subnets.subnet_length[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":1275.1428833007812,"y":383.2857360839844,"z":"16a5084d.6904d8","wires":[["fc8ffad6.e42698"]]},{"id":"fc8ffad6.e42698","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1556.5873336791992,"y":383.0634717941284,"z":"16a5084d.6904d8","wires":[["188c2712.ad31f9"]]},{"id":"188c2712.ad31f9","type":"set","name":"set tmp.AnAI.l3network.subnets.subnet_length = 0","xml":"<set>\n<parameter name=\"tmp.AnAI.l3network.subnets.subnet_length\" value=\"0\" />\n","comments":"","outputs":1,"x":1831.1429426405166,"y":383.0634924570718,"z":"16a5084d.6904d8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-network-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-network-topology-operation.json
new file mode 100644
index 00000000..e0701c9b
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-network-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"2b70e6bb.85997a","type":"dgstart","name":"DGSTART","outputs":1,"x":127.14286041259766,"y":74.28571319580078,"z":"418bfec1.6ec9d","wires":[["4e0a2233.21b8cc"]]},{"id":"4e0a2233.21b8cc","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":160.14287567138672,"y":125.39681243896484,"z":"418bfec1.6ec9d","wires":[["408c6275.d3cccc"]]},{"id":"408c6275.d3cccc","type":"method","name":"preload-network-topology-operation","xml":"<method rpc=\"preload-network-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":240.80953216552734,"y":202.73013877868652,"z":"418bfec1.6ec9d","wires":[["d62a514b.d51bc"]]},{"id":"d62a514b.d51bc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":175.36505889892578,"y":323.9523696899414,"z":"418bfec1.6ec9d","wires":[["b009273e.32cec8","f4841692.2b9828"]]},{"id":"6d566c28.40eb94","type":"comment","name":"preload-network-topology-operation","info":"","comments":"","x":708.8550300598145,"y":81.0533971786499,"z":"418bfec1.6ec9d","wires":[]},{"id":"b009273e.32cec8","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-network-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-network-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-network-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field6\" value=\"`$preload-network-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-network-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-network-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field9\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.service-type`\"/>\n<parameter name=\"field10\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-name`\"/>\n<parameter name=\"field11\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-type`\"/>\n<parameter name=\"field12\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-role`\"/>\n<parameter name=\"field13\" value=\"`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-technology`\"/>","comments":"","outputs":1,"x":396.07718658447266,"y":307.6089401245117,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"48dd215b.72708","type":"comment","name":"request-action = PreloadNetworkRequest, svc-action = reserve","info":"","comments":"","x":717.6428565979004,"y":118.73015975952148,"z":"418bfec1.6ec9d","wires":[]},{"id":"f4841692.2b9828","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-network-topology-operation-input.request-information.request-action`\">\n","comments":"","outputs":1,"x":442.14286041259766,"y":344.0533981323242,"z":"418bfec1.6ec9d","wires":[["fac0642d.abb4d8","b8412422.c95d98","c045741c.637738"]]},{"id":"fac0642d.abb4d8","type":"other","name":"PreloadNetworkRequest","xml":"<outcome value='PreloadNetworkRequest'>","comments":"","outputs":1,"x":670.1428604125977,"y":345.0533981323242,"z":"418bfec1.6ec9d","wires":[["e310fb22.59f6b8"]]},{"id":"b8412422.c95d98","type":"other","name":"DeletePreloadNetworkRequest","xml":"<outcome value='DeletePreloadNetworkRequest'>","comments":"","outputs":1,"x":683.1428604125977,"y":614.0533981323242,"z":"418bfec1.6ec9d","wires":[["94895ced.01f0f"]]},{"id":"4e1fc2cc.f2923c","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","outputs":1,"x":1150.2540283203125,"y":614.7201194763184,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"a5d85b0f.26c618","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1134.142921447754,"y":696.0534000396729,"z":"418bfec1.6ec9d","wires":[]},{"id":"c045741c.637738","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":651.1428604125977,"y":734.0533981323242,"z":"418bfec1.6ec9d","wires":[["8f6f1c80.7e41b"]]},{"id":"8f6f1c80.7e41b","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value='Invalid Request `$preload-network-topology-operation-input.request-information.request-action`'/>\n\n \n","comments":"","x":893.2249755859375,"y":734.738935470581,"z":"418bfec1.6ec9d","wires":[]},{"id":"e310fb22.59f6b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":910.1428604125977,"y":344.0533981323242,"z":"418bfec1.6ec9d","wires":[["6ee0c350.4beafc","56bd18f2.7b01d8","3681c77.3bb7238","94b71ffd.dd657","a54cd151.1dc8c"]]},{"id":"94b71ffd.dd657","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1144.9643630981445,"y":515.4383478164673,"z":"418bfec1.6ec9d","wires":[]},{"id":"3681c77.3bb7238","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","outputs":1,"x":1218.6390342712402,"y":428.4464111328125,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"6ee0c350.4beafc","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":1166.873191833496,"y":473.239990234375,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"56bd18f2.7b01d8","type":"set","name":"set: preload-data += input","xml":"<set>\n<parameter name=\"preload-data.\" value=\"preload-network-topology-operation-input.\" />\n","comments":"","outputs":1,"x":1176.4445762634277,"y":384.658486366272,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"94895ced.01f0f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":922.1428604125977,"y":615.0533981323242,"z":"418bfec1.6ec9d","wires":[["4e1fc2cc.f2923c","a5d85b0f.26c618","53e93276.727bcc"]]},{"id":"bfc175eb.f98d18","type":"comment","name":"request-action = DeletePreloadNetworkRequest, svc-action = delete","info":"","comments":"","x":726.1428604125977,"y":156.05339813232422,"z":"418bfec1.6ec9d","wires":[]},{"id":"a54cd151.1dc8c","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","outputs":1,"x":1158.3929595947266,"y":343.74997329711914,"z":"418bfec1.6ec9d","wires":[[]]},{"id":"53e93276.727bcc","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":1156,"y":655,"z":"418bfec1.6ec9d","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-vf-module-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-vf-module-topology-operation.json
new file mode 100644
index 00000000..d400658d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-vf-module-topology-operation.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"4ed05b5.6b0cc24","type":"dgstart","name":"DGSTART","outputs":1,"x":129,"y":63,"z":"c02ffcad.d96588","wires":[["7a49be38.64e98"]]},{"id":"7a49be38.64e98","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":162.00001525878906,"y":114.11109924316406,"z":"c02ffcad.d96588","wires":[["d3ccd8ee.2b9278"]]},{"id":"d3ccd8ee.2b9278","type":"method","name":"preload-vf-module-topology-operation","xml":"<method rpc=\"preload-vf-module-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":249.33334350585938,"y":159.22219848632812,"z":"c02ffcad.d96588","wires":[["43320618.59ae38"]]},{"id":"43320618.59ae38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":231.50789642333984,"y":219.80951690673828,"z":"c02ffcad.d96588","wires":[["f5b119ec.e6b","c7734083.208b18"]]},{"id":"f5b119ec.e6b","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-vf-module-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-vf-module-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$preload-vf-module-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-vf-module-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`\"/>\n<parameter name=\"field9\" value=\"`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-name`\"/>\n<parameter name=\"field10\" value=\"`$preload-vf-module-topology-operation-input.service-information.service-instance-id`\"/>","comments":"","outputs":1,"x":422.2200241088867,"y":219.60895919799805,"z":"c02ffcad.d96588","wires":[[]]},{"id":"c7734083.208b18","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-vf-module-topology-operation-input.request-information.request-action`\">\n\n","comments":"","outputs":1,"x":466.8571014404297,"y":264.6248369216919,"z":"c02ffcad.d96588","wires":[["6acf84a1.0edcb4","63c23261.09f294","b3485c95.2f976"]]},{"id":"6acf84a1.0edcb4","type":"other","name":"PreloadVfModuleRequest","xml":"<outcome value='PreloadVfModuleRequest'>","comments":"","outputs":1,"x":722.8571014404297,"y":264.6248369216919,"z":"c02ffcad.d96588","wires":[["743d62df.7dc0ec"]]},{"id":"63c23261.09f294","type":"other","name":"DeletePreloadVfModuleRequest","xml":"<outcome value='DeletePreloadVfModuleRequest'>","comments":"","outputs":1,"x":739.1427154541016,"y":485.83913707733154,"z":"c02ffcad.d96588","wires":[["b697edc0.00ada"]]},{"id":"6a60f29f.69eb8c","type":"set","name":"Delete vf-module-preload-data","xml":"<set>\n<parameter name=\"vf-module-preload-data.\" value=\"\" />\n","comments":"","x":1254.3927764892578,"y":485.58916664123535,"z":"c02ffcad.d96588","wires":[]},{"id":"b3485c95.2f976","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":677.4284362792969,"y":604.8391275405884,"z":"c02ffcad.d96588","wires":[["7b304af0.ef57b4"]]},{"id":"7b304af0.ef57b4","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value=\"`'Invalid Request, ' + $preload-vf-module-topology-operation-input.request-information.request-action`\"/>\n\n \n","comments":"","x":925.3676300048828,"y":605.1595792770386,"z":"c02ffcad.d96588","wires":[]},{"id":"743d62df.7dc0ec","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":963.8571014404297,"y":264.6248369216919,"z":"c02ffcad.d96588","wires":[["7f0c8c59.497cc4","3ce7f257.b72826","6c7514f5.b868a4","e15fd6d3.405928","adf3760.7268908"]]},{"id":"6d99ded3.62ff18","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1343.8571472167969,"y":602.3034706115723,"z":"c02ffcad.d96588","wires":[]},{"id":"6c7514f5.b868a4","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"vf-module-preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","x":1276.8810577392578,"y":399.24797916412354,"z":"c02ffcad.d96588","wires":[]},{"id":"69e4e2cc.d3d454","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":1364.7659606933594,"y":559.3115577697754,"z":"c02ffcad.d96588","wires":[]},{"id":"7f0c8c59.497cc4","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"vnf-profile\" key=\"SELECT * from VNF_PROFILE where vnf_type = $preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id\">\n","comments":"","outputs":1,"x":1255.3771514892578,"y":265.0774154663086,"z":"c02ffcad.d96588","wires":[["1d79be03.963b92","21840fa8.360b2"]]},{"id":"b16775da.951558","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-model-id not found. New vnf-model-id can be added via admin portal\" />","comments":"","x":1745.7103424072266,"y":264.2995834350586,"z":"c02ffcad.d96588","wires":[]},{"id":"1d79be03.963b92","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1532.3770904541016,"y":264.8551254272461,"z":"c02ffcad.d96588","wires":[["b16775da.951558"]]},{"id":"3ce7f257.b72826","type":"set","name":"set: vf-module-preload-data += input","xml":"<set>\n<parameter name=\"vf-module-preload-data.\" value=\"preload-vf-module-topology-operation-input.\" />\n","comments":"","x":1270.0476837158203,"y":353.54341983795166,"z":"c02ffcad.d96588","wires":[]},{"id":"21840fa8.360b2","type":"success","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1524.654800415039,"y":306.40059661865234,"z":"c02ffcad.d96588","wires":[["b16775da.951558"]]},{"id":"b697edc0.00ada","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":990.8927154541016,"y":485.8391361236572,"z":"c02ffcad.d96588","wires":[["6a60f29f.69eb8c","adf3760.7268908"]]},{"id":"e15fd6d3.405928","type":"set","name":"Delete vf-module-preload-data","xml":"<set>\n<parameter name=\"vf-module-preload-data.\" value=\"\" />\n","comments":"","x":1249.0713653564453,"y":309.96434783935547,"z":"c02ffcad.d96588","wires":[]},{"id":"adf3760.7268908","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1175.5357208251953,"y":560.0714998245239,"z":"c02ffcad.d96588","wires":[["69e4e2cc.d3d454","6d99ded3.62ff18"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-vnf-instance-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-vnf-instance-topology-operation.json
new file mode 100644
index 00000000..fca4005a
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-vnf-instance-topology-operation.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"4e9ae561.7b3bdc","type":"dgstart","name":"DGSTART","outputs":1,"x":89,"y":35,"z":"b4f2c7b3.ab7c9","wires":[["c1b468c3.926cd8"]]},{"id":"c1b468c3.926cd8","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":122.00001525878906,"y":86.11109924316406,"z":"b4f2c7b3.ab7c9","wires":[["451f3c5c.01a58c"]]},{"id":"451f3c5c.01a58c","type":"method","name":"preload-vnf-instance-topology-operation","xml":"<method rpc=\"preload-vnf-instance-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":209.33334350585938,"y":131.22219848632812,"z":"b4f2c7b3.ab7c9","wires":[["a682f066.77cf4"]]},{"id":"a682f066.77cf4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":191.50789642333984,"y":191.80951690673828,"z":"b4f2c7b3.ab7c9","wires":[["6eda1ef4.1ead78","b5eac53b.9e8d28"]]},{"id":"6eda1ef4.1ead78","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-vnf-instance-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-vnf-instance-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$preload-vnf-instance-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-vnf-instance-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`\"/>\n<parameter name=\"field9\" value=\"`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`\"/>\n<parameter name=\"field10\" value=\"`$preload-vnf-instance-topology-operation-input.service-information.service-instance-id`\"/>","comments":"","outputs":1,"x":382.2200241088867,"y":191.60895919799805,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"b5eac53b.9e8d28","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-vnf-instance-topology-operation-input.request-information.request-action`\">\n\n","comments":"","outputs":1,"x":426.8571014404297,"y":236.6248369216919,"z":"b4f2c7b3.ab7c9","wires":[["5e96cd18.3876b4","4ad665bd.459114","ab2a26d5.c6128"]]},{"id":"5e96cd18.3876b4","type":"other","name":"PreloadVnfInstanceRequest","xml":"<outcome value='PreloadVnfInstanceRequest'>","comments":"","outputs":1,"x":688.8571014404297,"y":236.6248369216919,"z":"b4f2c7b3.ab7c9","wires":[["e72ac2fe.5d824"]]},{"id":"4ad665bd.459114","type":"other","name":"DeletePreloadVnfInstanceRequest","xml":"<outcome value='DeletePreloadVnfInstanceRequest'>","comments":"","outputs":1,"x":708.1427154541016,"y":457.83913707733154,"z":"b4f2c7b3.ab7c9","wires":[["a201aadf.fd3c4"]]},{"id":"57509d2f.c1779c","type":"set","name":"Delete vnf-instance-preload-data","xml":"<set>\n<parameter name=\"vnf-instance-preload-data.\" value=\"\" />\n","comments":"","x":1224.3927764892578,"y":457.58916664123535,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"ab2a26d5.c6128","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":637.4284362792969,"y":576.8391275405884,"z":"b4f2c7b3.ab7c9","wires":[["fa569e30.804e1"]]},{"id":"fa569e30.804e1","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value='Invalid Request `$preload-vnf-instance-topology-operation-input.request-information.request-action`'/>\n\n \n","comments":"","x":895.3676300048828,"y":577.1595792770386,"z":"b4f2c7b3.ab7c9","wires":[]},{"id":"e72ac2fe.5d824","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":933.8571014404297,"y":236.6248369216919,"z":"b4f2c7b3.ab7c9","wires":[["f77e2117.bb6f6","4f83b470.be184c","9d54146b.7af598","9a828dbc.af94c8","e9ffde5b.92c2a"]]},{"id":"43c4685.d24a598","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1313.8571472167969,"y":574.3034706115723,"z":"b4f2c7b3.ab7c9","wires":[]},{"id":"9d54146b.7af598","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"vnf-instance-preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","x":1246.8810577392578,"y":371.24797916412354,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"d7e96d34.d9ff38","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":1334.7659606933594,"y":531.3115577697754,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"f77e2117.bb6f6","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"vnf-profile\" key=\"SELECT * from VNF_PROFILE where vnf_type = $preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id\">\n","comments":"","outputs":1,"x":1225.3771514892578,"y":237.0774154663086,"z":"b4f2c7b3.ab7c9","wires":[["f80978ff.f80f6","da20f0d9.1dc818"]]},{"id":"8662fe2a.4fba88","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-model-id not found. New vnf-model-id can be added via admin portal\" />","comments":"","x":1715.7103424072266,"y":236.2995834350586,"z":"b4f2c7b3.ab7c9","wires":[]},{"id":"f80978ff.f80f6","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1502.3770904541016,"y":236.8551254272461,"z":"b4f2c7b3.ab7c9","wires":[["8662fe2a.4fba88"]]},{"id":"4f83b470.be184c","type":"set","name":"set: vnf-instance-preload-data += input","xml":"<set>\n<parameter name=\"vnf-instance-preload-data.\" value=\"preload-vnf-instance-topology-operation-input.\" />\n","comments":"","x":1245.0476837158203,"y":325.54341983795166,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"da20f0d9.1dc818","type":"success","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1494.654800415039,"y":278.40059661865234,"z":"b4f2c7b3.ab7c9","wires":[["8662fe2a.4fba88"]]},{"id":"a201aadf.fd3c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":960.8927154541016,"y":457.8391361236572,"z":"b4f2c7b3.ab7c9","wires":[["57509d2f.c1779c","e9ffde5b.92c2a"]]},{"id":"9a828dbc.af94c8","type":"set","name":"Delete vnf-instance-preload-data","xml":"<set>\n<parameter name=\"vnf-instance-preload-data.\" value=\"\" />\n","comments":"","x":1227.0713653564453,"y":281.96434783935547,"z":"b4f2c7b3.ab7c9","wires":[[]]},{"id":"e9ffde5b.92c2a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1145.5357208251953,"y":532.0714998245239,"z":"b4f2c7b3.ab7c9","wires":[["d7e96d34.d9ff38","43c4685.d24a598"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/preload-vnf-topology-operation.json b/platform-logic/vnfapi/src/main/json/preload-vnf-topology-operation.json
new file mode 100644
index 00000000..e0390357
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/preload-vnf-topology-operation.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"fae93ccf.cab658","type":"dgstart","name":"DGSTART","outputs":1,"x":129,"y":20,"z":"2500da67.7593e6","wires":[["ca4ee988.18e94"]]},{"id":"ca4ee988.18e94","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":162.00001525878906,"y":71.11109924316406,"z":"2500da67.7593e6","wires":[["f719cf30.51d0b"]]},{"id":"f719cf30.51d0b","type":"method","name":"preload-vnf-topology-operation","xml":"<method rpc=\"preload-vnf-topology-operation\" mode=\"sync\">","comments":"","outputs":1,"x":249.33334350585938,"y":116.22219848632812,"z":"2500da67.7593e6","wires":[["78ada0b2.50427"]]},{"id":"78ada0b2.50427","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":177.22219848632812,"y":269.6666564941406,"z":"2500da67.7593e6","wires":[["77cbb227.262d74","c8f7640f.136fa"]]},{"id":"169fbec8.2ae4b1","type":"comment","name":"preload-vnf-topology-operation","info":"","comments":"","x":710.7121696472168,"y":26.76768398284912,"z":"2500da67.7593e6","wires":[]},{"id":"77cbb227.262d74","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"preload-vnf-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$preload-vnf-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$preload-vnf-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$preload-vnf-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field6\" value=\"`$preload-vnf-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$preload-vnf-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$preload-vnf-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field9\" value=\"`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.service-type`\"/>\n<parameter name=\"field10\" value=\"`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-name`\"/>\n<parameter name=\"field11\" value=\"`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type`\"/>","comments":"","outputs":1,"x":397.934326171875,"y":253.32322692871094,"z":"2500da67.7593e6","wires":[[]]},{"id":"cd624889.3ab088","type":"comment","name":"request-action = PreloadVNFRequest, svc-action = reserve","info":"","comments":"","x":719.4999961853027,"y":64.4444465637207,"z":"2500da67.7593e6","wires":[]},{"id":"c8f7640f.136fa","type":"switchNode","name":"switch: request-action","xml":"<switch test=\"`$preload-vnf-topology-operation-input.request-information.request-action`\">\n<!--\nleaf request-action { \n\t\t\t\ttype enumeration { \n\t\t\t\t\tenum \"VNFActivateRequest\";\n\t\t\t\t\tenum \"ChangeVNFActivateRequest\";\n\t\t\t\t\tenum \"DisconnectVNFRequest\";\n\t\t\t\t\tenum \"PreloadVNFRequest\";\n\t\t\t\t\tenum \"DeletePreloadVNFRequest\";\n\t\t\t\t} \n}\n-->\n\n","comments":"","outputs":1,"x":444,"y":289.76768493652344,"z":"2500da67.7593e6","wires":[["496c8179.d18ef","8675aa08.bbf3f8","c9bbcd1d.2da5f8"]]},{"id":"496c8179.d18ef","type":"other","name":"PreloadVNFRequest","xml":"<outcome value='PreloadVNFRequest'>","comments":"","outputs":1,"x":672,"y":290.76768493652344,"z":"2500da67.7593e6","wires":[["c51b9598.c5f25"]]},{"id":"8675aa08.bbf3f8","type":"other","name":"DeletePreloadVNFRequest","xml":"<outcome value='DeletePreloadVNFRequest'>","comments":"","outputs":1,"x":673.5713119506836,"y":664.6248331069946,"z":"2500da67.7593e6","wires":[["56297be.01b5984"]]},{"id":"90fab1a1.b184","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","x":1143.5713119506836,"y":706.6248331069946,"z":"2500da67.7593e6","wires":[]},{"id":"d7b12d3.82f4c5","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1126.5713119506836,"y":746.6248331069946,"z":"2500da67.7593e6","wires":[]},{"id":"c9bbcd1d.2da5f8","type":"other","name":"outcome: Other","xml":"<outcome value=\"Other\">\n\n","outputs":1,"x":641.5713119506836,"y":784.6248331069946,"z":"2500da67.7593e6","wires":[["e1246f8e.79201"]]},{"id":"e1246f8e.79201","type":"returnFailure","name":"return failure","xml":" <return status=\"failure\">\n\t<parameter name='error-code' value='2000'/>\n\t<parameter name='error-message' value='Invalid Request `$preload-vnf-topology-operation-input.request-information.request-action`'/>\n\n \n","comments":"","x":883.6534042358398,"y":783.0881509780884,"z":"2500da67.7593e6","wires":[]},{"id":"c51b9598.c5f25","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912,"y":289.76768493652344,"z":"2500da67.7593e6","wires":[["ee8d2da6.a9587","9950aa2a.c6fbb","e6726c5.1ca5f1","64decaf7.b5ef04","e1a96601.00fff8","8c6d0f47.8edca","ddd51a1e.acd6b"]]},{"id":"8c6d0f47.8edca","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":1170.0000457763672,"y":526.1962547302246,"z":"2500da67.7593e6","wires":[]},{"id":"e1a96601.00fff8","type":"set","name":"set: order-status = PendingAssignment","xml":"<set>\n\t<parameter name=\"preload-data.oper-status.order-status\" value=\"PendingAssignment\"/>","comments":"","x":1245.0239715576172,"y":486.28368759155273,"z":"2500da67.7593e6","wires":[]},{"id":"ee8d2da6.a9587","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":1190.9088668823242,"y":288.91858863830566,"z":"2500da67.7593e6","wires":[]},{"id":"e6726c5.1ca5f1","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"`$sql-resource-plugin`\" resource=\"vnf-profile\" key=\"SELECT * from VNF_PROFILE WHERE vnf_type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type\">\n","comments":"","outputs":1,"x":1223.520133972168,"y":368.3631076812744,"z":"2500da67.7593e6","wires":[["7db96b77.bfc044","b73e7ecf.53e96"]]},{"id":"aadb3af.3b1dcc8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-type not found as valid vnf \" />","comments":"","x":1713.8533248901367,"y":367.5852756500244,"z":"2500da67.7593e6","wires":[]},{"id":"7db96b77.bfc044","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1500.5200729370117,"y":368.1408176422119,"z":"2500da67.7593e6","wires":[["aadb3af.3b1dcc8"]]},{"id":"9950aa2a.c6fbb","type":"set","name":"set : sql-resource-plugin","xml":"<set only-if-unset=\"true\">\n<parameter name=\"sql-resource-plugin\" value=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\"/>","comments":"","x":1211.7321090698242,"y":327.79737281799316,"z":"2500da67.7593e6","wires":[]},{"id":"64decaf7.b5ef04","type":"set","name":"set: preload-data += input","xml":"<set>\n<parameter name=\"preload-data.\" value=\"preload-vnf-topology-operation-input.\" />\n","comments":"","x":1202.940658569336,"y":446.82912826538086,"z":"2500da67.7593e6","wires":[]},{"id":"b73e7ecf.53e96","type":"success","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1492.7977828979492,"y":409.68628883361816,"z":"2500da67.7593e6","wires":[["aadb3af.3b1dcc8"]]},{"id":"56297be.01b5984","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912.5713119506836,"y":665.6248331069946,"z":"2500da67.7593e6","wires":[["f3e9e7c1.6f523","90fab1a1.b184","d7b12d3.82f4c5"]]},{"id":"f3e9e7c1.6f523","type":"get-resource","name":"get-resource: vnf-profile.vnf-type","xml":"<get-resource plugin=\"`$sql-resource-plugin`\" resource=\"generic-vnf\" key=\"SELECT * FROM VNF_PROFILE vnf-type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type\">\n","comments":"","outputs":1,"x":1181.5713119506836,"y":665.6248331069946,"z":"2500da67.7593e6","wires":[["cab895eb.9b1258"]]},{"id":"cab895eb.9b1258","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1448.5713119506836,"y":664.6248331069946,"z":"2500da67.7593e6","wires":[["f94b13c7.f036c"]]},{"id":"f94b13c7.f036c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"3000\" />\n\t<parameter name=\"error-message\" value=\"preload vnf-type cannot be deleted while vnf is in use\" />","comments":"","x":1662.5713119506836,"y":664.6248331069946,"z":"2500da67.7593e6","wires":[]},{"id":"4447ff82.0787b","type":"comment","name":"request-action = DeletePreloadVNFRequest, svc-action = delete","info":"","comments":"","x":728,"y":101.76768493652344,"z":"2500da67.7593e6","wires":[]},{"id":"ddd51a1e.acd6b","type":"set","name":"Delete Preload Data","xml":"<set>\n<parameter name=\"preload-data.\" value=\"\" />\n","comments":"","x":1185.7143020629883,"y":407.0000305175781,"z":"2500da67.7593e6","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-activate.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-activate.json
new file mode 100644
index 00000000..7d875a87
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-activate.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"39e8a74f.00d7a8","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","outputs":1,"x":432.8571472167969,"y":392.8571472167969,"z":"99edc426.381898","wires":[[]]},{"id":"74e6fd2f.dee3c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":179.85713958740234,"y":160.35716247558594,"z":"99edc426.381898","wires":[["39e8a74f.00d7a8","83f09b75.461298","b65a1681.7c1c38","ca5aa154.d8ea2","e0967d0e.757cc","91c8fd96.73034","ef986c0d.9506","3041a9ae.a8b0d6","38723ef.e0f7bc2","7646ab3a.7636e4"]]},{"id":"dfa6e2c6.49745","type":"method","name":"method vf-module-topology-activate","xml":"<method rpc='vf-module-topology-activate' mode='sync'>\n","comments":"","outputs":1,"x":222.5238265991211,"y":104.5238265991211,"z":"99edc426.381898","wires":[["74e6fd2f.dee3c4"]]},{"id":"daef36a1.fa1368","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":314.52379608154297,"y":57.523834228515625,"z":"99edc426.381898","wires":[["dfa6e2c6.49745"]]},{"id":"1253e5b0.3e31fa","type":"dgstart","name":"DGSTART","outputs":1,"x":149.35713958740234,"y":57.35716247558594,"z":"99edc426.381898","wires":[["daef36a1.fa1368"]]},{"id":"83f09b75.461298","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":472.1905212402344,"y":289.19036865234375,"z":"99edc426.381898","wires":[["32730681.fc526a"]]},{"id":"32730681.fc526a","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":721.5238723754883,"y":288.52367782592773,"z":"99edc426.381898","wires":[["94496491.8e1268"]]},{"id":"86ef0554.fbc0a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1379.8569946289062,"y":288.5237293243408,"z":"99edc426.381898","wires":[]},{"id":"e0967d0e.757cc","type":"switchNode","name":"switch:vf-module-id config == input","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`\">","comments":"","outputs":1,"x":465.6298828125,"y":237.40260314941406,"z":"99edc426.381898","wires":[["f8c73b3a.1a2af8"]]},{"id":"f8c73b3a.1a2af8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":694.084358215332,"y":237.58442306518555,"z":"99edc426.381898","wires":[["6bcf58a9.7508d8"]]},{"id":"6bcf58a9.7508d8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`\"/>","comments":"","x":847.1753005981445,"y":237.49352645874023,"z":"99edc426.381898","wires":[]},{"id":"b65a1681.7c1c38","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":400.96826171875,"y":705.5238037109375,"z":"99edc426.381898","wires":[]},{"id":"94496491.8e1268","type":"switchNode","name":"switch: order-status = PendingUpdate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingUpdate`\">","comments":"","outputs":1,"x":972.4480667114258,"y":288.9480857849121,"z":"99edc426.381898","wires":[["b04177c6.257fd8"]]},{"id":"b04177c6.257fd8","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1214.902473449707,"y":288.948055267334,"z":"99edc426.381898","wires":[["86ef0554.fbc0a8"]]},{"id":"ca5aa154.d8ea2","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":465.9708251953125,"y":341.4708557128906,"z":"99edc426.381898","wires":[[]]},{"id":"a84acf1a.f3c8c","type":"comment","name":"request-action = VNFActivateRequest, svc-action = activate","info":"","comments":"","x":728.4682235717773,"y":96.69049644470215,"z":"99edc426.381898","wires":[]},{"id":"91c8fd96.73034","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"vf-module-topology-operation-input.\" />","comments":"","outputs":1,"x":429.8571472167969,"y":527.9127197265625,"z":"99edc426.381898","wires":[[]]},{"id":"ef986c0d.9506","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-module-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":399.8571472167969,"y":439.9127197265625,"z":"99edc426.381898","wires":[[]]},{"id":"cba23ed7.a7888","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":758.2698669433594,"y":482.90121841430664,"z":"99edc426.381898","wires":[["b1d53231.032d9"]]},{"id":"b1d53231.032d9","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 occurred while updating vf-module orchestration-status in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":941.4127960205078,"y":482.90128898620605,"z":"99edc426.381898","wires":[]},{"id":"d71b0b9.a2878f8","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":423.17459869384766,"y":663.6269645690918,"z":"99edc426.381898","wires":[[]]},{"id":"3041a9ae.a8b0d6","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":493.74600982666016,"y":482.91271591186523,"z":"99edc426.381898","wires":[["cba23ed7.a7888","324dd0a1.e8559"]]},{"id":"324dd0a1.e8559","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":765.4960327148438,"y":525.66273021698,"z":"99edc426.381898","wires":[["b1d53231.032d9"]]},{"id":"38723ef.e0f7bc2","type":"set","name":"set: vnf-instance-service-data.vf-module-relationship-list[]","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vf-module-relationship-list[$vnf-instance-service-data.vf-module-relationship-list_length].vf-module-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`\" />","comments":"","outputs":1,"x":532.2460098266602,"y":619.1627159118652,"z":"99edc426.381898","wires":[[]]},{"id":"d97e99d0.9e7e48","type":"set","name":"set: vnf-instance-service-data.vf-module-relationship-list[] = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vf-module-relationship-list_length\" value=\"0\" />","comments":"","outputs":1,"x":1149.773796081543,"y":575.0516405105591,"z":"99edc426.381898","wires":[[]]},{"id":"7646ab3a.7636e4","type":"switchNode","name":"switch: vnf-instance-service-data.vf-module-relationship-list[]","xml":"<switch test=\"`$vnf-instance-service-data.vf-module-relationship-list_length`\">","comments":"","outputs":1,"x":543.4960098266602,"y":574.4127254486084,"z":"99edc426.381898","wires":[["f9261340.ae80b"]]},{"id":"f9261340.ae80b","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":844.7460098266602,"y":574.4127254486084,"z":"99edc426.381898","wires":[["d97e99d0.9e7e48"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-assign-vnf-networks.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign-vnf-networks.json
new file mode 100644
index 00000000..15e63adf
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign-vnf-networks.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"c30b96fb.b54ae8","type":"dgstart","name":"DGSTART","outputs":1,"x":107.3214340209961,"y":47.32143020629883,"z":"1faa4c21.138614","wires":[["92128070.77ca8"]]},{"id":"92128070.77ca8","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":272.4880905151367,"y":47.488101959228516,"z":"1faa4c21.138614","wires":[["17c24793.5d4508"]]},{"id":"17c24793.5d4508","type":"method","name":"method vf-module-topology-assign-vnf-networks","xml":"<method rpc='vf-module-topology-assign-vnf-networks' mode='sync'>","comments":"","outputs":1,"x":235.7381134033203,"y":101.73809432983398,"z":"1faa4c21.138614","wires":[["4de1dc94.aef9f4"]]},{"id":"4de1dc94.aef9f4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":188.0714340209961,"y":150.57143020629883,"z":"1faa4c21.138614","wires":[["70ff54f3.ff0e6c","b46a3430.78ab38","aaf65e9a.4351f","763de398.5ac24c","8fc6861.1cc4c78","330d0bd.ba072f4","3600f85a.1aec98"]]},{"id":"dc1fefd3.cd357","type":"switchNode","name":"switch test: INPUT network-id = NULL or 0","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '0'`\">","comments":"","outputs":1,"x":764.5137062072754,"y":701.5578842163086,"z":"1faa4c21.138614","wires":[["ed113fb3.62eda","a0ca4ac5.fdc388"]]},{"id":"ed113fb3.62eda","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1039.8771934509277,"y":745.7397541999817,"z":"1faa4c21.138614","wires":[["aba6d801.11f9a8"]]},{"id":"aba6d801.11f9a8","type":"switchNode","name":"switch : INPUT network-name = NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '0'`\">","comments":"","outputs":1,"x":1277.659294128418,"y":745.5837326049805,"z":"1faa4c21.138614","wires":[["18391f2.d637de1","d29dc4ee.83b888"]]},{"id":"a0ca4ac5.fdc388","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1039.8974800109863,"y":702.4467806816101,"z":"1faa4c21.138614","wires":[["3c76d450.1a1c5c"]]},{"id":"18391f2.d637de1","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1515.851245880127,"y":785.139214515686,"z":"1faa4c21.138614","wires":[["4e004f85.49efa"]]},{"id":"3c76d450.1a1c5c","type":"save","name":"get AnAI - l3-network by id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1241.1195945739746,"y":702.4469485282898,"z":"1faa4c21.138614","wires":[["b7314ceb.79175","32bd35ee.cb0d2a"]]},{"id":"b7314ceb.79175","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1444.0642852783203,"y":702.0023970603943,"z":"1faa4c21.138614","wires":[["32309ba2.0ab454"]]},{"id":"3c910573.9a235a","type":"for","name":"for i : INPUT vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":546.8075828552246,"y":559.0505676269531,"z":"1faa4c21.138614","wires":[["dfdb5bcb.cdcf38"]]},{"id":"4e004f85.49efa","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n\n","comments":"","outputs":1,"x":1726.3532485961914,"y":784.8810062408447,"z":"1faa4c21.138614","wires":[["127c9bfe.0fbf64","7871388.9d854c8"]]},{"id":"127c9bfe.0fbf64","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1947.6032485961914,"y":785.131067276001,"z":"1faa4c21.138614","wires":[["32309ba2.0ab454"]]},{"id":"f0b9ed4f.6db11","type":"set","name":"initialize tmp.usePreload = 1 and tmp.AAI.l3network","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n<parameter name='tmp.AnAI.l3network.' value='' />\n","comments":"","outputs":1,"x":478.3012237548828,"y":472.77592849731445,"z":"1faa4c21.138614","wires":[[]]},{"id":"e1f0efe6.81d2e","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":138.2354278564453,"y":472.56047439575195,"z":"1faa4c21.138614","wires":[["f0b9ed4f.6db11","6e1813c8.e5e2fc","ee2deaea.1bec48"]]},{"id":"70ff54f3.ff0e6c","type":"for","name":"for j : PRELOAD vnf-networks","xml":"<for index=\"j\" start=\"0\" end=\"`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":272.4603729248047,"y":385.82141494750977,"z":"1faa4c21.138614","wires":[["e1f0efe6.81d2e"]]},{"id":"6e1813c8.e5e2fc","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":314.1876983642578,"y":558.9804592132568,"z":"1faa4c21.138614","wires":[["3c910573.9a235a","aeff0ffa.88a75"]]},{"id":"dfdb5bcb.cdcf38","type":"switchNode","name":"switch : PRELOAD network-role = INPUT","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":856.1877632141113,"y":558.3441305160522,"z":"1faa4c21.138614","wires":[["382cc26b.de833e"]]},{"id":"382cc26b.de833e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1106.9831886291504,"y":558.6397728919983,"z":"1faa4c21.138614","wires":[["fb7701c1.24954"]]},{"id":"fb7701c1.24954","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":465.2687568664551,"y":659.4189281463623,"z":"1faa4c21.138614","wires":[["dc1fefd3.cd357","5a2e54d8.28c0dc","bc41d36b.5b0d6"]]},{"id":"5a2e54d8.28c0dc","type":"set","name":"set tmp.usePreload = 0","xml":"<set>\n<parameter name='tmp.usePreload' value='0' />\n","comments":"","outputs":1,"x":705.6323890686035,"y":659.3280572891235,"z":"1faa4c21.138614","wires":[[]]},{"id":"d29dc4ee.83b888","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1515.4091796875,"y":745.8452072143555,"z":"1faa4c21.138614","wires":[["32309ba2.0ab454"]]},{"id":"bc41d36b.5b0d6","type":"switchNode","name":"switch : tmp.usePreload= 0","xml":"<switch test=\"`$tmp.usePreload == 0`\">","comments":"","outputs":1,"x":705.0207977294922,"y":971.0733308792114,"z":"1faa4c21.138614","wires":[["9ce9a7a6.6d0d28"]]},{"id":"9ce9a7a6.6d0d28","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":906.0206756591797,"y":971.0734529495239,"z":"1faa4c21.138614","wires":[["df99f43a.192678"]]},{"id":"aeff0ffa.88a75","type":"switchNode","name":"switch: tmp.usePreload= 1","xml":"<switch test=\"`$tmp.usePreload == 1`\">","comments":"","outputs":1,"x":467.8374481201172,"y":1901.7782440185547,"z":"1faa4c21.138614","wires":[["35b40dfd.b6e712"]]},{"id":"35b40dfd.b6e712","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":675.869026184082,"y":1901.5184955596924,"z":"1faa4c21.138614","wires":[["9aecd914.8483b8"]]},{"id":"32309ba2.0ab454","type":"set","name":"set tmp.usePreload = 1","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n","comments":"","outputs":1,"x":1710.0172729492188,"y":886.6042308807373,"z":"1faa4c21.138614","wires":[[]]},{"id":"70579eed.d89c5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id`\" />\n","comments":"","x":1594.9880854288735,"y":661.1269476148818,"z":"1faa4c21.138614","wires":[]},{"id":"32bd35ee.cb0d2a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1437.7658632066514,"y":661.1269476148818,"z":"1faa4c21.138614","wires":[["70579eed.d89c5"]]},{"id":"d5ab10a8.40fb5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred whie querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name`\" />\n","comments":"","x":2096.099006652832,"y":743.3491630554199,"z":"1faa4c21.138614","wires":[]},{"id":"7871388.9d854c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1938.8767844306099,"y":743.3491630554199,"z":"1faa4c21.138614","wires":[["d5ab10a8.40fb5"]]},{"id":"b46a3430.78ab38","type":"switchNode","name":"switch ...PRELOAD vnf-networks[]","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":452.07142639160156,"y":330.0714340209961,"z":"1faa4c21.138614","wires":[["3f756909.e553f6"]]},{"id":"3f756909.e553f6","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":679.5158996582031,"y":329.5991439819336,"z":"1faa4c21.138614","wires":[["61c7ea59.ae7a54"]]},{"id":"61c7ea59.ae7a54","type":"set","name":"set PRELOAD vnf-networks[] = 0","xml":"<set>\n<parameter name = \"vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value=\"0\" />\n","comments":"","outputs":1,"x":901.0715086195205,"y":329.59916464487696,"z":"1faa4c21.138614","wires":[[]]},{"id":"ee2deaea.1bec48","type":"switchNode","name":"switch ...INPUT vnf-networks[]","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":367.5714416503906,"y":513.8214120864868,"z":"1faa4c21.138614","wires":[["b5803df6.ae5a9"]]},{"id":"b5803df6.ae5a9","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":591.0158920288086,"y":513.5991477966309,"z":"1faa4c21.138614","wires":[["a3eaa269.9cad5"]]},{"id":"a3eaa269.9cad5","type":"set","name":"set INPUT vnf-networks_length = 0","xml":"<set>\n<parameter name='vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":823.571500990126,"y":513.5991684595742,"z":"1faa4c21.138614","wires":[[]]},{"id":"a5aed389.d71d6","type":"comment","name":"For each preload network, see if there is an override in input","info":"","comments":"","x":741.6826629638672,"y":422.0436592102051,"z":"1faa4c21.138614","wires":[]},{"id":"238b5959.ad0836","type":"comment","name":"CALLED BY vf-module-topology-assign AND vf-module-topology-changeassign","info":"","comments":"","x":793.7380828857422,"y":92.68254470825195,"z":"1faa4c21.138614","wires":[]},{"id":"763de398.5ac24c","type":"set","name":"set: service-data =+ input","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"vf-module-topology-operation-input.\" />","comments":"","outputs":1,"x":423.8492031097412,"y":239.015869140625,"z":"1faa4c21.138614","wires":[[]]},{"id":"aaf65e9a.4351f","type":"set","name":"set: service-data = preload-data","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"vf-module-preload-data.\" />","comments":"","outputs":1,"x":443.75331687927246,"y":197.162353515625,"z":"1faa4c21.138614","wires":[[]]},{"id":"8fc6861.1cc4c78","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":396.19046783447266,"y":2271.0118932724,"z":"1faa4c21.138614","wires":[]},{"id":"330d0bd.ba072f4","type":"switchNode","name":"switch: preload order-status = PendingAssignment","xml":"<switch test=\"`$vf-module-preload-data.oper-status.order-status == PendingAssignment`\">","comments":"","outputs":1,"x":500.8492126464844,"y":150.57143306732178,"z":"1faa4c21.138614","wires":[["4c5e6e0b.0d9a"]]},{"id":"471ae763.ed73c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid preload-data order status'/>","comments":"","x":917.7884559631348,"y":150.26844310760498,"z":"1faa4c21.138614","wires":[]},{"id":"4c5e6e0b.0d9a","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":768.4553451538086,"y":150.2683687210083,"z":"1faa4c21.138614","wires":[["471ae763.ed73c8"]]},{"id":"3600f85a.1aec98","type":"set","name":"set: vf-module-id","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`\"/>","comments":"","outputs":1,"x":397.17071533203125,"y":283.51190757751465,"z":"1faa4c21.138614","wires":[[]]},{"id":"5b189a42.545814","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":774,"y":1174,"z":"1faa4c21.138614","wires":[["a749d767.017348"]]},{"id":"a749d767.017348","type":"switchNode","name":"switch: SERVICE-DATA network-role = INPUT","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":1134.9634094238281,"y":1173.099287033081,"z":"1faa4c21.138614","wires":[["b3cb6d4f.0288f"]]},{"id":"b3cb6d4f.0288f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1414.5088195800781,"y":1173.144941329956,"z":"1faa4c21.138614","wires":[["24634a0a.d7c076"]]},{"id":"de134847.1f4e48","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n","comments":"","outputs":1,"x":1892.982032775879,"y":1172.0794134140015,"z":"1faa4c21.138614","wires":[[]]},{"id":"24634a0a.d7c076","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1574.9354400634766,"y":1172.961480140686,"z":"1faa4c21.138614","wires":[["73a4d8d5.c06308","748cdef5.bc80f","de134847.1f4e48"]]},{"id":"a8393abf.7fcee8","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":880.2924880981445,"y":1064.4257173538208,"z":"1faa4c21.138614","wires":[]},{"id":"181bc12d.03d83f","type":"switchNode","name":"switch: INPUT sbunet-name != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name != ''`\">","comments":"","outputs":1,"x":2357.911766052246,"y":1280.5684156417847,"z":"1faa4c21.138614","wires":[["b1aab41.1658748"]]},{"id":"b1aab41.1658748","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2595.1617317199707,"y":1280.3183946609497,"z":"1faa4c21.138614","wires":[["ebb89f74.08857"]]},{"id":"ce3cc9d0.4cee08","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3334.42374420166,"y":1393.8661336898804,"z":"1faa4c21.138614","wires":[[]]},{"id":"ebb89f74.08857","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2460.923728942871,"y":1330.866021156311,"z":"1faa4c21.138614","wires":[["c8277f6a.50834"]]},{"id":"94133efa.587e1","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2469.352195739746,"y":1395.2946138381958,"z":"1faa4c21.138614","wires":[["d4e7d16e.714f7"]]},{"id":"d4e7d16e.714f7","type":"switchNode","name":"switch: AnAI == INPUT - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name`\">","comments":"","outputs":1,"x":2842.102149963379,"y":1394.5446977615356,"z":"1faa4c21.138614","wires":[["cf289518.3fc368"]]},{"id":"cf289518.3fc368","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3100.50484085083,"y":1394.4117259979248,"z":"1faa4c21.138614","wires":[["ce3cc9d0.4cee08"]]},{"id":"c8277f6a.50834","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2746.2452125549316,"y":1330.449411869049,"z":"1faa4c21.138614","wires":[["94133efa.587e1"]]},{"id":"748cdef5.bc80f","type":"switchNode","name":"switch: INPUT sbunet-id != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id != ''`\">","comments":"","outputs":1,"x":1851.483211517334,"y":1236.8065958023071,"z":"1faa4c21.138614","wires":[["87aac3bf.46e16","8c173a36.9127d8"]]},{"id":"1bed8cec.efe9e3","type":"set","name":"set: data-data = INPUT - subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id`\" />","comments":"","outputs":1,"x":2349.7332077026367,"y":1237.0565977096558,"z":"1faa4c21.138614","wires":[[]]},{"id":"87aac3bf.46e16","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2107.7331771850586,"y":1236.5565748214722,"z":"1faa4c21.138614","wires":[["1bed8cec.efe9e3"]]},{"id":"8c173a36.9127d8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2108.9832191467285,"y":1280.5565958023071,"z":"1faa4c21.138614","wires":[["181bc12d.03d83f"]]},{"id":"12ef162a.3f441a","type":"switchNode","name":"switch: INPUT ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2366.185417175293,"y":1508.7114629745483,"z":"1faa4c21.138614","wires":[["f70a96da.79e438"]]},{"id":"f70a96da.79e438","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2613.4353828430176,"y":1508.4614419937134,"z":"1faa4c21.138614","wires":[["f829dcc5.c6de7"]]},{"id":"cc6db42c.cf6378","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3342.697395324707,"y":1622.009181022644,"z":"1faa4c21.138614","wires":[[]]},{"id":"f829dcc5.c6de7","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2469.197380065918,"y":1559.0090684890747,"z":"1faa4c21.138614","wires":[["fdeef706.829528"]]},{"id":"4f132648.69d248","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2477.625846862793,"y":1623.4376611709595,"z":"1faa4c21.138614","wires":[["cae2d965.d355a8"]]},{"id":"cae2d965.d355a8","type":"switchNode","name":"switch: AnAI == INPUT - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2850.375801086426,"y":1622.6877450942993,"z":"1faa4c21.138614","wires":[["1d5397be.45f898"]]},{"id":"1d5397be.45f898","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3108.778491973877,"y":1622.5547733306885,"z":"1faa4c21.138614","wires":[["cc6db42c.cf6378"]]},{"id":"fdeef706.829528","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2754.5188636779785,"y":1558.5924592018127,"z":"1faa4c21.138614","wires":[["4f132648.69d248"]]},{"id":"73a4d8d5.c06308","type":"switchNode","name":"switch: INPUT ipv6-sbunet-id != NULL","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id != ''`\">","comments":"","outputs":1,"x":1859.7568626403809,"y":1464.9496431350708,"z":"1faa4c21.138614","wires":[["9cb75fc8.62948","64acb997.b0bf68"]]},{"id":"ae50028d.0d9f6","type":"set","name":"set: service-data = INPUT - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id`\" />","comments":"","outputs":1,"x":2367.0068588256836,"y":1465.1996450424194,"z":"1faa4c21.138614","wires":[[]]},{"id":"9cb75fc8.62948","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2116.0068283081055,"y":1464.6996221542358,"z":"1faa4c21.138614","wires":[["ae50028d.0d9f6"]]},{"id":"64acb997.b0bf68","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2117.2568702697754,"y":1508.6996431350708,"z":"1faa4c21.138614","wires":[["12ef162a.3f441a"]]},{"id":"df99f43a.192678","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":515.8282470703125,"y":1070.390067100525,"z":"1faa4c21.138614","wires":[["44440d79.5a1ee4","5b189a42.545814"]]},{"id":"44440d79.5a1ee4","type":"switchNode","name":"switch:vf-module-service-data...vnf-networks_length","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":831.0153274536133,"y":1124.4490270614624,"z":"1faa4c21.138614","wires":[["63358e06.3f664"]]},{"id":"63358e06.3f664","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1118.5153198242188,"y":1124.4490270614624,"z":"1faa4c21.138614","wires":[["ac876566.e9a498"]]},{"id":"ac876566.e9a498","type":"switchNode","name":"set: vf-module-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1417.2653198242188,"y":1124.4490270614624,"z":"1faa4c21.138614","wires":[[]]},{"id":"a64b9779.a71b08","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1339.638515472412,"y":1900.6209201812744,"z":"1faa4c21.138614","wires":[["4696ff9e.15cd7"]]},{"id":"3b397c6b.f1ef14","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n\n","comments":"","outputs":1,"x":2014.0710487365723,"y":2173.3637895584106,"z":"1faa4c21.138614","wires":[[]]},{"id":"5d489590.345c3c","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1116.531536102295,"y":1900.8868598937988,"z":"1faa4c21.138614","wires":[["a64b9779.a71b08","96f0e56a.e21d98","1b8842da.0a0e4d"]]},{"id":"9aecd914.8483b8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":858.0431060791016,"y":1901.1858234405518,"z":"1faa4c21.138614","wires":[["5d489590.345c3c","eb351c3a.523a","a1ca6a21.36bfc8"]]},{"id":"60582a4c.d77b14","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$j].network-name`\" />\n","comments":"","x":1486.9243507385254,"y":1938.4834985733032,"z":"1faa4c21.138614","wires":[]},{"id":"96f0e56a.e21d98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1331.7021285163032,"y":1938.4834985733032,"z":"1faa4c21.138614","wires":[["60582a4c.d77b14"]]},{"id":"4696ff9e.15cd7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'PRELOAD network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`\" />\n","comments":"","x":1505.9243812561035,"y":1900.4835233688354,"z":"1faa4c21.138614","wires":[]},{"id":"1f867022.29e93","type":"switchNode","name":"switch: SERVICE-DATA network-role = PRELOAD","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role`\">","comments":"","outputs":1,"x":1264.674373626709,"y":2173.2336616516113,"z":"1faa4c21.138614","wires":[["e72c07ef.a09cd8"]]},{"id":"e72c07ef.a09cd8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1549.0770645141602,"y":2173.1006898880005,"z":"1faa4c21.138614","wires":[["946a7c8e.c755c"]]},{"id":"eb351c3a.523a","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1134.4244194030762,"y":2120.483539581299,"z":"1faa4c21.138614","wires":[["1f867022.29e93"]]},{"id":"4c2a528c.ae82fc","type":"switchNode","name":"switch: tmp.AnAI.l3network.network-id == null","xml":"<switch test=\"`$tmp.AnAI.l3network.network-id == ''`\">","comments":"","outputs":1,"x":1597.317310333252,"y":1976.3764724731445,"z":"1faa4c21.138614","wires":[["c00f083d.1aa798"]]},{"id":"c00f083d.1aa798","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1859.567310333252,"y":1976.3764724731445,"z":"1faa4c21.138614","wires":[["45a1f95e.d33e58"]]},{"id":"45a1f95e.d33e58","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying l3-network with network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`\" />\n","comments":"","x":2013.567310333252,"y":1976.8764724731445,"z":"1faa4c21.138614","wires":[]},{"id":"1b8842da.0a0e4d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1337.317295074463,"y":1976.1264533996582,"z":"1faa4c21.138614","wires":[["4c2a528c.ae82fc"]]},{"id":"a1ca6a21.36bfc8","type":"switchNode","name":"switch: vf-module-service-data...vnf-networks_length","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1189.995891571045,"y":2071.305072784424,"z":"1faa4c21.138614","wires":[["2beaa433.a0358c"]]},{"id":"2beaa433.a0358c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1477.4958839416504,"y":2071.305072784424,"z":"1faa4c21.138614","wires":[["46d2dad3.6e7a34"]]},{"id":"46d2dad3.6e7a34","type":"switchNode","name":"set: vf-module-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1776.2458839416504,"y":2071.305072784424,"z":"1faa4c21.138614","wires":[[]]},{"id":"19586604.772bba","type":"switchNode","name":"switch: SERVICE-DATA sbunet-id == NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`\">","comments":"","outputs":1,"x":2000.0316200256348,"y":2225.2693090438843,"z":"1faa4c21.138614","wires":[["b3750df1.dad78"]]},{"id":"946a7c8e.c755c","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1707.0316123962402,"y":2173.2693090438843,"z":"1faa4c21.138614","wires":[["3b397c6b.f1ef14","19586604.772bba","a54a422d.7f289"]]},{"id":"b3750df1.dad78","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2256.2815856933594,"y":2225.0192880630493,"z":"1faa4c21.138614","wires":[["1fb12a07.945fd6"]]},{"id":"1fb12a07.945fd6","type":"switchNode","name":"switch: SERVICE-DATA sbunet-name != NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`\">","comments":"","outputs":1,"x":2082.6267700195312,"y":2285.174117088318,"z":"1faa4c21.138614","wires":[["7263aff8.1dc94"]]},{"id":"7263aff8.1dc94","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2347.876735687256,"y":2284.924096107483,"z":"1faa4c21.138614","wires":[["1e753aed.9f0f55"]]},{"id":"1cc5f67b.c5836a","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3104.1387329101562,"y":2408.043137550354,"z":"1faa4c21.138614","wires":[[]]},{"id":"1e753aed.9f0f55","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2201.3529663085938,"y":2346.1146154403687,"z":"1faa4c21.138614","wires":[["80ab5bcc.2e28c8"]]},{"id":"ea48a7cf.4c4df8","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2239.067184448242,"y":2409.4716176986694,"z":"1faa4c21.138614","wires":[["145c2385.46aa9c"]]},{"id":"145c2385.46aa9c","type":"switchNode","name":"switch: AnAI == service-data - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`\">","comments":"","outputs":1,"x":2611.817138671875,"y":2408.7217016220093,"z":"1faa4c21.138614","wires":[["b42e690f.505ff8"]]},{"id":"b42e690f.505ff8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2870.219829559326,"y":2408.5887298583984,"z":"1faa4c21.138614","wires":[["1cc5f67b.c5836a"]]},{"id":"80ab5bcc.2e28c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2486.6744499206543,"y":2345.6980061531067,"z":"1faa4c21.138614","wires":[["ea48a7cf.4c4df8"]]},{"id":"5296c6fd.9fcb48","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2096.4482421875,"y":2544.9955739974976,"z":"1faa4c21.138614","wires":[["e32aea1f.9758e8"]]},{"id":"e32aea1f.9758e8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2381.6982078552246,"y":2544.7455530166626,"z":"1faa4c21.138614","wires":[["384e37ed.ea75c8"]]},{"id":"13d42cf8.7179b3","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3127.9600982666016,"y":2660.007555961609,"z":"1faa4c21.138614","wires":[[]]},{"id":"384e37ed.ea75c8","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2193.7459716796875,"y":2603.7931451797485,"z":"1faa4c21.138614","wires":[["21db5d22.4f1eb2"]]},{"id":"1f1251f4.1e980e","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2262.8885498046875,"y":2661.4360361099243,"z":"1faa4c21.138614","wires":[["c4b44e57.fc7a1"]]},{"id":"c4b44e57.fc7a1","type":"switchNode","name":"switch: AnAI == service-data - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2635.6385040283203,"y":2660.686120033264,"z":"1faa4c21.138614","wires":[["95800325.64ed4"]]},{"id":"95800325.64ed4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2894.0411949157715,"y":2660.5531482696533,"z":"1faa4c21.138614","wires":[["13d42cf8.7179b3"]]},{"id":"21db5d22.4f1eb2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2479.067455291748,"y":2603.3765358924866,"z":"1faa4c21.138614","wires":[["1f1251f4.1e980e"]]},{"id":"b6579139.05a4d","type":"comment","name":"Use Preload Data","info":"","comments":"","x":453.5230941772461,"y":1850.9603958129883,"z":"1faa4c21.138614","wires":[]},{"id":"a54a422d.7f289","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-id == NULL","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`\">","comments":"","outputs":1,"x":2010.781494140625,"y":2492.055146217346,"z":"1faa4c21.138614","wires":[["c01ff5de.4ee4b8"]]},{"id":"c01ff5de.4ee4b8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2295.0314598083496,"y":2491.8051252365112,"z":"1faa4c21.138614","wires":[["5296c6fd.9fcb48"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-assign.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign.json
new file mode 100644
index 00000000..46afa880
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"c16263f6.6c033","type":"dgstart","name":"DGSTART","outputs":1,"x":122.85714721679688,"y":48.57143020629883,"z":"350dd502.49698a","wires":[["37a9d0a8.5ccc7"]]},{"id":"37a9d0a8.5ccc7","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":288.0238037109375,"y":48.738101959228516,"z":"350dd502.49698a","wires":[["588951bd.cad18"]]},{"id":"588951bd.cad18","type":"method","name":"method vf-module-topology-assign","xml":"<method rpc='vf-module-topology-assign' mode='sync'>\n","comments":"","outputs":1,"x":247.4524040222168,"y":104.30952453613281,"z":"350dd502.49698a","wires":[["23232616.dc87ba"]]},{"id":"23232616.dc87ba","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":234.78572463989258,"y":159.14286041259766,"z":"350dd502.49698a","wires":[["f8edc82.b3e8938","2ec63c84.2fdfa4","6f2046b4.9e38b8","70b11385.26396c","83b4e560.3deac8","ec42a08c.2f911","3fb1f49d.968cac","70c2e0fb.98281"]]},{"id":"f8edc82.b3e8938","type":"set","name":"set: order-status = PendingCreate","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"PendingCreate\"/>","comments":"","outputs":1,"x":502.67656326293945,"y":581.3350772857666,"z":"350dd502.49698a","wires":[[]]},{"id":"2ec63c84.2fdfa4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":441.8194007873535,"y":667.0397090911865,"z":"350dd502.49698a","wires":[]},{"id":"2e373aaa.eea7e6","type":"comment","name":"request-action = VNFActivateRequest","info":"","comments":"","x":681.4523811340332,"y":77.25397491455078,"z":"350dd502.49698a","wires":[]},{"id":"2f391c5c.812e84","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":799.7263221740723,"y":532.3576011657715,"z":"350dd502.49698a","wires":[["47e9fdf3.2b1f24"]]},{"id":"ccece92b.253528","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 occurred while updating vf-module orchestration-status in AnAI\"/>","comments":"","x":1183.8692512512207,"y":532.3576717376709,"z":"350dd502.49698a","wires":[]},{"id":"a9a15235.6b621","type":"save","name":"save relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":802.031810760498,"y":375.2578191757202,"z":"350dd502.49698a","wires":[["7bf5e0bd.bd877"]]},{"id":"7bf5e0bd.bd877","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1014.676082611084,"y":375.3048334121704,"z":"350dd502.49698a","wires":[["6b0b8d97.a1d2c4"]]},{"id":"6f2046b4.9e38b8","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":507.67861557006836,"y":375.226300239563,"z":"350dd502.49698a","wires":[["a9a15235.6b621"]]},{"id":"9195333e.3c5b3","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 occurred while saving vf-module l3-network relationship in AnAI with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>","comments":"","x":1183.726146697998,"y":485.3211603164673,"z":"350dd502.49698a","wires":[]},{"id":"6b0b8d97.a1d2c4","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":973.4405326843262,"y":437.6070137023926,"z":"350dd502.49698a","wires":[["2266e1a7.71fbbe","9195333e.3c5b3"]]},{"id":"2266e1a7.71fbbe","type":"save","name":"delete vf-module: l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1266.8691291809082,"y":438.0357599258423,"z":"350dd502.49698a","wires":[[]]},{"id":"70b11385.26396c","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":535.202465057373,"y":532.3690986633301,"z":"350dd502.49698a","wires":[["2f391c5c.812e84"]]},{"id":"47e9fdf3.2b1f24","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":958.1548957824707,"y":532.4643602371216,"z":"350dd502.49698a","wires":[["ccece92b.253528","2266e1a7.71fbbe"]]},{"id":"83b4e560.3deac8","type":"call","name":"call: vf-module-topology-assign-vnf-networks","xml":"<call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":534.9524040222168,"y":264.8928756713867,"z":"350dd502.49698a","wires":[[]]},{"id":"ec42a08c.2f911","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":465.8572120666504,"y":626.4642963409424,"z":"350dd502.49698a","wires":[[]]},{"id":"3fb1f49d.968cac","type":"switchNode","name":"switch ...SERVICE-DATA vnf-networks[]","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":520.0357627868652,"y":315.46430587768555,"z":"350dd502.49698a","wires":[["66fc8dde.364c84"]]},{"id":"66fc8dde.364c84","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":760.4802360534668,"y":314.99201583862305,"z":"350dd502.49698a","wires":[["5163a821.a1b9a8"]]},{"id":"5163a821.a1b9a8","type":"set","name":"set SERVICE-DATA vnf-networks[] = 0","xml":"<set>\n<parameter name='vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":982.0358450147842,"y":314.9920365015664,"z":"350dd502.49698a","wires":[[]]},{"id":"70c2e0fb.98281","type":"save","name":"GET AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" \n\t\tpfx=\"tmp.AnAI.vfmodule\" >","comments":"","outputs":1,"x":465.5357322692871,"y":159.64287090301514,"z":"350dd502.49698a","wires":[["5093485a.9aea88","ef352420.3d6798"]]},{"id":"5093485a.9aea88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":659.5357322692871,"y":159.39287090301514,"z":"350dd502.49698a","wires":[["2a95d52a.bc0f4a"]]},{"id":"ef352420.3d6798","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":667.0357475280762,"y":199.39288139343262,"z":"350dd502.49698a","wires":[["a7a735d3.c7fd48"]]},{"id":"2a95d52a.bc0f4a","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 occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":813.7857322692871,"y":159.14287090301514,"z":"350dd502.49698a","wires":[]},{"id":"a7a735d3.c7fd48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'vf-module not found in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":834.2857322692871,"y":199.64287090301514,"z":"350dd502.49698a","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-changeassign.json
new file mode 100644
index 00000000..d12a01cb
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"74fb79ea.032e48","type":"dgstart","name":"DGSTART","outputs":1,"x":122.85714721679688,"y":60,"z":"82b724af.168de8","wires":[["1f56866e.5a45aa"]]},{"id":"1f56866e.5a45aa","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":288.0238037109375,"y":60.16667175292969,"z":"82b724af.168de8","wires":[["7d1ef972.4819e8"]]},{"id":"ded9641e.047bb8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":200.3571548461914,"y":163,"z":"82b724af.168de8","wires":[["74023518.66a7dc","53b04d88.f911e4","ee20442e.3ca3d8","4e4ca37c.97abbc","3db50ae5.43abb6","6af9e30c.118d8c","64e590aa.7bcaa","490cb041.34c72","3520790.e294188","8646627b.abeda","df4daff8.410d8"]]},{"id":"74023518.66a7dc","type":"set","name":"set: order-status = PendingUpdate","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"PendingUpdate\"/>","comments":"","outputs":1,"x":495.8020248413086,"y":887.4610958099365,"z":"82b724af.168de8","wires":[[]]},{"id":"53b04d88.f911e4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":434.07183837890625,"y":1022.2609748840332,"z":"82b724af.168de8","wires":[]},{"id":"ee20442e.3ca3d8","type":"switchNode","name":"switch: service-data order-status = Active","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":515.5238189697266,"y":162.88889145851135,"z":"82b724af.168de8","wires":[["6f57b256.79d63c"]]},{"id":"2efaeb27.a894b4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid service-data order status'/>","comments":"","x":920.2736358642578,"y":162.72226548194885,"z":"82b724af.168de8","wires":[]},{"id":"6f57b256.79d63c","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":761.6904449462891,"y":162.47214341163635,"z":"82b724af.168de8","wires":[["2efaeb27.a894b4"]]},{"id":"7d1ef972.4819e8","type":"method","name":"method vf-module-topology-changeassign","xml":"<method rpc='vf-module-topology-changeassign' mode='sync'>\n","comments":"","outputs":1,"x":222.85714721679688,"y":111,"z":"82b724af.168de8","wires":[["ded9641e.047bb8"]]},{"id":"4e4ca37c.97abbc","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-module-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":433.80957794189453,"y":933.476110458374,"z":"82b724af.168de8","wires":[[]]},{"id":"3db50ae5.43abb6","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":497.80957794189453,"y":841.476110458374,"z":"82b724af.168de8","wires":[[]]},{"id":"6af9e30c.118d8c","type":"call","name":"call: vf-module-topology-assign-vnf-neworks","xml":"<call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":523.7460479736328,"y":208.66666793823242,"z":"82b724af.168de8","wires":[[]]},{"id":"490cb041.34c72","type":"save","name":"delete l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":478.7778015136719,"y":339.9049777984619,"z":"82b724af.168de8","wires":[["9028380b.6c4ac8"]]},{"id":"557a38ee.a802f8","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 occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id + ' vf-module update FAILED.'`\"/>","comments":"","x":880.6347961425781,"y":340.1903476715088,"z":"82b724af.168de8","wires":[]},{"id":"64e590aa.7bcaa","type":"save","name":"get AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" \n\t\tpfx=\"tmp.AnAI.vfmodule\">","comments":"","outputs":1,"x":452.63490295410156,"y":253.55555725097656,"z":"82b724af.168de8","wires":[["6fd52d0e.ed4644","85739c68.20d2c"]]},{"id":"795ec745.e145d8","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":799.5909881591797,"y":429.90022468566895,"z":"82b724af.168de8","wires":[["c6d96495.8cf3e8"]]},{"id":"c6d96495.8cf3e8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1012.7352294921875,"y":429.94725704193115,"z":"82b724af.168de8","wires":[["fc96e652.96f9f8"]]},{"id":"3520790.e294188","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":495.80943298339844,"y":429.44017601013184,"z":"82b724af.168de8","wires":[["795ec745.e145d8"]]},{"id":"cbdefadd.2eea08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`\"/>","comments":"","x":1368.928123474121,"y":789.1421012878418,"z":"82b724af.168de8","wires":[]},{"id":"fc96e652.96f9f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1181.713981628418,"y":429.1780004501343,"z":"82b724af.168de8","wires":[["cbdefadd.2eea08","c910e4b6.a9df08","434af9d5.0675a8","264625a3.d0bf3a","52f02717.530ac8"]]},{"id":"434af9d5.0675a8","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1421.2140502929688,"y":477.10680198669434,"z":"82b724af.168de8","wires":[[]]},{"id":"d3e9f0df.7a967","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 occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>","comments":"","x":833.9204864501953,"y":254.2696990966797,"z":"82b724af.168de8","wires":[]},{"id":"9028380b.6c4ac8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":694.6349182128906,"y":340.3333225250244,"z":"82b724af.168de8","wires":[["557a38ee.a802f8"]]},{"id":"8646627b.abeda","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":455.4286117553711,"y":979.4286098480225,"z":"82b724af.168de8","wires":[[]]},{"id":"264625a3.d0bf3a","type":"for","name":"for i : tmp.AnAI.vfmodule.relationship","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1445.1783752441406,"y":568.0000343322754,"z":"82b724af.168de8","wires":[["e2842577.e43338"]]},{"id":"e2842577.e43338","type":"switchNode","name":"switch: relationship.related-to","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`\">","comments":"","outputs":1,"x":1756.1783447265625,"y":567.7143545150757,"z":"82b724af.168de8","wires":[["6c2ffb96.bbe484"]]},{"id":"6c2ffb96.bbe484","type":"other","name":"l3-network","xml":"<outcome value='l3-network'>","comments":"","outputs":1,"x":1984.1783447265625,"y":567.7143545150757,"z":"82b724af.168de8","wires":[["ee9c3f17.36cc2"]]},{"id":"a605f7c0.31a3b8","type":"for","name":"for j : tmp.AnAI.vfmodule.relationship-data","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1884.1783752441406,"y":702.6071891784668,"z":"82b724af.168de8","wires":[["75b5e472.e4c3ac"]]},{"id":"75b5e472.e4c3ac","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`\" />","comments":"","outputs":1,"x":2241.7498321533203,"y":702.750072479248,"z":"82b724af.168de8","wires":[["706c56b8.8643e8","5f66312e.f434f"]]},{"id":"706c56b8.8643e8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2499.7498321533203,"y":702.750072479248,"z":"82b724af.168de8","wires":[["7dd21ad6.da13b4"]]},{"id":"6fd52d0e.ed4644","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":642.4920768737793,"y":253.69842529296875,"z":"82b724af.168de8","wires":[["d3e9f0df.7a967"]]},{"id":"c910e4b6.a9df08","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`' | An error occurred while saving l3-network relationship with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":1386.2141189575195,"y":429.10716819763184,"z":"82b724af.168de8","wires":[[]]},{"id":"7dd21ad6.da13b4","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":2697.7141494750977,"y":702.285717010498,"z":"82b724af.168de8","wires":[[]]},{"id":"85739c68.20d2c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":649.3849029541016,"y":296.1388702392578,"z":"82b724af.168de8","wires":[["d3e9f0df.7a967"]]},{"id":"5f66312e.f434f","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2510.0355377197266,"y":743.9285688400269,"z":"82b724af.168de8","wires":[["7dd21ad6.da13b4"]]},{"id":"75eb4741.287e38","type":"switchNode","name":"set: vf-module-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1134.9840469360352,"y":384.7142581939697,"z":"82b724af.168de8","wires":[[]]},{"id":"6c3f0f76.71273","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":836.2340469360352,"y":384.7142581939697,"z":"82b724af.168de8","wires":[["75eb4741.287e38"]]},{"id":"df4daff8.410d8","type":"switchNode","name":"switch: vf-module-service-data...vnf-networks_length","xml":"<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":548.7340545654297,"y":384.7142581939697,"z":"82b724af.168de8","wires":[["6c3f0f76.71273"]]},{"id":"7ee2d878.734fd8","type":"switchNode","name":"set: tmp.AnAI.vfmodule.relationship-list.relationship_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vfmodule.relationship-list.relationship_length\" value = \"0\" />","comments":"","outputs":1,"x":2168.9999923706055,"y":524.0000495910645,"z":"82b724af.168de8","wires":[[]]},{"id":"a0c959dc.928788","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1851.2499923706055,"y":524.0000495910645,"z":"82b724af.168de8","wires":[["7ee2d878.734fd8"]]},{"id":"52f02717.530ac8","type":"switchNode","name":"switch: tmp.AnAI.vfmodule.relationship-list.relationship_length","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1530.75,"y":524.0000495910645,"z":"82b724af.168de8","wires":[["a0c959dc.928788"]]},{"id":"767a5f43.e2cc1","type":"switchNode","name":"set: tmp.AnAI.vfmodulerelationship-list.relationship[$i].relationship-data_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length\" value = \"0\" />","comments":"","outputs":1,"x":2777.0000228881836,"y":655.0000133514404,"z":"82b724af.168de8","wires":[[]]},{"id":"4e18247d.2004dc","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2392.2500228881836,"y":655.0000133514404,"z":"82b724af.168de8","wires":[["767a5f43.e2cc1"]]},{"id":"a926fa42.76f768","type":"switchNode","name":"switch: tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":2008.7500305175781,"y":655.0000133514404,"z":"82b724af.168de8","wires":[["4e18247d.2004dc"]]},{"id":"ee9c3f17.36cc2","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1596.2500228881836,"y":654.7500095367432,"z":"82b724af.168de8","wires":[["a926fa42.76f768","a605f7c0.31a3b8"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-delete.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-delete.json
new file mode 100644
index 00000000..66fbf719
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-delete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"311b3dda.3a6ee2","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":391.11109924316406,"y":442.75004386901855,"z":"dab4c267.b1578","wires":[]},{"id":"3879dfc2.a88","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":168.11104583740234,"y":141.888916015625,"z":"dab4c267.b1578","wires":[["26cf5bcd.60b334","311b3dda.3a6ee2","1ebd1e72.56bc82","92acc6b8.3892a8","755d4650.1103f8","fad87c6e.a4bde","32debc64.c813c4","e381bce7.8db14"]]},{"id":"26cf5bcd.60b334","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":432.11109924316406,"y":269.75004386901855,"z":"dab4c267.b1578","wires":[[]]},{"id":"3b032898.d41a98","type":"method","name":"method vf-module-topology-delete","xml":"<method rpc='vf-module-topology-delete' mode='sync'>\n","comments":"","outputs":1,"x":199.7777328491211,"y":91.05558013916016,"z":"dab4c267.b1578","wires":[["3879dfc2.a88"]]},{"id":"ee0d1a29.b42c08","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":269.77770233154297,"y":39.05558776855469,"z":"dab4c267.b1578","wires":[["3b032898.d41a98"]]},{"id":"7e50728c.7027fc","type":"dgstart","name":"DGSTART","outputs":1,"x":106.61104583740234,"y":38.888916015625,"z":"dab4c267.b1578","wires":[["ee0d1a29.b42c08"]]},{"id":"152dd102.d75f6f","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":639.4798355102539,"y":185.5732650756836,"z":"dab4c267.b1578","wires":[["32c98655.4f8d8a"]]},{"id":"32c98655.4f8d8a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":802.8129653930664,"y":185.57332611083984,"z":"dab4c267.b1578","wires":[]},{"id":"755d4650.1103f8","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-module-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":393.3686981201172,"y":313.2956371307373,"z":"dab4c267.b1578","wires":[[]]},{"id":"1ebd1e72.56bc82","type":"switchNode","name":"switch: vf-module-id config == input","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`\">","comments":"","outputs":1,"x":459.25494384765625,"y":142.37646102905273,"z":"dab4c267.b1578","wires":[["b8947b68.74b8b8"]]},{"id":"b8947b68.74b8b8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":684.7095031738281,"y":142.55828857421875,"z":"dab4c267.b1578","wires":[["5ffa6798.ed60a8"]]},{"id":"5ffa6798.ed60a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-id not found in SDNC'/>","comments":"","x":847.300422668457,"y":142.7173891067505,"z":"dab4c267.b1578","wires":[]},{"id":"92acc6b8.3892a8","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":458.5050506591797,"y":228.48759269714355,"z":"dab4c267.b1578","wires":[[]]},{"id":"fad87c6e.a4bde","type":"set","name":"Clear vf-module-topology","xml":"<set>\n\t<parameter name=\"vf-module-service-data.vf-module-topology-information.\" value=\"\" /> \n","comments":"","outputs":1,"x":425.5050506591797,"y":353.48759269714355,"z":"dab4c267.b1578","wires":[[]]},{"id":"e381bce7.8db14","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":437.66273498535156,"y":185.87306594848633,"z":"dab4c267.b1578","wires":[["152dd102.d75f6f"]]},{"id":"32debc64.c813c4","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":413.8254165649414,"y":398.6905174255371,"z":"dab4c267.b1578","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-operation.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-operation.json
new file mode 100644
index 00000000..1acb0fdb
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"b2b9aa36.90c458","type":"dgstart","name":"DGSTART","outputs":1,"x":147.38094329833984,"y":59.999999046325684,"z":"63798740.0bebb8","wires":[["3b7a89dc.6882f6"]]},{"id":"3b7a89dc.6882f6","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":314.65870666503906,"y":59.66666793823242,"z":"63798740.0bebb8","wires":[["80962807.697918"]]},{"id":"80962807.697918","type":"method","name":"vf-module-topology-operation","xml":"<method rpc='vf-module-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":237.88094329833984,"y":110.2222204208374,"z":"63798740.0bebb8","wires":[["a021878d.6bc908"]]},{"id":"e35b68e.76c7198","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":665.9920959472656,"y":960.3332662582397,"z":"63798740.0bebb8","wires":[["7d148de2.daa994"]]},{"id":"7d148de2.daa994","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action not recognized'/>\n","comments":"","x":890.9920959472656,"y":960.3332662582397,"z":"63798740.0bebb8","wires":[]},{"id":"981a0559.178fd8","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":666.2420959472656,"y":916.5832681655884,"z":"63798740.0bebb8","wires":[["b4d8512d.b7644"]]},{"id":"b4d8512d.b7644","type":"call","name":"call: vf-module-topology-delete","xml":"<call module='VNF-API' rpc='vf-module-topology-delete' mode='sync' >","comments":"","outputs":1,"x":945.9921646118164,"y":916.5832691192627,"z":"63798740.0bebb8","wires":[[]]},{"id":"9c74b303.df115","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"vf-module-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$vf-module-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$vf-module-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$vf-module-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$vf-module-topology-operation-input.service-information.service-id`\"/>\n<parameter name=\"field9\" value=\"`$vf-module-topology-operation-input.service-information.service-type`\"/>\n<parameter name=\"field10\" value=\"`$vf-module-topology-operation-input.service-information.subscriber-name`\"/>\n<parameter name=\"field11\" value=\"`$vf-module-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field12\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-id`\"/>\n<parameter name=\"field13\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-model-id`\"/>\n<parameter name=\"field14\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-name`\"/>\n<parameter name=\"field15\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.request-version`\"/>\n<parameter name=\"field16\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-id`\"/>\n<parameter name=\"field17\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vnf-model-id`\"/>\n<parameter name=\"field18\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-name`\"/>\n<parameter name=\"field19\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.aic-cloud-region`\"/>\n<parameter name=\"field20\" value=\"`$vf-module-topology-operation-input.vf-module-topology-information.tenant`\"/>","comments":"","outputs":1,"x":420.0476379394531,"y":167.22222423553467,"z":"63798740.0bebb8","wires":[[]]},{"id":"f768fd5a.adb8a","type":"comment","name":"vf-module-topology-operation","info":"","comments":"","x":638.2698211669922,"y":101.44444370269775,"z":"63798740.0bebb8","wires":[]},{"id":"a021878d.6bc908","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":232.38095092773438,"y":167.00000476837158,"z":"63798740.0bebb8","wires":[["9c74b303.df115","bc617051.8373c","7d112cb1.d7edf4","4133dd42.c08bb4","293395b5.40c96a","44fbb825.f1f9d8","18c435d7.1141ea","bac1f2ae.3be1","6d26b2ee.e1dbcc"]]},{"id":"bc617051.8373c","type":"switchNode","name":"switch: INPUT vf-module-name","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name`\">","comments":"","outputs":1,"x":494.04762268066406,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["80948d41.4e439","28867132.f8316e"]]},{"id":"80948d41.4e439","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":708.0476226806641,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["b4b96e66.163f7"]]},{"id":"28867132.f8316e","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":707.0476226806641,"y":257.66664695739746,"z":"63798740.0bebb8","wires":[["40842fb6.6a48e"]]},{"id":"b4b96e66.163f7","type":"switchNode","name":"switch: PRELOAD vf-module-name","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`\">","comments":"","outputs":1,"x":938.0476226806641,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["f71a995b.156168","191fc631.94c04a"]]},{"id":"f71a995b.156168","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1173.047622680664,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[["ede3c59c.0a6ad8"]]},{"id":"191fc631.94c04a","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1174.047622680664,"y":256.66664695739746,"z":"63798740.0bebb8","wires":[["6ba480c9.342ea"]]},{"id":"ede3c59c.0a6ad8","type":"switchNode","name":"switch: vf-module-name INPUT == PRELOAD","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`\">","comments":"","outputs":1,"x":1431.047607421875,"y":213.66664505004883,"z":"63798740.0bebb8","wires":[["2482f31f.63fecc"]]},{"id":"2482f31f.63fecc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1686.380973815918,"y":214.3335475921631,"z":"63798740.0bebb8","wires":[["f44b3d7f.1ca9b"]]},{"id":"f44b3d7f.1ca9b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-name not found in vf-module-preload-data'/>","comments":"","x":1845.0475997924805,"y":213.66664695739746,"z":"63798740.0bebb8","wires":[]},{"id":"6ba480c9.342ea","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vf-module-name'/>","comments":"","x":1341.047622680664,"y":256.66664695739746,"z":"63798740.0bebb8","wires":[]},{"id":"40842fb6.6a48e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-module-name is required'/>","comments":"","x":868.5476226806641,"y":257.91664695739746,"z":"63798740.0bebb8","wires":[]},{"id":"7d112cb1.d7edf4","type":"switchNode","name":"switch: INPUT vf-module-model-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id`\">","comments":"","outputs":1,"x":500.26985931396484,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["474af7dd.015108","e5dce74.d4b4018"]]},{"id":"474af7dd.015108","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":723.2698516845703,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["5540ad23.69af84"]]},{"id":"e5dce74.d4b4018","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":722.2698516845703,"y":360.33331775665283,"z":"63798740.0bebb8","wires":[["dddc6603.8e99c8"]]},{"id":"5540ad23.69af84","type":"switchNode","name":"switch: PRELOAD vf-module-model-id","xml":"<switch test=\"`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`\">","comments":"","outputs":1,"x":962.2698516845703,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["2864ae53.aa3a82","9183452.51198b8"]]},{"id":"2864ae53.aa3a82","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1202.2698516845703,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["74e5fb42.a304e4"]]},{"id":"9183452.51198b8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1202.2698516845703,"y":359.33331775665283,"z":"63798740.0bebb8","wires":[["376fd68.672322a"]]},{"id":"dddc6603.8e99c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-module-model-id is required'/>","comments":"","x":883.7698516845703,"y":360.58331775665283,"z":"63798740.0bebb8","wires":[]},{"id":"74e5fb42.a304e4","type":"switchNode","name":"switch: vf-module-model-id INPUT == PRELOAD","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`\">","comments":"","outputs":1,"x":1473.2698287963867,"y":318.33331775665283,"z":"63798740.0bebb8","wires":[["f518b05.e9bfe5"]]},{"id":"376fd68.672322a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vf-module-model-id from input'/>","comments":"","x":1362.2698287963867,"y":359.33331775665283,"z":"63798740.0bebb8","wires":[]},{"id":"f518b05.e9bfe5","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1743.2698287963867,"y":318.66681385040283,"z":"63798740.0bebb8","wires":[["64c53b14.74a6a4"]]},{"id":"64c53b14.74a6a4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-model-id not found in vf-module-preload-data'/>","comments":"","x":1901.9364547729492,"y":317.9999132156372,"z":"63798740.0bebb8","wires":[]},{"id":"4133dd42.c08bb4","type":"switchNode","name":"switch: INPUT vf-module-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`\">","comments":"","outputs":1,"x":478.4485168457031,"y":410.2976427078247,"z":"63798740.0bebb8","wires":[["24582128.95217e","a8303f6.63a26c"]]},{"id":"a8303f6.63a26c","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":700.448486328125,"y":450.44048023223877,"z":"63798740.0bebb8","wires":[["636f5b70.b91114"]]},{"id":"24582128.95217e","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":700.5914154052734,"y":409.86907863616943,"z":"63798740.0bebb8","wires":[["636f5b70.b91114"]]},{"id":"636f5b70.b91114","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-module-id cannot be NULL or 0'/>","comments":"","x":875.3056945800781,"y":450.7262010574341,"z":"63798740.0bebb8","wires":[]},{"id":"293395b5.40c96a","type":"switchNode","name":"switch: INPUT vnf-instance-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\">","comments":"","outputs":1,"x":484.3532485961914,"y":503.9444637298584,"z":"63798740.0bebb8","wires":[["9950854d.189d38","8d68bc49.6b2e4"]]},{"id":"8d68bc49.6b2e4","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":717.3532180786133,"y":542.0873012542725,"z":"63798740.0bebb8","wires":[["65b058d.3449fa8"]]},{"id":"9950854d.189d38","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":716.4961471557617,"y":504.5158996582031,"z":"63798740.0bebb8","wires":[["65b058d.3449fa8"]]},{"id":"65b058d.3449fa8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/>","comments":"","x":871.2104263305664,"y":542.3730220794678,"z":"63798740.0bebb8","wires":[]},{"id":"44fbb825.f1f9d8","type":"switchNode","name":"switch: INPUT vnf-instance-name","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-name`\">","comments":"","outputs":1,"x":497.6032371520996,"y":584.9444646835327,"z":"63798740.0bebb8","wires":[["c5d65cf1.fcd86"]]},{"id":"c5d65cf1.fcd86","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":747.6032066345215,"y":585.0873022079468,"z":"63798740.0bebb8","wires":[["425cdf86.d8726"]]},{"id":"425cdf86.d8726","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-instance-name cannot be NULL'/>","comments":"","x":901.4604148864746,"y":585.3730230331421,"z":"63798740.0bebb8","wires":[]},{"id":"18c435d7.1141ea","type":"switchNode","name":"switch: INPUT vnf-model-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vnf-model-id`\">","comments":"","outputs":1,"x":479.353271484375,"y":632.1944665908813,"z":"63798740.0bebb8","wires":[["96ed3988.9aab78"]]},{"id":"96ed3988.9aab78","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":729.3532409667969,"y":632.3373041152954,"z":"63798740.0bebb8","wires":[["368ecf78.0f8b6"]]},{"id":"368ecf78.0f8b6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-model-id cannot be NULL'/>","comments":"","x":883.21044921875,"y":632.6230249404907,"z":"63798740.0bebb8","wires":[]},{"id":"bac1f2ae.3be1","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":489.6309509277344,"y":676.5000085830688,"z":"63798740.0bebb8","wires":[["a479aebf.dc5d"]]},{"id":"a479aebf.dc5d","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":707.6309204101562,"y":676.6428461074829,"z":"63798740.0bebb8","wires":[["988e892c.d475a8"]]},{"id":"988e892c.d475a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region cannot be NULL'/>","comments":"","x":861.4881286621094,"y":676.9285669326782,"z":"63798740.0bebb8","wires":[]},{"id":"6d26b2ee.e1dbcc","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":447.9364929199219,"y":742.3332624435425,"z":"63798740.0bebb8","wires":[["e35b68e.76c7198","93ac097f.c6f298","1922a4aa.01150b","2f8e310d.ec431e","981a0559.178fd8","33970441.68697c"]]},{"id":"93ac097f.c6f298","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":665.4920501708984,"y":742.3332681655884,"z":"63798740.0bebb8","wires":[["8c570735.beda08"]]},{"id":"1922a4aa.01150b","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":668.4920654296875,"y":831.5832567214966,"z":"63798740.0bebb8","wires":[["8daf28f.5d017d8"]]},{"id":"2f8e310d.ec431e","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":668.2420654296875,"y":873.8332576751709,"z":"63798740.0bebb8","wires":[["da48c7ad.8819b8"]]},{"id":"33970441.68697c","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":686.9920654296875,"y":787.8332586288452,"z":"63798740.0bebb8","wires":[["355d5e58.476532"]]},{"id":"8c570735.beda08","type":"call","name":"call: vf-module-topology-assign","xml":"<call module='VNF-API' rpc='vf-module-topology-assign' mode='sync' >","comments":"","outputs":1,"x":945.7420501708984,"y":742.3332662582397,"z":"63798740.0bebb8","wires":[[]]},{"id":"355d5e58.476532","type":"call","name":"call: vf-module-topology-changeassign","xml":"<call module='VNF-API' rpc='vf-module-topology-changeassign' mode='sync' >","comments":"","outputs":1,"x":968.9921722412109,"y":787.3332662582397,"z":"63798740.0bebb8","wires":[[]]},{"id":"da48c7ad.8819b8","type":"call","name":"call: vf-module-topology-rollback","xml":"<call module='VNF-API' rpc='vf-module-topology-rollback' mode='sync' >","comments":"","outputs":1,"x":950.7421722412109,"y":873.8332681655884,"z":"63798740.0bebb8","wires":[[]]},{"id":"8daf28f.5d017d8","type":"call","name":"call: vf-module-topology-activate","xml":"<call module='VNF-API' rpc='vf-module-topology-activate' mode='sync' >","comments":"","outputs":1,"x":950.2421646118164,"y":831.8332619667053,"z":"63798740.0bebb8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vf-module-topology-rollback.json b/platform-logic/vnfapi/src/main/json/vf-module-topology-rollback.json
new file mode 100644
index 00000000..85e05a5d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vf-module-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"c3ce5a21.858818","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":156.80559539794922,"y":155.7499885559082,"z":"a2906cac.f91a6","wires":[["b7bd282e.ecbe08"]]},{"id":"504ed4c1.19f72c","type":"method","name":"method vf-module-topology-rollback","xml":"<method rpc='vf-module-topology-rollback' mode='sync'>\n","comments":"","outputs":1,"x":185.22228240966797,"y":103.1666612625122,"z":"a2906cac.f91a6","wires":[["c3ce5a21.858818"]]},{"id":"bbc0a862.2012a8","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":262.3333435058594,"y":44.055559158325195,"z":"a2906cac.f91a6","wires":[["504ed4c1.19f72c"]]},{"id":"dc5c5f1f.f5323","type":"dgstart","name":"DGSTART","outputs":1,"x":96.61115264892578,"y":43.888885498046875,"z":"a2906cac.f91a6","wires":[["bbc0a862.2012a8"]]},{"id":"69f49ed4.8c74a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":895.0556182861328,"y":508.4972972869873,"z":"a2906cac.f91a6","wires":[]},{"id":"5f1c1e9f.c2fb3","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":930.8056182861328,"y":337.2751064300537,"z":"a2906cac.f91a6","wires":[[]]},{"id":"560147c0.dbc8c8","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":963.6465606689453,"y":251.40388870239258,"z":"a2906cac.f91a6","wires":[["190a74c8.9c3ddb"]]},{"id":"190a74c8.9c3ddb","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1195.2299423217773,"y":251.2372007369995,"z":"a2906cac.f91a6","wires":[["c8163813.24eb68"]]},{"id":"c8163813.24eb68","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1347.5630722045898,"y":251.23726177215576,"z":"a2906cac.f91a6","wires":[]},{"id":"9439ef4e.19bcf","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-action\" value=\"`$vf-modules-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":892.5633125305176,"y":379.57069969177246,"z":"a2906cac.f91a6","wires":[[]]},{"id":"2366439a.26ba4c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1218.9041366577148,"y":204.1944456100464,"z":"a2906cac.f91a6","wires":[["378d2536.971caa"]]},{"id":"378d2536.971caa","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value=\"`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`\"/>","comments":"","x":1378.9949569702148,"y":204.60354900360107,"z":"a2906cac.f91a6","wires":[]},{"id":"97215d09.0cf54","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vf-module-service-data.oper-status.last-order-status\" value=\"`$vf-module-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":956.4496612548828,"y":294.59599781036377,"z":"a2906cac.f91a6","wires":[[]]},{"id":"98c2d38b.6194","type":"set","name":"Clear vf-module topology","xml":"<set>\n\t<parameter name=\"vf-module-service-data.\" value=\"\" /> \n","comments":"","outputs":1,"x":925.9496612548828,"y":423.2626552581787,"z":"a2906cac.f91a6","wires":[[]]},{"id":"77cc369b.dab328","type":"switchNode","name":"switch:CONFIG == INPUT - vf-module-id","xml":"<switch test=\"`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`\">","comments":"","outputs":1,"x":975.0556182861328,"y":204.1944456100464,"z":"a2906cac.f91a6","wires":[["2366439a.26ba4c"]]},{"id":"b7bd282e.ecbe08","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vf-module-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":264.30560302734375,"y":202.69444942474365,"z":"a2906cac.f91a6","wires":[["d8a6efb4.1cae2"]]},{"id":"d8a6efb4.1cae2","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":500.5555953979492,"y":203.44444274902344,"z":"a2906cac.f91a6","wires":[["d28acb25.7ef2e8"]]},{"id":"d28acb25.7ef2e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":662.5555953979492,"y":203.44444274902344,"z":"a2906cac.f91a6","wires":[["77cc369b.dab328","560147c0.dbc8c8","97215d09.0cf54","5f1c1e9f.c2fb3","9439ef4e.19bcf","98c2d38b.6194","69f49ed4.8c74a","5a9a93a0.4a243c"]]},{"id":"58f1f93f.d350c8","type":"comment","name":"request-action = VNFActivateRequest, svc-action = rollback","info":"","comments":"","x":760.3056030273438,"y":80.44444465637207,"z":"a2906cac.f91a6","wires":[]},{"id":"5a9a93a0.4a243c","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":916.6666259765625,"y":465.5555419921875,"z":"a2906cac.f91a6","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-activate.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-activate.json
new file mode 100644
index 00000000..5e025e36
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-activate.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"224ab88a.0adf58","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","outputs":1,"x":423.33331298828125,"y":374.3888626098633,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"ab9eb400.713038","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":170.33330535888672,"y":141.88887786865234,"z":"76e70bd1.ad60c4","wires":[["224ab88a.0adf58","c8ee6ab7.bac638","c0d479cd.b79348","34cb709c.929ed","f798ae57.6d47d","b8342ba1.d183f8","a8c37c05.42ceb","716ea0ca.5337a"]]},{"id":"e7f31ebf.f0df3","type":"method","name":"method vnf-instance-topology-activate","xml":"<method rpc='vnf-instance-topology-activate' mode='sync'>\n","comments":"","outputs":1,"x":212.99999237060547,"y":86.0555419921875,"z":"76e70bd1.ad60c4","wires":[["ab9eb400.713038"]]},{"id":"ef96001e.3e2e5","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":304.99996185302734,"y":39.05554962158203,"z":"76e70bd1.ad60c4","wires":[["e7f31ebf.f0df3"]]},{"id":"5b8d2293.3efc3c","type":"dgstart","name":"DGSTART","outputs":1,"x":139.83330535888672,"y":38.888877868652344,"z":"76e70bd1.ad60c4","wires":[["ef96001e.3e2e5"]]},{"id":"c8ee6ab7.bac638","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":462.66668701171875,"y":270.72208404541016,"z":"76e70bd1.ad60c4","wires":[["2f2bb679.ddde5a"]]},{"id":"2f2bb679.ddde5a","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":712.0000381469727,"y":271.05539321899414,"z":"76e70bd1.ad60c4","wires":[["caf23eef.2d6a7"]]},{"id":"9112f66c.accf18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1370.3331604003906,"y":270.0554447174072,"z":"76e70bd1.ad60c4","wires":[]},{"id":"f798ae57.6d47d","type":"switchNode","name":"switch:vnf-instance-id config == input","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`\">","comments":"","outputs":1,"x":456.1060485839844,"y":218.93431854248047,"z":"76e70bd1.ad60c4","wires":[["d6b1f417.d762b8"]]},{"id":"d6b1f417.d762b8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":684.5605239868164,"y":219.11613845825195,"z":"76e70bd1.ad60c4","wires":[["7f1082ca.4c62bc"]]},{"id":"7f1082ca.4c62bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`\"/>","comments":"","x":837.6514663696289,"y":219.02524185180664,"z":"76e70bd1.ad60c4","wires":[]},{"id":"c0d479cd.b79348","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":392.4444274902344,"y":595.0555191040039,"z":"76e70bd1.ad60c4","wires":[]},{"id":"caf23eef.2d6a7","type":"switchNode","name":"switch: order-status = PendingUpdate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingUpdate`\">","comments":"","outputs":1,"x":962.9242324829102,"y":270.4798011779785,"z":"76e70bd1.ad60c4","wires":[["3d49c074.c55d4"]]},{"id":"3d49c074.c55d4","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1205.3786392211914,"y":270.4797706604004,"z":"76e70bd1.ad60c4","wires":[["9112f66c.accf18"]]},{"id":"26b3d7a2.652ae8","type":"comment","name":"once success is returned, operational-data gets saved","info":"","comments":"","x":738.8510208129883,"y":555.9898414611816,"z":"76e70bd1.ad60c4","wires":[]},{"id":"34cb709c.929ed","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":456.4469909667969,"y":323.00257110595703,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"1c5ee2ad.503e0d","type":"comment","name":"request-action = VNFActivateRequest, svc-action = activate","info":"","comments":"","x":718.9443893432617,"y":78.22221183776855,"z":"76e70bd1.ad60c4","wires":[]},{"id":"b8342ba1.d183f8","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"vnf-instance-topology-operation-input.\" />","comments":"","outputs":1,"x":420.33331298828125,"y":509.4444351196289,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"a8c37c05.42ceb","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instance-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":390.33331298828125,"y":421.4444351196289,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"9d73784e.83dda8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":778.7460327148438,"y":464.43293380737305,"z":"76e70bd1.ad60c4","wires":[["852e8aa2.d5c6c8"]]},{"id":"852e8aa2.d5c6c8","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 occurred while updating vnf-instance orchestration-status in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":961.8889617919922,"y":464.43300437927246,"z":"76e70bd1.ad60c4","wires":[]},{"id":"5f34e90c.952258","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":414.65076446533203,"y":553.1586799621582,"z":"76e70bd1.ad60c4","wires":[[]]},{"id":"716ea0ca.5337a","type":"save","name":"update AnAI - vnf-instance.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":491.22217559814453,"y":464.44443130493164,"z":"76e70bd1.ad60c4","wires":[["9d73784e.83dda8","d85d5574.f399a8"]]},{"id":"d85d5574.f399a8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":785.9721984863281,"y":507.1944456100464,"z":"76e70bd1.ad60c4","wires":[["852e8aa2.d5c6c8"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign-vnf-networks.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign-vnf-networks.json
new file mode 100644
index 00000000..577b7513
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign-vnf-networks.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"2febef4a.283f9","type":"dgstart","name":"DGSTART","outputs":1,"x":142.85714721679688,"y":42.85714340209961,"z":"705ac336.10121c","wires":[["87e9f370.e9afd"]]},{"id":"87e9f370.e9afd","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":308.0238037109375,"y":43.0238151550293,"z":"705ac336.10121c","wires":[["93f9836d.c6161"]]},{"id":"93f9836d.c6161","type":"method","name":"method vnf-instance-topology-assign-vnf-networks","xml":"<method rpc='vnf-instance-topology-assign-vnf-networks' mode='sync'>\n","comments":"","outputs":1,"x":271.2738265991211,"y":97.27380752563477,"z":"705ac336.10121c","wires":[["32b0dfaf.61c42"]]},{"id":"32b0dfaf.61c42","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":223.60714721679688,"y":146.1071434020996,"z":"705ac336.10121c","wires":[["469e6730.fe15a8","86c0733.b9d429","5927f9c6.e24288","62bcb573.1f631c","c6c3193c.d163d8","c5892e4d.2c5e1","675a0354.e31bbc"]]},{"id":"5c01cf7e.f97ba","type":"switchNode","name":"switch test: INPUT network-id = NULL or 0","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '0'`\">","comments":"","outputs":1,"x":804.0494194030762,"y":698.0935974121094,"z":"705ac336.10121c","wires":[["f75a2a6c.ecff98","35d46151.35aa0e"]]},{"id":"f75a2a6c.ecff98","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1093.4129066467285,"y":741.2754673957825,"z":"705ac336.10121c","wires":[["8e53b29.404cb5"]]},{"id":"8e53b29.404cb5","type":"switchNode","name":"switch : INPUT network-name = NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '0'`\">","comments":"","outputs":1,"x":1331.1950073242188,"y":741.1194458007812,"z":"705ac336.10121c","wires":[["8819d24.34e3e3","4bb47302.d72c4c"]]},{"id":"35d46151.35aa0e","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1093.433193206787,"y":697.9824938774109,"z":"705ac336.10121c","wires":[["6dd56a34.8d5b54"]]},{"id":"8819d24.34e3e3","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1569.3869590759277,"y":780.6749277114868,"z":"705ac336.10121c","wires":[["7b1b2acb.ddf7c4"]]},{"id":"6dd56a34.8d5b54","type":"save","name":"get AnAI - l3-network by id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1294.6553077697754,"y":697.9826617240906,"z":"705ac336.10121c","wires":[["44c56e39.3f0a8","51e53ee8.48261"]]},{"id":"44c56e39.3f0a8","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1497.599998474121,"y":697.5381102561951,"z":"705ac336.10121c","wires":[["dff64318.2bcdb"]]},{"id":"19517c79.8ad8d4","type":"for","name":"for i : INPUT vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":582.3432960510254,"y":554.5862808227539,"z":"705ac336.10121c","wires":[["bdc05789.7d3538"]]},{"id":"7b1b2acb.ddf7c4","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n\n","comments":"","outputs":1,"x":1779.8889617919922,"y":780.4167194366455,"z":"705ac336.10121c","wires":[["2e045a8b.0e6f96","8351920.613ce7"]]},{"id":"2e045a8b.0e6f96","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2001.1389617919922,"y":780.6667804718018,"z":"705ac336.10121c","wires":[["dff64318.2bcdb"]]},{"id":"7b66b18d.2f326","type":"set","name":"initialize tmp.usePreload = 1 and tmp.AAI.l3network","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n<parameter name='tmp.AnAI.l3network.' value='' />\n","comments":"","outputs":1,"x":513.8369369506836,"y":468.31164169311523,"z":"705ac336.10121c","wires":[[]]},{"id":"43e60079.dc59f","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":173.7711410522461,"y":468.09618759155273,"z":"705ac336.10121c","wires":[["7b66b18d.2f326","47109692.f76808","30733a26.180766"]]},{"id":"469e6730.fe15a8","type":"for","name":"for j : PRELOAD vnf-networks","xml":"<for index=\"j\" start=\"0\" end=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":307.99608612060547,"y":381.35712814331055,"z":"705ac336.10121c","wires":[["43e60079.dc59f"]]},{"id":"47109692.f76808","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":349.7234115600586,"y":554.5161724090576,"z":"705ac336.10121c","wires":[["19517c79.8ad8d4","7c927d87.7b5564"]]},{"id":"bdc05789.7d3538","type":"switchNode","name":"switch : PRELOAD network-role = INPUT","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":891.7234764099121,"y":553.879843711853,"z":"705ac336.10121c","wires":[["c183486b.a5ef78"]]},{"id":"c183486b.a5ef78","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1142.5189018249512,"y":554.1754860877991,"z":"705ac336.10121c","wires":[["54abbc42.575c24"]]},{"id":"54abbc42.575c24","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":500.80447006225586,"y":654.9546413421631,"z":"705ac336.10121c","wires":[["5c01cf7e.f97ba","210d0a9b.6fcbb6","90f51ab8.31eb88"]]},{"id":"210d0a9b.6fcbb6","type":"set","name":"set tmp.usePreload = 0","xml":"<set>\n<parameter name='tmp.usePreload' value='0' />\n","comments":"","outputs":1,"x":745.1681022644043,"y":654.8637704849243,"z":"705ac336.10121c","wires":[[]]},{"id":"4bb47302.d72c4c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1568.9448928833008,"y":741.3809204101562,"z":"705ac336.10121c","wires":[["dff64318.2bcdb"]]},{"id":"90f51ab8.31eb88","type":"switchNode","name":"switch : tmp.usePreload= 0","xml":"<switch test=\"`$tmp.usePreload == 0`\">","comments":"","outputs":1,"x":753.667610168457,"y":972.085075378418,"z":"705ac336.10121c","wires":[["d1d0fb28.49edd8"]]},{"id":"d1d0fb28.49edd8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":960.6674880981445,"y":972.0851974487305,"z":"705ac336.10121c","wires":[["5b8f0229.494b7c"]]},{"id":"95ee9ed6.51075","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":834.2347030639648,"y":1170.0867052078247,"z":"705ac336.10121c","wires":[["5e01584.eae73a8"]]},{"id":"5e01584.eae73a8","type":"switchNode","name":"switch: SERVICE-DATA network-role = INPUT","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":1195.198112487793,"y":1169.1859922409058,"z":"705ac336.10121c","wires":[["c658b72e.64fd88"]]},{"id":"c658b72e.64fd88","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1474.743522644043,"y":1169.2316465377808,"z":"705ac336.10121c","wires":[["55115b00.d54c94"]]},{"id":"7c927d87.7b5564","type":"switchNode","name":"switch: tmp.usePreload= 1","xml":"<switch test=\"`$tmp.usePreload == 1`\">","comments":"","outputs":1,"x":577.5398750305176,"y":1811.4806985855103,"z":"705ac336.10121c","wires":[["cb0441d2.c823a"]]},{"id":"cb0441d2.c823a","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":785.5714530944824,"y":1811.220950126648,"z":"705ac336.10121c","wires":[["7eabce1e.f927a"]]},{"id":"dff64318.2bcdb","type":"set","name":"set tmp.usePreload = 1","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n","comments":"","outputs":1,"x":1763.5529861450195,"y":882.1399440765381,"z":"705ac336.10121c","wires":[[]]},{"id":"e2672de2.41ec7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id`\" />\n","comments":"","x":1648.5237986246743,"y":656.6626608106826,"z":"705ac336.10121c","wires":[]},{"id":"51e53ee8.48261","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1491.3015764024522,"y":656.6626608106826,"z":"705ac336.10121c","wires":[["e2672de2.41ec7"]]},{"id":"e8382ace.043858","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name`\" />\n","comments":"","x":2149.634719848633,"y":738.8848762512207,"z":"705ac336.10121c","wires":[]},{"id":"8351920.613ce7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1992.4124976264102,"y":738.8848762512207,"z":"705ac336.10121c","wires":[["e8382ace.043858"]]},{"id":"96febb32.ff1698","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n","comments":"","outputs":1,"x":1953.2167358398438,"y":1168.1661186218262,"z":"705ac336.10121c","wires":[[]]},{"id":"b430a14b.edbac","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1423.1784019470215,"y":1811.1015844345093,"z":"705ac336.10121c","wires":[["5e981db0.af4e04"]]},{"id":"bfa6a0be.7489","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n\n","comments":"","outputs":1,"x":2097.6109352111816,"y":2083.8444538116455,"z":"705ac336.10121c","wires":[[]]},{"id":"ab894ac3.a9bab8","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name\" \n\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1200.0714225769043,"y":1811.3675241470337,"z":"705ac336.10121c","wires":[["b430a14b.edbac","c1f93466.7c2698","fd1394ec.ad0d08"]]},{"id":"7eabce1e.f927a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":941.5829925537109,"y":1811.6664876937866,"z":"705ac336.10121c","wires":[["ab894ac3.a9bab8","74f2ba7a.8cc2c4","1538dd04.c879b3"]]},{"id":"eb0f970.2983468","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$j].network-name`\" />\n","comments":"","x":1570.4642372131348,"y":1848.964162826538,"z":"705ac336.10121c","wires":[]},{"id":"c1f93466.7c2698","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1415.2420149909126,"y":1848.964162826538,"z":"705ac336.10121c","wires":[["eb0f970.2983468"]]},{"id":"5e981db0.af4e04","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'PRELOAD network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`\" />\n","comments":"","x":1589.464267730713,"y":1810.9641876220703,"z":"705ac336.10121c","wires":[]},{"id":"86c0733.b9d429","type":"switchNode","name":"switch ...PRELOAD vnf-networks[]","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":487.60713958740234,"y":325.6071472167969,"z":"705ac336.10121c","wires":[["6be8fc2.6fa3c04"]]},{"id":"6be8fc2.6fa3c04","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":715.0516128540039,"y":325.1348571777344,"z":"705ac336.10121c","wires":[["71d9fad7.21cca4"]]},{"id":"71d9fad7.21cca4","type":"set","name":"set PRELOAD vnf-networks[] = 0","xml":"<set>\n<parameter name = \"vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value=\"0\" />\n","comments":"","outputs":1,"x":936.6072218153213,"y":325.13487784067775,"z":"705ac336.10121c","wires":[[]]},{"id":"30733a26.180766","type":"switchNode","name":"switch ...INPUT vnf-networks[]","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":403.1071548461914,"y":509.3571252822876,"z":"705ac336.10121c","wires":[["65ed996e.186c98"]]},{"id":"65ed996e.186c98","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":626.5516052246094,"y":509.13486099243164,"z":"705ac336.10121c","wires":[["62ba63ce.b4775c"]]},{"id":"62ba63ce.b4775c","type":"set","name":"set INPUT vnf-networks_length = 0","xml":"<set>\n<parameter name='vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":859.1072141859268,"y":509.134881655375,"z":"705ac336.10121c","wires":[[]]},{"id":"d7d2ccb7.b7852","type":"comment","name":"For each preload network, see if there is an override in input","info":"","comments":"","x":777.218376159668,"y":417.57937240600586,"z":"705ac336.10121c","wires":[]},{"id":"cb5c7a6.d166888","type":"switchNode","name":"switch: SERVICE-DATA network-role = PRELOAD","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role`\">","comments":"","outputs":1,"x":1348.2142601013184,"y":2083.714325904846,"z":"705ac336.10121c","wires":[["44615613.416bf8"]]},{"id":"44615613.416bf8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1632.6169509887695,"y":2083.5813541412354,"z":"705ac336.10121c","wires":[["9eb668ef.2179a8"]]},{"id":"74f2ba7a.8cc2c4","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1217.9643058776855,"y":2030.9642038345337,"z":"705ac336.10121c","wires":[["cb5c7a6.d166888"]]},{"id":"24c39fed.a3597","type":"comment","name":"CALLED BY vnf-instance-topology-assign AND vnf-instance-topology-changeassign","info":"","comments":"","x":829.273796081543,"y":88.21825790405273,"z":"705ac336.10121c","wires":[]},{"id":"62bcb573.1f631c","type":"set","name":"set: service-data =+ input","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"vnf-instance-topology-operation-input.\" />","comments":"","outputs":1,"x":459.384916305542,"y":234.55158233642578,"z":"705ac336.10121c","wires":[[]]},{"id":"5927f9c6.e24288","type":"set","name":"set: service-data = preload-data","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"vnf-instance-preload-data.\" />","comments":"","outputs":1,"x":479.28903007507324,"y":192.69806671142578,"z":"705ac336.10121c","wires":[[]]},{"id":"c6c3193c.d163d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":416.6428451538086,"y":2581.464366912842,"z":"705ac336.10121c","wires":[]},{"id":"c5892e4d.2c5e1","type":"switchNode","name":"switch: preload order-status = PendingAssignment","xml":"<switch test=\"`$vnf-instance-preload-data.oper-status.order-status == PendingAssignment`\">","comments":"","outputs":1,"x":536.3849258422852,"y":146.10714626312256,"z":"705ac336.10121c","wires":[["9e68561a.bf1958"]]},{"id":"934076d8.86ea48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid preload-data order status'/>","comments":"","x":953.3241691589355,"y":145.80415630340576,"z":"705ac336.10121c","wires":[]},{"id":"9e68561a.bf1958","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":803.9910583496094,"y":145.80408191680908,"z":"705ac336.10121c","wires":[["934076d8.86ea48"]]},{"id":"675a0354.e31bbc","type":"set","name":"set: vnf-iinstance-d","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-id\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","outputs":1,"x":439.70642852783203,"y":279.04762077331543,"z":"705ac336.10121c","wires":[[]]},{"id":"2745e73.af9a018","type":"switchNode","name":"switch: tmp.AnAI.l3network.network-id == null","xml":"<switch test=\"`$tmp.AnAI.l3network.network-id == ''`\">","comments":"","outputs":1,"x":1680.8571968078613,"y":1886.8571367263794,"z":"705ac336.10121c","wires":[["e35dc16c.c2c63"]]},{"id":"e35dc16c.c2c63","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1943.1071968078613,"y":1886.8571367263794,"z":"705ac336.10121c","wires":[["6722f4ec.b60c2c"]]},{"id":"6722f4ec.b60c2c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying l3-network with network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`\" />\n","comments":"","x":2097.1071968078613,"y":1887.3571367263794,"z":"705ac336.10121c","wires":[]},{"id":"fd1394ec.ad0d08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1420.8571815490723,"y":1886.607117652893,"z":"705ac336.10121c","wires":[["2745e73.af9a018"]]},{"id":"1538dd04.c879b3","type":"switchNode","name":"switch: vnf-instance-service-data...vnf-networks_length","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1273.5357780456543,"y":1981.7857370376587,"z":"705ac336.10121c","wires":[["acdd927c.05908"]]},{"id":"acdd927c.05908","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1561.0357704162598,"y":1981.7857370376587,"z":"705ac336.10121c","wires":[["15d7e90e.01ef77"]]},{"id":"15d7e90e.01ef77","type":"switchNode","name":"set: vnf-instance-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1859.7857704162598,"y":1981.7857370376587,"z":"705ac336.10121c","wires":[[]]},{"id":"2dbaf99b.74fa26","type":"switchNode","name":"switch: SERVICE-DATA sbunet-id == NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`\">","comments":"","outputs":1,"x":2083.571506500244,"y":2135.749973297119,"z":"705ac336.10121c","wires":[["72edf3ef.16637c"]]},{"id":"9eb668ef.2179a8","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1790.5714988708496,"y":2083.749973297119,"z":"705ac336.10121c","wires":[["bfa6a0be.7489","2dbaf99b.74fa26","ceefaa2e.4bf518"]]},{"id":"72edf3ef.16637c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2339.8214721679688,"y":2135.499952316284,"z":"705ac336.10121c","wires":[["bfc8e1d2.0b5d2"]]},{"id":"bfc8e1d2.0b5d2","type":"switchNode","name":"switch: SERVICE-DATA sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`\">","comments":"","outputs":1,"x":2166.1666564941406,"y":2195.6547813415527,"z":"705ac336.10121c","wires":[["fd2de09f.959e6"]]},{"id":"fd2de09f.959e6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2431.4166221618652,"y":2195.404760360718,"z":"705ac336.10121c","wires":[["2cb0803c.c7bc8"]]},{"id":"4a5f9fe5.05752","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3187.6786193847656,"y":2318.523801803589,"z":"705ac336.10121c","wires":[[]]},{"id":"2cb0803c.c7bc8","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2284.892852783203,"y":2256.5952796936035,"z":"705ac336.10121c","wires":[["d4ebe86e.15b258"]]},{"id":"4954faeb.6cfbf4","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2322.6070709228516,"y":2319.9522819519043,"z":"705ac336.10121c","wires":[["90d30b64.06a4e8"]]},{"id":"90d30b64.06a4e8","type":"switchNode","name":"switch: AnAI == service-data - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`\">","comments":"","outputs":1,"x":2695.3570251464844,"y":2319.202365875244,"z":"705ac336.10121c","wires":[["2e058631.959aea"]]},{"id":"2e058631.959aea","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2953.7597160339355,"y":2319.0693941116333,"z":"705ac336.10121c","wires":[["4a5f9fe5.05752"]]},{"id":"d4ebe86e.15b258","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2570.2143363952637,"y":2256.1786704063416,"z":"705ac336.10121c","wires":[["4954faeb.6cfbf4"]]},{"id":"59ecf05b.2d584","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2179.9881286621094,"y":2455.4762382507324,"z":"705ac336.10121c","wires":[["11682b08.bfbad5"]]},{"id":"11682b08.bfbad5","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2465.238094329834,"y":2455.2262172698975,"z":"705ac336.10121c","wires":[["3e72b6d2.9b778a"]]},{"id":"c982fd9a.aac94","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3211.499984741211,"y":2570.4882202148438,"z":"705ac336.10121c","wires":[[]]},{"id":"3e72b6d2.9b778a","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2277.285858154297,"y":2514.2738094329834,"z":"705ac336.10121c","wires":[["3cfbefe2.89e85"]]},{"id":"30ffaee.a267252","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2346.428436279297,"y":2571.916700363159,"z":"705ac336.10121c","wires":[["4c7bf8f0.8c87f8"]]},{"id":"4c7bf8f0.8c87f8","type":"switchNode","name":"switch: AnAI == service-data - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2719.1783905029297,"y":2571.166784286499,"z":"705ac336.10121c","wires":[["9622186b.306c98"]]},{"id":"9622186b.306c98","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2977.581081390381,"y":2571.033812522888,"z":"705ac336.10121c","wires":[["c982fd9a.aac94"]]},{"id":"3cfbefe2.89e85","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2562.6073417663574,"y":2513.8572001457214,"z":"705ac336.10121c","wires":[["30ffaee.a267252"]]},{"id":"12a1ac30.b20924","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":919.8214416503906,"y":921.9643211364746,"z":"705ac336.10121c","wires":[]},{"id":"55115b00.d54c94","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1635.1701431274414,"y":1169.0481853485107,"z":"705ac336.10121c","wires":[["3532fb1.4b9fd04","f20e0105.06607","96febb32.ff1698"]]},{"id":"ba99d311.ff42e","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":940.5271911621094,"y":1060.5124225616455,"z":"705ac336.10121c","wires":[]},{"id":"7e2271f2.8e943","type":"switchNode","name":"switch: INPUT sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name != ''`\">","comments":"","outputs":1,"x":2418.146469116211,"y":1276.6551208496094,"z":"705ac336.10121c","wires":[["bce7ec0c.26ab4"]]},{"id":"bce7ec0c.26ab4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2655.3964347839355,"y":1276.4050998687744,"z":"705ac336.10121c","wires":[["5ecde9ff.9bcd68"]]},{"id":"1b75f440.6ce07c","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3394.658447265625,"y":1389.952838897705,"z":"705ac336.10121c","wires":[[]]},{"id":"5ecde9ff.9bcd68","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2521.158432006836,"y":1326.9527263641357,"z":"705ac336.10121c","wires":[["c5624ea.4db5bb"]]},{"id":"94a26b5d.774068","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2529.586898803711,"y":1391.3813190460205,"z":"705ac336.10121c","wires":[["2d6ec25.ba7e33e"]]},{"id":"2d6ec25.ba7e33e","type":"switchNode","name":"switch: AnAI == INPUT - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name`\">","comments":"","outputs":1,"x":2902.3368530273438,"y":1390.6314029693604,"z":"705ac336.10121c","wires":[["81fef1e6.a152e"]]},{"id":"81fef1e6.a152e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3160.739543914795,"y":1390.4984312057495,"z":"705ac336.10121c","wires":[["1b75f440.6ce07c"]]},{"id":"c5624ea.4db5bb","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2806.4799156188965,"y":1326.5361170768738,"z":"705ac336.10121c","wires":[["94a26b5d.774068"]]},{"id":"f20e0105.06607","type":"switchNode","name":"switch: INPUT sbunet-id != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id != ''`\">","comments":"","outputs":1,"x":1911.7179145812988,"y":1232.8933010101318,"z":"705ac336.10121c","wires":[["d4afa68e.bfc558","98804ce8.a13a6"]]},{"id":"abd5ea69.b13cb8","type":"set","name":"set: data-data = INPUT - subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id`\" />","comments":"","outputs":1,"x":2409.9679107666016,"y":1233.1433029174805,"z":"705ac336.10121c","wires":[[]]},{"id":"d4afa68e.bfc558","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2167.9678802490234,"y":1232.6432800292969,"z":"705ac336.10121c","wires":[["abd5ea69.b13cb8"]]},{"id":"98804ce8.a13a6","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2169.2179222106934,"y":1276.6433010101318,"z":"705ac336.10121c","wires":[["7e2271f2.8e943"]]},{"id":"1d02e4c9.16f89b","type":"switchNode","name":"switch: INPUT ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2426.420120239258,"y":1504.798168182373,"z":"705ac336.10121c","wires":[["560491e4.841a3"]]},{"id":"560491e4.841a3","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2673.6700859069824,"y":1504.548147201538,"z":"705ac336.10121c","wires":[["ad4e972e.25b658"]]},{"id":"dfb01c55.64a29","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3402.932098388672,"y":1618.0958862304688,"z":"705ac336.10121c","wires":[[]]},{"id":"ad4e972e.25b658","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2529.432083129883,"y":1555.0957736968994,"z":"705ac336.10121c","wires":[["c4bb2d17.a6dd2"]]},{"id":"b53303f1.98bac","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2537.860549926758,"y":1619.5243663787842,"z":"705ac336.10121c","wires":[["8b2e7716.5aaf38"]]},{"id":"8b2e7716.5aaf38","type":"switchNode","name":"switch: AnAI == INPUT - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2910.6105041503906,"y":1618.774450302124,"z":"705ac336.10121c","wires":[["e8ec1e1f.57f23"]]},{"id":"e8ec1e1f.57f23","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3169.013195037842,"y":1618.6414785385132,"z":"705ac336.10121c","wires":[["dfb01c55.64a29"]]},{"id":"c4bb2d17.a6dd2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2814.7535667419434,"y":1554.6791644096375,"z":"705ac336.10121c","wires":[["b53303f1.98bac"]]},{"id":"3532fb1.4b9fd04","type":"switchNode","name":"switch: INPUT ipv6-sbunet-id != NULL","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id != ''`\">","comments":"","outputs":1,"x":1919.9915657043457,"y":1461.0363483428955,"z":"705ac336.10121c","wires":[["843a8b19.b1c348","8591ce30.50334"]]},{"id":"f7ba6e82.4320e","type":"set","name":"set: service-data = INPUT - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id`\" />","comments":"","outputs":1,"x":2427.2415618896484,"y":1461.2863502502441,"z":"705ac336.10121c","wires":[[]]},{"id":"843a8b19.b1c348","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2176.2415313720703,"y":1460.7863273620605,"z":"705ac336.10121c","wires":[["f7ba6e82.4320e"]]},{"id":"8591ce30.50334","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2177.4915733337402,"y":1504.7863483428955,"z":"705ac336.10121c","wires":[["1d02e4c9.16f89b"]]},{"id":"10ab9be3.5754a4","type":"comment","name":"Use Preload Data","info":"","comments":"","x":608.4915390014648,"y":1743.5838871002197,"z":"705ac336.10121c","wires":[]},{"id":"5b8f0229.494b7c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":576.0629501342773,"y":1066.4767723083496,"z":"705ac336.10121c","wires":[["c5e10bb0.819f28","95ee9ed6.51075"]]},{"id":"c5e10bb0.819f28","type":"switchNode","name":"switch: vnf-instance-service-data...vnf-networks_length","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":891.2500305175781,"y":1120.535732269287,"z":"705ac336.10121c","wires":[["6761e206.68fe2c"]]},{"id":"6761e206.68fe2c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1178.7500228881836,"y":1120.535732269287,"z":"705ac336.10121c","wires":[["380d182.b48fce8"]]},{"id":"380d182.b48fce8","type":"switchNode","name":"set: vnf-instance-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1477.5000228881836,"y":1120.535732269287,"z":"705ac336.10121c","wires":[[]]},{"id":"ceefaa2e.4bf518","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-id == NULL","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`\">","comments":"","outputs":1,"x":2094.3213806152344,"y":2402.535810470581,"z":"705ac336.10121c","wires":[["c1f79dd7.d0fc5"]]},{"id":"c1f79dd7.d0fc5","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2378.571346282959,"y":2402.285789489746,"z":"705ac336.10121c","wires":[["59ecf05b.2d584"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign.json
new file mode 100644
index 00000000..cccd771d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"2cedcd37.fe8ab2","type":"dgstart","name":"DGSTART","outputs":1,"x":174.57137298583984,"y":71.4285888671875,"z":"cee53bf1.d63798","wires":[["d0b308e8.cdee18"]]},{"id":"d0b308e8.cdee18","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":339.73802947998047,"y":71.59526062011719,"z":"cee53bf1.d63798","wires":[["7508dd9c.f543d4"]]},{"id":"7508dd9c.f543d4","type":"method","name":"method vnf-instance-topology-assign","xml":"<method rpc='vnf-instance-topology-assign' mode='sync'>\n","comments":"","outputs":1,"x":289.16661834716797,"y":118.59525680541992,"z":"cee53bf1.d63798","wires":[["df9a3175.c6c8d"]]},{"id":"df9a3175.c6c8d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":235.07138061523438,"y":174.4285888671875,"z":"cee53bf1.d63798","wires":[["da24c094.d6258","7e403afc.ca86f4","db6cf5b9.be6428","41693571.36e60c","8723af06.8912c","4e11edf0.dd1024","33375972.3ee9b6","88fc01a3.bf7a3"]]},{"id":"da24c094.d6258","type":"set","name":"set: order-status = PendingCreate","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"PendingCreate\"/>","comments":"","outputs":1,"x":502.96221923828125,"y":595.6208057403564,"z":"cee53bf1.d63798","wires":[[]]},{"id":"7e403afc.ca86f4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":442.1050567626953,"y":681.3254375457764,"z":"cee53bf1.d63798","wires":[]},{"id":"c1bd5bbc.d08278","type":"comment","name":"request-action = VNFActivateRequest","info":"","comments":"","x":681.738037109375,"y":91.53970336914062,"z":"cee53bf1.d63798","wires":[]},{"id":"2983e427.e89c6c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":820.0119781494141,"y":546.6433296203613,"z":"cee53bf1.d63798","wires":[["6e9f230e.fe328c"]]},{"id":"5785fdd6.aeaed4","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 occurred while updating vnf-instance orchestration-status in AnAI\"/>","comments":"","x":1204.1549072265625,"y":546.6434001922607,"z":"cee53bf1.d63798","wires":[]},{"id":"67bf7768.b620d8","type":"save","name":"save relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":822.3174667358398,"y":389.54354763031006,"z":"cee53bf1.d63798","wires":[["a997a0b4.695d1"]]},{"id":"a997a0b4.695d1","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1034.9617385864258,"y":389.59056186676025,"z":"cee53bf1.d63798","wires":[["aea10b11.934cb8"]]},{"id":"db6cf5b9.be6428","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":507.96427154541016,"y":389.51202869415283,"z":"cee53bf1.d63798","wires":[["67bf7768.b620d8"]]},{"id":"12eea8c7.978027","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 occurred while saving generic-vnf l3-network relationship in AnAI with network-id = ' + $vnf-instance.service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>","comments":"","x":1204.0118026733398,"y":499.60688877105713,"z":"cee53bf1.d63798","wires":[]},{"id":"aea10b11.934cb8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":993.726188659668,"y":451.8927421569824,"z":"cee53bf1.d63798","wires":[["98086e0f.3b64d","12eea8c7.978027"]]},{"id":"98086e0f.3b64d","type":"save","name":"delete vnf-instance: l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1287.15478515625,"y":452.32148838043213,"z":"cee53bf1.d63798","wires":[[]]},{"id":"41693571.36e60c","type":"save","name":"update AnAI - vnf-instance.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":544.4881210327148,"y":546.6548271179199,"z":"cee53bf1.d63798","wires":[["2983e427.e89c6c"]]},{"id":"6e9f230e.fe328c","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":978.4405517578125,"y":546.7500886917114,"z":"cee53bf1.d63798","wires":[["5785fdd6.aeaed4","98086e0f.3b64d"]]},{"id":"8723af06.8912c","type":"call","name":"call: vnf-instance-topology-assign-vnf-networks","xml":"<call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":542.2380599975586,"y":279.17860412597656,"z":"cee53bf1.d63798","wires":[[]]},{"id":"4e11edf0.dd1024","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":466.1428680419922,"y":640.7500247955322,"z":"cee53bf1.d63798","wires":[[]]},{"id":"33375972.3ee9b6","type":"switchNode","name":"switch ...SERVICE-DATA vnf-networks[]","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":520.321418762207,"y":329.7500343322754,"z":"cee53bf1.d63798","wires":[["de2601f5.481bb"]]},{"id":"de2601f5.481bb","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":766.7658920288086,"y":329.2777442932129,"z":"cee53bf1.d63798","wires":[["bc89e7d4.363558"]]},{"id":"bc89e7d4.363558","type":"set","name":"set SERVICE-DATA vnf-networks[] = 0","xml":"<set>\n<parameter name='vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":1012.321500990126,"y":329.27776495615626,"z":"cee53bf1.d63798","wires":[[]]},{"id":"88fc01a3.bf7a3","type":"save","name":"GET AnAI - vnf-instance","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" \n\tpfx=\"tmp.AnAI.vnf-instance\" >","comments":"","outputs":1,"x":465.8213882446289,"y":173.92859935760498,"z":"cee53bf1.d63798","wires":[["544d350b.3602ec","2400a64e.19d90a"]]},{"id":"544d350b.3602ec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":666.8213882446289,"y":173.67859935760498,"z":"cee53bf1.d63798","wires":[["24cc16d1.2a783a"]]},{"id":"2400a64e.19d90a","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":674.321403503418,"y":213.67860984802246,"z":"cee53bf1.d63798","wires":[["e96a9f54.0d0cd"]]},{"id":"24cc16d1.2a783a","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 occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":833.0713882446289,"y":173.42859935760498,"z":"cee53bf1.d63798","wires":[]},{"id":"e96a9f54.0d0cd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'generic-vnf not found in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":834.5713882446289,"y":213.92859935760498,"z":"cee53bf1.d63798","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-changeassign.json
new file mode 100644
index 00000000..4f583970
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"7e3f5196.e417c","type":"dgstart","name":"DGSTART","outputs":1,"x":111.42857360839844,"y":60.00000047683716,"z":"2cd468d5.f36418","wires":[["10b8528a.211b1d"]]},{"id":"10b8528a.211b1d","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":276.59523010253906,"y":60.166672229766846,"z":"2cd468d5.f36418","wires":[["59ca7427.fd225c"]]},{"id":"26eeb6ea.2961fa","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":188.92858123779297,"y":163.00000047683716,"z":"2cd468d5.f36418","wires":[["54500f80.f1dde","b5bb0315.e5f83","e31262f8.d4f67","b5584bc7.3ea138","7c0c33c0.92e28c","e091d3c2.33bc","ed72da5e.728ab8","579e919a.69eb7","d72290b6.13cfc","7b79f91e.a56ff8","723df9f0.89be98"]]},{"id":"54500f80.f1dde","type":"set","name":"set: order-status = PendingUpdate","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"PendingUpdate\"/>","comments":"","outputs":1,"x":484.37345123291016,"y":887.4610962867737,"z":"2cd468d5.f36418","wires":[[]]},{"id":"b5bb0315.e5f83","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":422.6432647705078,"y":1022.2609753608704,"z":"2cd468d5.f36418","wires":[]},{"id":"e31262f8.d4f67","type":"switchNode","name":"switch: service-data order-status = Active","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":495.2063674926758,"y":163.66666984558105,"z":"2cd468d5.f36418","wires":[["83191ca8.35ba"]]},{"id":"1634a3cd.229f0c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid service-data order status'/>","comments":"","x":899.9561920166016,"y":166.00004768371582,"z":"2cd468d5.f36418","wires":[]},{"id":"83191ca8.35ba","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":741.3729934692383,"y":163.24992179870605,"z":"2cd468d5.f36418","wires":[["1634a3cd.229f0c"]]},{"id":"59ca7427.fd225c","type":"method","name":"method vnf-instance-topology-changeassign","xml":"<method rpc='vnf-instance-topology-changeassign' mode='sync'>\n","comments":"","outputs":1,"x":233.65078735351562,"y":109.88889026641846,"z":"2cd468d5.f36418","wires":[["26eeb6ea.2961fa"]]},{"id":"b5584bc7.3ea138","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instance-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":422.3810043334961,"y":933.4761109352112,"z":"2cd468d5.f36418","wires":[[]]},{"id":"7c0c33c0.92e28c","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":486.3810043334961,"y":841.4761109352112,"z":"2cd468d5.f36418","wires":[[]]},{"id":"e091d3c2.33bc","type":"call","name":"call: vnf-instance-topology-assign-vnf-networks","xml":"<call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' >","comments":"","outputs":1,"x":514.3174896240234,"y":209.77777767181396,"z":"2cd468d5.f36418","wires":[[]]},{"id":"579e919a.69eb7","type":"save","name":"delete l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":461.793701171875,"y":348.7938804626465,"z":"2cd468d5.f36418","wires":[["12305cd8.a70123"]]},{"id":"6fb4fdc9.79da44","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 occurred while deleting existing l3-network relationship in AnAI with with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' vnf-instance update FAILED.'`\"/>","comments":"","x":863.6506958007812,"y":349.07925033569336,"z":"2cd468d5.f36418","wires":[]},{"id":"ed72da5e.728ab8","type":"save","name":"get AnAI - vnf-instance","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" \n\tpfx=\"tmp.AnAI.vnf-instance\" >","comments":"","outputs":1,"x":440.0952453613281,"y":253.55556106567383,"z":"2cd468d5.f36418","wires":[["75c63427.b2a41c","58db1cd8.34dbb4"]]},{"id":"f6b122b7.d730f","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":780.8290863037109,"y":438.56689071655273,"z":"2cd468d5.f36418","wires":[["f6bb7bd9.76bae8"]]},{"id":"f6bb7bd9.76bae8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":989.9733276367188,"y":438.61392307281494,"z":"2cd468d5.f36418","wires":[["93b5ee1e.221ca"]]},{"id":"d72290b6.13cfc","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":481.0475311279297,"y":439.1068420410156,"z":"2cd468d5.f36418","wires":[["f6b122b7.d730f"]]},{"id":"5921c16b.5bd97","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update vnf-instance l3-network relationship in AnAI. ' + $error-message`\"/>","comments":"","x":1335.166160583496,"y":818.8087882995605,"z":"2cd468d5.f36418","wires":[]},{"id":"93b5ee1e.221ca","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1152.9520797729492,"y":438.84466648101807,"z":"2cd468d5.f36418","wires":[["5921c16b.5bd97","76dff6e4.660dd8","625f1fb8.1f18e","efc90ef3.b0a7c","e4edafac.b2e1f"]]},{"id":"625f1fb8.1f18e","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >","comments":"","outputs":1,"x":1392.4521484375,"y":486.7734680175781,"z":"2cd468d5.f36418","wires":[[]]},{"id":"e63dcfd2.1a0d3","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 occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>","comments":"","x":821.3808288574219,"y":254.26970291137695,"z":"2cd468d5.f36418","wires":[]},{"id":"12305cd8.a70123","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":677.6508178710938,"y":349.222225189209,"z":"2cd468d5.f36418","wires":[["6fb4fdc9.79da44"]]},{"id":"7b79f91e.a56ff8","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":444.00003814697266,"y":979.4286103248596,"z":"2cd468d5.f36418","wires":[[]]},{"id":"efc90ef3.b0a7c","type":"for","name":"for i : tmp.AnAI.vnf-instance.relationship","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1425.4164733886719,"y":577.6667003631592,"z":"2cd468d5.f36418","wires":[["68e41057.68fce"]]},{"id":"68e41057.68fce","type":"switchNode","name":"switch: relationship.related-to","xml":"<switch test=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].related-to`\">","comments":"","outputs":1,"x":1732.4164428710938,"y":577.3810205459595,"z":"2cd468d5.f36418","wires":[["ac07b174.2f5ff"]]},{"id":"ac07b174.2f5ff","type":"other","name":"l3-network","xml":"<outcome value='l3-network'>","comments":"","outputs":1,"x":1955.4164428710938,"y":577.3810205459595,"z":"2cd468d5.f36418","wires":[["87f7cb69.27eb38"]]},{"id":"a34ca0bd.1f59f","type":"for","name":"for j : tmp.AnAI.vnf-instance.relationship-data","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1866.6664123535156,"y":711.0238761901855,"z":"2cd468d5.f36418","wires":[["867a21f.18c04e"]]},{"id":"867a21f.18c04e","type":"save","name":"save l3-network relationship","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf:relationship-list\" \n\t\tkey=\"generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id\" >\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data[$j].relationship-value`\" />","comments":"","outputs":1,"x":2224.2378692626953,"y":711.1667594909668,"z":"2cd468d5.f36418","wires":[["6dbc5217.3d6f5c","6f428706.86a3b8"]]},{"id":"6dbc5217.3d6f5c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2482.2378692626953,"y":711.1667594909668,"z":"2cd468d5.f36418","wires":[["6609cec3.9d5d2"]]},{"id":"75c63427.b2a41c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":629.9524192810059,"y":253.69842910766602,"z":"2cd468d5.f36418","wires":[["e63dcfd2.1a0d3"]]},{"id":"76dff6e4.660dd8","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`' | An error occurred while saving l3-network relationship with network-id = ' + $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":1357.4522171020508,"y":438.7738342285156,"z":"2cd468d5.f36418","wires":[[]]},{"id":"6609cec3.9d5d2","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$error-message + ' | An error occurred while during rollback of l3-network relationship for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\" />\n","comments":"","outputs":1,"x":2680.2021865844727,"y":710.7024040222168,"z":"2cd468d5.f36418","wires":[[]]},{"id":"58db1cd8.34dbb4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":636.8452453613281,"y":296.1388740539551,"z":"2cd468d5.f36418","wires":[["e63dcfd2.1a0d3"]]},{"id":"6f428706.86a3b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2492.5235748291016,"y":752.3452558517456,"z":"2cd468d5.f36418","wires":[["6609cec3.9d5d2"]]},{"id":"f7812e3d.246cd","type":"switchNode","name":"set: vnf-instance-service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1126.888816833496,"y":394.7142753601074,"z":"2cd468d5.f36418","wires":[[]]},{"id":"a018c1ed.7323c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":828.1388168334961,"y":394.7142753601074,"z":"2cd468d5.f36418","wires":[["f7812e3d.246cd"]]},{"id":"723df9f0.89be98","type":"switchNode","name":"switch: vnf-instance-service-data...vnf-networks_length","xml":"<switch test=\"`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":540.6388244628906,"y":394.7142753601074,"z":"2cd468d5.f36418","wires":[["a018c1ed.7323c"]]},{"id":"b1a06442.5f4468","type":"switchNode","name":"set: tmp.AnAI.vnf-instance.relationship-list.relationship_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vnf-instance.relationship-list.relationship_length\" value = \"0\" />","comments":"","outputs":1,"x":2139.2380905151367,"y":533.6667156219482,"z":"2cd468d5.f36418","wires":[[]]},{"id":"cfeea49e.1a6548","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1821.4880905151367,"y":533.6667156219482,"z":"2cd468d5.f36418","wires":[["b1a06442.5f4468"]]},{"id":"e4edafac.b2e1f","type":"switchNode","name":"switch: tmp.AnAI.vnf-instance.relationship-list.relationship_length","xml":"<switch test=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1502.9880981445312,"y":533.6667156219482,"z":"2cd468d5.f36418","wires":[["cfeea49e.1a6548"]]},{"id":"87f7cb69.27eb38","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1571.250015258789,"y":663.7500133514404,"z":"2cd468d5.f36418","wires":[["baf72e9.09de9d","a34ca0bd.1f59f"]]},{"id":"baf72e9.09de9d","type":"switchNode","name":"switch: tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length","xml":"<switch test=\"`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1990.7500228881836,"y":664.0000171661377,"z":"2cd468d5.f36418","wires":[["ddf26f89.730fa"]]},{"id":"ddf26f89.730fa","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2367.250015258789,"y":664.0000171661377,"z":"2cd468d5.f36418","wires":[["a4584fcd.7e598"]]},{"id":"a4584fcd.7e598","type":"switchNode","name":"set: tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length = 0","xml":"<set>\n\t<parameter name=\"tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length\" value = \"0\" />","comments":"","outputs":1,"x":2752.000015258789,"y":664.0000171661377,"z":"2cd468d5.f36418","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-delete.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-delete.json
new file mode 100644
index 00000000..edca37e5
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-delete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"892394b6.5a0068","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":394.4444274902344,"y":448.305570602417,"z":"bae6c09b.ec173","wires":[]},{"id":"ae2cbfc2.b3e0d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":171.44437408447266,"y":147.44444274902344,"z":"bae6c09b.ec173","wires":[["8dac86ee.e1bed8","892394b6.5a0068","3d06c980.f160e6","d3da4ebd.718d2","e25b96d5.e6f508","da9108f7.df52c8","ed7cb1e2.2fa6d","99637329.93ae"]]},{"id":"8dac86ee.e1bed8","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":435.4444274902344,"y":275.305570602417,"z":"bae6c09b.ec173","wires":[[]]},{"id":"24188683.531f4a","type":"method","name":"method vnf-instance-topology-delete","xml":"<method rpc='vnf-instance-topology-delete' mode='sync'>\n","comments":"","outputs":1,"x":203.1110610961914,"y":96.6111068725586,"z":"bae6c09b.ec173","wires":[["ae2cbfc2.b3e0d"]]},{"id":"2d805b52.c5e354","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":273.1110305786133,"y":44.611114501953125,"z":"bae6c09b.ec173","wires":[["24188683.531f4a"]]},{"id":"1dec305b.bded3","type":"dgstart","name":"DGSTART","outputs":1,"x":109.94437408447266,"y":44.44444274902344,"z":"bae6c09b.ec173","wires":[["2d805b52.c5e354"]]},{"id":"59d02cc9.9c4fa4","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":642.8131637573242,"y":191.12879180908203,"z":"bae6c09b.ec173","wires":[["cbe21014.03475"]]},{"id":"cbe21014.03475","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":806.1462936401367,"y":191.12885284423828,"z":"bae6c09b.ec173","wires":[]},{"id":"e25b96d5.e6f508","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instance-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":396.7020263671875,"y":318.85116386413574,"z":"bae6c09b.ec173","wires":[[]]},{"id":"3d06c980.f160e6","type":"switchNode","name":"switch: vnf-instance-id config == input","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vf-module-id == $vf-module-service-data.vnf-instance-id`\">","comments":"","outputs":1,"x":468.58827209472656,"y":147.93198776245117,"z":"bae6c09b.ec173","wires":[["52ff4df1.be8e04"]]},{"id":"52ff4df1.be8e04","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":717.0428314208984,"y":148.1138153076172,"z":"bae6c09b.ec173","wires":[["8514ded5.e8697"]]},{"id":"8514ded5.e8697","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vf-module-id not found in SDNC'/>","comments":"","x":885.6337509155273,"y":148.27291584014893,"z":"bae6c09b.ec173","wires":[]},{"id":"d3da4ebd.718d2","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":461.83837890625,"y":234.043119430542,"z":"bae6c09b.ec173","wires":[[]]},{"id":"da9108f7.df52c8","type":"set","name":"Clear vnf-instance-topology","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.vnf-instance-topology-information.\" value=\"\" /> \n","comments":"","outputs":1,"x":435.83837890625,"y":359.043119430542,"z":"bae6c09b.ec173","wires":[[]]},{"id":"99637329.93ae","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":439.9960632324219,"y":191.42859268188477,"z":"bae6c09b.ec173","wires":[["59d02cc9.9c4fa4"]]},{"id":"ed7cb1e2.2fa6d","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":417.1587448120117,"y":404.24604415893555,"z":"bae6c09b.ec173","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-operation.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-operation.json
new file mode 100644
index 00000000..b82bb884
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"b6cde583.fc1578","type":"dgstart","name":"DGSTART","outputs":1,"x":148.57142639160156,"y":67.14286041259766,"z":"7f454f1f.392aa","wires":[["22ea9e53.72aad2"]]},{"id":"22ea9e53.72aad2","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":315.8491897583008,"y":66.8095293045044,"z":"7f454f1f.392aa","wires":[["9e0df0a0.1f3a9"]]},{"id":"9e0df0a0.1f3a9","type":"method","name":"vnf-instance-topology-operation","xml":"<method rpc='vnf-instance-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":243.07142639160156,"y":121.36507797241211,"z":"7f454f1f.392aa","wires":[["97f7f3c4.5c2c7"]]},{"id":"7da5f802.f7a678","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`\">\n","comments":"","outputs":1,"x":461.6269760131836,"y":587.2261047363281,"z":"7f454f1f.392aa","wires":[["56abcb20.439cd4","7b21b7bd.d66ed8","6552ee31.315f","4cc3c0e7.f2f6c","5f3d0452.12c89c","c827944d.effcf8"]]},{"id":"56abcb20.439cd4","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":679.4325790405273,"y":803.9761066436768,"z":"7f454f1f.392aa","wires":[["a888bd06.a19e8"]]},{"id":"7b21b7bd.d66ed8","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":679.1825332641602,"y":587.226110458374,"z":"7f454f1f.392aa","wires":[["c8e7f422.0f4a78"]]},{"id":"a888bd06.a19e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action not recognized'/>\n","comments":"","x":893.4325790405273,"y":803.9761066436768,"z":"7f454f1f.392aa","wires":[]},{"id":"6552ee31.315f","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":682.1825485229492,"y":676.4760990142822,"z":"7f454f1f.392aa","wires":[["6c5e9dfe.049d54"]]},{"id":"4cc3c0e7.f2f6c","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":681.9325485229492,"y":718.7260999679565,"z":"7f454f1f.392aa","wires":[["db8da778.5bf248"]]},{"id":"c827944d.effcf8","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":700.6825485229492,"y":632.7261009216309,"z":"7f454f1f.392aa","wires":[["4b6cc24b.5be82c"]]},{"id":"5f3d0452.12c89c","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":679.6825790405273,"y":760.2261075973511,"z":"7f454f1f.392aa","wires":[["43dc3d5d.2b8ed4"]]},{"id":"c8e7f422.0f4a78","type":"call","name":"call: vnf-instance-topology-assign","xml":"<call module='VNF-API' rpc='vnf-instance-topology-assign' mode='sync' >","comments":"","outputs":1,"x":953.4325332641602,"y":587.2261085510254,"z":"7f454f1f.392aa","wires":[[]]},{"id":"4b6cc24b.5be82c","type":"call","name":"call: vnf-instance-topology-changeassign","xml":"<call module='VNF-API' rpc='vnf-instance-topology-changeassign' mode='sync' >","comments":"","outputs":1,"x":976.6826553344727,"y":632.2261085510254,"z":"7f454f1f.392aa","wires":[[]]},{"id":"db8da778.5bf248","type":"call","name":"call: vnf-instance-topology-rollback","xml":"<call module='VNF-API' rpc='vnf-instance-topology-rollback' mode='sync' >","comments":"","outputs":1,"x":958.4326553344727,"y":718.726110458374,"z":"7f454f1f.392aa","wires":[[]]},{"id":"43dc3d5d.2b8ed4","type":"call","name":"call: vnf-instance-topology-delete","xml":"<call module='VNF-API' rpc='vnf-instance-topology-delete' mode='sync' >","comments":"","outputs":1,"x":954.4326477050781,"y":760.2261085510254,"z":"7f454f1f.392aa","wires":[[]]},{"id":"6c5e9dfe.049d54","type":"call","name":"call: vnf-instance-topology-activate","xml":"<call module='VNF-API' rpc='vnf-instance-topology-activate' mode='sync' >","comments":"","outputs":1,"x":957.9326477050781,"y":676.726104259491,"z":"7f454f1f.392aa","wires":[[]]},{"id":"e853df7f.d8cf2","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"vnf-instance-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$vnf-instance-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field6\" value=\"`$vnf-instance-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$vnf-instance-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$vnf-instance-topology-operation-input.service-information.service-id`\"/>\n<parameter name=\"field9\" value=\"`$vnf-instance-topology-operation-input.service-information.service-type`\"/>\n<parameter name=\"field10\" value=\"`$vnf-instance-topology-operation-input.service-information.subscriber-name`\"/>\n<parameter name=\"field11\" value=\"`$vnf-instance-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field12\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.request-version`\"/>\n<parameter name=\"field13\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\"/>\n<parameter name=\"field14\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`\"/>\n<parameter name=\"field15\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`\"/>\n<parameter name=\"field16\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`\"/>\n<parameter name=\"field17\" value=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.tenant`\"/>","comments":"","outputs":1,"x":435.1269989013672,"y":171.03175735473633,"z":"7f454f1f.392aa","wires":[[]]},{"id":"1ce1cb42.ddf305","type":"comment","name":"vnf-instance-topology-operation","info":"","comments":"","x":675.4603042602539,"y":112.58730411529541,"z":"7f454f1f.392aa","wires":[]},{"id":"97f7f3c4.5c2c7","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":251.57142639160156,"y":171.14287185668945,"z":"7f454f1f.392aa","wires":[["e853df7f.d8cf2","1629c736.329f19","d7f25385.ebe65","7da5f802.f7a678","7d084342.0bce0c","d50b494f.832b58"]]},{"id":"1629c736.329f19","type":"switchNode","name":"switch: INPUT vnf-instance-name","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`\">","comments":"","outputs":1,"x":516.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["ecffbed3.c6e14","b49395b.4d79268"]]},{"id":"ecffbed3.c6e14","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":750.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["a273a316.cf939"]]},{"id":"b49395b.4d79268","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":750.7936553955078,"y":259.5872926712036,"z":"7f454f1f.392aa","wires":[["32a0f03.ebb881"]]},{"id":"a273a316.cf939","type":"switchNode","name":"switch: PRELOAD vnf-instance-name","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`\">","comments":"","outputs":1,"x":988.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["cbb1a490.a33cd8","c77c21c9.5614a"]]},{"id":"cbb1a490.a33cd8","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1221.7936553955078,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[["c2db9f95.3f365"]]},{"id":"c77c21c9.5614a","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1219.7936553955078,"y":258.5872926712036,"z":"7f454f1f.392aa","wires":[["6aa2959b.18ff5c"]]},{"id":"c2db9f95.3f365","type":"switchNode","name":"switch: vnf-instance-name INPUT == PRELOAD","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`\">","comments":"","outputs":1,"x":1495.7936401367188,"y":217.58729076385498,"z":"7f454f1f.392aa","wires":[["8c2ca8dd.1e4558"]]},{"id":"8c2ca8dd.1e4558","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1771.1270065307617,"y":217.25419330596924,"z":"7f454f1f.392aa","wires":[["e4dc9156.5d663"]]},{"id":"e4dc9156.5d663","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='vnf-instance-name from input not found in vnf-instance-preload-data'/>","comments":"","x":1929.7936325073242,"y":217.5872926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"6aa2959b.18ff5c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-instance-name from input'/>","comments":"","x":1386.7936553955078,"y":258.5872926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"32a0f03.ebb881","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-instance-name is required'/>","comments":"","x":912.2936553955078,"y":259.8372926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"d7f25385.ebe65","type":"switchNode","name":"switch: INPUT vnf-model-id","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`\">","comments":"","outputs":1,"x":496.79368591308594,"y":305.5872926712036,"z":"7f454f1f.392aa","wires":[["c7fe49d7.91ad98","fbe8d80c.171448"]]},{"id":"c7fe49d7.91ad98","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":713.7936782836914,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["90e0b948.74bb68"]]},{"id":"fbe8d80c.171448","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":714.7936782836914,"y":349.5872926712036,"z":"7f454f1f.392aa","wires":[["e694a04b.dee48"]]},{"id":"90e0b948.74bb68","type":"switchNode","name":"switch: PRELOAD vnf-model-id","xml":"<switch test=\"`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`\">","comments":"","outputs":1,"x":924.7936782836914,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["ff6610b6.ecd1e","160f2740.7d7439"]]},{"id":"ff6610b6.ecd1e","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1135.7936782836914,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["d7a29f1b.08cf3"]]},{"id":"160f2740.7d7439","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1136.7936782836914,"y":348.5872926712036,"z":"7f454f1f.392aa","wires":[["a6c80c7f.af94e"]]},{"id":"e694a04b.dee48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-model-id is required'/>","comments":"","x":868.2936782836914,"y":349.8372926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"d7a29f1b.08cf3","type":"switchNode","name":"switch: vnf-model-id INPUT == PRELOAD","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`\">","comments":"","outputs":1,"x":1383.7936553955078,"y":306.5872926712036,"z":"7f454f1f.392aa","wires":[["6ed859c6.7bded8"]]},{"id":"a6c80c7f.af94e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-model-id from input'/>","comments":"","x":1295.7936553955078,"y":348.5872926712036,"z":"7f454f1f.392aa","wires":[]},{"id":"6ed859c6.7bded8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1632.7936553955078,"y":305.9207887649536,"z":"7f454f1f.392aa","wires":[["89f8a67e.750a48"]]},{"id":"89f8a67e.750a48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value='request.vnf-model-id not found in vnf-instance-preload-data'/>","comments":"","x":1791.4602813720703,"y":305.253888130188,"z":"7f454f1f.392aa","wires":[]},{"id":"7d084342.0bce0c","type":"switchNode","name":"switch: INPUT vnf-instance-id","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`\">","comments":"","outputs":1,"x":502.47232818603516,"y":400.0516195297241,"z":"7f454f1f.392aa","wires":[["f23dfd7e.975a9","2a84c473.0020ec"]]},{"id":"2a84c473.0020ec","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":721.472297668457,"y":441.1944570541382,"z":"7f454f1f.392aa","wires":[["1240516c.17edef"]]},{"id":"f23dfd7e.975a9","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":720.6152267456055,"y":399.62305545806885,"z":"7f454f1f.392aa","wires":[["1240516c.17edef"]]},{"id":"1240516c.17edef","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-instance-id cannot be NULL or 0'/>","comments":"","x":896.3295059204102,"y":441.4801778793335,"z":"7f454f1f.392aa","wires":[]},{"id":"d50b494f.832b58","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":504.3214416503906,"y":522.6428508758545,"z":"7f454f1f.392aa","wires":[["e2f45743.5634e8"]]},{"id":"e2f45743.5634e8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":722.3214111328125,"y":522.7856884002686,"z":"7f454f1f.392aa","wires":[["d672f28c.c59ab"]]},{"id":"d672f28c.c59ab","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region cannot be NULL'/>","comments":"","x":876.1786193847656,"y":523.0714092254639,"z":"7f454f1f.392aa","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-instance-topology-rollback.json b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-rollback.json
new file mode 100644
index 00000000..e9d9dc45
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-instance-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"94c92ddd.ae5ed","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":184.44444274902344,"y":160.74999046325684,"z":"df9d3b3e.c0e1c8","wires":[["93e2a330.f35a"]]},{"id":"3d687d14.a75552","type":"method","name":"method vnf-instance-topology-rollback","xml":"<method rpc='vnf-instance-topology-rollback' mode='sync'>\n","comments":"","outputs":1,"x":212.8611297607422,"y":108.16666316986084,"z":"df9d3b3e.c0e1c8","wires":[["94c92ddd.ae5ed"]]},{"id":"cee35ab0.d8d768","type":"service-logic","name":"VNF-API 1.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":289.9721908569336,"y":49.05556106567383,"z":"df9d3b3e.c0e1c8","wires":[["3d687d14.a75552"]]},{"id":"561962a7.5d021c","type":"dgstart","name":"DGSTART","outputs":1,"x":124.25,"y":48.88888740539551,"z":"df9d3b3e.c0e1c8","wires":[["cee35ab0.d8d768"]]},{"id":"1bf35c69.3105c4","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":922.694465637207,"y":513.4972991943359,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"faa6e689.963ce8","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":958.444465637207,"y":342.27510833740234,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"8bd3d099.709d5","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":991.2854080200195,"y":256.4038906097412,"z":"df9d3b3e.c0e1c8","wires":[["8b9ee3fe.e64ab"]]},{"id":"8b9ee3fe.e64ab","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1222.8687896728516,"y":256.23720264434814,"z":"df9d3b3e.c0e1c8","wires":[["a0d580c9.8f91a"]]},{"id":"a0d580c9.8f91a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1375.201919555664,"y":256.2372636795044,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"61bf6764.c0ee08","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-action\" value=\"`$vnf-instances-service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":920.2021598815918,"y":384.5707015991211,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"abf35da3.aa20e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1246.542984008789,"y":209.19444751739502,"z":"df9d3b3e.c0e1c8","wires":[["6266141a.67c14c"]]},{"id":"6266141a.67c14c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='404'/>\n\t<parameter name='error-message' value=\"`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`\"/>","comments":"","x":1406.633804321289,"y":209.6035509109497,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"a6e5c1a8.6bc63","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.oper-status.last-order-status\" value=\"`$vnf-instance-service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":984.088508605957,"y":299.5959997177124,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"8e3a7d8d.ca152","type":"set","name":"Clear vnf-instance topology","xml":"<set>\n\t<parameter name=\"vnf-instance-service-data.\" value=\"\" /> \n","comments":"","outputs":1,"x":960.588508605957,"y":428.26265716552734,"z":"df9d3b3e.c0e1c8","wires":[[]]},{"id":"68d58b09.4d9dd4","type":"switchNode","name":"switch:CONFIG == INPUT - vnf-instance-id","xml":"<switch test=\"`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`\">","comments":"","outputs":1,"x":1002.694465637207,"y":209.19444751739502,"z":"df9d3b3e.c0e1c8","wires":[["abf35da3.aa20e"]]},{"id":"93e2a330.f35a","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$vnf-instance-service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":291.94445037841797,"y":207.69445133209229,"z":"df9d3b3e.c0e1c8","wires":[["ef7c4880.dd4728"]]},{"id":"ef7c4880.dd4728","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":528.1944427490234,"y":208.44444465637207,"z":"df9d3b3e.c0e1c8","wires":[["7f540634.54f868"]]},{"id":"7f540634.54f868","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":690.1944427490234,"y":208.44444465637207,"z":"df9d3b3e.c0e1c8","wires":[["68d58b09.4d9dd4","8bd3d099.709d5","a6e5c1a8.6bc63","faa6e689.963ce8","61bf6764.c0ee08","8e3a7d8d.ca152","1bf35c69.3105c4","e3c9abe6.25d908"]]},{"id":"34d8bebb.20ff92","type":"comment","name":"request-action = VNFActivateRequest, svc-action = rollback","info":"","comments":"","x":787.944450378418,"y":85.4444465637207,"z":"df9d3b3e.c0e1c8","wires":[]},{"id":"e3c9abe6.25d908","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":944.3054733276367,"y":470.55554389953613,"z":"df9d3b3e.c0e1c8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-activate.json b/platform-logic/vnfapi/src/main/json/vnf-topology-activate.json
new file mode 100644
index 00000000..87f11f2c
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-activate.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"88706b6c.d7e8f8","type":"comment","name":"VNF-TOPOLOGY-ACTIVATE","info":"","comments":"","x":705,"y":56.25,"z":"bdb7525f.b82ac","wires":[]},{"id":"9919a3a0.0db84","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","outputs":1,"x":416.1111373901367,"y":392.19443130493164,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"c7aef71a.0546b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":163.1111297607422,"y":159.6944465637207,"z":"bdb7525f.b82ac","wires":[["9919a3a0.0db84","d2f822b9.c0ba2","cb7a4a21.63f1a8","a2825e7b.f1f5b","997d743b.93f348","4d75942d.b062cc","4d26f461.ab756c","be925673.a43ed8"]]},{"id":"e1d7f022.0eec5","type":"method","name":"method vnf-topology-activate","xml":"<method rpc='vnf-topology-activate' mode='sync'>\n","comments":"","outputs":1,"x":205.77781677246094,"y":103.86111068725586,"z":"bdb7525f.b82ac","wires":[["c7aef71a.0546b8"]]},{"id":"8ecea6c6.be7228","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":297.7777862548828,"y":56.86111831665039,"z":"bdb7525f.b82ac","wires":[["e1d7f022.0eec5"]]},{"id":"c14838e9.4ff538","type":"dgstart","name":"DGSTART","outputs":1,"x":132.6111297607422,"y":56.6944465637207,"z":"bdb7525f.b82ac","wires":[["8ecea6c6.be7228"]]},{"id":"d2f822b9.c0ba2","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingCreate`\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":455.4445114135742,"y":288.5276527404785,"z":"bdb7525f.b82ac","wires":[["7fbf2884.337bd8"]]},{"id":"7fbf2884.337bd8","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":704.7778625488281,"y":288.8609619140625,"z":"bdb7525f.b82ac","wires":[["6a86c40f.3cacbc"]]},{"id":"5ab563ab.d3ac3c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid last-order-status'/>","comments":"","x":1363.110984802246,"y":287.8610134124756,"z":"bdb7525f.b82ac","wires":[]},{"id":"997d743b.93f348","type":"switchNode","name":"switch:vnf-id config == input","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":427.88387298583984,"y":236.73988723754883,"z":"bdb7525f.b82ac","wires":[["18372478.ff847c"]]},{"id":"18372478.ff847c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":647.3383483886719,"y":236.9217071533203,"z":"bdb7525f.b82ac","wires":[["a2862881.e98788"]]},{"id":"a2862881.e98788","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`\"/>","comments":"","x":825.4292907714844,"y":236.830810546875,"z":"bdb7525f.b82ac","wires":[]},{"id":"cb7a4a21.63f1a8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":385.22225189208984,"y":612.8610877990723,"z":"bdb7525f.b82ac","wires":[]},{"id":"6a86c40f.3cacbc","type":"switchNode","name":"switch: order-status = PendingUpdate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingUpdate`\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":955.7020568847656,"y":288.2853698730469,"z":"bdb7525f.b82ac","wires":[["8c8f2029.ca786"]]},{"id":"8c8f2029.ca786","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1198.1564636230469,"y":288.28533935546875,"z":"bdb7525f.b82ac","wires":[["5ab563ab.d3ac3c"]]},{"id":"3c6838ea.3c4ff8","type":"comment","name":"once success is returned, operational-data gets saved","info":"","comments":"","x":731.6288452148438,"y":573.79541015625,"z":"bdb7525f.b82ac","wires":[]},{"id":"a2825e7b.f1f5b","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":449.22481536865234,"y":340.8081398010254,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"b434395d.5c9488","type":"comment","name":"request-action = VNFActivateRequest, svc-action = activate","info":"","comments":"","x":711.7222137451172,"y":96.02778053283691,"z":"bdb7525f.b82ac","wires":[]},{"id":"4d75942d.b062cc","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vnf-topology-operation-input.\" />","comments":"","outputs":1,"x":413.1111373901367,"y":527.2500038146973,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"4d26f461.ab756c","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":383.1111373901367,"y":439.25000381469727,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"25f69501.db82ca","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":741.5238571166992,"y":482.2385025024414,"z":"bdb7525f.b82ac","wires":[["8b31c6d4.18a8e8"]]},{"id":"8b31c6d4.18a8e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while updating vf-module orchestration-status in AnAI with vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":909.6667861938477,"y":482.2385730743408,"z":"bdb7525f.b82ac","wires":[]},{"id":"baf5a37d.f9734","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":407.4285888671875,"y":570.9642486572266,"z":"bdb7525f.b82ac","wires":[[]]},{"id":"be925673.a43ed8","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" >\n\t<parameter name=\"orchestration-status\" value=\"active\" />","comments":"","outputs":1,"x":477,"y":482.25,"z":"bdb7525f.b82ac","wires":[["25f69501.db82ca"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-assign-vfmodule.json b/platform-logic/vnfapi/src/main/json/vnf-topology-assign-vfmodule.json
new file mode 100644
index 00000000..6bdfc895
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-assign-vfmodule.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"a31dd50.8f7cf28","type":"dgstart","name":"DGSTART","outputs":1,"x":140,"y":61.42857360839844,"z":"3018bfef.3ec6f","wires":[["fcb8154c.6bd848"]]},{"id":"fcb8154c.6bd848","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":305.1666564941406,"y":61.595245361328125,"z":"3018bfef.3ec6f","wires":[["94fe54b7.9c25f8"]]},{"id":"94fe54b7.9c25f8","type":"method","name":"method vnf-topology-assign-vfmodule","xml":"<method rpc='vnf-topology-assign-vfmodule' mode='sync'>\n","comments":"","outputs":1,"x":237.16668701171875,"y":114.5952377319336,"z":"3018bfef.3ec6f","wires":[["1d4d3089.10a17f"]]},{"id":"1d4d3089.10a17f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":189.50000762939453,"y":163.42857360839844,"z":"3018bfef.3ec6f","wires":[["20002884.ee2078","b3f35db0.e0e4","d031edaa.e6184","cb1afc0e.40927","3c67b88b.3c6c28","9aaf059b.32e0d8","9f4073e7.b1211"]]},{"id":"637385b9.ca295c","type":"switchNode","name":"switch test: INPUT network-id = NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '0'`\">","comments":"","outputs":1,"x":718.9422798156738,"y":715.4150276184082,"z":"3018bfef.3ec6f","wires":[["49d71e01.633db","53a64d09.4de384"]]},{"id":"49d71e01.633db","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":959.3057670593262,"y":758.5968976020813,"z":"3018bfef.3ec6f","wires":[["3983efb0.652cd"]]},{"id":"3983efb0.652cd","type":"switchNode","name":"switch : INPUT network-name = NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '0'`\">","comments":"","outputs":1,"x":1197.0878677368164,"y":758.4408760070801,"z":"3018bfef.3ec6f","wires":[["372c9435.92cf3c","d62ab763.7f7488"]]},{"id":"53a64d09.4de384","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":959.3260536193848,"y":715.3039240837097,"z":"3018bfef.3ec6f","wires":[["c6e8f114.6edb3"]]},{"id":"372c9435.92cf3c","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1435.2798194885254,"y":797.9963579177856,"z":"3018bfef.3ec6f","wires":[["459aea4a.7ec284"]]},{"id":"c6e8f114.6edb3","type":"save","name":"get AnAI - l3-network by id","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1160.548168182373,"y":715.3040919303894,"z":"3018bfef.3ec6f","wires":[["ef79ca38.6e05a8","8a064197.2016f"]]},{"id":"ef79ca38.6e05a8","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1363.4928588867188,"y":714.8595404624939,"z":"3018bfef.3ec6f","wires":[["df4013d1.53f66"]]},{"id":"d4a5dd72.75857","type":"for","name":"for i : INPUT vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":548.236156463623,"y":571.9077110290527,"z":"3018bfef.3ec6f","wires":[["2dd04c5d.087a24"]]},{"id":"459aea4a.7ec284","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n\n","comments":"","outputs":1,"x":1645.7818222045898,"y":797.7381496429443,"z":"3018bfef.3ec6f","wires":[["3388e17e.b2e1be","86e3396f.1580b8"]]},{"id":"3388e17e.b2e1be","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1867.0318222045898,"y":797.9882106781006,"z":"3018bfef.3ec6f","wires":[["df4013d1.53f66"]]},{"id":"b1029783.5d2708","type":"set","name":"initialize tmp.usePreload = 1 and tmp.AAI.l3network","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n<parameter name='tmp.AnAI.l3network.' value='' />\n","comments":"","outputs":1,"x":435.72979736328125,"y":485.63307189941406,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"22808f4a.1e8c2","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":510.91400146484375,"y":398.16761016845703,"z":"3018bfef.3ec6f","wires":[["b1029783.5d2708","816372ff.06ba2","b66fd01c.9af55"]]},{"id":"20002884.ee2078","type":"for","name":"for j : PRELOAD vnf-networks","xml":"<for index=\"j\" start=\"0\" end=\"`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":273.8889465332031,"y":398.6785583496094,"z":"3018bfef.3ec6f","wires":[["22808f4a.1e8c2"]]},{"id":"816372ff.06ba2","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":315.61627197265625,"y":571.8376026153564,"z":"3018bfef.3ec6f","wires":[["d4a5dd72.75857","fd1635d9.5c1398"]]},{"id":"2dd04c5d.087a24","type":"switchNode","name":"switch : PRELOAD network-role = INPUT","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":857.6163368225098,"y":572.2012739181519,"z":"3018bfef.3ec6f","wires":[["b66fe12f.c0be8"]]},{"id":"b66fe12f.c0be8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1108.4117622375488,"y":572.4969162940979,"z":"3018bfef.3ec6f","wires":[["6c5f5d3f.b58ed4"]]},{"id":"6c5f5d3f.b58ed4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":466.6973304748535,"y":672.2760715484619,"z":"3018bfef.3ec6f","wires":[["637385b9.ca295c","13b8f738.862a39","989e6dbf.d5d9d"]]},{"id":"13b8f738.862a39","type":"set","name":"set tmp.usePreload = 0","xml":"<set>\n<parameter name='tmp.usePreload' value='0' />\n","comments":"","outputs":1,"x":673.060962677002,"y":672.1852006912231,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d62ab763.7f7488","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1434.8377532958984,"y":758.7023506164551,"z":"3018bfef.3ec6f","wires":[["df4013d1.53f66"]]},{"id":"989e6dbf.d5d9d","type":"switchNode","name":"switch : tmp.usePreload= 0","xml":"<switch test=\"`$tmp.usePreload == 0`\">","comments":"","outputs":1,"x":699.7430572509766,"y":951.2915191650391,"z":"3018bfef.3ec6f","wires":[["a94fbeb7.9f49d"]]},{"id":"a94fbeb7.9f49d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":898.7429428100586,"y":951.5416564941406,"z":"3018bfef.3ec6f","wires":[["f300366b.1bf838"]]},{"id":"ae3d7146.3003c","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":800.1870269775391,"y":1135.3089752197266,"z":"3018bfef.3ec6f","wires":[["6d4a43e6.1837ec"]]},{"id":"6d4a43e6.1837ec","type":"switchNode","name":"switch: SERVICE-DATA network-role = INPUT","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`\">","comments":"","outputs":1,"x":1158.0671691894531,"y":1135.6582279205322,"z":"3018bfef.3ec6f","wires":[["5d39673b.750638"]]},{"id":"5d39673b.750638","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1437.6125793457031,"y":1135.7038822174072,"z":"3018bfef.3ec6f","wires":[["99507e8d.3fb04"]]},{"id":"fd1635d9.5c1398","type":"switchNode","name":"switch: tmp.usePreload= 1","xml":"<switch test=\"`$tmp.usePreload == 1`\">","comments":"","outputs":1,"x":540.9327087402344,"y":1653.80224609375,"z":"3018bfef.3ec6f","wires":[["f3fd6148.f130e"]]},{"id":"f3fd6148.f130e","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":748.9642868041992,"y":1653.5424976348877,"z":"3018bfef.3ec6f","wires":[["394ee13a.df62ee"]]},{"id":"df4013d1.53f66","type":"set","name":"set tmp.usePreload = 1","xml":"<set>\n<parameter name='tmp.usePreload' value='1' />\n","comments":"","outputs":1,"x":1629.4458465576172,"y":899.4613742828369,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"b7f69264.cf1ab","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to query AnAI for l3-network with network-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id`\" />\n","comments":"","x":1514.416659037272,"y":673.9840910169814,"z":"3018bfef.3ec6f","wires":[]},{"id":"8a064197.2016f","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1357.1944368150498,"y":673.9840910169814,"z":"3018bfef.3ec6f","wires":[["b7f69264.cf1ab"]]},{"id":"d9b59f8d.62ec6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name`\" />\n","comments":"","x":2015.5275802612305,"y":756.2063064575195,"z":"3018bfef.3ec6f","wires":[]},{"id":"86e3396f.1580b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1858.3053580390078,"y":756.2063064575195,"z":"3018bfef.3ec6f","wires":[["d9b59f8d.62ec6"]]},{"id":"18ac44d0.2f45cb","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n","comments":"","outputs":1,"x":1894.9072570800781,"y":1135.7456226348877,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d30c2e81.9d2fd","type":"success","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1419.0712356567383,"y":1653.4231624603271,"z":"3018bfef.3ec6f","wires":[["ae6f9f81.1a798"]]},{"id":"10de1549.964beb","type":"set","name":"set: SERVICE_DATA vnf-networks = AAI DATA","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name\" value=\"`$tmp.AnAI.l3network.network-name`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id\" value=\"`$tmp.AnAI.l3network.neutron-network-id`\" />\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn\" value=\"`$tmp.AnAI.l3network.contrail-network-fqdn`\" />\n\n","comments":"","outputs":1,"x":2024.2062301635742,"y":1900.2730236053467,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"a3d35540.191cd8","type":"save","name":"get AnAI - l3-network by name","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-name = $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":1153.964256286621,"y":1653.6891021728516,"z":"3018bfef.3ec6f","wires":[["d30c2e81.9d2fd","d435904c.f085c","f9269416.45efe8"]]},{"id":"394ee13a.df62ee","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":904.9758262634277,"y":1653.9880352020264,"z":"3018bfef.3ec6f","wires":[["a3d35540.191cd8","b15670b5.3c9b2","ad2f4a81.8af4e8"]]},{"id":"e68e26af.0bdf48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$j].network-name`\" />\n","comments":"","x":1566.3570709228516,"y":1691.285740852356,"z":"3018bfef.3ec6f","wires":[]},{"id":"d435904c.f085c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1411.1348487006294,"y":1691.285740852356,"z":"3018bfef.3ec6f","wires":[["e68e26af.0bdf48"]]},{"id":"ae6f9f81.1a798","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'PRELOAD network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`\" />\n","comments":"","x":1585.3571014404297,"y":1653.2857656478882,"z":"3018bfef.3ec6f","wires":[]},{"id":"b3f35db0.e0e4","type":"switchNode","name":"switch ...PRELOAD vnf-networks[]","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":453.5,"y":342.9285774230957,"z":"3018bfef.3ec6f","wires":[["24971653.569cea"]]},{"id":"24971653.569cea","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":680.9444732666016,"y":342.4562873840332,"z":"3018bfef.3ec6f","wires":[["cbca70d0.7f17"]]},{"id":"cbca70d0.7f17","type":"set","name":"set PRELOAD vnf-networks[] = 0","xml":"<set>\n<parameter name = \"preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length\" value=\"0\" />\n","comments":"","outputs":1,"x":902.5000822279189,"y":342.4563080469766,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"b66fd01c.9af55","type":"switchNode","name":"switch ...INPUT vnf-networks[]","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`\">","comments":"","outputs":1,"x":369.00001525878906,"y":526.6785554885864,"z":"3018bfef.3ec6f","wires":[["3bbc7752.e54408"]]},{"id":"3bbc7752.e54408","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":592.444465637207,"y":526.4562911987305,"z":"3018bfef.3ec6f","wires":[["ebefaf21.666f1"]]},{"id":"ebefaf21.666f1","type":"set","name":"set INPUT vnf-networks_length = 0","xml":"<set>\n<parameter name='vnf-topology-operation-input.vnf-request-information.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":825.0000745985244,"y":526.4563118616738,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"8ee6be3c.0943d","type":"comment","name":"For each preload network, see if there is an override in input","info":"","comments":"","x":861.8612213134766,"y":454.90082454681396,"z":"3018bfef.3ec6f","wires":[]},{"id":"be41e53d.c12d58","type":"switchNode","name":"switch: SERVICE-DATA network-role = PRELOAD","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role`\">","comments":"","outputs":1,"x":1278.1070175170898,"y":1900.0358438491821,"z":"3018bfef.3ec6f","wires":[["35b957ef.660a98"]]},{"id":"35b957ef.660a98","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1566.509693145752,"y":1899.6528720855713,"z":"3018bfef.3ec6f","wires":[["9a01436f.4ed71"]]},{"id":"b15670b5.3c9b2","type":"for","name":"for k : SERVICE_DATA vnf-networks","xml":"<for index=\"k\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1173.642807006836,"y":1850.6072368621826,"z":"3018bfef.3ec6f","wires":[["be41e53d.c12d58"]]},{"id":"c7ee590b.fb69b8","type":"comment","name":"CALLED BY vnf-topology-assign AND vnf-topology-changeassign","info":"","comments":"","x":795.1666564941406,"y":105.53968811035156,"z":"3018bfef.3ec6f","wires":[]},{"id":"cb1afc0e.40927","type":"set","name":"set: service-data =+ input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vnf-topology-operation-input.\" />","comments":"","outputs":1,"x":425.27777671813965,"y":251.8730125427246,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d031edaa.e6184","type":"set","name":"set: service-data = preload-data","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"preload-data.\" />","comments":"","outputs":1,"x":445.1818904876709,"y":210.0194969177246,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"3c67b88b.3c6c28","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":396.2857437133789,"y":1912.2859153747559,"z":"3018bfef.3ec6f","wires":[]},{"id":"9aaf059b.32e0d8","type":"switchNode","name":"switch: preload order-status = PendingAssignment","xml":"<switch test=\"`$preload-data.oper-status.order-status == PendingAssignment`\">\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":502.2777862548828,"y":163.4285764694214,"z":"3018bfef.3ec6f","wires":[["113a87df.14b818"]]},{"id":"d97cceee.5c382","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid preload-data order status'/>","comments":"","x":919.2170295715332,"y":163.1255865097046,"z":"3018bfef.3ec6f","wires":[]},{"id":"113a87df.14b818","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":769.883918762207,"y":163.1255121231079,"z":"3018bfef.3ec6f","wires":[["d97cceee.5c382"]]},{"id":"9f4073e7.b1211","type":"set","name":"set: vnf-id","xml":"<set>\n\t<parameter name=\"service-data.vnf-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>\n\t<parameter name=\"service-data.service-information.service-instance-id\" value=\"`$vnf-topology-operation-input.service-information.service-instance-id`\"/>\n\t<parameter name=\"service-data.vnf-request-information.vnf-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>\n <parameter name=\"service-data.vnf-topology-information.vnf-topology-identifier.vnf-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>","comments":"","outputs":1,"x":377.5992889404297,"y":296.36905097961426,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"63fc40cc.c84e4","type":"switchNode","name":"switch: tmp.AnAI.l3network.network-id == null","xml":"<switch test=\"`$tmp.AnAI.l3network.network-id == ''`\">","comments":"","outputs":1,"x":1676.7500305175781,"y":1729.1787147521973,"z":"3018bfef.3ec6f","wires":[["f7b88266.11803"]]},{"id":"f7b88266.11803","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1939.0000305175781,"y":1729.1787147521973,"z":"3018bfef.3ec6f","wires":[["60aaae18.6b34b"]]},{"id":"60aaae18.6b34b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'An error occurred while querying l3-network with network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`\" />\n","comments":"","x":2093.000030517578,"y":1729.6787147521973,"z":"3018bfef.3ec6f","wires":[]},{"id":"f9269416.45efe8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1414.750015258789,"y":1728.928695678711,"z":"3018bfef.3ec6f","wires":[["63fc40cc.c84e4"]]},{"id":"365956fb.0b312a","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-id == NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`\">","comments":"","outputs":1,"x":2011.41650390625,"y":2245.250244140625,"z":"3018bfef.3ec6f","wires":[["94a6ca67.61df88"]]},{"id":"94a6ca67.61df88","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2295.6664695739746,"y":2245.00022315979,"z":"3018bfef.3ec6f","wires":[["34509c24.cfaf64"]]},{"id":"b4cda74e.ecf228","type":"switchNode","name":"switch: SERVICE-DATA sbunet-name != NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`\">","comments":"","outputs":1,"x":2102.857208251953,"y":2050.3570852279663,"z":"3018bfef.3ec6f","wires":[["117b6909.23fc67"]]},{"id":"117b6909.23fc67","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2368.1071739196777,"y":2050.1070642471313,"z":"3018bfef.3ec6f","wires":[["14f42f64.b3e611"]]},{"id":"f8a8a33e.215bb","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3136.868942260742,"y":2164.6549243927,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"14f42f64.b3e611","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2228.368927001953,"y":2107.9048166275024,"z":"3018bfef.3ec6f","wires":[["12ee504d.24c76"]]},{"id":"f8a347b6.06cb48","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2271.797393798828,"y":2166.0834045410156,"z":"3018bfef.3ec6f","wires":[["f8cb09b3.6b0028"]]},{"id":"f8cb09b3.6b0028","type":"switchNode","name":"switch: AnAI == service-data - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`\">","comments":"","outputs":1,"x":2644.547348022461,"y":2165.3334884643555,"z":"3018bfef.3ec6f","wires":[["7ed66661.050d48"]]},{"id":"7ed66661.050d48","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2902.950038909912,"y":2165.2005167007446,"z":"3018bfef.3ec6f","wires":[["f8a8a33e.215bb"]]},{"id":"12ee504d.24c76","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2513.6904106140137,"y":2107.4882073402405,"z":"3018bfef.3ec6f","wires":[["f8a347b6.06cb48"]]},{"id":"34509c24.cfaf64","type":"switchNode","name":"switch: SERVICE-DATA ipv6-sbunet-name != NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2147.6188888549805,"y":2299.976417541504,"z":"3018bfef.3ec6f","wires":[["9d340516.572948"]]},{"id":"9d340516.572948","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2432.868854522705,"y":2299.726396560669,"z":"3018bfef.3ec6f","wires":[["1544738d.b38abc"]]},{"id":"e9ee4f00.4d645","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3159.1308670043945,"y":2411.7742557525635,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"1544738d.b38abc","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2248.1308517456055,"y":2355.024024963379,"z":"3018bfef.3ec6f","wires":[["151974e3.0664ab"]]},{"id":"5a40afd6.e4ff8","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2294.0593185424805,"y":2413.202735900879,"z":"3018bfef.3ec6f","wires":[["d120df1f.f811c"]]},{"id":"d120df1f.f811c","type":"switchNode","name":"switch: AnAI == service-data - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2666.8092727661133,"y":2412.4528198242188,"z":"3018bfef.3ec6f","wires":[["541bc841.f2b0f8"]]},{"id":"541bc841.f2b0f8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2925.2119636535645,"y":2412.319848060608,"z":"3018bfef.3ec6f","wires":[["e9ee4f00.4d645"]]},{"id":"151974e3.0664ab","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2533.452335357666,"y":2354.607415676117,"z":"3018bfef.3ec6f","wires":[["5a40afd6.e4ff8"]]},{"id":"9a01436f.4ed71","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1729.9999771118164,"y":1900.16672706604,"z":"3018bfef.3ec6f","wires":[["10de1549.964beb","6110484f.04a978","365956fb.0b312a"]]},{"id":"6110484f.04a978","type":"switchNode","name":"switch: SERVICE-DATA sbunet-id == NULL","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`\">","comments":"","outputs":1,"x":1996.4285697937012,"y":1993.845314025879,"z":"3018bfef.3ec6f","wires":[["71d2499c.c98928"]]},{"id":"71d2499c.c98928","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2252.6785049438477,"y":1994.345365524292,"z":"3018bfef.3ec6f","wires":[["b4cda74e.ecf228"]]},{"id":"99507e8d.3fb04","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1601.2500228881836,"y":1136.2500171661377,"z":"3018bfef.3ec6f","wires":[["18ac44d0.2f45cb","aa7965a7.8a0268","fe682f55.17228"]]},{"id":"9b32ad95.a25bc","type":"comment","name":"Use INPUT vnf-networks to override preload","info":"","comments":"","x":906.6070709228516,"y":1030.7142543792725,"z":"3018bfef.3ec6f","wires":[]},{"id":"f6b569a4.ef41e8","type":"comment","name":"if INPUT vnf-network not in AnAI, use Preload","info":"","comments":"","x":1957.1429443359375,"y":878.2142715454102,"z":"3018bfef.3ec6f","wires":[]},{"id":"acfdf9bf.62cbd8","type":"switchNode","name":"switch: INPUT sbunet-name != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name != ''`\">","comments":"","outputs":1,"x":2384.226348876953,"y":1246.8569526672363,"z":"3018bfef.3ec6f","wires":[["279dbc6a.3dcd44"]]},{"id":"279dbc6a.3dcd44","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2621.4763145446777,"y":1246.6069316864014,"z":"3018bfef.3ec6f","wires":[["7a8c22e0.a09bfc"]]},{"id":"15630d42.609893","type":"set","name":"set: service-data = AnAI - subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3360.738327026367,"y":1360.154670715332,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"7a8c22e0.a09bfc","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2487.238311767578,"y":1297.1545581817627,"z":"3018bfef.3ec6f","wires":[["f12b50fc.bf6ec"]]},{"id":"3e5c8652.818e1a","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2495.666778564453,"y":1361.5831508636475,"z":"3018bfef.3ec6f","wires":[["1103bb86.f0b774"]]},{"id":"1103bb86.f0b774","type":"switchNode","name":"switch: AnAI == INPUT - subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name`\">","comments":"","outputs":1,"x":2868.416732788086,"y":1360.8332347869873,"z":"3018bfef.3ec6f","wires":[["86b2b0cf.39e87"]]},{"id":"86b2b0cf.39e87","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3126.819423675537,"y":1360.7002630233765,"z":"3018bfef.3ec6f","wires":[["15630d42.609893"]]},{"id":"f12b50fc.bf6ec","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2772.5597953796387,"y":1296.7379488945007,"z":"3018bfef.3ec6f","wires":[["3e5c8652.818e1a"]]},{"id":"fe682f55.17228","type":"switchNode","name":"switch: INPUT sbunet-id != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id != ''`\">","comments":"","outputs":1,"x":1877.797794342041,"y":1203.0951328277588,"z":"3018bfef.3ec6f","wires":[["d47a1488.eef628","c9c1e1fa.1b416"]]},{"id":"b85f607.859b7a","type":"set","name":"set: data-data = INPUT - subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id`\" />","comments":"","outputs":1,"x":2376.0477905273438,"y":1203.3451347351074,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"d47a1488.eef628","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2134.0477600097656,"y":1202.8451118469238,"z":"3018bfef.3ec6f","wires":[["b85f607.859b7a"]]},{"id":"c9c1e1fa.1b416","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2135.2978019714355,"y":1246.8451328277588,"z":"3018bfef.3ec6f","wires":[["acfdf9bf.62cbd8"]]},{"id":"a1734fb1.d43be","type":"switchNode","name":"switch: INPUT ipv6-sbunet-name != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name != ''`\">","comments":"","outputs":1,"x":2392.5,"y":1475,"z":"3018bfef.3ec6f","wires":[["e98fe3c1.1cf8c"]]},{"id":"e98fe3c1.1cf8c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2639.7499656677246,"y":1474.749979019165,"z":"3018bfef.3ec6f","wires":[["77179e25.c032f"]]},{"id":"7618e85b.df1788","type":"set","name":"set: service-data = AnAI - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`\" />","comments":"","outputs":1,"x":3369.011978149414,"y":1588.2977180480957,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"77179e25.c032f","type":"switchNode","name":"switch: tmp.AnAI.l3network.subnets.subnet != NULL","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length != ''`\">","comments":"","outputs":1,"x":2495.511962890625,"y":1525.2976055145264,"z":"3018bfef.3ec6f","wires":[["d63d308e.fbbed"]]},{"id":"4cf11d6a.ec1414","type":"for","name":"for i : tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":2503.9404296875,"y":1589.7261981964111,"z":"3018bfef.3ec6f","wires":[["1eb54f30.ad23b1"]]},{"id":"1eb54f30.ad23b1","type":"switchNode","name":"switch: AnAI == INPUT - ipv6-subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name`\">","comments":"","outputs":1,"x":2876.690383911133,"y":1588.976282119751,"z":"3018bfef.3ec6f","wires":[["bba8b999.fef0c8"]]},{"id":"bba8b999.fef0c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3135.093074798584,"y":1588.8433103561401,"z":"3018bfef.3ec6f","wires":[["7618e85b.df1788"]]},{"id":"d63d308e.fbbed","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2780.8334465026855,"y":1524.8809962272644,"z":"3018bfef.3ec6f","wires":[["4cf11d6a.ec1414"]]},{"id":"aa7965a7.8a0268","type":"switchNode","name":"switch: INPUT ipv6-sbunet-id != NULL","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id != ''`\">","comments":"","outputs":1,"x":1886.071445465088,"y":1431.2381801605225,"z":"3018bfef.3ec6f","wires":[["dba017f7.db9878","db733b1.265eec8"]]},{"id":"83458f26.3bb7d","type":"set","name":"set: service-data = INPUT - ipv6-subnet-id ","xml":"<set>\n<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id`\" />","comments":"","outputs":1,"x":2393.3214416503906,"y":1431.488182067871,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"dba017f7.db9878","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2142.3214111328125,"y":1430.9881591796875,"z":"3018bfef.3ec6f","wires":[["83458f26.3bb7d"]]},{"id":"db733b1.265eec8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2143.5714530944824,"y":1474.9881801605225,"z":"3018bfef.3ec6f","wires":[["a1734fb1.d43be"]]},{"id":"f8168a86.067868","type":"comment","name":"Use Preload Data","info":"","comments":"","x":576,"y":1599.5,"z":"3018bfef.3ec6f","wires":[]},{"id":"ad2f4a81.8af4e8","type":"switchNode","name":"switch: service-data...vnf-networks_length","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":1190.21435546875,"y":1803.0714111328125,"z":"3018bfef.3ec6f","wires":[["27e3bb35.5afc04"]]},{"id":"27e3bb35.5afc04","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1449.7143478393555,"y":1803.0714111328125,"z":"3018bfef.3ec6f","wires":[["c75309.f948fcf8"]]},{"id":"c75309.f948fcf8","type":"switchNode","name":"set: service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1714.4643478393555,"y":1803.0714111328125,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"98d3927f.7bccf","type":"switchNode","name":"switch: service-data...vnf-networks_length","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":817.6786041259766,"y":1087.6786041259766,"z":"3018bfef.3ec6f","wires":[["d2e9cd7e.23312"]]},{"id":"d2e9cd7e.23312","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1077.178596496582,"y":1087.6786041259766,"z":"3018bfef.3ec6f","wires":[["fcd3cd85.688eb"]]},{"id":"fcd3cd85.688eb","type":"switchNode","name":"set: service-data...vnf-networks_length = 0","xml":"<set>\n\t<parameter name=\"service-data.vnf-topology-information.vnf-assignments.vnf-networks_length\" value = \"0\" />","comments":"","outputs":1,"x":1341.928596496582,"y":1087.6786041259766,"z":"3018bfef.3ec6f","wires":[[]]},{"id":"f300366b.1bf838","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":542.1428298950195,"y":1036.6786041259766,"z":"3018bfef.3ec6f","wires":[["98d3927f.7bccf","ae3d7146.3003c"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-assign.json b/platform-logic/vnfapi/src/main/json/vnf-topology-assign.json
new file mode 100644
index 00000000..6e431987
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-assign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"ffac9d92.2aaca","type":"dgstart","name":"DGSTART","outputs":1,"x":192.85714721679688,"y":78.57142639160156,"z":"c61f02a7.f710b","wires":[["cb8ca6c4.e37a28"]]},{"id":"cb8ca6c4.e37a28","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":358.0238037109375,"y":78.73809814453125,"z":"c61f02a7.f710b","wires":[["5e434d1b.a4bf14"]]},{"id":"5e434d1b.a4bf14","type":"method","name":"method vnf-topology-assign","xml":"<method rpc='vnf-topology-assign' mode='sync'>\n","comments":"","outputs":1,"x":266.0238342285156,"y":125.73809051513672,"z":"c61f02a7.f710b","wires":[["d0de5a86.924be8"]]},{"id":"d0de5a86.924be8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":253.3571548461914,"y":181.57142639160156,"z":"c61f02a7.f710b","wires":[["1e8a3f5e.717d91","f514732f.8810c","d85c86c9.1e8a28","3fd98125.b3edde","ea24658e.334798","3868dfb4.d7723","954a9a87.8b91b8","69314bf3.7bab64"]]},{"id":"1e8a3f5e.717d91","type":"set","name":"set: order-status = PendingCreate","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"PendingCreate\"/>","comments":"","outputs":1,"x":521.2479934692383,"y":602.7636432647705,"z":"c61f02a7.f710b","wires":[[]]},{"id":"f514732f.8810c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":460.39083099365234,"y":688.4682750701904,"z":"c61f02a7.f710b","wires":[]},{"id":"9d55e492.693d48","type":"comment","name":"request-action = VNFActivateRequest","info":"","comments":"","x":700.023811340332,"y":98.68254089355469,"z":"c61f02a7.f710b","wires":[]},{"id":"8ef75230.30a75","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":818.2977523803711,"y":553.7861671447754,"z":"c61f02a7.f710b","wires":[["e8c4e2c.01b712"]]},{"id":"34349fb4.a298a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"Encountered error while updating vf-module orchestration-status in AnAI\"/>","comments":"","x":1202.4406814575195,"y":553.7862377166748,"z":"c61f02a7.f710b","wires":[]},{"id":"64dd9984.c41aa8","type":"save","name":"save relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":820.6032409667969,"y":396.6863851547241,"z":"c61f02a7.f710b","wires":[["df85f46a.a2a638"]]},{"id":"df85f46a.a2a638","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1033.2475128173828,"y":396.7333993911743,"z":"c61f02a7.f710b","wires":[["90ef1bbc.fcd5d8"]]},{"id":"d85c86c9.1e8a28","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":526.2500457763672,"y":396.6548662185669,"z":"c61f02a7.f710b","wires":[["64dd9984.c41aa8"]]},{"id":"cab52ea5.e9d35","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while saving vf-module l3-network relationship in AnAI with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>","comments":"","x":1202.2975769042969,"y":506.7497262954712,"z":"c61f02a7.f710b","wires":[]},{"id":"90ef1bbc.fcd5d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":992.011962890625,"y":459.0355796813965,"z":"c61f02a7.f710b","wires":[["1f3d8f07.94f7b1","cab52ea5.e9d35"]]},{"id":"1f3d8f07.94f7b1","type":"save","name":"delete vf-module: l3-network relationship","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id \n\t\tAND related-to = l3-network\" \n\tforce=\"true\" \n\tlocal-only=\"false\">","comments":"","outputs":1,"x":1285.440559387207,"y":459.4643259048462,"z":"c61f02a7.f710b","wires":[[]]},{"id":"3fd98125.b3edde","type":"save","name":"update AnAI - vf-module.orchestration-status","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" >\n\t<parameter name=\"orchestration-status\" value=\"pending-create\" />","comments":"","outputs":1,"x":553.7738952636719,"y":553.797664642334,"z":"c61f02a7.f710b","wires":[["8ef75230.30a75"]]},{"id":"e8c4e2c.01b712","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":976.7263259887695,"y":553.8929262161255,"z":"c61f02a7.f710b","wires":[["34349fb4.a298a","1f3d8f07.94f7b1"]]},{"id":"ea24658e.334798","type":"call","name":"call: vnf-topology-assign-vfmodule","xml":"<call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' >","comments":"","outputs":1,"x":520.5238342285156,"y":286.3214416503906,"z":"c61f02a7.f710b","wires":[[]]},{"id":"3868dfb4.d7723","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":484.4286422729492,"y":647.8928623199463,"z":"c61f02a7.f710b","wires":[[]]},{"id":"954a9a87.8b91b8","type":"switchNode","name":"switch ...SERVICE-DATA vnf-networks[]","xml":"<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":538.6071929931641,"y":336.89287185668945,"z":"c61f02a7.f710b","wires":[["49274fc7.115de"]]},{"id":"49274fc7.115de","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":779.0516662597656,"y":336.42058181762695,"z":"c61f02a7.f710b","wires":[["b1bab9f3.5e4328"]]},{"id":"b1bab9f3.5e4328","type":"set","name":"set SERVICE-DATA vnf-networks[] = 0","xml":"<set>\n<parameter name='service-data.vnf-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n","comments":"","outputs":1,"x":1000.607275221083,"y":336.4206024805703,"z":"c61f02a7.f710b","wires":[[]]},{"id":"69314bf3.7bab64","type":"save","name":"GET AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.vfmodule\" >","comments":"","outputs":1,"x":484.10716247558594,"y":181.07143688201904,"z":"c61f02a7.f710b","wires":[["7ddae686.7d9d48","4aa52b8f.fa62b4"]]},{"id":"7ddae686.7d9d48","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":678.1071624755859,"y":180.82143688201904,"z":"c61f02a7.f710b","wires":[["72bfa174.1630f"]]},{"id":"4aa52b8f.fa62b4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":685.607177734375,"y":220.82144737243652,"z":"c61f02a7.f710b","wires":[["a517ff09.80f91"]]},{"id":"72bfa174.1630f","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":832.3571624755859,"y":180.57143688201904,"z":"c61f02a7.f710b","wires":[]},{"id":"a517ff09.80f91","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'vf-module not found in AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":852.8571624755859,"y":221.07143688201904,"z":"c61f02a7.f710b","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-changeassign.json b/platform-logic/vnfapi/src/main/json/vnf-topology-changeassign.json
new file mode 100644
index 00000000..5c4b03cc
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-changeassign.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"31d117bd.10a048","type":"dgstart","name":"DGSTART","outputs":1,"x":126.25,"y":58.75,"z":"a5fb464c.c71c28","wires":[["2d3833.abbcb7ce"]]},{"id":"2d3833.abbcb7ce","type":"service-logic","name":"VNF-API 2.1.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":291.4166564941406,"y":58.91667175292969,"z":"a5fb464c.c71c28","wires":[["a102d673.d7f388"]]},{"id":"efb068cd.5823f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":203.75000762939453,"y":161.75,"z":"a5fb464c.c71c28","wires":[["f8ca55f5.34b0b8","af9ec214.64e7a","e2492eda.02325","2abf740c.cd838c","c7d8c86f.119978","7e665123.21b8b","59d37872.b8ce68","7c97e6ef.65e338","be63322a.38b31","eb3fccd4.5ce26"]]},{"id":"f8ca55f5.34b0b8","type":"set","name":"set: order-status = PendingUpdate","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"PendingUpdate\"/>","comments":"","outputs":1,"x":499.1948776245117,"y":886.2110958099365,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"af9ec214.64e7a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":437.4646911621094,"y":1021.0109748840332,"z":"a5fb464c.c71c28","wires":[]},{"id":"e2492eda.02325","type":"switchNode","name":"switch: service-data order-status = Active","xml":"<switch test=\"`$service-data.oper-status.order-status == Active`\">\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":522.25,"y":205.75,"z":"a5fb464c.c71c28","wires":[["b2a5f07c.04d7d"]]},{"id":"26a5b9af.94f946","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid service-data order status'/>","comments":"","x":926.9998168945312,"y":205.5833740234375,"z":"a5fb464c.c71c28","wires":[]},{"id":"b2a5f07c.04d7d","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":768.4166259765625,"y":205.333251953125,"z":"a5fb464c.c71c28","wires":[["26a5b9af.94f946"]]},{"id":"a102d673.d7f388","type":"method","name":"method vnf-topology-changeassign","xml":"<method rpc='vnf-topology-changeassign' mode='sync'>\n","comments":"","outputs":1,"x":226.25,"y":109.75,"z":"a5fb464c.c71c28","wires":[["efb068cd.5823f8"]]},{"id":"2abf740c.cd838c","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":437.20243072509766,"y":932.226110458374,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"c7d8c86f.119978","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":501.20243072509766,"y":840.226110458374,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"7e665123.21b8b","type":"call","name":"call: vnf-topology-assign-vfmodule","xml":"<call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' >","comments":"","outputs":1,"x":500.25,"y":250.75,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"7c97e6ef.65e338","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id \n\t\t\tAND related-to = l3-network\" \n\tforce=\"true\" \n\tlocal-only=\"false\">","comments":"","outputs":1,"x":484.39288330078125,"y":395.3216552734375,"z":"a5fb464c.c71c28","wires":[["7cf8a075.0c7b6"]]},{"id":"71ebaa69.659a44","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 occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id + ' vf-module update FAILED.'`\"/>","comments":"","x":886.2498779296875,"y":395.6070251464844,"z":"a5fb464c.c71c28","wires":[]},{"id":"59d37872.b8ce68","type":"save","name":"get AnAI - vf-module","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.vfmodule\">","comments":"","outputs":1,"x":458.25,"y":296.75,"z":"a5fb464c.c71c28","wires":[["70f5df5a.ae288","da907bbd.1df408"]]},{"id":"42a2f99d.70da88","type":"save","name":"save vf-module relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />","comments":"","outputs":1,"x":826.5554656982422,"y":484.6502323150635,"z":"a5fb464c.c71c28","wires":[["34aa2d4f.eeba12"]]},{"id":"34aa2d4f.eeba12","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1069.69970703125,"y":484.6972646713257,"z":"a5fb464c.c71c28","wires":[["d4b975b3.5b0b68"]]},{"id":"be63322a.38b31","type":"for","name":"for i : SERVICE_DATA vnf-networks","xml":"<for index=\"i\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">","comments":"","outputs":1,"x":504.2022705078125,"y":484.61871337890625,"z":"a5fb464c.c71c28","wires":[["42a2f99d.70da88"]]},{"id":"62d9f13e.cced9","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`\"/>","comments":"","x":1396.6425323486328,"y":764.8921175003052,"z":"a5fb464c.c71c28","wires":[]},{"id":"d4b975b3.5b0b68","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1215.6784591674805,"y":484.9280080795288,"z":"a5fb464c.c71c28","wires":[["62d9f13e.cced9","9440d75c.a932c8","4db9652d.ed131c","28a4b739.327c78"]]},{"id":"4db9652d.ed131c","type":"save","name":"delete relationship: vf-module","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id \n\t\t\tAND related-to = l3-network\" \n\tforce=\"true\" \n\tlocal-only=\"false\">","comments":"","outputs":1,"x":1456.6070709228516,"y":532.8567838668823,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"9447b7ff.c2b628","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 occurred while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>","comments":"","x":839.5355834960938,"y":297.4641418457031,"z":"a5fb464c.c71c28","wires":[]},{"id":"7cf8a075.0c7b6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":700.25,"y":395.75,"z":"a5fb464c.c71c28","wires":[["71ebaa69.659a44"]]},{"id":"eb3fccd4.5ce26","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","outputs":1,"x":458.8214645385742,"y":978.1786098480225,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"28a4b739.327c78","type":"for","name":"for i : tmp.AnAI.vfmodule.relationship","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship_length`\">","comments":"","outputs":1,"x":1476.1428756713867,"y":582.321457862854,"z":"a5fb464c.c71c28","wires":[["cab01870.1f3998"]]},{"id":"cab01870.1f3998","type":"switchNode","name":"switch: relationship.related-to","xml":"<switch test=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`\">","comments":"","outputs":1,"x":1785.1428451538086,"y":583.0357780456543,"z":"a5fb464c.c71c28","wires":[["8c96096.770f9f8"]]},{"id":"8c96096.770f9f8","type":"other","name":"l3-network","xml":"<outcome value='l3-network'>","comments":"","outputs":1,"x":2008.1428451538086,"y":583.0357780456543,"z":"a5fb464c.c71c28","wires":[["32c23b53.ebdd34"]]},{"id":"32c23b53.ebdd34","type":"for","name":"for j : tmp.AnAI.vfmodule.relationship-data","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`\">","comments":"","outputs":1,"x":1603.142837524414,"y":665.6786203384399,"z":"a5fb464c.c71c28","wires":[["62acd50c.89a44c"]]},{"id":"62acd50c.89a44c","type":"save","name":"save vf-module relationship: l3-network","xml":"<save plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`\" />","comments":"","outputs":1,"x":1960.7142944335938,"y":665.8215036392212,"z":"a5fb464c.c71c28","wires":[["4d56aed6.76e2d","145c425.478d3be"]]},{"id":"4d56aed6.76e2d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2218.7142944335938,"y":665.8215036392212,"z":"a5fb464c.c71c28","wires":[["5961586a.d170d8"]]},{"id":"70f5df5a.ae288","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":648.1071739196777,"y":296.8928680419922,"z":"a5fb464c.c71c28","wires":[["9447b7ff.c2b628"]]},{"id":"9440d75c.a932c8","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`' | An error occurred while saving l3-network relationship with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\" />\n","comments":"","outputs":1,"x":1420.178596496582,"y":484.85717582702637,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"5961586a.d170d8","type":"set","name":"set error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\" />\n","comments":"","outputs":1,"x":2416.678611755371,"y":665.3571481704712,"z":"a5fb464c.c71c28","wires":[[]]},{"id":"da907bbd.1df408","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":655,"y":339.33331298828125,"z":"a5fb464c.c71c28","wires":[["9447b7ff.c2b628"]]},{"id":"145c425.478d3be","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2229,"y":707,"z":"a5fb464c.c71c28","wires":[["5961586a.d170d8"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-changedelete.json b/platform-logic/vnfapi/src/main/json/vnf-topology-changedelete.json
new file mode 100644
index 00000000..aec54958
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-changedelete.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"acc7a1a9.a1048","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":202.5,"y":202.5,"z":"c2480ba7.74ffa8","wires":[["64cc4463.d3e58c","85ab4097.8b2dc","acf4923b.06fde","5df44df2.cfa404","a0786094.6ea81","ecb32124.6cd76","b4b1be1a.81bad","b95c32b4.219e1"]]},{"id":"eaa42ad6.78f358","type":"method","name":"method vnf-topology-changedelete","xml":"<method rpc='vnf-topology-changedelete' mode='sync'>\n","comments":"","outputs":1,"x":263.16668701171875,"y":128.66666507720947,"z":"c2480ba7.74ffa8","wires":[["acc7a1a9.a1048"]]},{"id":"64cc4463.d3e58c","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"'$service-data.oper-status.order-status == Active'\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":497.83331298828125,"y":260.8331604003906,"z":"c2480ba7.74ffa8","wires":[["b18f56cb.33d1f8"]]},{"id":"c7301650.992bf8","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":333.1666564941406,"y":82.666672706604,"z":"c2480ba7.74ffa8","wires":[["eaa42ad6.78f358"]]},{"id":"b18f56cb.33d1f8","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":718.1666870117188,"y":261.1664733886719,"z":"c2480ba7.74ffa8","wires":[["94a2faf.7549008"]]},{"id":"608bf838.51bd68","type":"dgstart","name":"DGSTART","outputs":1,"x":170,"y":82.50000095367432,"z":"c2480ba7.74ffa8","wires":[["c7301650.992bf8"]]},{"id":"94a2faf.7549008","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid last-order-status'/>","comments":"","x":877.4998168945312,"y":261.16651916503906,"z":"c2480ba7.74ffa8","wires":[]},{"id":"85ab4097.8b2dc","type":"set","name":"set: order-status = PendingDelete","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"PendingDelete\"/>","comments":"","outputs":1,"x":512.9999694824219,"y":422.4999694824219,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"acf4923b.06fde","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />\n","comments":"","x":459,"y":589.4999694824219,"z":"c2480ba7.74ffa8","wires":[]},{"id":"efff4a22.b9abb8","type":"comment","name":"Update VNF status to PendingDelete","info":"","comments":"","x":1071.3333740234375,"y":73.38889789581299,"z":"c2480ba7.74ffa8","wires":[]},{"id":"67d8ea7b.3b55e4","type":"comment","name":"VNF-TOPOLOGY-CHANGEDELETE","info":"","comments":"","x":766.8889007568359,"y":73.05555725097656,"z":"c2480ba7.74ffa8","wires":[]},{"id":"94a9e016.11104","type":"comment","name":"request-action = DisconnectVNFRequest, svc-action = changedelete","info":"","comments":"","x":899.7777404785156,"y":109.1666669845581,"z":"c2480ba7.74ffa8","wires":[]},{"id":"ecb32124.6cd76","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":456,"y":476.4999694824219,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"5df44df2.cfa404","type":"switchNode","name":"switch:vnf-id config == input","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":495.1363830566406,"y":203.69192504882812,"z":"c2480ba7.74ffa8","wires":[["e76a19e5.7aa208"]]},{"id":"e76a19e5.7aa208","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":717.5909118652344,"y":203.87375259399414,"z":"c2480ba7.74ffa8","wires":[["7f2aec26.3ec724"]]},{"id":"7f2aec26.3ec724","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-id not found'/>","comments":"","x":875.6818161010742,"y":203.78285026550293,"z":"c2480ba7.74ffa8","wires":[]},{"id":"a0786094.6ea81","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":518.1363525390625,"y":371.6919250488281,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"b4b1be1a.81bad","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vnf-topology-operation-input.\" /> \n","comments":"","outputs":1,"x":487.1363525390625,"y":530.6918640136719,"z":"c2480ba7.74ffa8","wires":[[]]},{"id":"b95c32b4.219e1","type":"save","name":"update generic-vnf status to pending-delete","xml":"<update plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"vnf-id = $vnf-topology-operation-input.vnf-request-information.vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\" >\n\t<parameter name=\"orchestration-status\" value=\"pending-delete\" />\n","comments":"","outputs":1,"x":542.1363525390625,"y":316.6918640136719,"z":"c2480ba7.74ffa8","wires":[[]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-delete.json b/platform-logic/vnfapi/src/main/json/vnf-topology-delete.json
new file mode 100644
index 00000000..aee34c11
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-delete.json
@@ -0,0 +1,3 @@
+
+
+[{"id":"fcf7e196.b57a18","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":407,"y":762.7500286102295,"z":"56a388d8.4ce54","wires":[]},{"id":"31ea957a.8db692","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":183.99996185302734,"y":123,"z":"56a388d8.4ce54","wires":[["9de92ad.50ab058","fcf7e196.b57a18","bb79241.52c52d8","32164f41.c7fe48","4983281c.426558","a52c709c.8702d","a6b4d2d7.948f98","1672533.d5ee9ad"]]},{"id":"9de92ad.50ab058","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","x":448,"y":589.7500286102295,"z":"56a388d8.4ce54","wires":[[]]},{"id":"1ccc10cf.aaa8b7","type":"method","name":"method vnf-topology-delete","xml":"<method rpc='vnf-topology-delete' mode='sync'>\n","comments":"","outputs":1,"x":215.6666488647461,"y":72.16666412353516,"z":"56a388d8.4ce54","wires":[["31ea957a.8db692"]]},{"id":"a68ff260.8bc4","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":285.66661834716797,"y":20.166671752929688,"z":"56a388d8.4ce54","wires":[["1ccc10cf.aaa8b7"]]},{"id":"f5fafe40.045238","type":"dgstart","name":"DGSTART","outputs":1,"x":122.49996185302734,"y":20,"z":"56a388d8.4ce54","wires":[["a68ff260.8bc4"]]},{"id":"3d3232c2.77f4ce","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1110.9242897033691,"y":204.46213626861572,"z":"56a388d8.4ce54","wires":[["26bca269.f17f9e"]]},{"id":"26bca269.f17f9e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1263.2574195861816,"y":204.46219730377197,"z":"56a388d8.4ce54","wires":[]},{"id":"4983281c.426558","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","x":409.2575988769531,"y":633.2956218719482,"z":"56a388d8.4ce54","wires":[[]]},{"id":"bb79241.52c52d8","type":"switchNode","name":"switch:vnf-id config == input","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":453.14385986328125,"y":122.48754501342773,"z":"56a388d8.4ce54","wires":[["beb921bb.2c9b58"]]},{"id":"beb921bb.2c9b58","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":654.5984191894531,"y":122.66937255859375,"z":"56a388d8.4ce54","wires":[["127ae102.70f307"]]},{"id":"127ae102.70f307","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-id not found'/>","comments":"","x":818.189338684082,"y":122.82847309112549,"z":"56a388d8.4ce54","wires":[]},{"id":"32164f41.c7fe48","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","x":474.3939514160156,"y":548.4875774383545,"z":"56a388d8.4ce54","wires":[[]]},{"id":"a52c709c.8702d","type":"set","name":"Clear vnf topology","xml":"<set>\n\t<parameter name=\"service-data.vnf-topology-information.\" value=\"\" /> \n","comments":"","x":418.3939514160156,"y":673.4875774383545,"z":"56a388d8.4ce54","wires":[[]]},{"id":"1283dc8f.0dbbdb","type":"switchNode","name":"switch: order-status = Active","xml":"<switch test=\"`$service-data.oper-status.order-status == Active`\">","comments":"","outputs":1,"x":909.1071891784668,"y":204.76193714141846,"z":"56a388d8.4ce54","wires":[["3d3232c2.77f4ce"]]},{"id":"1672533.d5ee9ad","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":429.71431732177734,"y":718.690502166748,"z":"56a388d8.4ce54","wires":[[]]},{"id":"a6b4d2d7.948f98","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":462.00001525878906,"y":205.0833387374878,"z":"56a388d8.4ce54","wires":[["3af03fc8.e707b","ddc78af.60992f8"]]},{"id":"3af03fc8.e707b","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":693.7500114440918,"y":252.72619247436523,"z":"56a388d8.4ce54","wires":[["afd57709.8addb"]]},{"id":"afd57709.8addb","type":"switchNode","name":"switch: INPUT aic-clli","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-clli`\">","comments":"","outputs":1,"x":890.7500534057617,"y":252.83336067199707,"z":"56a388d8.4ce54","wires":[["dadea9f1.52f198","ac9e3f4c.36446"]]},{"id":"ddc78af.60992f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":693.250072479248,"y":204.83335304260254,"z":"56a388d8.4ce54","wires":[["1283dc8f.0dbbdb"]]},{"id":"dadea9f1.52f198","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1085.75,"y":253.5833339691162,"z":"56a388d8.4ce54","wires":[["81095c78.688578"]]},{"id":"81095c78.688578","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Either aic-cloud-region or aic-clli must be present'/>","comments":"","x":1258.25,"y":254.0833339691162,"z":"56a388d8.4ce54","wires":[]},{"id":"ac9e3f4c.36446","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1087,"y":296.0833339691162,"z":"56a388d8.4ce54","wires":[["7a2e8e8a.7bba7"]]},{"id":"680cdb38.59b984","type":"save","name":"delete generic-vnf-l3-network","xml":"<delete plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"generic-vnf-l3-network\" \n\tkey=\"DELETE FROM GENERIC_VNF_L3_NETWORK WHERE vnf_id = $service-data.vnf-id\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1209.5000305175781,"y":418.5833568572998,"z":"56a388d8.4ce54","wires":[["bb5026cb.49ad98"]]},{"id":"e95a580b.ce45f8","type":"save","name":"delete GammaResource: generic-vnf","xml":"<delete plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"generic-vnf\" \n\tkey=\"DELETE FROM GENERIC_VNF where vnf_id = $service-data.vnf-id\" \n\tlocal-only=\"true\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1233.159194946289,"y":504.9546184539795,"z":"56a388d8.4ce54","wires":[["bb5026cb.49ad98"]]},{"id":"e46b8405.65dc18","type":"save","name":"delete generic-vnf-vserver","xml":"<delete plugin=\"org.openecomp.sdnc.sli.resource.sql.SqlResource\" \n\tresource=\"generic-vnf-vserver\" \n\tkey=\"DELETE FROM GENERIC_VNF_VSERVER where vnf_id = $service-data.vnf-id\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1200.909194946289,"y":460.0379009246826,"z":"56a388d8.4ce54","wires":[["bb5026cb.49ad98"]]},{"id":"f2b7f8ab.79b31","type":"switchNode","name":"switch: order-status = PendingDelete","xml":"<switch test=\"'$service-data.oper-status.order-status == PendingDelete'\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":1232.750015258789,"y":376.83334159851074,"z":"56a388d8.4ce54","wires":[["142b3d5d.ab57d3"]]},{"id":"142b3d5d.ab57d3","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1462.0833892822266,"y":377.166654586792,"z":"56a388d8.4ce54","wires":[["f3ef39a7.92022"]]},{"id":"f3ef39a7.92022","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1614.416519165039,"y":377.16671562194824,"z":"56a388d8.4ce54","wires":[]},{"id":"7a2e8e8a.7bba7","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":979.5,"y":377.0833339691162,"z":"56a388d8.4ce54","wires":[["680cdb38.59b984","e95a580b.ce45f8","e46b8405.65dc18","6a59db9b.2f1714"]]},{"id":"bb5026cb.49ad98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1495.75,"y":459.5833339691162,"z":"56a388d8.4ce54","wires":[["8239c2d0.1bd9c"]]},{"id":"8239c2d0.1bd9c","type":"set","name":"set: error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource\"/>","comments":"","x":1678.2500228881836,"y":459.58334255218506,"z":"56a388d8.4ce54","wires":[[]]},{"id":"6a59db9b.2f1714","type":"save","name":"delete AnAI: generic-vnf","xml":"<delete plugin=\"com.att.sdnctl.sli.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\tkey=\"generic-vnf.vnf-id = $service-data.vnf-id\" \n\tlocal-only=\"false\" \n\tforce=\"true\" >\n\n","comments":"","outputs":1,"x":1191.5,"y":549.3333339691162,"z":"56a388d8.4ce54","wires":[["6f19a831.9a037"]]},{"id":"6f19a831.9a037","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1384.590805053711,"y":549.4620494842529,"z":"56a388d8.4ce54","wires":[["d613b798.91976"]]},{"id":"d613b798.91976","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Failed to delete generic-vnf from AnAI with vnf-id = '+ $service-data.vnf-id`\"/>","comments":"","x":1542.7573318481445,"y":549.5454301834106,"z":"56a388d8.4ce54","wires":[]},{"id":"1e6708d8.18e507","type":"comment","name":"NOT checking order-status intentionally","info":"","comments":"","x":1337.000015258789,"y":341.0833396911621,"z":"56a388d8.4ce54","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-operation.json b/platform-logic/vnfapi/src/main/json/vnf-topology-operation.json
new file mode 100644
index 00000000..3658949d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-operation.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"958f963f.31b188","type":"dgstart","name":"DGSTART","outputs":1,"x":119,"y":55,"z":"25983d3c.1a46c2","wires":[["d0fd6aea.b81a28"]]},{"id":"d0fd6aea.b81a28","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":286.2777633666992,"y":54.66666889190674,"z":"25983d3c.1a46c2","wires":[["1c65065f.c3d76a"]]},{"id":"1c65065f.c3d76a","type":"method","name":"vnf-topology-operation","xml":"<method rpc='vnf-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":176.49999237060547,"y":97.22221946716309,"z":"25983d3c.1a46c2","wires":[["3cc3382f.1bf7c8"]]},{"id":"dde1c2c4.10a5a","type":"switchNode","name":"switch: svc-action","xml":"<switch test=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action`\">\n<!--\nleaf svc-action { \n\ttype enumeration { \n\t\tenum \"reserve\";\n\t\tenum \"assign\";\n\t\tenum \"activate\"; // equal to commit\n\t\tenum \"delete\";\t // equal to commit\n\t\tenum \"changeassign\";\n\t\tenum \"changedelete\";\n\t\tenum \"rollback\";\n\t}\n}\n-->\n\n","comments":"","outputs":1,"x":370.55554962158203,"y":728.3332614898682,"z":"25983d3c.1a46c2","wires":[["8f40217f.2be81","44aca114.d2cc","972c2555.d107c8","5e0f2d9d.3e79e4","cbce4b74.b01e88","57c70c87.486604","b4b94e63.99422"]]},{"id":"8f40217f.2be81","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":578.3611526489258,"y":1255.0832691192627,"z":"25983d3c.1a46c2","wires":[["7399697a.b21158"]]},{"id":"44aca114.d2cc","type":"other","name":"assign","xml":"<outcome value='assign'>","comments":"","outputs":1,"x":588.1111068725586,"y":728.3332672119141,"z":"25983d3c.1a46c2","wires":[["221592c2.d2e22e"]]},{"id":"7399697a.b21158","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='svc-action not recognized'/>\n","comments":"","x":750.3611526489258,"y":1255.0832691192627,"z":"25983d3c.1a46c2","wires":[]},{"id":"972c2555.d107c8","type":"other","name":"activate","xml":"<outcome value='activate'>","comments":"","outputs":1,"x":591.1111221313477,"y":817.5832557678223,"z":"25983d3c.1a46c2","wires":[["42a68a05.d53734"]]},{"id":"5e0f2d9d.3e79e4","type":"other","name":"rollback","xml":"<outcome value='rollback'>","comments":"","outputs":1,"x":590.8611221313477,"y":859.8332567214966,"z":"25983d3c.1a46c2","wires":[["a61ccd6d.3aebe"]]},{"id":"57c70c87.486604","type":"other","name":"changeassign","xml":"<outcome value='changeassign'>","comments":"","outputs":1,"x":609.6111221313477,"y":773.8332576751709,"z":"25983d3c.1a46c2","wires":[["e15984c8.645068"]]},{"id":"cbce4b74.b01e88","type":"other","name":"delete","xml":"<outcome value='delete'>","comments":"","outputs":1,"x":586.1111602783203,"y":1127.5832681655884,"z":"25983d3c.1a46c2","wires":[["f561040f.098178"]]},{"id":"b2b5054b.a272c8","type":"call","name":"call: vnf-topology-assign","xml":"<call module='VNF-API' rpc='vnf-topology-assign' mode='sync' >","comments":"","outputs":1,"x":980.3611068725586,"y":728.3332653045654,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"b4b94e63.99422","type":"other","name":"changedelete","xml":"<outcome value='changedelete'>","comments":"","outputs":1,"x":607.8611526489258,"y":957.5832653045654,"z":"25983d3c.1a46c2","wires":[["c42de2b1.7e92f"]]},{"id":"ba1b2b13.db9ac8","type":"call","name":"call: vnf-topology-changeassign","xml":"<call module='VNF-API' rpc='vnf-topology-changeassign' mode='sync' >","comments":"","outputs":1,"x":1003.6112289428711,"y":772.3332653045654,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"3dbb27de.9f2dc8","type":"call","name":"call: vnf-topology-rollback","xml":"<call module='VNF-API' rpc='vnf-topology-rollback' mode='sync' >","comments":"","outputs":1,"x":985.3612289428711,"y":859.8332672119141,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"f561040f.098178","type":"call","name":"call: vnf-topology-delete","xml":"<call module='VNF-API' rpc='vnf-topology-delete' mode='sync' >","comments":"","outputs":1,"x":794.8612289428711,"y":1127.5832691192627,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"c6b280b0.6cd7f","type":"call","name":"call: vnf-topology-activate","xml":"<call module='VNF-API' rpc='vnf-topology-activate' mode='sync' >","comments":"","outputs":1,"x":984.8612213134766,"y":816.833261013031,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"155d31e0.05b84e","type":"call","name":"call: vnf-topology-changedelete","xml":"<call module='VNF-API' rpc='vnf-topology-changedelete' mode='sync' >","comments":"","outputs":1,"x":990.3612365722656,"y":1048.583267211914,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"a7b54cb3.980ce","type":"record","name":"record","xml":"<record plugin=\"com.att.sdnctl.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"svc-topology-operation\"/>\n<parameter name=\"field3\" value=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action`\"/>\n<parameter name=\"field4\" value=\"`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field5\" value=\"`$vnf-topology-operation-input.service-information.service-instance-id`\"/>\n<parameter name=\"field6\" value=\"`$vnf-topology-operation-input.request-information.request-id`\"/>\n<parameter name=\"field7\" value=\"`$vnf-topology-operation-input.request-information.request-action`\"/>\n<parameter name=\"field8\" value=\"`$vnf-topology-operation-input.request-information.source`\"/>\n<parameter name=\"field9\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-name`\"/>\n<parameter name=\"field10\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-type`\"/>\n<parameter name=\"field11\" value=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\"/>\n<parameter name=\"field12\" value=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`\"/>\n<parameter name=\"field13\" value=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`\"/>\n<parameter name=\"field14\" value=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>\n<parameter name=\"field15\" value=\"`$vnf-topology-operation-input.vnf-request-information.tenant`\"/>\n<parameter name=\"field16\" value=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`\"/>\n<parameter name=\"field17\" value=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`\"/>\n<parameter name=\"field18\" value=\"`$preload-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":340.5555725097656,"y":142.88889503479004,"z":"25983d3c.1a46c2","wires":[[]]},{"id":"bffc5a60.352f28","type":"comment","name":"vnf-topology-operation","info":"","comments":"","x":581.8888778686523,"y":77.44444465637207,"z":"25983d3c.1a46c2","wires":[]},{"id":"3cc3382f.1bf7c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":176.00000762939453,"y":143.0000057220459,"z":"25983d3c.1a46c2","wires":[["a7b54cb3.980ce","54531a3f.9a8244","f8efbd03.26ae7","dde1c2c4.10a5a","28d8bce6.199104"]]},{"id":"54531a3f.9a8244","type":"switchNode","name":"switch: INPUT vnf-name","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-name`\">","comments":"","outputs":1,"x":393.22222900390625,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["45cb3770.822158","cf085c81.629d9"]]},{"id":"45cb3770.822158","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":607.2222290039062,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["edf87ba5.9649e8"]]},{"id":"cf085c81.629d9","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":608.2222290039062,"y":223.44443321228027,"z":"25983d3c.1a46c2","wires":[["c31d2b9a.235b38"]]},{"id":"edf87ba5.9649e8","type":"switchNode","name":"switch: PRELOAD vnf-name","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`\">","comments":"","outputs":1,"x":818.2222290039062,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["dd3bda61.91fef8","d1fbfea6.d6b4e"]]},{"id":"dd3bda61.91fef8","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1029.2222290039062,"y":187.44443321228027,"z":"25983d3c.1a46c2","wires":[["a56ba8fa.fd0dc8"]]},{"id":"d1fbfea6.d6b4e","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1030.2222290039062,"y":222.44443321228027,"z":"25983d3c.1a46c2","wires":[["74256d47.66f134"]]},{"id":"a56ba8fa.fd0dc8","type":"switchNode","name":"switch: vnf-name INPUT == PRELOAD","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-name == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`\">","comments":"","outputs":1,"x":1277.2222137451172,"y":187.44443130493164,"z":"25983d3c.1a46c2","wires":[["fd6ecd32.7e998"]]},{"id":"fd6ecd32.7e998","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1523.5555801391602,"y":187.1113338470459,"z":"25983d3c.1a46c2","wires":[["d4097d82.5bf18"]]},{"id":"d4097d82.5bf18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='request.vnf-name not found in preload-data'/>","comments":"","x":1682.2222061157227,"y":186.44443321228027,"z":"25983d3c.1a46c2","wires":[]},{"id":"74256d47.66f134","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-name'/>","comments":"","x":1197.2222290039062,"y":222.44443321228027,"z":"25983d3c.1a46c2","wires":[]},{"id":"c31d2b9a.235b38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-name is required'/>","comments":"","x":769.7222290039062,"y":223.69443321228027,"z":"25983d3c.1a46c2","wires":[]},{"id":"f8efbd03.26ae7","type":"switchNode","name":"switch: INPUT vnf-type","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-type`\">","comments":"","outputs":1,"x":389.2222595214844,"y":275.4444332122803,"z":"25983d3c.1a46c2","wires":[["65e149af.cbde18","ea33806b.6d2f5"]]},{"id":"65e149af.cbde18","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":606.2222518920898,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["62202805.17d5c8"]]},{"id":"ea33806b.6d2f5","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":607.2222518920898,"y":312.4444332122803,"z":"25983d3c.1a46c2","wires":[["ac6b3fa2.70605"]]},{"id":"62202805.17d5c8","type":"switchNode","name":"switch: PRELOAD vnf-type","xml":"<switch test=\"`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`\">","comments":"","outputs":1,"x":817.2222518920898,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["c1ab266d.3e50e8","6103e8e2.d0ac48"]]},{"id":"c1ab266d.3e50e8","type":"outcome","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":1028.2222518920898,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["7d4ee884.193e58"]]},{"id":"6103e8e2.d0ac48","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1029.2222518920898,"y":311.4444332122803,"z":"25983d3c.1a46c2","wires":[["25b723b.6c928dc"]]},{"id":"ac6b3fa2.70605","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vnf-type is required'/>","comments":"","x":768.7222518920898,"y":312.6944332122803,"z":"25983d3c.1a46c2","wires":[]},{"id":"7d4ee884.193e58","type":"switchNode","name":"switch: vnf-type INPUT == PRELOAD","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-type == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`\">","comments":"","outputs":1,"x":1276.2222290039062,"y":276.4444332122803,"z":"25983d3c.1a46c2","wires":[["3f9c526d.64517e"]]},{"id":"25b723b.6c928dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='No preload data found to match vnf-type'/>","comments":"","x":1196.2222290039062,"y":311.4444332122803,"z":"25983d3c.1a46c2","wires":[]},{"id":"3f9c526d.64517e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1525.2222290039062,"y":276.7779293060303,"z":"25983d3c.1a46c2","wires":[["1f890771.7bde59"]]},{"id":"1f890771.7bde59","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='request.vnf-type not found in preload-data'/>","comments":"","x":1683.8888549804688,"y":276.11102867126465,"z":"25983d3c.1a46c2","wires":[]},{"id":"28d8bce6.199104","type":"switchNode","name":"switch: INPUT vnf-id","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id`\">","comments":"","outputs":1,"x":381.9009017944336,"y":369.9087600708008,"z":"25983d3c.1a46c2","wires":[["ae4cccb8.ead7f","c595b7b0.cb5c08"]]},{"id":"c595b7b0.cb5c08","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":564.9008712768555,"y":407.05159759521484,"z":"25983d3c.1a46c2","wires":[["c4592136.61d7c"]]},{"id":"ae4cccb8.ead7f","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":564.0438003540039,"y":369.4801959991455,"z":"25983d3c.1a46c2","wires":[["c4592136.61d7c"]]},{"id":"c4592136.61d7c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='vf-modules vnf-id cannot be NULL or 0'/>","comments":"","x":739.7580795288086,"y":407.33731842041016,"z":"25983d3c.1a46c2","wires":[]},{"id":"40476a8f.071944","type":"switchNode","name":"switch: INPUT generic-vnf-id","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\">","comments":"","outputs":1,"x":1187.972312927246,"y":471.19446659088135,"z":"25983d3c.1a46c2","wires":[["71e91fc9.fc681","eaa464db.400d28"]]},{"id":"eaa464db.400d28","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1420.972282409668,"y":509.3373041152954,"z":"25983d3c.1a46c2","wires":[["f557b1e2.3389f"]]},{"id":"71e91fc9.fc681","type":"outcome","name":"0","xml":"<outcome value='0'>","comments":"","outputs":1,"x":1420.1152114868164,"y":471.7659025192261,"z":"25983d3c.1a46c2","wires":[["f557b1e2.3389f"]]},{"id":"f557b1e2.3389f","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/>","comments":"","x":1574.829490661621,"y":509.6230249404907,"z":"25983d3c.1a46c2","wires":[]},{"id":"6c32f4a6.dc1bbc","type":"switchNode","name":"switch: INPUT generic-vnf-name","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`\">","comments":"","outputs":1,"x":1199.722312927246,"y":552.1944665908813,"z":"25983d3c.1a46c2","wires":[["65632028.5d066"]]},{"id":"65632028.5d066","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1417.722282409668,"y":552.3373041152954,"z":"25983d3c.1a46c2","wires":[["8ba72342.bbed5"]]},{"id":"8ba72342.bbed5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='generic-vnf-name cannot be NULL'/>","comments":"","x":1571.579490661621,"y":552.6230249404907,"z":"25983d3c.1a46c2","wires":[]},{"id":"b28e0cca.d41bb","type":"switchNode","name":"switch: INPUT generic-vnf-type","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`\">","comments":"","outputs":1,"x":1193.972312927246,"y":596.1944665908813,"z":"25983d3c.1a46c2","wires":[["aa1b2f7.b06f8d"]]},{"id":"aa1b2f7.b06f8d","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1411.972282409668,"y":596.3373041152954,"z":"25983d3c.1a46c2","wires":[["e2e17d64.872be"]]},{"id":"e2e17d64.872be","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='generic-vnf-type cannot be NULL'/>","comments":"","x":1565.829490661621,"y":596.6230249404907,"z":"25983d3c.1a46c2","wires":[]},{"id":"58a1478b.c0e8f8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":957.5001373291016,"y":470.75006675720215,"z":"25983d3c.1a46c2","wires":[["40476a8f.071944","6c32f4a6.dc1bbc","b28e0cca.d41bb","529f560e.4f4038"]]},{"id":"42a68a05.d53734","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":739.5000152587891,"y":817.0000095367432,"z":"25983d3c.1a46c2","wires":[["58a1478b.c0e8f8","c6b280b0.6cd7f"]]},{"id":"e15984c8.645068","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":768.2500152587891,"y":773.2500095367432,"z":"25983d3c.1a46c2","wires":[["58a1478b.c0e8f8","ba1b2b13.db9ac8"]]},{"id":"a61ccd6d.3aebe","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":740.7500152587891,"y":859.5000104904175,"z":"25983d3c.1a46c2","wires":[["3dbb27de.9f2dc8","58a1478b.c0e8f8"]]},{"id":"221592c2.d2e22e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":758.2500152587891,"y":728.2500114440918,"z":"25983d3c.1a46c2","wires":[["58a1478b.c0e8f8","b2b5054b.a272c8"]]},{"id":"5199930f.f65cbc","type":"comment","name":"changedelete is for 1604 VNF ONLY","info":"","comments":"","x":1045.000015258789,"y":908.7500133514404,"z":"25983d3c.1a46c2","wires":[]},{"id":"529f560e.4f4038","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":1193.250015258789,"y":638.7500114440918,"z":"25983d3c.1a46c2","wires":[["97a6fbef.743c78"]]},{"id":"97a6fbef.743c78","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1411.249984741211,"y":638.8928489685059,"z":"25983d3c.1a46c2","wires":[["4f783332.567abc"]]},{"id":"4f783332.567abc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region cannot be NULL'/>","comments":"","x":1565.107192993164,"y":639.1785697937012,"z":"25983d3c.1a46c2","wires":[]},{"id":"65f88fb5.ab931","type":"switchNode","name":"switch: INPUT aic-cloud-region","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`\">","comments":"","outputs":1,"x":988.7500190734863,"y":958.0000133514404,"z":"25983d3c.1a46c2","wires":[["41b77e7.203668"]]},{"id":"41b77e7.203668","type":"outcome","name":"other","xml":"<outcome value='other'>","comments":"","outputs":1,"x":1206.7499885559082,"y":958.1428508758545,"z":"25983d3c.1a46c2","wires":[["c067f3e8.62d66"]]},{"id":"c067f3e8.62d66","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/>","comments":"","x":1360.6071968078613,"y":958.4285717010498,"z":"25983d3c.1a46c2","wires":[]},{"id":"bfc65951.089598","type":"switchNode","name":"switch: INPUT aic-clli","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.aic-clli`\">","comments":"","outputs":1,"x":958.7500381469727,"y":1001.5000276565552,"z":"25983d3c.1a46c2","wires":[["8c86155.bd7ede8"]]},{"id":"8c86155.bd7ede8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1140.7500076293945,"y":1001.6428651809692,"z":"25983d3c.1a46c2","wires":[["b2dd9cc5.c6ce"]]},{"id":"b2dd9cc5.c6ce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/>","comments":"","x":1294.6072158813477,"y":1001.9285860061646,"z":"25983d3c.1a46c2","wires":[]},{"id":"c42de2b1.7e92f","type":"block","name":"block","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":770.0000190734863,"y":957.7500133514404,"z":"25983d3c.1a46c2","wires":[["65f88fb5.ab931","bfc65951.089598","155d31e0.05b84e"]]}]
diff --git a/platform-logic/vnfapi/src/main/json/vnf-topology-rollback.json b/platform-logic/vnfapi/src/main/json/vnf-topology-rollback.json
new file mode 100644
index 00000000..0f0477d0
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/json/vnf-topology-rollback.json
@@ -0,0 +1,4 @@
+
+
+
+[{"id":"4adc401f.6fd4e","type":"comment","name":"vnf-topology-rollback","info":"","comments":"","x":768.75,"y":68.75,"z":"c46e36ad.370538","wires":[]},{"id":"a35df8d1.5089b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":176.66674041748047,"y":180.05554580688477,"z":"c46e36ad.370538","wires":[["4b413bbb.dead44"]]},{"id":"4b859f58.89806","type":"method","name":"method vnf-topology-rollback","xml":"<method rpc='vnf-topology-rollback' mode='sync'>\n","comments":"","outputs":1,"x":205.08342742919922,"y":127.47221851348877,"z":"c46e36ad.370538","wires":[["a35df8d1.5089b8"]]},{"id":"f018b62.ed5ec48","type":"service-logic","name":"VNF-API 2.0.0","module":"VNF-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.att.com/sdnctl/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.att.com/sdnctl/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>","outputs":1,"x":297.0833969116211,"y":80.4722261428833,"z":"c46e36ad.370538","wires":[["4b859f58.89806"]]},{"id":"7687c33c.8308fc","type":"dgstart","name":"DGSTART","outputs":1,"x":150.91674041748047,"y":79.3055534362793,"z":"c46e36ad.370538","wires":[["f018b62.ed5ec48"]]},{"id":"9e388b53.8eec58","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":914.9167633056641,"y":490.5806646347046,"z":"c46e36ad.370538","wires":[]},{"id":"498b1cdc.f5b874","type":"set","name":"set: order-status = Deleted","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Deleted\"/>","comments":"","outputs":1,"x":950.6667633056641,"y":361.5806636810303,"z":"c46e36ad.370538","wires":[[]]},{"id":"966704da.f1e5e8","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingCreate`\">","comments":"","outputs":1,"x":983.5077056884766,"y":275.70944595336914,"z":"c46e36ad.370538","wires":[["f9e7dbf4.3cee38"]]},{"id":"f9e7dbf4.3cee38","type":"other","name":"false","xml":"<outcome value='false'>","comments":"","outputs":1,"x":1215.0910873413086,"y":275.5427579879761,"z":"c46e36ad.370538","wires":[["da524aac.dca358"]]},{"id":"da524aac.dca358","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value='Invalid order-status'/>","comments":"","x":1367.424217224121,"y":275.5428190231323,"z":"c46e36ad.370538","wires":[]},{"id":"1b62d02c.b7bba","type":"set","name":"set: last-action ","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-action\" value=\"`$service-data.request-information.request-action`\"/>","comments":"","outputs":1,"x":912.4244575500488,"y":403.876256942749,"z":"c46e36ad.370538","wires":[[]]},{"id":"db17d4a.2603328","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1203.765281677246,"y":228.50000286102295,"z":"c46e36ad.370538","wires":[["27eb4ee.58ec4b2"]]},{"id":"27eb4ee.58ec4b2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='400'/>\n\t<parameter name='error-message' value=\"`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`\"/>","comments":"","x":1366.856101989746,"y":228.90910625457764,"z":"c46e36ad.370538","wires":[]},{"id":"523d2145.891db","type":"set","name":"set: last-order-status = order-status","xml":"<set>\n\t<parameter name=\"service-data.oper-status.last-order-status\" value=\"`$service-data.oper-status.order-status`\"/>","comments":"","outputs":1,"x":977.3108062744141,"y":318.56821060180664,"z":"c46e36ad.370538","wires":[[]]},{"id":"c8d475e9.cca918","type":"set","name":"Clear vnf topology","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"\" /> \n","comments":"","outputs":1,"x":925.8108062744141,"y":447.5682125091553,"z":"c46e36ad.370538","wires":[[]]},{"id":"1b28eda7.d7bd22","type":"switchNode","name":"switch:CONFIG == INPUT - vnf-id","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">","comments":"","outputs":1,"x":972.9167633056641,"y":228.50000286102295,"z":"c46e36ad.370538","wires":[["db17d4a.2603328"]]},{"id":"4b413bbb.dead44","type":"switchNode","name":"switch: order-status = PendingCreate","xml":"<switch test=\"`$service-data.oper-status.order-status == PendingCreate`\">\n\n<!--\nleaf order-status {\n\ttype enumeration {\n\t\tenum \"Active\";\n\t\tenum \"PendingAssignment\";\n\t\tenum \"PendingCreate\";\n\t\tenum \"PendingUpdate\";\n\t\tenum \"Deleted\";\n\t}\n}\n-->","comments":"","outputs":1,"x":284.166748046875,"y":227.00000667572021,"z":"c46e36ad.370538","wires":[["487e1089.4a94b"]]},{"id":"487e1089.4a94b","type":"other","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":520.4167404174805,"y":227.75,"z":"c46e36ad.370538","wires":[["1f7d22e0.cbfffd"]]},{"id":"1f7d22e0.cbfffd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":682.4167404174805,"y":227.75,"z":"c46e36ad.370538","wires":[["1b28eda7.d7bd22","966704da.f1e5e8","523d2145.891db","498b1cdc.f5b874","1b62d02c.b7bba","c8d475e9.cca918","9e388b53.8eec58"]]},{"id":"9dca4993.365578","type":"comment","name":"request-action = VNFActivateRequest, svc-action = rollback","info":"","comments":"","x":780.166748046875,"y":104.75000190734863,"z":"c46e36ad.370538","wires":[]}]
diff --git a/platform-logic/vnfapi/src/main/resources/graph.versions b/platform-logic/vnfapi/src/main/resources/graph.versions
new file mode 100644
index 00000000..a49567c6
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/resources/graph.versions
@@ -0,0 +1,33 @@
+VNF-API generate-l3network-network-id ${project.version} sync
+VNF-API generate-subnets-subnet-id ${project.version} sync
+VNF-API network-topology-assign ${project.version} sync
+VNF-API network-topology-changeassign ${project.version} sync
+VNF-API network-topology-delete ${project.version} sync
+VNF-API network-topology-operation ${project.version} sync
+VNF-API network-topology-rollback ${project.version} sync
+VNF-API preload-network-topology-operation ${project.version} sync
+VNF-API preload-vf-module-topology-operation ${project.version} sync
+VNF-API preload-vnf-instance-topology-operation ${project.version} sync
+VNF-API preload-vnf-topology-operation ${project.version} sync
+VNF-API vf-module-topology-activate ${project.version} sync
+VNF-API vf-module-topology-assign ${project.version} sync
+VNF-API vf-module-topology-assign-vnf-networks ${project.version} sync
+VNF-API vf-module-topology-changeassign ${project.version} sync
+VNF-API vf-module-topology-delete ${project.version} sync
+VNF-API vf-module-topology-operation ${project.version} sync
+VNF-API vf-module-topology-rollback ${project.version} sync
+VNF-API vnf-instance-topology-activate ${project.version} sync
+VNF-API vnf-instance-topology-assign ${project.version} sync
+VNF-API vnf-instance-topology-assign-vnf-networks ${project.version} sync
+VNF-API vnf-instance-topology-changeassign ${project.version} sync
+VNF-API vnf-instance-topology-delete ${project.version} sync
+VNF-API vnf-instance-topology-operation ${project.version} sync
+VNF-API vnf-instance-topology-rollback ${project.version} sync
+VNF-API vnf-topology-activate ${project.version} sync
+VNF-API vnf-topology-assign ${project.version} sync
+VNF-API vnf-topology-assign-vfmodule ${project.version} sync
+VNF-API vnf-topology-changeassign ${project.version} sync
+VNF-API vnf-topology-changedelete ${project.version} sync
+VNF-API vnf-topology-delete ${project.version} sync
+VNF-API vnf-topology-operation ${project.version} sync
+VNF-API vnf-topology-rollback ${project.version} sync
diff --git a/platform-logic/vnfapi/src/main/xml/dg-generate-l3network-network-id.xml b/platform-logic/vnfapi/src/main/xml/dg-generate-l3network-network-id.xml
new file mode 100644
index 00000000..443be5b4
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-generate-l3network-network-id.xml
@@ -0,0 +1,48 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-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.openecomp.sdnc.sli.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.openecomp.sdnc.sli.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.openecomp.sdnc.sli.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/vnfapi/src/main/xml/dg-generate-subnets-subnet-id.xml b/platform-logic/vnfapi/src/main/xml/dg-generate-subnets-subnet-id.xml
new file mode 100644
index 00000000..c33fe9ad
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-generate-subnets-subnet-id.xml
@@ -0,0 +1,49 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="generate-subnets-subnet-id" mode="sync"><block atomic="true"><set>
+ <parameter name="tmp.local-variables.generate-subnets-subnet-id." value="" />
+ <parameter name="tmp.return.generate-subnets-subnet-id." value="" /></set><execute plugin="org.openecomp.sdnc.sli.SliPluginUtils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-subnets-subnet-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="s" start="0" end="1" ><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.local.network-id
+ AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid"
+ local-only="false"
+ pfx="tmp.local-variables.generate-subnets-subnet-id.SUBNETS" ><outcome value='success'>
+<block atomic='true'><set>
+ <parameter name="tmp.local-variables.generate-subnets-subnet-id.is-unique" value="0" /></set><execute plugin="org.openecomp.sdnc.sli.SliPluginUtils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate-subnets-subnet-id.uuid" /><outcome value='failure'>
+<return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-subnets-subnet-id" value="An error occured while generating a UUID for SUBNETS." /></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-subnets-subnet-id" value="`'An error occured while checking if a generated subnets-subnet-id was unique. subnet-id = ' + $tmp.local-variables.generate-subnets-subnet-id.uuid`" /></return></outcome><outcome value="Other"><return status="failure">
+ <!-- return parameters -->
+ <parameter name="error-message.generate-subnets-subnet-id" value="`'An error occured while checking if a generated subnets-subnet-id was unique. subnet-id = ' + $tmp.local-variables.generate-subnets-subnet-id.uuid`" /></return></outcome></get-resource></for><set>
+ <parameter name="tmp.local-variables.generate-subnets-subnet-id." value="" /></set></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-assign.xml
new file mode 100644
index 00000000..650f0240
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-assign.xml
@@ -0,0 +1,358 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-assign" mode="sync"><block atomic="true"><switch test="`$network-topology-operation-input.service-information.service-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='service-type, aka AnAI subscription-service-type, is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.subscriber-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='subscriber-name, aka AnAI global-customer-id, is required.'/></return></outcome></switch><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $network-topology-operation-input.network-request-information.network-name"
+ local-only="false"
+ pfx="tmp.AnAI.l3network.existed">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying whether l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already exists in AnAI'`"/>
+</return></outcome><outcome value='success'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'A l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already existed in AnAI with network-id = ' + $tmp.AnAI.l3network.existed.network-id`" />
+</return></outcome></get-resource><set>
+ <parameter name="tmp.error-message" value=""/></set><call module="VNF-API" rpc="generate-l3network-network-id" mode="sync" >
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='Error in generating l3-network.network-id in SDNC'/></return></outcome></call><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+<parameter name="network-name" value="`$network-topology-operation-input.network-request-information.network-name`" />
+<parameter name="network-type" value="`$network-topology-operation-input.network-request-information.network-type`" />
+<parameter name="network-role" value="`$preload-data.network-topology-information.network-topology-identifier.network-role`" />
+<parameter name="network-technology" value="`$preload-data.network-topology-information.network-topology-identifier.network-technology`" />
+<parameter name="service-id" value="`$network-topology-operation-input.service-information.service-id`" />
+<parameter name="tenant-id" value="`$network-topology-operation-input.network-request-information.tenant`" />
+<parameter name="network-role-instance" value="0" />
+<parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></return></outcome></save><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="physical-network-name" value="`$preload-data.network-topology-information.provider-network-information.physical-network-name`" />
+<parameter name="is-provider-network" value="`$preload-data.network-topology-information.provider-network-information.is-provider-network`" />
+<parameter name="is-shared-network" value="`$preload-data.network-topology-information.provider-network-information.is-shared-network`" />
+<parameter name="is-external-network" value="`$preload-data.network-topology-information.provider-network-information.is-external-network`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></update><for index="i" start="0" end="`$preload-data.network-topology-information.subnets_length`">
+<block atomic='true'><switch test="`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`"><outcome value='Y'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="true" />
+</set></outcome><outcome value='N'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="false" />
+</set></outcome></switch><set>
+<parameter name="tmp.gateway-address" value="`$preload-data.network-topology-information.subnets[$i].gateway-address`" />
+</set><switch test="`$preload-data.network-topology-information.subnets[$i].gateway-address`"><outcome value=''><block atomic='true'><execute plugin="org.openecomp.sdnc.sli.plugin.ipAddressTools.IpAddressTool" method="getGatewayAddress">
+ <parameter name="ipAddress" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+ <parameter name="ipVersion" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+ <parameter name="subnet" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+ <parameter name="ctxVariable" value="tmp.return.generate.gateway-address" /></execute><set>
+<parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
+</set></block></outcome></switch><set>
+<parameter name="tmp.local.network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+</set><call module="VNF-API" rpc="generate-subnets-subnet-id" mode="sync" >
+<outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></outcome></call><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid
+ AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid" >
+<!-- Create l3-network object -->
+<parameter name="network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+<parameter name="subnet-id" value="`$tmp.return.generate-subnets-subnet-id.uuid`" />
+<parameter name="subnet-name" value="`$preload-data.network-topology-information.subnets[$i].subnet-name`" />
+<parameter name="gateway-address" value="`$tmp.gateway-address`" />
+<parameter name="network-start-address" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+<parameter name="cidr-mask" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+<parameter name="ip-version" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+<parameter name="dhcp-start" value="`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`" />
+<parameter name="dhcp-end" value="`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`" />
+<parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`" />
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></block></for><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
+ 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-information.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-information.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-information.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 clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save><switch test="`$preload-data.network-topology-information.vpn-bindings_length`"><outcome value=''><set>
+<parameter name="preload-data.network-topology-information.vpn-bindings_length" value="0" />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.vpn-bindings_length`">
+<block atomic='true'><set>
+<parameter name="tmp.vpn-binding-id" value="" />
+</set><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`"><outcome value='Other'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`" />
+</set></outcome></switch><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`" ><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target"
+ local-only="false"
+ pfx="tmp.AnAI.vpn-binding"><outcome value='success'>
+<switch test="`$tmp.AnAI.vpn-binding.vpn-id`" ><outcome value='Other'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$tmp.AnAI.vpn-binding.vpn-id`" />
+</set></outcome><outcome value=''>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target + '. It is likely that the same global-route-target points to more than one vpn-binding objects in AnAI.'`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></switch></outcome><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></get-resource></outcome></switch><switch test="`$tmp.vpn-binding-id != ''`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
+ force="true"
+ local-only="false">
+
+ <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="`$tmp.vpn-binding-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 vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='success'>
+<set>
+<parameter name="tmp.is-bound-to-vpn" value="true" />
+</set></outcome></save></outcome></switch></block></for><switch test="`$preload-data.network-topology-information.network-policy_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.network-policy_length`">
+<switch test="`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != ''`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="network-policy"
+ key="network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn"
+ local-only="false"
+ pfx="tmp.AnAI.network-policy"><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.network-policy.network-policy-id`" ><outcome value=''>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query newtork-policy from AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn + '. It is likely that the same network-policy-fqdn points to more than one network-policy objects in AnAI.'`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='Other'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.network-policy.network-policy-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 network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></outcome></switch></outcome></get-resource></outcome></switch></for><switch test="`$preload-data.network-topology-information.route-table-reference_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.route-table-reference_length`">
+<switch test="`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != ''`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="route-table-reference"
+ key="route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn"
+ pfx="tmp.AnAI.route-table-reference"><outcome value='not-found'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set></block></outcome><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set></block></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.route-table-referencey.route-table-reference-id`" ><outcome value=''>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query route-table-reference from AnAI where route-table-reference-fqdn = ' + $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn + '. It is likely that the same route-table-reference-fqdn points to more than one route-table-reference objects in AnAI.'`"/></set></block></outcome><outcome value='Other'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.route-table-reference.route-table-reference-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 route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></outcome></switch></outcome></get-resource></outcome></switch></for><switch test="`$tmp.is-bound-to-vpn`"><outcome value="true"><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<parameter name="is-bound-to-vpn" value="true" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></update></outcome></switch><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
+<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="`$network-topology-operation-input.service-information.subscriber-name`" />
+<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="`$network-topology-operation-input.service-information.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="`$network-topology-operation-input.service-information.service-instance-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 service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $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 service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/></set><block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="networkId" value="`$tmp.return.generate-l3network-network-id.uuid`" />
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-changeassign.xml
new file mode 100644
index 00000000..8b16c83a
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-changeassign.xml
@@ -0,0 +1,525 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-changeassign" mode="sync"><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+<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><outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'network-id: ' + $network-topology-operation-input.network-request-information.network-id + 'not found in AnAI'`" /></return></outcome></get-resource><switch test="`$tmp.AnAI.l3network.network-name == $network-topology-operation-input.network-request-information.network-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'The input network-name,' + network-topology-operation-input.network-request-information.network-name + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></switch><switch test="`$tmp.AnAI.l3network.network-type == $network-topology-operation-input.network-request-information.network-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'The input network-type,' + network-topology-operation-input.network-request-information.network-type + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></switch><switch test="`$tmp.AnAI.l3network.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'No preload network found with network-name = ' + $tmp.AnAI.l3network.network-name + ' in SDNC'`" /></return></outcome></switch><switch test="`$tmp.AnAI.l3network.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'No preload network found with network-type = ' + $tmp.AnAI.l3network.network-type + ' in SDNC'`" /></return></outcome></switch><set>
+ <parameter name='x' value='0' />
+ <parameter name='tmp.error-message' value='' />
+ <parameter name='execute_failure' value='false' />
+ <parameter name='tmp.l3networkUpdate' value='0' /></set><switch test="`$tmp.AnAI.l3network.subnets.subnet_length`"><outcome value=''><set>
+<parameter name="tmp.AnAI.l3network.subnets.subnet_length" value="0" />
+</set></outcome></switch><for index="k" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<block atomic='true'><set>
+<parameter name='tmp.start-address-match' value='0' />
+</set><set>
+<parameter name='tmp.subnetUpdate' value='0' />
+</set><block atomic='true'><for index="n" start="0" end="`$preload-data.network-topology-information.subnets_length`">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].network-start-address == $preload-data.network-topology-information.subnets[$n].start-address`"><outcome value='true'>
+<block atomic='true'><set>
+<parameter name='tmp.start-address-match' value='1' />
+</set><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].cidr-mask == $preload-data.network-topology-information.subnets[$n].cidr-mask`"><outcome value='false'>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></outcome></switch><switch test="`$preload-data.network-topology-information.subnets[$n].gateway-address`"><outcome value=''><block>
+<execute plugin="org.openecomp.sdnc.sli.plugin.ipAddressTools.IpAddressTool" method="getGatewayAddress">
+ <parameter name="ipAddress" value="`$preload-data.network-topology-information.subnets[$n].start-address`" />
+ <parameter name="ipVersion" value="`$preload-data.network-topology-information.subnets[$n].ip-version`" />
+ <parameter name="subnet" value="`$preload-data.network-topology-information.subnets[$n].cidr-mask`" />
+ <parameter name="ctxVariable" value="tmp.return.generate.gateway-address" /></execute><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $tmp.return.generate.gateway-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
+</set><set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch></block></outcome><outcome value='Other'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $preload-data.network-topology-information.subnets[$n].gateway-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.gateway-address" value="`$preload-data.network-topology-information.subnets[$n].gateway-address`" />
+</set><set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome><outcome value='true'>
+<set>
+<parameter name="tmp.gateway-address" value="`$preload-data.network-topology-information.subnets[$n].gateway-address`" />
+</set></outcome></switch></outcome></switch><switch test="`$preload-data.network-topology-information.subnets[$n].dhcp-enabled`"><outcome value='N'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="false" />
+</set></outcome><outcome value='Y'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="true" />
+</set></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-enabled == $tmp.dhcpEnabled.boolean`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-start == $preload-data.network-topology-information.subnets[$n].dhcp-start-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-end == $preload-data.network-topology-information.subnets[$n].dhcp-end-address`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-name == $preload-data.network-topology-information.subnets[$n].subnet-name`"><outcome value='false'>
+<block>
+<set>
+<parameter name="tmp.subnetUpdate" value="1" />
+</set></block></outcome></switch><switch test="`$tmp.subnetUpdate == 1`"><outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id" >
+ <!-- Update l3network.subnet -->
+ <parameter name="gateway-address" value="`$tmp.gateway-address`"/>
+ <parameter name="subnet-name" value="`$preload-data.network-topology-information.subnets[$n].subnet-name`"/>
+ <parameter name="cidr-mask" value="`$preload-data.network-topology-information.subnets[$n].cidr-mask`"/>
+ <parameter name="dhcp-start" value="`$preload-data.network-topology-information.subnets[$n].dhcp-start-address`"/>
+ <parameter name="dhcp-end" value="`$preload-data.network-topology-information.subnets[$n].dhcp-end-address`"/>
+ <parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`"/>
+ <parameter name="orchestration-status" value="pending-update" />
+ <outcome value='failure'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet attributes in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet attributes in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<block>
+<set>
+ <parameter name="tmp.subnetRollback[$x].subnet-id" value= "`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/>
+ <parameter name="tmp.subnetRollback[$x].type" value = "update"/>
+
+
+
+</set><set>
+ <parameter name="x" value = "`$x + 1`" />
+
+</set><set>
+<parameter name="tmp.l3networkUpdate" value="1" />
+</set></block></outcome></update></outcome></switch></block></outcome></switch></for><switch test="`$execute_failure`"><outcome value='false'>
+<switch test="`$tmp.start-address-match == 0`"><outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id" >
+<parameter name="orchestration-status" value="pending-delete" />
+ <outcome value='failure'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet status to pending-delete in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block>
+<set>
+ <parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />
+ <parameter name='n' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while updating subnet status to pending-delete in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<block>
+<set>
+ <parameter name="tmp.subnetRollback[$x].subnet-id" value= "`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`"/>
+ <parameter name="tmp.subnetRollback[$x].orchestration-status" value= "`$tmp.AnAI.l3network.subnets.subnet[$k].orchestration-status`" />
+ <parameter name="tmp.subnetRollback[$x].type" value = "delete" />
+
+
+
+</set><set>
+ <parameter name="x" value = "`$x + 1`" />
+
+</set><set>
+<parameter name="tmp.l3networkUpdate" value="1" />
+</set></block></outcome></update></outcome></switch></outcome></switch></block></block></for><switch test="`$execute_failure`"><outcome value='false'>
+<for index="i" start="0" end="`$preload-data.network-topology-information.subnets_length`">
+<block atomic='true'><set>
+<parameter name="tmp.start-address-match" value="0" />
+</set><block atomic='true'><for index="j" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<switch test="`$preload-data.network-topology-information.subnets[$i].start-address == $tmp.AnAI.l3network.subnets.subnet[$j].network-start-address`"><outcome value='true'>
+<set>
+<parameter name='tmp.start-address-match' value='1' />
+</set></outcome></switch></for><switch test="`$tmp.start-address-match == 0`"><outcome value='true'>
+<block atomic="true"><switch test="`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`"><outcome value='N'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="false" />
+</set></outcome><outcome value='Y'><set>
+<parameter name="tmp.dhcpEnabled.boolean" value="true" />
+</set></outcome></switch><set>
+<parameter name='tmp.gateway-address' value='`$preload-data.network-topology-information.subnets[$i].gateway-address`' />
+</set><switch test="`$preload-data.network-topology-information.subnets[$i].gateway-address`"><outcome value=''><block>
+<execute plugin="org.openecomp.sdnc.sli.plugin.ipAddressTools.IpAddressTool" method="getGatewayAddress">
+ <parameter name="ipAddress" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+ <parameter name="ipVersion" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+ <parameter name="subnet" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+ <parameter name="ctxVariable" value="tmp.return.generate.gateway-address" /></execute><set>
+<parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
+</set></block></outcome></switch><set>
+<parameter name="tmp.local.network-id" value="`$tmp.AnAI.l3network.network-id`" />
+</set><call module="VNF-API" rpc="generate-subnets-subnet-id" mode="sync" >
+<outcome value='failure'>
+<block>
+<set>
+ <parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />
+ <parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></call><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid" >
+ <!-- Create l3-network object -->
+ <parameter name="network-id" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="subnet-id" value="`$tmp.return.generate-subnets-subnet-id.uuid`" />
+ <parameter name="gateway-address" value="`$tmp.gateway-address`" />
+ <parameter name="subnet-name" value="`$preload-data.network-topology-information.subnets[$i].subnet-name`" />
+ <parameter name="network-start-address" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
+ <parameter name="cidr-mask" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
+ <parameter name="ip-version" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
+ <parameter name="dhcp-start" value="`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`" />
+ <parameter name="dhcp-end" value="`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`" />
+ <parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`" />
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block>
+<set>
+ <parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />
+ <parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block>
+<set>
+ <parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />
+ <parameter name='i' value='`$preload-data.network-topology-information.subnets_length + 1`' /></set><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<block>
+<set>
+ <parameter name="tmp.subnetRollback[$x].subnet-id" value= "`$tmp.return.generate-subnets-subnet-id.uuid`" />
+ <parameter name="tmp.subnetRollback[$x].type" value = "create" /></set><set>
+ <parameter name="x" value = "`$x + 1`" />
+
+</set><set>
+<parameter name='tmp.l3networkUpdate' value='1' />
+</set></block></outcome></save></block></outcome></switch></block></block></for></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND related-to = vpn-binding" ><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while deleting l3-network vpn-binding relationship from AnAI"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></delete><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><switch test="`$preload-data.network-topology-information.vpn-bindings_length`"><outcome value=''><set>
+<parameter name="preload-data.network-topology-information.vpn-bindings_length" value="0" />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.vpn-bindings_length`">
+<block atomic='true'><set>
+<parameter name="tmp.vpn-binding-id" value="" />
+</set><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`"><outcome value='Other'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`" />
+</set></outcome></switch><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`" ><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target"
+ pfx="tmp.AnAI.vpn-binding"><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings n AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings n AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<set>
+<parameter name="tmp.vpn-binding-id" value="`$tmp.AnAI.vpn-binding.vpn-id`" />
+</set></outcome></get-resource></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<switch test="`$tmp.vpn-binding-id != ''`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.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="`$tmp.vpn-binding-id`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><set>
+ <parameter name="i" value = "`$preload-data.network-topology-information.vpn-bindings_length + 1`" />
+
+</set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></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 l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><set>
+ <parameter name="i" value = "`$preload-data.network-topology-information.vpn-bindings_length + 1`" />
+
+</set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.vpn-binding.updated' value='1' />
+</set></outcome></save></outcome></switch></outcome></switch></block></for></block></outcome></switch></block></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND related-to = network-policy" ><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while deleting l3-network network-policy relationship from AnAI in preparation to regenerate the network-policy relationship from PRELOAD."/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></delete><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><switch test="`$preload-data.network-topology-information.network-policy_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.network-policy_length`">
+<switch test="`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != NULL`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="network-policy"
+ key="network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn"
+ pfx="tmp.AnAI.network-policy" ><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.network-policy.network-policy-id`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+</outcome><outcome value='success'>
+<set>
+<parameter name='tmp.network-policy.updated' value='1' />
+</set></outcome></save></outcome></get-resource></outcome></switch></for></block></outcome></switch></block></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND related-to = route-table-reference" ><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while deleting l3-network route-table-reference relationship from AnAI prior to regenerate the route-table-reference relationship from PRELOAD."/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome></delete><switch test="`$execute_failure`"><outcome value='false'>
+<block atomic='true'><switch test="`$preload-data.network-topology-information.route-table-reference_length`"><outcome value=''><set>
+<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.route-table-reference_length`">
+<switch test="`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != NULL`"><outcome value='true'>
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="route-table-reference"
+ key="route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn"
+ pfx="tmp.AnAI.route-table-reference"><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.route-table-reference.route-table-reference-id`" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+</outcome><outcome value='success'>
+<set>
+<parameter name='tmp.route-table-reference.updated' value='1' />
+</set></outcome></save></outcome></get-resource></outcome></switch></for></block></outcome></switch></block></outcome></switch><switch test="`$execute_failure`"><outcome value='false'>
+<switch test="`$tmp.l3networkUpdate == 1`">
+<outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="orchestration-status" value="pending-update" /><outcome value='failure'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while updating l3-network.orchestration-status in AnAI"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='not-found'>
+<block><set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.error-message" value="An error occurred while updating l3-network.orchestration-status in AnAI"/></set><return status='success'>
+ <parameter name='execute_failure' value='true' />
+</return></block></outcome><outcome value='success'>
+<set>
+<parameter name='tmp.l3network.status.updated' value='1' />
+</set></outcome></update></outcome></switch></outcome></switch><switch test="`$execute_failure`"><outcome value="true"><block atomic='true'><for index="z" start="0" end="`$tmp.AnAI.l3network.relationship-list.relationship_length`">
+<switch test="`$tmp.AnAI.l3network.relationship-list.relationship[$z].related-to`"><outcome value='vpn-binding'>
+<switch test="`$tmp.vpn-binding.updated == 1`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.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="`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></save></outcome></switch></outcome><outcome value='network-policy'>
+<switch test="`$tmp.network-policy.updated == 1`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></save></outcome></switch></outcome><outcome value='route-table-reference'>
+<switch test="`$tmp.route-table-reference.updated == 1`"><outcome value='true'>
+<save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network:relationship-list"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
+<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'An error occurred during rollback of l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></save></outcome></switch></outcome></switch></for><for index="j" start="0" end="`$x`">
+<block atomic='true'><set>
+ <parameter name="tmp.rollback.match" value="0"/></set><for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-id == $tmp.subnetRollback[$j].subnet-id`"><outcome value='true'>
+<block atomic='true'><switch test="`$tmp.subnetRollback[$j].type`"><outcome value='delete'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id" >
+<parameter name="orchestration-status" value="`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`" />
+ <outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></update></outcome><outcome value='update'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$j].subnet-id" >
+<parameter name="subnet-name" value="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name`"/>
+<parameter name="gateway-address" value="`$tmp.AnAI.l3network.subnets.subnet[$i].gateway-address`"/>
+<parameter name="cidr-mask" value="`$tmp.AnAI.l3network.subnets.subnet[$i].cidr-mask`"/>
+<parameter name="dhcp-start" value="`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-start`"/>
+<parameter name="dhcp-end" value="`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-end`"/>
+<parameter name="dhcp-enabled" value="`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-enabled`"/>
+<parameter name="orchestration-status" value="`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`" />
+ <outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet attributes update in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback the subnet attributes update in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></update></outcome></switch><set>
+ <parameter name="tmp.rollback.match" value="1"/></set></block></outcome></switch></for><switch test="`$tmp.rollback.match == 0`"><outcome value='true'>
+<switch test="`$tmp.subnetRollback[$j].type`"><outcome value='create'>
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id
+ AND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id" ><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback to delete subnet from AnAI where subnet-id = ' + $tmp.subnetRollback[$j].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback to delete subnet from AnAI where subnet-id = ' + $tmp.subnetRollback[$j].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></delete></outcome></switch></outcome></switch></block></for><switch test="`$tmp.l3network.status.updated == 1`">
+<outcome value='true'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" >
+<parameter name="orchestration-status" value="`$tmp.AnAI.l3network.orchestration-status`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback l3network.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="tmp.rollback.error-message" value="`'failed to rollback l3network.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`"/></set></outcome></update></outcome></switch><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error updating l3-network in AnAI with network-id = ' + $tmp.AnAI.l3network.network-id + ' - ' + $tmp.error-message + ' - ' + $tmp.rollback.error-message`"/></return></block></outcome></switch><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="networkId" value="`$network-topology-operation-input.network-request-information.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-delete.xml
new file mode 100644
index 00000000..83be0602
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-delete.xml
@@ -0,0 +1,75 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-delete" mode="sync"><block atomic="true">
+<switch test="`$network-topology-operation-input.network-request-information.network-id`"><outcome value='Other'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="Failed to query AAI by network-id"/></return></outcome><outcome value='not-found'>
+<return status="success">
+ <parameter name="networkId" value="`$network-topology-operation-input.network-request-information.network-id` not found" />
+ <parameter name="error-code" value="200" /></return></outcome><outcome value='success'>
+<block atomic="true"><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" ></delete><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="networkId" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></outcome></get-resource></outcome><outcome value='0'><switch test="`$network-topology-operation-input.network-request-information.network-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="DisconnectNetworkRequest requires network-id or network-name "/></return></outcome><outcome value='Other'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $network-topology-operation-input.network-request-information.network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="Failed to query AAI by network-name"/></return></outcome><outcome value='not-found'>
+<return status="success">
+ <parameter name="augmentation" value="`$network-topology-operation-input.network-request-information.network-name` not found" />
+ <parameter name="error-code" value="200" /></return></outcome><outcome value='success'>
+<block atomic="true"><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" ></delete><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="networkId" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></outcome></get-resource></outcome></switch></outcome><outcome value=''><switch test="`$network-topology-operation-input.network-request-information.network-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="DisconnectNetworkRequest requires network-id or network-name "/></return></outcome><outcome value='Other'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $network-topology-operation-input.network-request-information.network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="Failed to query AAI by network-name"/></return></outcome><outcome value='not-found'>
+<return status="success">
+ <parameter name="augmentation" value="`$network-topology-operation-input.network-request-information.network-name` not found" />
+ <parameter name="error-code" value="200" /></return></outcome><outcome value='success'>
+<block atomic="true"><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $tmp.AnAI.l3network.network-id" ></delete><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="networkId" value="`$tmp.AnAI.l3network.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></outcome></get-resource></outcome></switch></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-operation.xml
new file mode 100644
index 00000000..70c59946
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-operation.xml
@@ -0,0 +1,109 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="network-topology-operation"/>
+<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$network-topology-operation-input.service-information.service-id`"/>
+<parameter name="field6" value="`$network-topology-operation-input.service-information.service-type`"/>
+<parameter name="field7" value="`$network-topology-operation-input.service-information.subscriber-name`"/>
+<parameter name="field8" value="`$network-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field9" value="`$network-topology-operation-input.request-information.request-id`"/>
+<parameter name="field10" value="`$network-topology-operation-input.request-information.request-action`"/>
+<parameter name="field11" value="`$network-topology-operation-input.request-information.source`"/>
+<parameter name="field12" value="`$network-topology-operation-input.network-request-information.network-name`"/>
+<parameter name="field13" value="`$network-topology-operation-input.network-request-information.network-type`"/>
+<parameter name="field14" value="`$network-topology-operation-input.network-request-information.tenant`"/>
+<parameter name="field15" value="`$network-topology-operation-input.network-request-information.aic-cloud-region`"/>
+<parameter name="field16" value="`$network-topology-operation-input.network-request-information.aic-clli`"/>
+<parameter name="field17" value="`$network-topology-operation-input.network-request-information.network-id`"/></record><switch test="`$network-topology-operation-input.request-information.request-action`">
+<outcome value='NetworkActivateRequest'><block atomic="true">
+<switch test="`$network-topology-operation-input.network-request-information.network-name`"><outcome value='Other'><switch test="`$preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='Other'><switch test="`$network-topology-operation-input.network-request-information.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'No preload-data found to match input network-name = ' + $network-topology-operation-input.network-request-information.network-name`"/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-name not found from preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-name is required from input'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.network-type`"><outcome value='Other'><switch test="`$preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='Other'><switch test="`$network-topology-operation-input.network-request-information.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'No preload-data found to match input network-type = ' + $network-topology-operation-input.network-request-information.network-type`"/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-type not found from preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='network-type is required from input'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.service-instance-id`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='service-instance-id is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='aic-cloud-region is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.tenant`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='tenant is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.service-id`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value='service-id is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='Other'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action is not found'/></return></outcome><outcome value='assign'><call module="VNF-API" rpc="network-topology-assign" mode="sync" >
+</call></outcome><outcome value='changeassign'><call module="VNF-API" rpc="network-topology-changeassign" mode="sync" >
+</call></outcome><outcome value='rollback'><call module="VNF-API" rpc="network-topology-rollback" mode="sync" >
+</call></outcome></switch></block></outcome><outcome value='DisconnectNetworkRequest'><switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='rollback'><call module="VNF-API" rpc="network-topology-rollback" mode="sync" >
+</call></outcome><outcome value='delete'><call module="VNF-API" rpc="network-topology-delete" mode="sync" >
+</call></outcome><outcome value='Other'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action is not found'/></return></outcome></switch></outcome><outcome value="Other">
+
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='request-action is not found'/></return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-network-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-network-topology-rollback.xml
new file mode 100644
index 00000000..925cac88
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-network-topology-rollback.xml
@@ -0,0 +1,75 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="network-topology-rollback" mode="sync"><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="`'l3-network not found in AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying l3-network from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></get-resource><switch test="`$tmp.AnAI.l3network.orchestration-status`"><outcome value='pending-create'>
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to delete l3-network from AAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`"/></return></outcome></delete></outcome><outcome value='pending-delete'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.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="`'Failed to update l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`"/></return></outcome></update></outcome><outcome value='pending-update'>
+<block atomic="true">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length`"><outcome value=''><set>
+<parameter name="tmp.AnAI.l3network.subnets.subnet_length" value="0" />
+</set></outcome></switch><for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`">
+<switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`"><outcome value='pending-create'>
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to rollback to delete subnet from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></delete></outcome><outcome value='pending-delete'>
+<update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="subnet"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.network-id
+ AND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id" >
+ <parameter name="orchestration-status" value="active" />
+ <outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to rollback subnet orchestration-status from AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' and network-id = ' + $network-topology-operation-input.network-request-information.network-id`" /></return></outcome></update></outcome></switch></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $network-topology-operation-input.network-request-information.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="`'Failed to rollback l3-netework orchestration-status in AnAI for network-id = ' + $network-topology-operation-input.network-request-information.network-id`"/></return></outcome></update></block></outcome></switch><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="networkId" value="`$network-topology-operation-input.network-request-information.network-id`" />
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-network-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-network-topology-operation.xml
new file mode 100644
index 00000000..52b68e26
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-network-topology-operation.xml
@@ -0,0 +1,55 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-network-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-network-topology-operation"/>
+<parameter name="field3" value="`$preload-network-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-network-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field6" value="`$preload-network-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-network-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-network-topology-operation-input.request-information.source`"/>
+<parameter name="field9" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.service-type`"/>
+<parameter name="field10" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-name`"/>
+<parameter name="field11" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-type`"/>
+<parameter name="field12" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-role`"/>
+<parameter name="field13" value="`$preload-network-topology-operation-input.network-topology-information.network-topology-identifier.network-technology`"/></record><switch test="`$preload-network-topology-operation-input.request-information.request-action`">
+<outcome value='PreloadNetworkRequest'><block atomic="true"><set>
+<parameter name="preload-data." value="" />
+</set><set>
+<parameter name="preload-data." value="preload-network-topology-operation-input." />
+</set><set>
+ <parameter name="preload-data.oper-status.order-status" value="PendingAssignment"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value='DeletePreloadNetworkRequest'><block atomic="true"><set>
+<parameter name="preload-data." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value='Invalid Request `$preload-network-topology-operation-input.request-information.request-action`'/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-vf-module-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-vf-module-topology-operation.xml
new file mode 100644
index 00000000..345b5801
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-vf-module-topology-operation.xml
@@ -0,0 +1,63 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-vf-module-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-vf-module-topology-operation"/>
+<parameter name="field3" value="`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-vf-module-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$preload-vf-module-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-vf-module-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"/>
+<parameter name="field9" value="`$preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-name`"/>
+<parameter name="field10" value="`$preload-vf-module-topology-operation-input.service-information.service-instance-id`"/></record><switch test="`$preload-vf-module-topology-operation-input.request-information.request-action`">
+
+<outcome value='PreloadVfModuleRequest'><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="vnf-profile" key="SELECT * from VNF_PROFILE where vnf_type = $preload-vf-module-topology-operation-input.vf-module-topology-information.vf-module-identifiers.vf-module-model-id">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome></get-resource><set>
+<parameter name="vf-module-preload-data." value="" />
+</set><set>
+<parameter name="vf-module-preload-data." value="preload-vf-module-topology-operation-input." />
+</set><set>
+ <parameter name="vf-module-preload-data.oper-status.order-status" value="PendingAssignment"/></set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value='DeletePreloadVfModuleRequest'><block atomic="true"><set>
+<parameter name="vf-module-preload-data." value="" />
+</set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value="`'Invalid Request, ' + $preload-vf-module-topology-operation-input.request-information.request-action`"/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-instance-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-instance-topology-operation.xml
new file mode 100644
index 00000000..cec38480
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-instance-topology-operation.xml
@@ -0,0 +1,63 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-vnf-instance-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-vnf-instance-topology-operation"/>
+<parameter name="field3" value="`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-vnf-instance-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$preload-vnf-instance-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-vnf-instance-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`"/>
+<parameter name="field9" value="`$preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`"/>
+<parameter name="field10" value="`$preload-vnf-instance-topology-operation-input.service-information.service-instance-id`"/></record><switch test="`$preload-vnf-instance-topology-operation-input.request-information.request-action`">
+
+<outcome value='PreloadVnfInstanceRequest'><block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="vnf-profile" key="SELECT * from VNF_PROFILE where vnf_type = $preload-vnf-instance-topology-operation-input.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-model-id not found. New vnf-model-id can be added via admin portal" /></return></outcome></get-resource><set>
+<parameter name="vnf-instance-preload-data." value="" />
+</set><set>
+<parameter name="vnf-instance-preload-data." value="preload-vnf-instance-topology-operation-input." />
+</set><set>
+ <parameter name="vnf-instance-preload-data.oper-status.order-status" value="PendingAssignment"/></set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value='DeletePreloadVnfInstanceRequest'><block atomic="true"><set>
+<parameter name="vnf-instance-preload-data." value="" />
+</set><block>
+<set>
+<parameter name="ack-final" value="Y"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value='Invalid Request `$preload-vnf-instance-topology-operation-input.request-information.request-action`'/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-topology-operation.xml
new file mode 100644
index 00000000..f4274520
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-preload-vnf-topology-operation.xml
@@ -0,0 +1,76 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-vnf-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="preload-vnf-topology-operation"/>
+<parameter name="field3" value="`$preload-vnf-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$preload-vnf-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$preload-vnf-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field6" value="`$preload-vnf-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$preload-vnf-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$preload-vnf-topology-operation-input.request-information.source`"/>
+<parameter name="field9" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.service-type`"/>
+<parameter name="field10" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-name`"/>
+<parameter name="field11" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type`"/></record><switch test="`$preload-vnf-topology-operation-input.request-information.request-action`">
+<!--
+leaf request-action {
+ type enumeration {
+ enum "VNFActivateRequest";
+ enum "ChangeVNFActivateRequest";
+ enum "DisconnectVNFRequest";
+ enum "PreloadVNFRequest";
+ enum "DeletePreloadVNFRequest";
+ }
+}
+-->
+
+<outcome value='PreloadVNFRequest'><block atomic="true"><set>
+<parameter name="ack-final" value="Y"/></set><set only-if-unset="true">
+<parameter name="sql-resource-plugin" value="org.openecomp.sdnc.sli.resource.sql.SqlResource"/></set><get-resource plugin="`$sql-resource-plugin`" resource="vnf-profile" key="SELECT * from VNF_PROFILE WHERE vnf_type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type">
+<outcome value='not-found'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-type not found as valid vnf " /></return></outcome><outcome value='failure'>
+<return status='failure'>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="preload vnf-type not found as valid vnf " /></return></outcome></get-resource><set>
+<parameter name="preload-data." value="" />
+</set><set>
+<parameter name="preload-data." value="preload-vnf-topology-operation-input." />
+</set><set>
+ <parameter name="preload-data.oper-status.order-status" value="PendingAssignment"/></set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value='DeletePreloadVNFRequest'><block atomic="true"><get-resource plugin="`$sql-resource-plugin`" resource="generic-vnf" key="SELECT * FROM VNF_PROFILE vnf-type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type">
+<outcome value='success'>
+<return status='failure'>
+ <parameter name="error-code" value="3000" />
+ <parameter name="error-message" value="preload vnf-type cannot be deleted while vnf is in use" /></return></outcome></get-resource><set>
+<parameter name="preload-data." value="" />
+</set><return status="success">
+ <parameter name="error-code" value="200" /></return></block></outcome><outcome value="Other">
+
+ <return status="failure">
+ <parameter name='error-code' value='2000'/>
+ <parameter name='error-message' value='Invalid Request `$preload-vnf-topology-operation-input.request-information.request-action`'/>
+
+
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-activate.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-activate.xml
new file mode 100644
index 00000000..16d92529
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-activate.xml
@@ -0,0 +1,45 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-activate' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vf-module-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><switch test="`$vf-module-service-data.oper-status.order-status == PendingUpdate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch></outcome></switch><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="Active"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-module-service-data.request-information.request-action`"/></set><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+ <parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vf-module orchestration-status in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vf-module orchestration-status in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome></update><set>
+ <parameter name="vf-module-service-data." value="vf-module-topology-operation-input." /></set><switch test="`$vnf-instance-service-data.vf-module-relationship-list_length`"><outcome value=''><set>
+ <parameter name="vnf-instance-service-data.vf-module-relationship-list_length" value="0" /></set></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.vf-module-relationship-list[$vnf-instance-service-data.vf-module-relationship-list_length].vf-module-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`" /></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign-vnf-networks.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign-vnf-networks.xml
new file mode 100644
index 00000000..dd2bf239
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign-vnf-networks.xml
@@ -0,0 +1,129 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-assign-vnf-networks' mode='sync'><block atomic="true"><switch test="`$vf-module-preload-data.oper-status.order-status == PendingAssignment`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid preload-data order status'/></return></outcome></switch><set>
+ <parameter name="vf-module-service-data." value="vf-module-preload-data." /></set><set>
+ <parameter name="vf-module-service-data." value="vf-module-topology-operation-input." /></set><set>
+ <parameter name="vf-module-service-data.vf-module-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`"/></set><switch test="`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name = "vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value="0" />
+</set></outcome></switch><for index="j" start="0" end="`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='1' />
+<parameter name='tmp.AnAI.l3network.' value='' />
+</set><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length' value='0' />
+</set></outcome></switch><block atomic="true">
+<for index="i" start="0" end="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks_length`"><switch test="`$vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='0' />
+</set><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id == '0'`"><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-id`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome><outcome value='true'>
+<switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '' or $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name == '0'`"><outcome value='true'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name"
+ pfx="tmp.AnAI.l3network">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred whie querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-name`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome></switch></outcome></switch><switch test="`$tmp.usePreload == 0`"><outcome value='true'>
+<block>
+<switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+</set><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$i].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></outcome></switch></for><switch test="`$tmp.usePreload == 1`"><outcome value='true'><block atomic="true">
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'PRELOAD network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-name = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-networks[$j].network-name`" />
+</return></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.l3network.network-id == ''`"><outcome value='true'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying l3-network with network-name = ' + $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`" />
+</return></outcome></switch></outcome></get-resource><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vf-module-preload-data.vf-module-topology-information.vnf-assignments.vnf-networks[$j].network-role`"><outcome value='true'>
+<block><set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+
+</set><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`"><outcome value='true'>
+<switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`"><outcome value='true'>
+<switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></block></for><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign.xml
new file mode 100644
index 00000000..abbb56ad
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-assign.xml
@@ -0,0 +1,63 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-assign' mode='sync'>
+<block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vfmodule" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'vf-module not found in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome></get-resource><call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' ></call><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+ <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="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while saving vf-module l3-network relationship in AnAI with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`"/></return></block></outcome></save></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+<parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic="true">
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="An error occurred while updating vf-module orchestration-status in AnAI"/></return></block></outcome></update><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="PendingCreate"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-changeassign.xml
new file mode 100644
index 00000000..bef4a8db
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-changeassign.xml
@@ -0,0 +1,85 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-changeassign' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid service-data order status'/></return></outcome></switch><call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' ></call><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ and generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vfmodule"><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"/></return></outcome></get-resource><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id + ' vf-module update FAILED.'`"/></return></outcome></delete><switch test="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+
+ <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="`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`' | An error occurred while saving l3-network relationship with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`" />
+</set><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vfmodule.relationship-list.relationship_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship_length`"><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`"><outcome value='l3-network'><block atomic='true'><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length" value = "0" /></set></outcome></switch><for index="j" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = vf-module-topology-operation-input.vf-module-request-information.vf-module-id
+ AND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id" >
+
+ <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.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`" />
+</set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and generic-vnf-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`" />
+</set></outcome></save></for></block></outcome></switch></for><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`"/></return></block></outcome></save></for><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="PendingUpdate"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-module-service-data.request-information.request-action`"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-delete.xml
new file mode 100644
index 00000000..e8c1f431
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-delete.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-delete' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-id not found in SDNC'/></return></outcome></switch><switch test="`$vf-module-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-module-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vf-module-service-data.vf-module-topology-information." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-operation.xml
new file mode 100644
index 00000000..e0c32468
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-operation.xml
@@ -0,0 +1,90 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-operation' mode='sync'>
+<block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="vf-module-topology-operation"/>
+<parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$vf-module-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$vf-module-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$vf-module-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$vf-module-topology-operation-input.service-information.service-id`"/>
+<parameter name="field9" value="`$vf-module-topology-operation-input.service-information.service-type`"/>
+<parameter name="field10" value="`$vf-module-topology-operation-input.service-information.subscriber-name`"/>
+<parameter name="field11" value="`$vf-module-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field12" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-id`"/>
+<parameter name="field13" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-model-id`"/>
+<parameter name="field14" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-name`"/>
+<parameter name="field15" value="`$vf-module-topology-operation-input.vf-module-topology-information.request-version`"/>
+<parameter name="field16" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-id`"/>
+<parameter name="field17" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-model-id`"/>
+<parameter name="field18" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-name`"/>
+<parameter name="field19" value="`$vf-module-topology-operation-input.vf-module-topology-information.aic-cloud-region`"/>
+<parameter name="field20" value="`$vf-module-topology-operation-input.vf-module-topology-information.tenant`"/></record><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name`"><outcome value='Other'><switch test="`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`"><outcome value='Other'><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-name not found in vf-module-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vf-module-name'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-name is required'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id`"><outcome value='Other'><switch test="`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"><outcome value='Other'><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-model-id not found in vf-module-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vf-module-model-id from input'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-model-id is required'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-module-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-name cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-model-id`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-model-id cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='assign'><call module='VNF-API' rpc='vf-module-topology-assign' mode='sync' ></call></outcome><outcome value='changeassign'><call module='VNF-API' rpc='vf-module-topology-changeassign' mode='sync' ></call></outcome><outcome value='activate'><call module='VNF-API' rpc='vf-module-topology-activate' mode='sync' ></call></outcome><outcome value='rollback'><call module='VNF-API' rpc='vf-module-topology-rollback' mode='sync' ></call></outcome><outcome value='delete'><call module='VNF-API' rpc='vf-module-topology-delete' mode='sync' ></call></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action not recognized'/>
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-rollback.xml
new file mode 100644
index 00000000..d0d80da6
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vf-module-topology-rollback.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vf-module-topology-rollback' mode='sync'>
+<block atomic="true"><switch test="`$vf-module-service-data.oper-status.order-status == PendingCreate`"><outcome value='true'><block atomic="true"><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id == $vf-module-service-data.vf-module-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value="`'vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vf-module-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vf-module-service-data.oper-status.last-order-status" value="`$vf-module-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vf-module-service-data.oper-status.last-action" value="`$vf-modules-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vf-module-service-data." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-activate.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-activate.xml
new file mode 100644
index 00000000..0f07fcf9
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-activate.xml
@@ -0,0 +1,42 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-activate' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingUpdate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="Active"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instance-service-data.request-information.request-action`"/></set><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+<parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vnf-instance orchestration-status in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while updating vnf-instance orchestration-status in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome></update><set>
+ <parameter name="vnf-instance-service-data." value="vnf-instance-topology-operation-input." /></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign-vnf-networks.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign-vnf-networks.xml
new file mode 100644
index 00000000..40e84291
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign-vnf-networks.xml
@@ -0,0 +1,130 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-assign-vnf-networks' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-preload-data.oper-status.order-status == PendingAssignment`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid preload-data order status'/></return></outcome></switch><set>
+ <parameter name="vnf-instance-service-data." value="vnf-instance-preload-data." /></set><set>
+ <parameter name="vnf-instance-service-data." value="vnf-instance-topology-operation-input." /></set><set>
+ <parameter name="vnf-instance-service-data.vnf-instance-id" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></set><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name = "vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value="0" />
+</set></outcome></switch><for index="j" start="0" end="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='1' />
+<parameter name='tmp.AnAI.l3network.' value='' />
+</set><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length' value='0' />
+</set></outcome></switch><block atomic="true">
+<for index="i" start="0" end="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks_length`"><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='0' />
+</set><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id == '0'`"><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-id`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome><outcome value='true'>
+<switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '' or $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name == '0'`"><outcome value='true'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name"
+ pfx="tmp.AnAI.l3network">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-name`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome></switch></outcome></switch><switch test="`$tmp.usePreload == 0`"><outcome value='true'>
+<block>
+<switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+</set><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$i].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></outcome></switch></for><switch test="`$tmp.usePreload == 1`"><outcome value='true'><block atomic="true">
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'PRELOAD network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying AnAI for l3-network with network-name = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-networks[$j].network-name`" />
+</return></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.l3network.network-id == ''`"><outcome value='true'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying l3-network with network-name = ' + $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`" />
+</return></outcome></switch></outcome></get-resource><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$j].network-role`"><outcome value='true'>
+<block><set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+
+</set><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`"><outcome value='true'>
+<switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`"><outcome value='true'>
+<switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></block></for><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign.xml
new file mode 100644
index 00000000..ca5ff845
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-assign.xml
@@ -0,0 +1,58 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-assign' mode='sync'>
+<block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vnf-instance" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'generic-vnf not found in AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome></get-resource><call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' ></call><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+ <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="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while saving generic-vnf l3-network relationship in AnAI with network-id = ' + $vnf-instance.service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`"/></return></block></outcome></save></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic="true">
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="An error occurred while updating vnf-instance orchestration-status in AnAI"/></return></block></outcome></update><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="PendingCreate"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-changeassign.xml
new file mode 100644
index 00000000..6b1c1f21
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-changeassign.xml
@@ -0,0 +1,80 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-changeassign' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid service-data order status'/></return></outcome></switch><call module='VNF-API' rpc='vnf-instance-topology-assign-vnf-networks' mode='sync' ></call><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id"
+ pfx="tmp.AnAI.vnf-instance" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying generic-vnf from AnAI with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/></return></outcome></get-resource><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while deleting existing l3-network relationship in AnAI with with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' vnf-instance update FAILED.'`"/></return></outcome></delete><switch test="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+
+ <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="`$vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`' | An error occurred while saving l3-network relationship with network-id = ' + $vnf-instance-service-data.vnf-instance-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`" />
+</set><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id
+ AND related-to = l3-network" ></delete><switch test="`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vnf-instance.relationship-list.relationship_length" value = "0" /></set></outcome></switch><for index="i" start="0" end="`$tmp.AnAI.vnf-instance.relationship-list.relationship_length`"><switch test="`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].related-to`"><outcome value='l3-network'><block atomic='true'><switch test="`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`"><outcome value=''>
+<set>
+ <parameter name="tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length" value = "0" /></set></outcome></switch><for index="j" start="0" end="`$tmp.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id" >
+
+ <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.AnAI.vnf-instance.relationship-list.relationship[$i].relationship-data[$j].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`" />
+</set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vnf-instance with vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`" />
+</set></outcome></save></for></block></outcome></switch></for><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to update vnf-instance l3-network relationship in AnAI. ' + $error-message`"/></return></block></outcome></save></for><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="PendingUpdate"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instance-service-data.request-information.request-action`"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-delete.xml
new file mode 100644
index 00000000..1c683bea
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-delete.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-delete' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vf-module-id == $vf-module-service-data.vnf-instance-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vf-module-id not found in SDNC'/></return></outcome></switch><switch test="`$vnf-instance-service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instance-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vnf-instance-service-data.vnf-instance-topology-information." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-operation.xml
new file mode 100644
index 00000000..322819b7
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-operation.xml
@@ -0,0 +1,65 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-operation' mode='sync'>
+<block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="vnf-instance-topology-operation"/>
+<parameter name="field3" value="`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$vnf-instance-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$vnf-instance-topology-operation-input.request-information.source`"/>
+<parameter name="field6" value="`$vnf-instance-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$vnf-instance-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$vnf-instance-topology-operation-input.service-information.service-id`"/>
+<parameter name="field9" value="`$vnf-instance-topology-operation-input.service-information.service-type`"/>
+<parameter name="field10" value="`$vnf-instance-topology-operation-input.service-information.subscriber-name`"/>
+<parameter name="field11" value="`$vnf-instance-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field12" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.request-version`"/>
+<parameter name="field13" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"/>
+<parameter name="field14" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`"/>
+<parameter name="field15" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`"/>
+<parameter name="field16" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`"/>
+<parameter name="field17" value="`$vnf-instance-topology-operation-input.vnf-instance-request-information.tenant`"/></record><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name`"><outcome value='Other'><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`"><outcome value='Other'><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-name == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-instance-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='vnf-instance-name from input not found in vnf-instance-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-instance-name from input'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-instance-name is required'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id`"><outcome value='Other'><switch test="`$vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`"><outcome value='Other'><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-model-id == $vnf-instance-preload-data.vnf-instance-topology-information.vnf-instance-identifiers.vnf-model-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value='request.vnf-model-id not found in vnf-instance-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-model-id from input'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-model-id is required'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-instance-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-instance-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch><switch test="`$vnf-instance-topology-operation-input.sdnc-request-header.svc-action`">
+<outcome value='assign'><call module='VNF-API' rpc='vnf-instance-topology-assign' mode='sync' ></call></outcome><outcome value='changeassign'><call module='VNF-API' rpc='vnf-instance-topology-changeassign' mode='sync' ></call></outcome><outcome value='activate'><call module='VNF-API' rpc='vnf-instance-topology-activate' mode='sync' ></call></outcome><outcome value='rollback'><call module='VNF-API' rpc='vnf-instance-topology-rollback' mode='sync' ></call></outcome><outcome value='delete'><call module='VNF-API' rpc='vnf-instance-topology-delete' mode='sync' ></call></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action not recognized'/>
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-rollback.xml
new file mode 100644
index 00000000..2ef20414
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-instance-topology-rollback.xml
@@ -0,0 +1,35 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-instance-topology-rollback' mode='sync'>
+<block atomic="true"><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingCreate`"><outcome value='true'><block atomic="true"><switch test="`$vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id == $vnf-instance-service-data.vnf-instance-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='404'/>
+ <parameter name='error-message' value="`'vnf-instance-id = ' + $vnf-instance-topology-operation-input.vnf-instance-request-information.vnf-instance-id + ' not found in SDNC'`"/></return></outcome></switch><switch test="`$vnf-instance-service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-order-status" value="`$vnf-instance-service-data.oper-status.order-status`"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="vnf-instance-service-data.oper-status.last-action" value="`$vnf-instances-service-data.request-information.request-action`"/></set><set>
+ <parameter name="vnf-instance-service-data." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-activate.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-activate.xml
new file mode 100644
index 00000000..81ad5bf5
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-activate.xml
@@ -0,0 +1,65 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-activate' mode='sync'>
+<block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`"/></return></outcome></switch><switch test="`$service-data.oper-status.order-status == PendingCreate`">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><switch test="`$service-data.oper-status.order-status == PendingUpdate`">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid last-order-status'/></return></outcome></switch></outcome></switch><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="Active"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false" >
+ <parameter name="orchestration-status" value="active" /><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error while updating vf-module orchestration-status in AnAI with vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome></update><set>
+ <parameter name="service-data." value="vnf-topology-operation-input." /></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign-vfmodule.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign-vfmodule.xml
new file mode 100644
index 00000000..e297a90d
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign-vfmodule.xml
@@ -0,0 +1,148 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-assign-vfmodule' mode='sync'>
+<block atomic="true"><switch test="`$preload-data.oper-status.order-status == PendingAssignment`">
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid preload-data order status'/></return></outcome></switch><set>
+ <parameter name="service-data." value="preload-data." /></set><set>
+ <parameter name="service-data." value="vnf-topology-operation-input." /></set><set>
+ <parameter name="service-data.vnf-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/>
+ <parameter name="service-data.service-information.service-instance-id" value="`$vnf-topology-operation-input.service-information.service-instance-id`"/>
+ <parameter name="service-data.vnf-request-information.vnf-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/>
+ <parameter name="service-data.vnf-topology-information.vnf-topology-identifier.vnf-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/></set><switch test="`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name = "preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length" value="0" />
+</set></outcome></switch><for index="j" start="0" end="`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='1' />
+<parameter name='tmp.AnAI.l3network.' value='' />
+</set><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`"><outcome value=''><set>
+<parameter name='vnf-topology-operation-input.vnf-request-information.vnf-networks_length' value='0' />
+</set></outcome></switch><block atomic="true">
+<for index="i" start="0" end="`$vnf-topology-operation-input.vnf-request-information.vnf-networks_length`"><switch test="`$preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block atomic="true">
+<set>
+<parameter name='tmp.usePreload' value='0' />
+</set><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id == '0'`"><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-id = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'Failed to query AnAI for l3-network with network-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-id`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome><outcome value='true'>
+<switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '' or $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name == '0'`"><outcome value='true'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome><outcome value='false'><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+
+<outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-name`" />
+</return></outcome><outcome value='not-found'>
+<set>
+<parameter name='tmp.usePreload' value='1' />
+</set></outcome></get-resource></outcome></switch></outcome></switch><switch test="`$tmp.usePreload == 0`"><outcome value='true'>
+<block>
+<switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+</set><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id != ''`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-id`" /></set></outcome><outcome value='false'>
+<switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $vnf-topology-operation-input.vnf-request-information.vnf-networks[$i].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></outcome></switch></for><switch test="`$tmp.usePreload == 1`"><outcome value='true'><block atomic="true">
+<get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="l3-network"
+ key="l3-network.network-name = $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name"
+ local-only="false"
+ pfx="tmp.AnAI.l3network">
+<outcome value='not-found'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'PRELOAD network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' not found in AnAI'`" />
+</return></outcome><outcome value='failure'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'Failed to query AnAI for l3-network with network-name = ' + $vnf-topology-operation-input.vnf-request-information.vnf-networks[$j].network-name`" />
+</return></outcome><outcome value='success'>
+<switch test="`$tmp.AnAI.l3network.network-id == ''`"><outcome value='true'><return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value="`'An error occurred while querying l3-network with network-name = ' + $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-name + ' , it is likely that there are more than one l3-newtork object with the same network-name in AnAI.'`" />
+</return></outcome></switch></outcome></get-resource><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''>
+<set>
+ <parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks_length" value = "0" /></set></outcome></switch><for index="k" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-role == $preload-data.vnf-topology-information.vnf-assignments.vnf-networks[$j].network-role`"><outcome value='true'>
+<block>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-name" value="`$tmp.AnAI.l3network.network-name`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].network-id" value="`$tmp.AnAI.l3network.network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].neutron-id" value="`$tmp.AnAI.l3network.neutron-network-id`" />
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].contrail-network-fqdn" value="`$tmp.AnAI.l3network.contrail-network-fqdn`" />
+
+</set><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id == ''`"><outcome value='true'>
+<switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id == ''`"><outcome value='true'>
+<switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name != ''`"><outcome value='true'>
+<switch test="`$tmp.AnAI.l3network.subnets.subnet_length != ''`"><outcome value='true'>
+<for index="i" start="0" end="`$tmp.AnAI.l3network.subnets.subnet_length`"><switch test="`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name == $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-name`"><outcome value='true'>
+<set>
+<parameter name="service-data.vnf-topology-information.vnf-assignments.vnf-networks[$k].ipv6-subnet-id" value="`$tmp.AnAI.l3network.subnets.subnet[$i].neutron-subnet-id`" /></set></outcome></switch></for></outcome></switch></outcome></switch></outcome></switch></block></outcome></switch></for></block></outcome></switch></block></block></for><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign.xml
new file mode 100644
index 00000000..50c2f0c2
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-assign.xml
@@ -0,0 +1,72 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-assign' mode='sync'>
+<block atomic="true"><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false"
+ pfx="tmp.AnAI.vfmodule" ><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'vf-module not found in AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome></get-resource><call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' ></call><switch test="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><outcome value=''><set>
+<parameter name='service-data.vnf-topology-information.vnf-assignments.vnf-networks_length' value='0' />
+</set></outcome></switch><for index="i" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ force="true"
+ local-only="false">
+
+ <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.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block atomic='true'><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error while saving vf-module l3-network relationship in AnAI with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`"/></return></block></outcome></save></for><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false" >
+ <parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
+<block atomic="true">
+<delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"></delete><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="Encountered error while updating vf-module orchestration-status in AnAI"/></return></block></outcome></update><set>
+ <parameter name="service-data.oper-status.order-status" value="PendingCreate"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changeassign.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changeassign.xml
new file mode 100644
index 00000000..68f1162f
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changeassign.xml
@@ -0,0 +1,100 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-changeassign' mode='sync'>
+<block atomic="true"><switch test="`$service-data.oper-status.order-status == Active`">
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid service-data order status'/></return></outcome></switch><call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' ></call><get-resource plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ and generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ local-only="false"
+ pfx="tmp.AnAI.vfmodule"><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome><outcome value='not-found'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/></return></outcome></get-resource><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"><outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'An error occurred while deleting existing vf-module l3-network relationship in AnAI with with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id + ' vf-module update FAILED.'`"/></return></outcome></delete><for index="i" start="0" end="`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ force="true"
+ local-only="false">
+
+ <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.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`" /><outcome value='failure'>
+<block>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`' | An error occurred while saving l3-network relationship with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id + ' for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`" />
+</set><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id
+ AND related-to = l3-network"
+ force="true"
+ local-only="false"></delete><for index="i" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship_length`"><switch test="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].related-to`"><outcome value='l3-network'><for index="j" start="0" end="`$tmp.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data_length`"><save plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id
+ AND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id"
+ force="true"
+ local-only="false">
+
+ <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.AnAI.vfmodule.relationship-list.relationship[$i].relationship-data[$j].relationship-value`" /><outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`" />
+</set></outcome><outcome value='not-found'>
+<set>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$error-message + ' | An error occurred while during rollback of l3-network relationship for vf-module with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`" />
+</set></outcome></save></for></outcome></switch></for><return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to update vf-module l3-network relationship in AnAI. ' + $error-message`"/></return></block></outcome></save></for><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="PendingUpdate"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changedelete.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changedelete.xml
new file mode 100644
index 00000000..6bb6392c
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-changedelete.xml
@@ -0,0 +1,53 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-changedelete' mode='sync'>
+<block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-id not found'/></return></outcome></switch><switch test="'$service-data.oper-status.order-status == Active'">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid last-order-status'/></return></outcome></switch><update plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="vnf-id = $vnf-topology-operation-input.vnf-request-information.vnf-id"
+ force="true"
+ local-only="false" >
+ <parameter name="orchestration-status" value="pending-delete" />
+</update><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="PendingDelete"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+ <parameter name="service-data." value="vnf-topology-operation-input." />
+</set><return status='success'>
+ <parameter name="error-code" value="200" />
+</return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-delete.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-delete.xml
new file mode 100644
index 00000000..31e61868
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-delete.xml
@@ -0,0 +1,74 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-delete' mode='sync'>
+<block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-id not found'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value='Other'>
+<switch test="`$service-data.oper-status.order-status == Active`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch></outcome><outcome value=''><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-clli`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Either aic-cloud-region or aic-clli must be present'/></return></outcome><outcome value='Other'>
+<block>
+<delete plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="generic-vnf-l3-network"
+ key="DELETE FROM GENERIC_VNF_L3_NETWORK WHERE vnf_id = $service-data.vnf-id"
+ force="true" >
+
+<outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource"/></set></outcome></delete><delete plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="generic-vnf-vserver"
+ key="DELETE FROM GENERIC_VNF_VSERVER where vnf_id = $service-data.vnf-id"
+ force="true" >
+
+<outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource"/></set></outcome></delete><delete plugin="org.openecomp.sdnc.sli.resource.sql.SqlResource"
+ resource="generic-vnf"
+ key="DELETE FROM GENERIC_VNF where vnf_id = $service-data.vnf-id"
+ local-only="true"
+ force="true" >
+
+<outcome value='failure'>
+<set>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occurred while deleting generic-vnf, generic-vnf-l3-netweork or generic-vnf-vserver from GammaResource"/></set></outcome></delete><delete plugin="org.openecomp.sdnc.sli.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $service-data.vnf-id"
+ local-only="false"
+ force="true" >
+
+<outcome value='failure'>
+<return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Failed to delete generic-vnf from AnAI with vnf-id = '+ $service-data.vnf-id`"/></return></outcome></delete></block></outcome></switch></outcome></switch><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+ <parameter name="service-data.vnf-topology-information." value="" />
+</set><set>
+<parameter name="ack-final" value="Y"/></set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-operation.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-operation.xml
new file mode 100644
index 00000000..8eea2a15
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-operation.xml
@@ -0,0 +1,131 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-operation' mode='sync'>
+<block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+<parameter name="field1" value="__TIMESTAMP__"/>
+<parameter name="field2" value="svc-topology-operation"/>
+<parameter name="field3" value="`$vnf-topology-operation-input.sdnc-request-header.svc-action`"/>
+<parameter name="field4" value="`$vnf-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+<parameter name="field5" value="`$vnf-topology-operation-input.service-information.service-instance-id`"/>
+<parameter name="field6" value="`$vnf-topology-operation-input.request-information.request-id`"/>
+<parameter name="field7" value="`$vnf-topology-operation-input.request-information.request-action`"/>
+<parameter name="field8" value="`$vnf-topology-operation-input.request-information.source`"/>
+<parameter name="field9" value="`$vnf-topology-operation-input.vnf-request-information.vnf-name`"/>
+<parameter name="field10" value="`$vnf-topology-operation-input.vnf-request-information.vnf-type`"/>
+<parameter name="field11" value="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"/>
+<parameter name="field12" value="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"/>
+<parameter name="field13" value="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"/>
+<parameter name="field14" value="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"/>
+<parameter name="field15" value="`$vnf-topology-operation-input.vnf-request-information.tenant`"/>
+<parameter name="field16" value="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`"/>
+<parameter name="field17" value="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`"/>
+<parameter name="field18" value="`$preload-data.oper-status.order-status`"/></record><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-name`"><outcome value='Other'><switch test="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`"><outcome value='Other'><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-name == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-name`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='request.vnf-name not found in preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-name'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-name is required'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-type`"><outcome value='Other'><switch test="`$preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`"><outcome value='Other'><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-type == $preload-data.vnf-topology-information.vnf-topology-identifier.vnf-type`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='request.vnf-type not found in preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='No preload data found to match vnf-type'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vnf-type is required'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-modules vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='vf-modules vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.sdnc-request-header.svc-action`">
+<!--
+leaf svc-action {
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate"; // equal to commit
+ enum "delete"; // equal to commit
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ }
+}
+-->
+
+<outcome value='assign'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-assign' mode='sync' ></call></block></outcome><outcome value='changeassign'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-changeassign' mode='sync' ></call></block></outcome><outcome value='activate'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-activate' mode='sync' ></call></block></outcome><outcome value='rollback'><block>
+<block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-id`"><outcome value='0'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-name`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-name cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.generic-vnf-type`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='generic-vnf-type cannot be NULL'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch></block><call module='VNF-API' rpc='vnf-topology-rollback' mode='sync' ></call></block></outcome><outcome value='changedelete'><block atomic="true">
+<switch test="`$vnf-topology-operation-input.vnf-request-information.aic-cloud-region`"><outcome value='other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/></return></outcome></switch><switch test="`$vnf-topology-operation-input.vnf-request-information.aic-clli`"><outcome value=''><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='aic-cloud-region can not be present for 1604 VNF changedelete'/></return></outcome></switch><call module='VNF-API' rpc='vnf-topology-changedelete' mode='sync' ></call></block></outcome><outcome value='delete'><call module='VNF-API' rpc='vnf-topology-delete' mode='sync' ></call></outcome><outcome value='Other'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='svc-action not recognized'/>
+</return></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-rollback.xml b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-rollback.xml
new file mode 100644
index 00000000..17245028
--- /dev/null
+++ b/platform-logic/vnfapi/src/main/xml/dg-vnf-topology-rollback.xml
@@ -0,0 +1,46 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc='vnf-topology-rollback' mode='sync'>
+<block atomic="true"><switch test="`$service-data.oper-status.order-status == PendingCreate`">
+
+<!--
+leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "Deleted";
+ }
+}
+--><outcome value='true'><block atomic="true"><switch test="`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`"><outcome value='false'>
+<return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value="`'vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' not found in config tree'`"/></return></outcome></switch><switch test="`$service-data.oper-status.order-status == PendingCreate`"><outcome value='false'><return status='failure'>
+ <parameter name='error-code' value='400'/>
+ <parameter name='error-message' value='Invalid order-status'/></return></outcome></switch><set>
+ <parameter name="service-data.oper-status.last-order-status" value="`$service-data.oper-status.order-status`"/></set><set>
+ <parameter name="service-data.oper-status.order-status" value="Deleted"/></set><set>
+ <parameter name="service-data.oper-status.last-action" value="`$service-data.request-information.request-action`"/></set><set>
+ <parameter name="service-data." value="" />
+</set><return status='success'>
+ <parameter name="error-code" value="200" /></return></block></outcome></switch></block></method></service-logic>