NetApp SolidFire: Enable driver IPv6 api request
Enable driver to make API requests to a cluster configured with an IPv6 MVIP. Implements: blueprint netapp-solidfire-ipv6-on-management-ip Change-Id: I12b6af1f6c24738ace59da6b3d50753db938ce3d
This commit is contained in:
committed by
Lucio Seki
parent
4b5704645e
commit
47c823e0d5
@@ -2908,6 +2908,16 @@ class SolidFireVolumeTestCase(test.TestCase):
|
|||||||
ep = sfv._build_endpoint_info(mvip='1.2.3.4', password='nunyabiz')
|
ep = sfv._build_endpoint_info(mvip='1.2.3.4', password='nunyabiz')
|
||||||
self.assertEqual(expected_ep, ep)
|
self.assertEqual(expected_ep, ep)
|
||||||
|
|
||||||
|
# Make sure we add brackets for IPv6 MVIP
|
||||||
|
expected_ep = {'passwd': 'nunyabiz',
|
||||||
|
'url': 'https://[ff00::00]:443',
|
||||||
|
'svip': None,
|
||||||
|
'mvip': 'ff00::00',
|
||||||
|
'login': 'admin',
|
||||||
|
'port': 443}
|
||||||
|
ep = sfv._build_endpoint_info(mvip='ff00::00', password='nunyabiz')
|
||||||
|
self.assertEqual(expected_ep, ep)
|
||||||
|
|
||||||
def test_generate_random_string(self):
|
def test_generate_random_string(self):
|
||||||
sfv = solidfire.SolidFireDriver(configuration=self.configuration)
|
sfv = solidfire.SolidFireDriver(configuration=self.configuration)
|
||||||
a = sfv._generate_random_string(12)
|
a = sfv._generate_random_string(12)
|
||||||
|
|||||||
@@ -647,7 +647,8 @@ class SolidFireDriver(san.SanISCSIDriver):
|
|||||||
kwargs.get('password', backend_conf.san_password))
|
kwargs.get('password', backend_conf.san_password))
|
||||||
endpoint['port'] = (
|
endpoint['port'] = (
|
||||||
kwargs.get(('port'), backend_conf.sf_api_port))
|
kwargs.get(('port'), backend_conf.sf_api_port))
|
||||||
endpoint['url'] = 'https://%s:%s' % (endpoint['mvip'],
|
sanitized_mvip = volume_utils.sanitize_host(endpoint['mvip'])
|
||||||
|
endpoint['url'] = 'https://%s:%s' % (sanitized_mvip,
|
||||||
endpoint['port'])
|
endpoint['port'])
|
||||||
endpoint['svip'] = kwargs.get('svip', backend_conf.sf_svip)
|
endpoint['svip'] = kwargs.get('svip', backend_conf.sf_svip)
|
||||||
if not endpoint.get('mvip', None) and kwargs.get('backend_id', None):
|
if not endpoint.get('mvip', None) and kwargs.get('backend_id', None):
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
SolidFire driver now supports IPv6 for management IP.
|
||||||
Reference in New Issue
Block a user