aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2019-05-22 16:00:08 +0200
committerLukasz Rajewski <lukasz.rajewski@orange.com>2019-05-22 16:01:25 +0200
commit8f397a4c22050bd76262c90a0739cad0ef89d989 (patch)
treeb09c553532dbeeaceb978a31a9a4451e3eb29c8e
parentf99c213c3bd266a0145093020ca08200daaf3b67 (diff)
Fix for support of InventoryNames
This change addes support for InventoryNames parameter in LCM request going to Ansible server Change-Id: I9aea0b5407460d5dc0b2691e73ba795f8fe2af15 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Issue-ID: APPC-1612
-rw-r--r--appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleMessageParser.java2
-rw-r--r--appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_Generic_AnsibleDG.json6
2 files changed, 5 insertions, 3 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 0b4a6bdfe..78c33b3e3 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
@@ -64,6 +64,7 @@ public class AnsibleMessageParser {
private static final String NODE_LIST_OPT_KEY = "NodeList";
private static final String TIMEOUT_OPT_KEY = "Timeout";
private static final String VERSION_OPT_KEY = "Version";
+ private static final String INVENTORY_NAMES_OPT_KEY = "InventoryNames";
private static final String ACTION_OPT_KEY = "Action";
private static final String OUTPUT_OPT_KEY = "Output";
private static final String JSON_ERROR_MESSAGE = "JSONException: Error parsing response";
@@ -303,6 +304,7 @@ public class AnsibleMessageParser {
break;
case VERSION_OPT_KEY:
+ case INVENTORY_NAMES_OPT_KEY:
jsonPayload.put(key, payload);
break;
diff --git a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_Generic_AnsibleDG.json b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_Generic_AnsibleDG.json
index e8bd2b584..e89142c08 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_Generic_AnsibleDG.json
+++ b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_Generic_AnsibleDG.json
@@ -146,7 +146,7 @@
"id": "92d97097.efde08",
"type": "execute",
"name": "execute Convert payload to DG Context ",
- "xml": "<execute plugin=\"org.onap.sdnc.config.generator.convert.ConvertNode\" method=\"convertJson2DGContext\">\n<parameter name=\"jsonData\" value=\"`$tmp.merge.mergedData`\" />\n<parameter name=\"isEscaped\" value=\"Y\" />\n<parameter name=\"blockKeys\" value=\"EnvParameters,PlaybookName,Timeout,NodeList,FileParameters\" />\n<parameter name=\"responsePrefix\" value=\"tmp.convertnode\" />",
+ "xml": "<execute plugin=\"org.onap.sdnc.config.generator.convert.ConvertNode\" method=\"convertJson2DGContext\">\n<parameter name=\"jsonData\" value=\"`$tmp.merge.mergedData`\" />\n<parameter name=\"isEscaped\" value=\"Y\" />\n<parameter name=\"blockKeys\" value=\"EnvParameters,PlaybookName,Timeout,NodeList,FileParameters,InventoryNames\" />\n<parameter name=\"responsePrefix\" value=\"tmp.convertnode\" />",
"comments": "",
"outputs": 1,
"x": 612.6145477294922,
@@ -163,7 +163,7 @@
"id": "b26ef86f.518fa8",
"type": "set",
"name": "set Payload params ",
- "xml": "<set>\n<parameter name='PlaybookName' value='`$PlaybookName`' />\n<parameter name='NodeList' value='`$NodeList`'/>\n<parameter name='vnf_id' value='`$vnf-id`' />\n<parameter name='AgentUrl' value='`$url`'/>\n <parameter name='User' value='`$user`'/>\n <parameter name='Password' value='`$password`'/>\n <parameter name='EnvParameters' value='`$EnvParameters`'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n <parameter name='FileParameters' value='`$FileParameters`'/>\n\n\n\n",
+ "xml": "<set>\n<parameter name='PlaybookName' value='`$PlaybookName`' />\n<parameter name='NodeList' value='`$NodeList`'/>\n<parameter name='vnf_id' value='`$vnf-id`' />\n<parameter name='AgentUrl' value='`$url`'/>\n <parameter name='User' value='`$user`'/>\n <parameter name='Password' value='`$password`'/>\n <parameter name='EnvParameters' value='`$EnvParameters`'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n <parameter name='InventoryNames' value='`$InventoryNames`'/>\n <parameter name='FileParameters' value='`$FileParameters`'/>\n\n\n\n",
"comments": "",
"x": 463.9220733642578,
"y": 592.0113525390625,
@@ -329,7 +329,7 @@
"id": "833c47f4.4e765",
"type": "set",
"name": "set Payload params ",
- "xml": "<set>\n<parameter name='PlaybookName' value='`$block_PlaybookName`' />\n<parameter name='NodeList' value ='`$block_NodeList`'/>\n<parameter name='vnf_id' value='`$vnf-id`' />\n<parameter name='EnvParameters' value='`$block_EnvParameters`'/>\n<parameter name='Timeout' value='`$block_Timeout`'/>\n<parameter name='FileParameters' value='`$block_FileParameters`'/>\n\n\n\n",
+ "xml": "<set>\n<parameter name='PlaybookName' value='`$block_PlaybookName`' />\n<parameter name='NodeList' value ='`$block_NodeList`'/>\n<parameter name='vnf_id' value='`$vnf-id`' />\n<parameter name='EnvParameters' value='`$block_EnvParameters`'/>\n<parameter name='Timeout' value='`$block_Timeout`'/>\n<parameter name='InventoryNames' value='`$block_InventoryNames`'/>\n<parameter name='FileParameters' value='`$block_FileParameters`'/>\n\n\n\n",
"comments": "",
"x": 612.4444732666016,
"y": 189.22222900390625,