From 1a6b55f1548c099456bfb72cf4181ea783932b08 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Mon, 27 Aug 2018 17:02:42 -0400 Subject: Add DG for self serve ip assign/unassign (netbox) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch also adds the new capability in the capability list of the generic self-serve assign / unassign. Change-Id: Id7e1f061038c0a5caa52ba41f1fcc3e08e5f02a2 Issue-ID: CCSDK-339 Issue-ID: CCSDK-340 Signed-off-by: Alexis de Talhouët Former-commit-id: a51e4453ebe80eec9688e587e34ce480e67adb1d --- ...SOURCE-API_self-serve-netbox-ip-assignment.json | 928 +++++++++++++++++++++ ...C-RESOURCE-API_self-serve-vf-module-assign.json | 2 +- ...RESOURCE-API_self-serve-vf-module-unassign.json | 2 +- 3 files changed, 930 insertions(+), 2 deletions(-) create mode 100644 platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-netbox-ip-assignment.json (limited to 'platform-logic/generic-resource-api/src/main') diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-netbox-ip-assignment.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-netbox-ip-assignment.json new file mode 100644 index 00000000..98ffc8a7 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-netbox-ip-assignment.json @@ -0,0 +1,928 @@ +[ + { + "id": "d82ababf.4deaf", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 112, + "y": 59, + "z": "158dead5.f2086d", + "wires": [ + [ + "514957da.088018" + ] + ] + }, + { + "id": "5c4ab99.de900c8", + "type": "method", + "name": "method self-serve-netbox-ip-assignment", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 247.7857208251953, + "y": 116.1269884109497, + "z": "158dead5.f2086d", + "wires": [ + [ + "ad092d5.0a569d" + ] + ] + }, + { + "id": "ad092d5.0a569d", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 141.32144165039062, + "y": 202.4286069869995, + "z": "158dead5.f2086d", + "wires": [ + [ + "b3535f37.0a7d5", + "cf52bd4f.68ddb", + "acedbb53.5c913" + ] + ] + }, + { + "id": "514957da.088018", + "type": "service-logic", + "name": "GENERIC-RESOURCE-API ${project.version}", + "module": "GENERIC-RESOURCE-API", + "version": "${project.version}", + "comments": "", + "xml": "", + "outputs": 1, + "x": 384.8571472167969, + "y": 58.42856693267822, + "z": "158dead5.f2086d", + "wires": [ + [ + "5c4ab99.de900c8" + ] + ] + }, + { + "id": "b3535f37.0a7d5", + "type": "switchNode", + "name": "switch: ss.capability-name", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 375.75000762939453, + "y": 203.75000476837158, + "z": "158dead5.f2086d", + "wires": [ + [ + "4c0e104c.c8992" + ] + ] + }, + { + "id": "4c0e104c.c8992", + "type": "outcome", + "name": "NULL", + "xml": "", + "outputs": 1, + "x": 600.7500305175781, + "y": 204.2500033378601, + "z": "158dead5.f2086d", + "wires": [ + [ + "3e59422c.56b57e" + ] + ] + }, + { + "id": "3e59422c.56b57e", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\t\n\t\n\t\n", + "comments": "", + "x": 760.6667022705078, + "y": 204.361102104187, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "cf52bd4f.68ddb", + "type": "switchNode", + "name": "switch: ss.capability-action", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 377.00002670288086, + "y": 253.75000524520874, + "z": "158dead5.f2086d", + "wires": [ + [ + "5c7f0bf6.ffeef4", + "8699e334.7ba04", + "aeaaa4c.eb96958" + ] + ] + }, + { + "id": "5c7f0bf6.ffeef4", + "type": "outcome", + "name": "NULL", + "xml": "", + "comments": "", + "outputs": 1, + "x": 600.5000228881836, + "y": 254.00000524520874, + "z": "158dead5.f2086d", + "wires": [ + [ + "e43d474e.c67e6" + ] + ] + }, + { + "id": "e43d474e.c67e6", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\t\n\t\n\t\n", + "comments": "", + "x": 760.4166946411133, + "y": 254.11110401153564, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "8699e334.7ba04", + "type": "outcome", + "name": "assign", + "xml": "", + "comments": "", + "outputs": 1, + "x": 599.2500190734863, + "y": 309.00000858306885, + "z": "158dead5.f2086d", + "wires": [ + [ + "aec36890.ff2fb" + ] + ] + }, + { + "id": "aeaaa4c.eb96958", + "type": "outcome", + "name": "unassign", + "xml": "", + "comments": "", + "outputs": 1, + "x": 599.1786499023438, + "y": 1120.642822265625, + "z": "158dead5.f2086d", + "wires": [ + [ + "56d47025.86d16" + ] + ] + }, + { + "id": "f70a5fa0.d247d", + "type": "call", + "name": "call self-service-capability-param-resolution", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1090.6666870117188, + "y": 309.2500123977661, + "z": "158dead5.f2086d", + "wires": [ + [ + "14ec23cb.75b09c" + ] + ] + }, + { + "id": "14ec23cb.75b09c", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1340.6666679382324, + "y": 309.25000858306885, + "z": "158dead5.f2086d", + "wires": [ + [ + "7c50a969.b62318" + ] + ] + }, + { + "id": "7c50a969.b62318", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\t\n\t\n\t\n", + "comments": "", + "x": 1499.416648864746, + "y": 309.2500047683716, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "1843f01b.23ada8", + "type": "set", + "name": "set tmp.ss.param.capability-name", + "xml": "\n\n", + "comments": "", + "x": 1504.5634536743164, + "y": 365.03172874450684, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "a2dda04a.43ae58", + "type": "for", + "name": "for pidx in param_length", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1214.7776794433594, + "y": 365.10319900512695, + "z": "158dead5.f2086d", + "wires": [ + [ + "943c092c.4b3b3", + "1843f01b.23ada8" + ] + ] + }, + { + "id": "943c092c.4b3b3", + "type": "switchNode", + "name": "switch: capability-name - ss vs param", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1516.5276794433594, + "y": 408.6032028198242, + "z": "158dead5.f2086d", + "wires": [ + [ + "740fdfdc.63143" + ] + ] + }, + { + "id": "740fdfdc.63143", + "type": "outcomeTrue", + "name": "true", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1755.277687072754, + "y": 408.3532028198242, + "z": "158dead5.f2086d", + "wires": [ + [ + "ff105b45.f52f4" + ] + ] + }, + { + "id": "32fe15e5.a7bf9a", + "type": "switchNode", + "name": "switch: resource-key[].name", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1520.5081405639648, + "y": 498.1706771850586, + "z": "158dead5.f2086d", + "wires": [ + [ + "318167f.d597118", + "f4971b35.f262", + "dfc56a05.e2c65", + "c64f6887.de64e" + ] + ] + }, + { + "id": "dfc56a05.e2c65", + "type": "outcome", + "name": "service-instance-id", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1791.8970489501953, + "y": 497.64289569854736, + "z": "158dead5.f2086d", + "wires": [ + [ + "d9a882de.1d6658" + ] + ] + }, + { + "id": "d9a882de.1d6658", + "type": "set", + "name": "set tmp.ss.service-instance-id", + "xml": "\n\n", + "comments": "", + "x": 2058.1470489501953, + "y": 497.39289569854736, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "318167f.d597118", + "type": "outcome", + "name": "client-key", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1767.4804229736328, + "y": 633.7817506790161, + "z": "158dead5.f2086d", + "wires": [ + [ + "bb45bf6b.de9f78" + ] + ] + }, + { + "id": "bb45bf6b.de9f78", + "type": "set", + "name": "set tmp.ss.client-key", + "xml": "\n\n", + "comments": "", + "x": 2036.4804229736328, + "y": 633.7817506790161, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "f7c84a6b.9d9108", + "type": "set", + "name": "set service-data...param[].value = ip-prefix", + "xml": "\n\n", + "comments": "", + "x": 2028.500015258789, + "y": 907, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "73427b92.9bde0c", + "type": "for", + "name": "for pidx in param_length", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1033.7142333984375, + "y": 906.8214111328125, + "z": "158dead5.f2086d", + "wires": [ + [ + "3466ae83.83e262" + ] + ] + }, + { + "id": "3466ae83.83e262", + "type": "switchNode", + "name": "switch: param[].name", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1281.7142333984375, + "y": 906.5714111328125, + "z": "158dead5.f2086d", + "wires": [ + [ + "870cd21d.8e341" + ] + ] + }, + { + "id": "870cd21d.8e341", + "type": "outcome", + "name": "ip-address", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1526.249984741211, + "y": 906.7499847412109, + "z": "158dead5.f2086d", + "wires": [ + [ + "52f0e6b1.b33288" + ] + ] + }, + { + "id": "52f0e6b1.b33288", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1757.5000114440918, + "y": 906.75, + "z": "158dead5.f2086d", + "wires": [ + [ + "f7c84a6b.9d9108", + "3f62b174.894c0e" + ] + ] + }, + { + "id": "b7977f7d.8ce65", + "type": "update", + "name": "get-resource NETBOX_IP_ASSIGNMENTS", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1077.6785888671875, + "y": 1120.892822265625, + "z": "158dead5.f2086d", + "wires": [ + [ + "f72ccdef.62b18", + "8dd46bd6.87c01" + ] + ] + }, + { + "id": "f72ccdef.62b18", + "type": "not-found", + "name": "not-found", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1369.250057220459, + "y": 1120.46426653862, + "z": "158dead5.f2086d", + "wires": [ + [ + "7de1e772.abc858" + ] + ] + }, + { + "id": "7de1e772.abc858", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1539.3928658621653, + "y": 1120.8928443363734, + "z": "158dead5.f2086d", + "wires": [ + [] + ] + }, + { + "id": "8dd46bd6.87c01", + "type": "success", + "name": "success", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1365.9642028808594, + "y": 1168.1785793304443, + "z": "158dead5.f2086d", + "wires": [ + [ + "87ae6929.f38048" + ] + ] + }, + { + "id": "56d47025.86d16", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "outputs": 1, + "x": 768.5000152587891, + "y": 1121.107177734375, + "z": "158dead5.f2086d", + "wires": [ + [ + "c62e6e8f.bfa43", + "b7977f7d.8ce65", + "684ada9c.20cdbc" + ] + ] + }, + { + "id": "aec36890.ff2fb", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 772.0000305175781, + "y": 309.25000953674316, + "z": "158dead5.f2086d", + "wires": [ + [ + "f70a5fa0.d247d", + "c62e6e8f.bfa43", + "73427b92.9bde0c" + ] + ] + }, + { + "id": "ff105b45.f52f4", + "type": "break", + "name": "break", + "xml": "\n", + "comments": "", + "x": 1893.6745948791504, + "y": 407.670615196228, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "999294fe.a69638", + "type": "for", + "name": "for kidx in resource-key_length", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1241.3692169189453, + "y": 498.03178787231445, + "z": "158dead5.f2086d", + "wires": [ + [ + "32fe15e5.a7bf9a" + ] + ] + }, + { + "id": "c62e6e8f.bfa43", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 980.0357055664062, + "y": 365.2261657714844, + "z": "158dead5.f2086d", + "wires": [ + [ + "a2dda04a.43ae58", + "999294fe.a69638", + "72366483.e4dd0c", + "93e0546d.de75b" + ] + ] + }, + { + "id": "acedbb53.5c913", + "type": "execute", + "name": "printContext", + "xml": "\n\n", + "comments": "", + "outputs": 1, + "x": 333.25000762939453, + "y": 419.0000066757202, + "z": "158dead5.f2086d", + "wires": [ + [] + ] + }, + { + "id": "4e153620.e3c8d", + "type": "update", + "name": "update NETBOX_IP_ASSIGNMENTS to PENDING_DELETE...", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1899.2262420654297, + "y": 1212.3929681777954, + "z": "158dead5.f2086d", + "wires": [ + [ + "3ca10d66.8e421a" + ] + ] + }, + { + "id": "59682f69.8b602", + "type": "set", + "name": "set status = PENDING_DELETE", + "xml": "\n\n", + "comments": "", + "x": 1808.7262344360352, + "y": 1169.476219177246, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "3ca10d66.8e421a", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 2205.2261505126953, + "y": 1211.7262678146362, + "z": "158dead5.f2086d", + "wires": [ + [ + "a79b0cd6.ba9dc" + ] + ] + }, + { + "id": "a79b0cd6.ba9dc", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\t\n\t\n \n", + "comments": "", + "outputs": 1, + "x": 2070.892837524414, + "y": 1257.392954826355, + "z": "158dead5.f2086d", + "wires": [ + [ + "6b5c8b96.1eb51c" + ] + ] + }, + { + "id": "6b5c8b96.1eb51c", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\t\n\t\n \n", + "comments": "", + "outputs": 1, + "x": 1166.2857360839844, + "y": 443.6428413391113, + "z": "158dead5.f2086d", + "wires": [ + [] + ] + }, + { + "id": "f4971b35.f262", + "type": "outcome", + "name": "vf-module-id", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1773.7300567626953, + "y": 543.8928346633911, + "z": "158dead5.f2086d", + "wires": [ + [ + "e7bc24a5.2b1688" + ] + ] + }, + { + "id": "e7bc24a5.2b1688", + "type": "set", + "name": "set tmp.ss.vf-module-id", + "xml": "\n\n", + "comments": "", + "x": 2039.7301788330078, + "y": 543.8928346633911, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "684ada9c.20cdbc", + "type": "for", + "name": "for pidx in param_length", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1035.9285888671875, + "y": 1359.7142124176025, + "z": "158dead5.f2086d", + "wires": [ + [ + "c9290a31.bc6ba" + ] + ] + }, + { + "id": "c9290a31.bc6ba", + "type": "switchNode", + "name": "switch: param[].name", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1283.9285888671875, + "y": 1359.4642124176025, + "z": "158dead5.f2086d", + "wires": [ + [ + "b44fcfdb.b21448" + ] + ] + }, + { + "id": "b44fcfdb.b21448", + "type": "outcome", + "name": "ip-address", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1528.464340209961, + "y": 1359.642786026001, + "z": "158dead5.f2086d", + "wires": [ + [ + "885816c2.0cf518" + ] + ] + }, + { + "id": "885816c2.0cf518", + "type": "set", + "name": "set resource-resolution-data.status = DELETED", + "xml": "\n\n", + "comments": "", + "x": 1850.6429443359375, + "y": 1359.857177734375, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "c64f6887.de64e", + "type": "outcome", + "name": "prefix-id", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1762.7857208251953, + "y": 588.1428651809692, + "z": "158dead5.f2086d", + "wires": [ + [ + "5e015d1e.a95ec4" + ] + ] + }, + { + "id": "5e015d1e.a95ec4", + "type": "set", + "name": "set prefix-id", + "xml": "\n\n", + "comments": "", + "x": 2009.2857208251953, + "y": 588.3928346633911, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "93e0546d.de75b", + "type": "execute", + "name": "execute NetboxClient assignIpAddress", + "xml": "", + "comments": "", + "outputs": 1, + "x": 1259.285903930664, + "y": 713.3928346633911, + "z": "158dead5.f2086d", + "wires": [ + [ + "a3087de2.330a5" + ] + ] + }, + { + "id": "a3087de2.330a5", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1514.2858428955078, + "y": 713.3928346633911, + "z": "158dead5.f2086d", + "wires": [ + [ + "c5dacbf8.86fe78" + ] + ] + }, + { + "id": "c5dacbf8.86fe78", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 1684.2858428955078, + "y": 713.3928346633911, + "z": "158dead5.f2086d", + "wires": [ + [ + "1f126d73.fa4e23", + "f3e9ed8c.ec8d78" + ] + ] + }, + { + "id": "1f126d73.fa4e23", + "type": "set", + "name": "set resource-resolution-data.status = FAILED", + "xml": "\n\n", + "comments": "", + "x": 1999.2858428955078, + "y": 713.3928346633911, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "f3e9ed8c.ec8d78", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\n\n", + "comments": "", + "x": 1914.2857208251953, + "y": 778.3928346633911, + "z": "158dead5.f2086d", + "wires": [] + }, + { + "id": "3f62b174.894c0e", + "type": "set", + "name": "set resource-resolution-data.status = SUCCESS", + "xml": "\n\n", + "comments": "", + "x": 2048.75, + "y": 963.75, + "z": "158dead5.f2086d", + "wires": [] + } +] \ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-assign.json index f1766b7d..e86889a7 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-assign.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-assign.json @@ -152,7 +152,7 @@ "id": "6175d91c.80a228", "type": "set", "name": "set ss.capability.execution-order[]", - "xml": "\n\n\n\n\n\n\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n\n\n\n\n\n", "comments": "", "x": 415.91666412353516, "y": 1216.9286432266235, diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json index 54b6a594..51d9b3c0 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json @@ -282,7 +282,7 @@ "id": "669839ba.56b488", "type": "set", "name": "set ss.capability.execution-order[]", - "xml": "\n\n\n\n\n\n\n", + "xml": "\n\n\n\n\n\n\n\n", "comments": "", "x": 434.25003814697266, "y": 160.50000381469727, -- cgit 1.2.3-korg