Unity: Attach Unity volume via IPv6.

The IPv6's ISCIS portal format is [IPv6Address]:Port.
The Unity returned IPv6 are not enclosed with brackets.
So Unity's cinder-driver has to add brackets for IPv6's ISCSI portal.

DocImpact
Change-Id: Ib54fe948d0f5d7cad6c28468503f8535573ef3fc
Implements: blueprint unity-cinder-ipv6
This commit is contained in:
Jichao Zhang
2017-12-18 16:02:50 +08:00
parent 69f721b399
commit 6171655d39
4 changed files with 35 additions and 1 deletions

View File

@@ -136,6 +136,9 @@ def extract_fc_uids(connector):
def convert_ip_to_portal(ip):
is_ipv6_without_brackets = ':' in ip and ip[-1] != ']'
if is_ipv6_without_brackets:
return '[%s]:3260' % ip
return '%s:3260' % ip