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: I1201db996ea6ceaebd49479b298d74585a78b006
Closes-Bug: #1786058
(cherry picked from commit 8b019d6f1e7893a7e308bd79c879e94d3400e007)
(cherry picked from commit 7ee5499e5507c45249945fa5baf7665bc2f1cc02)
Reviewed: https:/ /review. openstack. org/603737 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=551a7a459c6 503158cb4512fec 8b2dc9c0641abe
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 551a7a459c65031 58cb4512fec8b2d c9c0641abe
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 7e308bd79c879e9 4d3400e007) 249945fa5baf766 5bc2f1cc02)
Closes-Bug: #1786058
(cherry picked from commit 8b019d6f1e7893a
(cherry picked from commit 7ee5499e5507c45