diff options
Diffstat (limited to 'framework/src/main')
7 files changed, 25 insertions, 25 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.java b/framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.java index e6c69a11..e87ef0ae 100644 --- a/framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.java +++ b/framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.java @@ -45,7 +45,7 @@ public class OnapAuthClient { public OnapAuthClient(OnapCredentials creds, boolean debug) throws OnapCommandHttpFailure { this.creds = creds; - this.http = new OnapHttpConnection(creds.getMsbUrl().startsWith("https"), debug); + this.http = new OnapHttpConnection(creds.getHostUrl().startsWith("https"), debug); } /** @@ -136,13 +136,13 @@ public class OnapAuthClient { */ public String getServiceBasePath(OnapService srv) throws OnapCommandException { if (srv.getName().equals(OnapCommandConfg.getApiGateway())) { - return this.getMsbUrl(); + return this.getApiGatewayUrl(); } else if (srv.isModeDirect()){ - return this.creds.getMsbUrl(); + return this.creds.getHostUrl(); } - HttpInput input = new HttpInput().setUri(this.creds.getMsbUrl() + HttpInput input = new HttpInput().setUri(this.creds.getHostUrl() + String.format(Constants.MSB_SERVICE_URI, srv.getName(), srv.getVersion())); HttpResult result = this.http.get(input); @@ -154,7 +154,7 @@ public class OnapAuthClient { } try { - return this.creds.getMsbUrl() + JsonPath.read(result.getBody(), "url"); + return this.creds.getHostUrl() + JsonPath.read(result.getBody(), "url"); } catch (Exception e) { throw new OnapCommandExecutionFailed(e, srv.toString()); } @@ -167,8 +167,8 @@ public class OnapAuthClient { return this.getServiceBasePath(srv); } - private String getMsbUrl() { - return this.creds.getMsbUrl() + Constants.MSB_URI; + private String getApiGatewayUrl() { + return this.creds.getHostUrl() + Constants.MSB_URI; } public String getAuthToken() { diff --git a/framework/src/main/java/org/onap/cli/fw/ad/OnapCredentials.java b/framework/src/main/java/org/onap/cli/fw/ad/OnapCredentials.java index 7c3c3ac0..02291b22 100644 --- a/framework/src/main/java/org/onap/cli/fw/ad/OnapCredentials.java +++ b/framework/src/main/java/org/onap/cli/fw/ad/OnapCredentials.java @@ -32,9 +32,9 @@ public class OnapCredentials { private String password; /* - * Onap Service msb-url + * Onap Service host-url */ - private String msbUrl; + private String hostUrl; /** * Onap credentials with username and password. @@ -43,14 +43,14 @@ public class OnapCredentials { * user name * @param password * password - * @param msbUrl - * msb url + * @param hostUrl + * host url */ - public OnapCredentials(String username, String password, String msbUrl) { + public OnapCredentials(String username, String password, String hostUrl) { super(); this.username = username; this.password = password; - this.msbUrl = msbUrl; + this.hostUrl = hostUrl; } public String getUsername() { @@ -61,7 +61,7 @@ public class OnapCredentials { return password; } - public String getMsbUrl() { - return msbUrl; + public String getHostUrl() { + return hostUrl; } } diff --git a/framework/src/main/java/org/onap/cli/fw/conf/Constants.java b/framework/src/main/java/org/onap/cli/fw/conf/Constants.java index e487bbf2..d711ba25 100644 --- a/framework/src/main/java/org/onap/cli/fw/conf/Constants.java +++ b/framework/src/main/java/org/onap/cli/fw/conf/Constants.java @@ -94,7 +94,7 @@ public class Constants { // Common parameters used across all commands. public static final String DEAFULT_PARAMETER_USERNAME = "onap-username"; public static final String DEAFULT_PARAMETER_PASS_WORD = "onap-password"; - public static final String DEAFULT_PARAMETER_MSB_URL = "msb-url"; + public static final String DEAFULT_PARAMETER_HOST_URL = "host-url"; public static final String DEFAULT_PARAMETER_HELP = "help"; public static final String DEFAULT_PARAMETER_VERSION = "version"; public static final String DEFAULT_PARAMETER_DEBUG = "debug"; 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 b4df2ace..9a425397 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 @@ -682,7 +682,7 @@ public class OnapCommandUtils { return new OnapCredentials(paramMap.get(Constants.DEAFULT_PARAMETER_USERNAME), paramMap.get(Constants.DEAFULT_PARAMETER_PASS_WORD), - paramMap.get(Constants.DEAFULT_PARAMETER_MSB_URL)); + paramMap.get(Constants.DEAFULT_PARAMETER_HOST_URL)); } /** diff --git a/framework/src/main/resources/default_input_parameters.yaml b/framework/src/main/resources/default_input_parameters.yaml index 4f0d419c..3b7e198a 100644 --- a/framework/src/main/resources/default_input_parameters.yaml +++ b/framework/src/main/resources/default_input_parameters.yaml @@ -15,13 +15,13 @@ parameters: default_value: ${ONAP_PASSWORD} is_secured: true is_optional: false - - name: msb-url + - name: host-url type: url - description: Onap MSB url + description: Onap host url short_option: m - long_option: msb-url + long_option: host-url is_optional: false - default_value: ${ONAP_MSB_URL} + default_value: ${ONAP_HOST_URL} - name: help type: string description: Onap command help message diff --git a/framework/src/main/resources/onap.properties b/framework/src/main/resources/onap.properties index b8f08d3b..47b02c8c 100644 --- a/framework/src/main/resources/onap.properties +++ b/framework/src/main/resources/onap.properties @@ -8,7 +8,7 @@ cli.api_gateway=msb cli.auth_service=auth # service section -cli.exclude_params_internal_cmd=onap-username,onap-password,msb-url,no-auth -cli.no_auth_disable_include_params_external_cmd=onap-username,onap-password,msb-url,no-auth +cli.exclude_params_internal_cmd=onap-username,onap-password,host-url,no-auth +cli.no_auth_disable_include_params_external_cmd=onap-username,onap-password,host-url,no-auth cli.no_auth_enable_exclude_params_external_cmd=onap-username,onap-password,no-auth -cli.no_auth_enable_include_params_external_cmd=msb-url
\ No newline at end of file +cli.no_auth_enable_include_params_external_cmd=host-url
\ No newline at end of file diff --git a/framework/src/main/resources/schema-validate.yaml b/framework/src/main/resources/schema-validate.yaml index 06bb6563..66787912 100644 --- a/framework/src/main/resources/schema-validate.yaml +++ b/framework/src/main/resources/schema-validate.yaml @@ -9,7 +9,7 @@ default_parameters: exclude: - onap-username - onap-password - - msb-url + - host-url - no-auth parameters: - name: schema-location |