+ if "" != subcloud_hostname:
+ subcloud_hostname = f"[{subcloud_hostname}]" if \
+ is_ipv6(subcloud_hostname) else subcloud_hostname
+ orig_auth_url = urlparse(get_stx_url())
+ new_auth_url = orig_auth_url._replace(
+ netloc=orig_auth_url.netloc.replace(
+ orig_auth_url.hostname, subcloud_hostname))
+ if sub_is_https:
+ new_auth_url = new_auth_url._replace(
+ scheme=new_auth_url.scheme.
+ replace(new_auth_url.scheme, 'https'))
+ os_client_args['auth_url'] = new_auth_url.geturl()
+ os_client_args['endpoint_type'] = 'publicURL'
+
+ os_client_args['insecure'] = CGTS_INSECURE_SSL