libvirt: Always escape IPv6 addresses when used in migration URI
If IPv6 is passed to URI it should be wrapped within square brackets.
This patch detects IPv6 to form migration URI properly. Domain name, IPv4 or
already bracketed IPv6 address will pass as is
Extend tests to include collapsed IPv6 addresses and IPv6 addresses with
port
Reviewed: https:/ /review. openstack. org/589548 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8b019d6f1e7 893a7e308bd79c8 79e94d3400e007
Committed: https:/
Submitter: Zuul
Branch: master
commit 8b019d6f1e7893a 7e308bd79c879e9 4d3400e007
Author: Sergii Golovatiuk <email address hidden>
Date: Tue Aug 7 19:49:37 2018 +0300
libvirt: Always escape IPv6 addresses when used in migration URI
If IPv6 is passed to URI it should be wrapped within square brackets.
This patch detects IPv6 to form migration URI properly. Domain name, IPv4 or
already bracketed IPv6 address will pass as is
Extend tests to include collapsed IPv6 addresses and IPv6 addresses with
port
Change-Id: I1201db996ea6ce aebd49479b298d7 4585a78b006
Closes-Bug: #1786058