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)
Reviewed: https:/ /review. openstack. org/599419 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=7ee5499e550 7c45249945fa5ba f7665bc2f1cc02
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 7ee5499e5507c45 249945fa5baf766 5bc2f1cc02
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)
Closes-Bug: #1786058
(cherry picked from commit 8b019d6f1e7893a