Allow ZAPI over IPv6

When an IPv6 literal is specified in manila.conf for the
netapp_hostname option, automatically URL-escape it.

Closes-bug: 1730509

Change-Id: Id55e870066b6a669da83aa6a96f74ea76d6103bd
This commit is contained in:
Ben Swartzlander committed 2017-11-06 16:52:29 -05:00
1 parent 5228e6ade7
commit ed3d93eb9b
2 files changed
+8 -2

No files matched your search

@@ -324,8 +324,10 @@ class NaServer(object):
return processed_response.get_child_by_name('results')
def _get_url(self):
return '%s://%s:%s/%s' % (self._protocol, self._host, self._port,
self._url)
host = self._host
if ':' in host:
host = '[%s]' % host
return '%s://%s:%s/%s' % (self._protocol, host, self._port, self._url)
def _build_opener(self):
if self._auth_style == NaServer.STYLE_LOGIN_PASSWORD:
@@ -0,0 +1,4 @@
---
fixes:
IPv6 addresses are handled corrected when specified
for the netapp_server_hostname driver option.