diff options
author | Michael Hwang <mhwang@research.att.com> | 2018-02-08 17:26:40 -0500 |
---|---|---|
committer | Michael Hwang <mhwang@research.att.com> | 2018-02-08 17:27:45 -0500 |
commit | 0f1b9a1a06593919e497acbb5bb835244e8c774d (patch) | |
tree | 810c6ca67a3acd99e03b8ae36240afe61160b14d /dcae-cli/dcae_cli/util | |
parent | 533e7d75cefbe0a839163c77c7c509a1e43aa9b6 (diff) |
Fix issues with initialization
Change-Id: Ib9520e4f5bd1d257a9281a60ea55c5fd2704e948
Issue-ID: DCAEGEN2-322
Signed-off-by: Michael Hwang <mhwang@research.att.com>
Diffstat (limited to 'dcae-cli/dcae_cli/util')
-rw-r--r-- | dcae-cli/dcae_cli/util/config.py | 7 | ||||
-rw-r--r-- | dcae-cli/dcae_cli/util/profiles.py | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/dcae-cli/dcae_cli/util/config.py b/dcae-cli/dcae_cli/util/config.py index 3d6ac0a..e3257af 100644 --- a/dcae-cli/dcae_cli/util/config.py +++ b/dcae-cli/dcae_cli/util/config.py @@ -69,7 +69,6 @@ def _init_config(): try: server_url = _init_config_server_url() new_config = util.fetch_file_from_web(server_url, "/dcae-cli/config.json") - new_config["server_url"] = server_url except: # Failing to pull seed configuration from remote server is not considered # a problem. Just continue and give user the option to set it up @@ -77,6 +76,8 @@ def _init_config(): if not click.confirm("Could not download initial configuration from remote server. Attempt manually setting up?"): raise ConfigurationInitError("Could not setup dcae-cli configuration") + # UPDATE: Keeping the server url even though the config was not found there. + new_config["server_url"] = server_url new_config["user"] = _init_config_user() new_config["cli_version"] = _version.__version__ @@ -123,11 +124,11 @@ def get_docker_logins_key(): def get_path_component_spec(): return get_config().get("path_component_spec", - "/schemas/component-specification/dcae-cli-v1/component-spec-schema.json") + "/component-json-schemas/component-specification/dcae-cli-v1/component-spec-schema.json") def get_path_data_format(): return get_config().get("path_data_format", - "/schemas/data-format/dcae-cli-v1/data-format-schema.json") + "/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json") def get_active_profile(): return get_config().get("active_profile", None) diff --git a/dcae-cli/dcae_cli/util/profiles.py b/dcae-cli/dcae_cli/util/profiles.py index 34580d6..721b0aa 100644 --- a/dcae-cli/dcae_cli/util/profiles.py +++ b/dcae-cli/dcae_cli/util/profiles.py @@ -103,8 +103,9 @@ def reinit_profiles(): # a problem. Just continue and give user the option to use an empty # default. if click.confirm("Could not download initial profiles from remote server. Set empty default?"): - new_profiles = {"default": { "consul_host": "", "config_binding_service": "", - "cdap_broker": "", "docker_host": ""}} + new_profiles = {"default": { "consul_host": "", + "config_binding_service": "config_binding_service", + "cdap_broker": "cdap_broker", "docker_host": ""}} else: raise ProfilesInitError("Could not setup dcae-cli profiles") |