aboutsummaryrefslogtreecommitdiffstats
path: root/profiles/http/src/main/java
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-01-03 14:03:21 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-01-03 14:03:21 +0530
commit886c6767ebbd2e3555e9fa3b40bcd430ce055ee0 (patch)
tree3ab5388c4892752f9017dfb2edd162d6503e8656 /profiles/http/src/main/java
parent997dc66cc6a9f14e44be2ae36de35ca40b8ff176 (diff)
Add no-catalog param in http
Issue-ID: CLI-66 Change-Id: I1054344a8a6ed6d82075c295007131a0c033856e Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'profiles/http/src/main/java')
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java3
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java b/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java
index aa1368ec..3127b6b1 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java
@@ -113,7 +113,8 @@ public class OnapCommandHttpAuthClient {
}
private String getServiceUrl(OnapHttpCommand cmd) throws OnapCommandException {
- if (cmd.getService().isModeDirect()){
+ if (cmd.getService().isModeDirect() ||
+ Boolean.parseBoolean(cmd.getParametersMap().get(OnapCommandHttpConstants.DEFAULT_PARAMETER_NO_CATALOG).getValue().toString())){
return cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_HOST_URL).getValue().toString();
} else { //Catalog mode
OnapCommand catalog = OnapCommandRegistrar.getRegistrar().get("catalog", cmd.getInfo().getProduct());
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java b/profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java
index 7b421523..38688abb 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java
@@ -87,6 +87,8 @@ public class OnapCommandHttpConstants {
public static final String MODE_VALUES = "cli.schema.mode_values";
public static final String SERVICE_PARAMS_LIST = "cli.schema.service_params_list";
public static final String SERVICE_PARAMS_MANDATORY_LIST = "cli.schema.service_params_mandatory_list";
+
+ public static final String DEFAULT_PARAMETER_NO_CATALOG = "no-catalog";
}