From 7155b808084ff6e49f6eef01ac7defd9a7754a3a Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Mon, 27 May 2019 08:03:27 +0200 Subject: [PATCH] InventoryNames in ansible adapter fixed This change fixes support for InventoryNames parameter in LCM request going to Ansible server. Also ansible adapter DG has been modified to consider new parameter added Change-Id: I68aa8efa34b79ef2f669d81563510fea7bb0a730 Signed-off-by: Lukasz Rajewski Issue-ID: APPC-1612 --- .../ansible/model/AnsibleMessageParser.java | 2 +- .../json/APPC/APPC_ansible-adapter-1.0.json | 188 ++++++++++----------- 2 files changed, 92 insertions(+), 98 deletions(-) diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleMessageParser.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleMessageParser.java index 78c33b3e3..0e0b89397 100644 --- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleMessageParser.java +++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleMessageParser.java @@ -84,7 +84,7 @@ public class AnsibleMessageParser { public JSONObject reqMessage(Map params) throws APPCException { final String[] mandatoryTestParams = { AGENT_URL_KEY, PLAYBOOK_NAME_KEY, USER_KEY, PASS_KEY }; final String[] optionalTestParams = { ENV_PARAMETERS_OPT_KEY, NODE_LIST_OPT_KEY, LOCAL_PARAMETERS_OPT_KEY, - TIMEOUT_OPT_KEY, VERSION_OPT_KEY, FILE_PARAMETERS_OPT_KEY, ACTION_OPT_KEY }; + TIMEOUT_OPT_KEY, VERSION_OPT_KEY, FILE_PARAMETERS_OPT_KEY, ACTION_OPT_KEY, INVENTORY_NAMES_OPT_KEY }; JSONObject jsonPayload = new JSONObject(); diff --git a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_ansible-adapter-1.0.json b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_ansible-adapter-1.0.json index ec7151a8c..838c8c467 100644 --- a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_ansible-adapter-1.0.json +++ b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_ansible-adapter-1.0.json @@ -1,22 +1,22 @@ [ { - "id": "d048ba2a.84e2f8", + "id": "7bf7da57.3da1c4", "type": "method", "name": "ansible-adapter-1.0", "xml": "\n", "comments": "", "outputs": 1, - "x": 477.6999816894531, - "y": 230.8833348751068, - "z": "7d7da29a.2b7398", + "x": 364, + "y": 69, + "z": "b542ee98.8e312", "wires": [ [ - "13d8bcd3.33755f" + "16608a2e.c8019e" ] ] }, { - "id": "750a91a2.96947", + "id": "51e78fba.f0a328", "type": "service-logic", "name": "APPC 2.0.1", "module": "APPC", @@ -24,213 +24,207 @@ "comments": "", "xml": "", "outputs": 1, - "x": 268.6999816894531, - "y": 308.8833348751068, - "z": "7d7da29a.2b7398", + "x": 155, + "y": 147, + "z": "b542ee98.8e312", "wires": [ [ - "d048ba2a.84e2f8" + "7bf7da57.3da1c4" ] ] }, { - "id": "53079a4f.559f84", + "id": "8d1e806.c53808", "type": "returnFailure", "name": "return failure", - "xml": "\n\n\n\n\n\n", "comments": "", - "x": 1218.6999816894531, - "y": 669.8833348751068, - "z": "7d7da29a.2b7398", + "x": 1122.142822265625, + "y": 67.99999237060547, + "z": "b542ee98.8e312", "wires": [] }, { - "id": "13d8bcd3.33755f", + "id": "16608a2e.c8019e", "type": "execute", "name": "execute", - "xml": "\n\n \n \n \n \n \n \n \n \n", + "xml": "\n\n \n \n \n \n \n \n \n \n \n \n \n", "comments": "", "outputs": 1, - "x": 682.6999816894531, - "y": 228.8833348751068, - "z": "7d7da29a.2b7398", + "x": 569, + "y": 67, + "z": "b542ee98.8e312", "wires": [ [ - "237110e5.33ae38", - "fe1ba4a5.cd6b68" + "d9cc3d9f.aac2d8", + "14bd2fff.6686e8" ] ] }, { - "id": "30b13fff.531b44", + "id": "ba12f2b.bdd719", "type": "switchNode", "name": "switch", "xml": "\n", "comments": "", "outputs": 1, - "x": 472.6999816894531, - "y": 389.8833348751068, - "z": "7d7da29a.2b7398", + "x": 359, + "y": 228, + "z": "b542ee98.8e312", "wires": [ [ - "f58c4f93.2bcb6", - "66fbd51d.685a14", - "c8a28d7.c69dd3" + "be58dd22.f76ca8", + "9a080acd.94f5a8" ] ] }, { - "id": "f58c4f93.2bcb6", + "id": "be58dd22.f76ca8", "type": "other", "name": "outcome", "xml": "\n", "comments": "", "outputs": 1, - "x": 659.6999816894531, - "y": 389.8833348751068, - "z": "7d7da29a.2b7398", + "x": 546, + "y": 228, + "z": "b542ee98.8e312", "wires": [ [ - "53079a4f.559f84" + "dae941c0.963348" ] ] }, { - "id": "66fbd51d.685a14", + "id": "9a080acd.94f5a8", "type": "other", "name": "outcome", "xml": "\n", "comments": "", "outputs": 1, - "x": 296.6999816894531, - "y": 477.8833348751068, - "z": "7d7da29a.2b7398", + "x": 183, + "y": 316, + "z": "b542ee98.8e312", "wires": [ [ - "daab3eeb.acc3e8" + "9e3bd7b.ca9e528" ] ] }, { - "id": "daab3eeb.acc3e8", + "id": "9e3bd7b.ca9e528", "type": "execute", "name": "execute", "xml": "\n \n \n \n \n \n \n", "comments": "", "outputs": 1, - "x": 474.6999816894531, - "y": 476.8833348751068, - "z": "7d7da29a.2b7398", + "x": 361, + "y": 315, + "z": "b542ee98.8e312", "wires": [ [ - "415101d2.f995cc", - "98312eaf.163de8" + "abbb14c.b93d5e8", + "976d4e79.c90208" ] ] }, { - "id": "237110e5.33ae38", + "id": "d9cc3d9f.aac2d8", "type": "failure", "name": "failure", "xml": "\n", "comments": "", "outputs": 1, - "x": 936.6999816894531, - "y": 229.8833348751068, - "z": "7d7da29a.2b7398", + "x": 823, + "y": 68, + "z": "b542ee98.8e312", "wires": [ [ - "53079a4f.559f84" + "8d1e806.c53808" ] ] }, { - "id": "fe1ba4a5.cd6b68", + "id": "14bd2fff.6686e8", "type": "other", "name": "other", "xml": "\n", "comments": "", "outputs": 1, - "x": 295.6999816894531, - "y": 390.8833348751068, - "z": "7d7da29a.2b7398", + "x": 182, + "y": 229, + "z": "b542ee98.8e312", "wires": [ [ - "30b13fff.531b44" + "ba12f2b.bdd719" ] ] }, { - "id": "415101d2.f995cc", + "id": "abbb14c.b93d5e8", "type": "failure", "name": "failure", "xml": "\n", "comments": "", "outputs": 1, - "x": 664.6999816894531, - "y": 477.8833348751068, - "z": "7d7da29a.2b7398", + "x": 551, + "y": 316, + "z": "b542ee98.8e312", "wires": [ [ - "53079a4f.559f84" + "dae941c0.963348" ] ] }, { - "id": "c8a28d7.c69dd3", - "type": "other", - "name": "outcome", - "xml": "\n", + "id": "976d4e79.c90208", + "type": "success", + "name": "success", + "xml": "\n", "comments": "", "outputs": 1, - "x": 283.6999816894531, - "y": 670.8833348751068, - "z": "7d7da29a.2b7398", + "x": 549, + "y": 385, + "z": "b542ee98.8e312", "wires": [ [ - "53079a4f.559f84" + "46cf1c4a.fd5ebc" ] ] }, { - "id": "98312eaf.163de8", - "type": "success", - "name": "success", - "xml": "\n", - "comments": "", + "id": "fd6d2e88.86c9a", + "type": "dgstart", + "name": "DGSTART", "outputs": 1, - "x": 662.6999816894531, - "y": 546.8833348751068, - "z": "7d7da29a.2b7398", + "x": 133, + "y": 47, + "z": "b542ee98.8e312", "wires": [ [ - "2c831d15.81b10a" + "51e78fba.f0a328" ] ] }, { - "id": "2c831d15.81b10a", - "type": "returnSuccess", - "name": "return success", - "xml": "\n\n\n\n\n", + "id": "dae941c0.963348", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\n\n\n", "comments": "", - "x": 814.6999816894531, - "y": 621.8833348751068, - "z": "7d7da29a.2b7398", + "x": 1126.7855224609375, + "y": 328.2143249511719, + "z": "b542ee98.8e312", "wires": [] }, { - "id": "f6dd55b0.6ce568", - "type": "dgstart", - "name": "DGSTART", - "outputs": 1, - "x": 246.69998168945312, - "y": 208.8833348751068, - "z": "7d7da29a.2b7398", - "wires": [ - [ - "750a91a2.96947" - ] - ] + "id": "46cf1c4a.fd5ebc", + "type": "set", + "name": "set", + "xml": "\n\n\n\n", + "comments": "", + "x": 1106.78564453125, + "y": 479.64276123046875, + "z": "b542ee98.8e312", + "wires": [] } -] +] \ No newline at end of file -- 2.16.6