aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorzm330 <zhangminyj@chinamobile.com>2019-05-07 00:07:22 +0800
committerzm330 <zhangminyj@chinamobile.com>2019-05-07 16:21:07 +0800
commit5595d82ee5120b863a833e1e45b262d80f7dc6a1 (patch)
treef0b852e367b4f83083595e7b6ed4d0eb0398b14f /adapters
parent7af16eec7a5ea196de57b47b918d3d88390a715c (diff)
Update the format of resourceInput
Save format when resource is list type e.g. {key2:[vf_prop_list,INDEX,key]|default} Issue-ID: SO-1393 Change-Id: Ibb5e7bb31114fa3bbd7a3e1af5f2152a98941a4b Signed-off-by: zm330 <zhangminyj@chinamobile.com>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcs.java4
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcsTest.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcs.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcs.java
index 0bf82fd8b7..dc73fe904d 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcs.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcs.java
@@ -35,7 +35,8 @@ public class QueryVnfcs extends CatalogQuery {
+ "\t\t\t\"modelUuid\" : <MODEL_UUID>,\n"
+ "\t\t\t\"modelInvariantUuid\" : <MODEL_INVARIANT_ID>,\n"
+ "\t\t\t\"modelVersion\" : <MODEL_VERSION>,\n"
- + "\t\t\t\"modelCustomizationUuid\" : <MODEL_CUSTOMIZATION_UUID>\n" + "\t\t}" + "\t}";
+ + "\t\t\t\"modelCustomizationUuid\" : <MODEL_CUSTOMIZATION_UUID>\n" + "\t\t},\n"
+ + "\t\t\"resourceInput\" : <RESOURCE_INPUT>\n" + "\t}";
public QueryVnfcs() {
super();
@@ -104,6 +105,7 @@ public class QueryVnfcs extends CatalogQuery {
put(valueMap, "MODEL_INVARIANT_ID", o.getModelInvariantUUID());
put(valueMap, "MODEL_VERSION", o.getModelVersion());
put(valueMap, "MODEL_CUSTOMIZATION_UUID", o.getModelCustomizationUUID());
+ put(valueMap, "RESOURCE_INPUT", o.getResourceInput());
sb.append(sep).append(this.setTemplate(TEMPLATE, valueMap));
sep = ",\n";
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcsTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcsTest.java
index 1fd4f19e29..abc59352b0 100644
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcsTest.java
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVnfcsTest.java
@@ -50,6 +50,7 @@ public class QueryVnfcsTest {
c1.setModelInvariantUUID("inv1");
c1.setModelVersion("v1");
c1.setModelCustomizationUUID("cust1");
+ c1.setResourceInput("resourceInput1");
VnfcCustomization c2 = new VnfcCustomization();
c2.setModelName("model2");
@@ -57,6 +58,7 @@ public class QueryVnfcsTest {
c2.setModelInvariantUUID("inv2");
c2.setModelVersion("v2");
c2.setModelCustomizationUUID("cust2");
+ c2.setResourceInput("resourceInput2");
customizations.add(c1);
customizations.add(c2);