aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java6
-rw-r--r--products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml4
2 files changed, 7 insertions, 3 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
index 879e6289..862e328b 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
@@ -262,7 +262,11 @@ public class OnapCommandUtils {
} else if (OnapCommandParameterType.MAP.equals(param.getParameterType())) {
try {
String value = new ObjectMapper().writeValueAsString(params.get(paramName).getValue());
- result += line.substring(currentIdx, idxS - 1) + value;
+ if ((idxS == 0) && (currentIdx == 0)) {
+ result = value;
+ } else {
+ result += line.substring(currentIdx, idxS - 1) + value;
+ }
} catch (JsonProcessingException e) { // NOSONAR
//never occur as map is coverted to json string here
}
diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml
index 1cf4586a..829bd6ab 100644
--- a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml
+++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/vnftest-run.yaml
@@ -47,8 +47,8 @@ http:
auth: none
mode: direct
request:
- uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/vtp/tests/S{name}/run
- method: GET
+ uri: /onapapi/vnfsdk-marketplace/v1/PackageResource/vtp/tests/${name}/run
+ method: POST
body: ${param}
success_codes:
- 201