This commit fix the dcmanager client and fmclient parse
IPv6 failed.
Test Plan:
PASS - Connect with IPv6 O-Cloud DC environment
PASS - Connect with IPv6 environment which has alarm
Issue-ID: INF-455
Change-Id: I5c18a7216b1bce57793bae390a2ccf3cf99f3c73
Signed-off-by: Zhang Rong(Jon) <rong.zhang@windriver.com>
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'))
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 = 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()
os_client_args['dcmanager_url'] = dcmanager_url.geturl()
os_client_args['auth_url'] = auth_url.geturl()
os_client_args['auth_url'] = auth_url.geturl()
if "" != subcloud_hostname:
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(
orig_auth_url = urlparse(_DEFAULT_STX_URL)
new_auth_url = orig_auth_url._replace(
netloc=orig_auth_url.netloc.replace(