X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2common%2Fconfig%2Fconfig.py;fp=o2common%2Fconfig%2Fconfig.py;h=61c8c692d9432dcfb3b2e4c0da8cb27b8cd1c3c4;hb=1f8a5aade209f5998a405f9a24ee54dd2eb52c57;hp=d045315300cfda8a19e7111b1ed65b26cad35298;hpb=73242ddf79513c5b48f8336a049e05e141ea8ba7;p=pti%2Fo2.git diff --git a/o2common/config/config.py b/o2common/config/config.py index d045315..61c8c69 100644 --- a/o2common/config/config.py +++ b/o2common/config/config.py @@ -193,9 +193,11 @@ def get_dc_access_info(): for key, val in client_args.items(): os_client_args['os_{key}'.format(key=key)] = val auth_url = urlparse(os_client_args.pop('os_auth_url')) + hostname = f"[{auth_url.hostname}]" if is_ipv6(auth_url.hostname) \ + else auth_url.hostname dcmanager_url = urlparse(_DEFAULT_DCMANAGER_URL) dcmanager_url = dcmanager_url._replace(netloc=dcmanager_url.netloc.replace( - dcmanager_url.hostname, auth_url.hostname)) + dcmanager_url.hostname, hostname)) os_client_args['dcmanager_url'] = dcmanager_url.geturl() os_client_args['auth_url'] = auth_url.geturl() @@ -231,6 +233,8 @@ def get_fm_access_info(subcloud_hostname: str = "", os_client_args['auth_url'] = auth_url.geturl() if "" != subcloud_hostname: + subcloud_hostname = f"[{subcloud_hostname}]" if \ + is_ipv6(subcloud_hostname) else subcloud_hostname orig_auth_url = urlparse(_DEFAULT_STX_URL) new_auth_url = orig_auth_url._replace( netloc=orig_auth_url.netloc.replace(