Software-client with internal USM endpoint
Current configuration of software-client chooses public usm endpoints by default. This is causing ssl errors when user has HTTPS enabled w/ self-signed certificates, which differs from other clients (e.g. cgtsclient). Removed the code that set this, so that usm client uses the one from env var 'os_endpoint_type'. This is set to 'internal' when admin credentials are sourced. Test plan: PASS: Deploy DC + SX subcloud. Change ssl cert to self-signed one. Source admin credentials. Execute 'software' commands w/ debug option in the SystemController and subcloud and observe that they are reaching the internal usm endpoints: - software --debug list - software --debug show <release> - software --debug deploy show - software --debug deploy host-list - software deploy precheck <release> (tested by Heitor) - software deploy start <major_release> (tested by Heitor) PASS: Upgrade AIO-SX: stx 9 -> stx 10. (code applied on both sides) Story: 2009811 Task: 50722 Change-Id: I72e70725c0e82ec4cb43a87e006b12b1e4c55c1f Signed-off-by: Marcelo de Castro Loebens <Marcelo.DeCastroLoebens@windriver.com>
This commit is contained in:
parent
4f535ab188
commit
e559c346b4
@ -371,10 +371,6 @@ class SoftwareClientShell(object):
|
||||
rc = 1
|
||||
exit(rc)
|
||||
|
||||
endpoint_type = 'public'
|
||||
if dc_request:
|
||||
endpoint_type = 'internal'
|
||||
|
||||
# Identify authentication mode [token, keystone, local_root]
|
||||
if args.software_url and args.os_auth_token:
|
||||
auth_mode = TOKEN
|
||||
@ -390,7 +386,6 @@ class SoftwareClientShell(object):
|
||||
'software commands as root (sudo)')
|
||||
raise exc.CommandError(exception_msg)
|
||||
|
||||
args.os_endpoint_type = endpoint_type
|
||||
client = sclient.get_client(api_version, auth_mode, **(args.__dict__))
|
||||
|
||||
try:
|
||||
|
@ -48,7 +48,7 @@ def get_token_endpoint(config, service_type="platform"):
|
||||
token = sess.get_token()
|
||||
endpoint = sess.get_endpoint(service_type=service_type,
|
||||
region_name=config["region_name"],
|
||||
interface="public")
|
||||
interface='internal')
|
||||
except exceptions.http.Unauthorized:
|
||||
raise Exception("Failed to authenticate to Keystone. Request unauthorized")
|
||||
except Exception as e:
|
||||
|
@ -420,7 +420,7 @@ def get_endpoints_token(config=None, service_type="platform"):
|
||||
token, endpoint = get_auth_token_and_endpoint(user=user,
|
||||
service_type=service_type,
|
||||
region_name=region_name,
|
||||
interface='public')
|
||||
interface='internal')
|
||||
return token, endpoint
|
||||
except Exception as e:
|
||||
LOG.error("Failed to get '%s' endpoint. Error: %s", service_type, str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user