Remove netapp-storage-pools config over netapp-pool-name-search-pattern
- The config option has been deprecated long time ago [0][1] - netapp-pool-name-search-pattern is shared by ONTAP and E-series - E-series always uses iSCSI protocol so the config netapp-pool-name-search-pattern should not be tied to the netapp-storage-protocol config [0]ab0313e356/cinder/volume/drivers/netapp/options.py (L165)
[1]ab0313e356/cinder/volume/drivers/netapp/eseries/library.py (L1692)
This commit is contained in:
parent
214654971e
commit
4b51db7bf5
@ -68,10 +68,6 @@
|
|||||||
"default": !!null ""
|
"default": !!null ""
|
||||||
"description": |
|
"description": |
|
||||||
Password for the NetApp E-Series storage array.
|
Password for the NetApp E-Series storage array.
|
||||||
"netapp-storage-pools":
|
|
||||||
"type": "string"
|
|
||||||
"default": !!null ""
|
|
||||||
"description": "comma seperated list of pool names ie: pool1,pool2"
|
|
||||||
"use-multipath":
|
"use-multipath":
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
"default": !!bool "true"
|
"default": !!bool "true"
|
||||||
|
@ -50,7 +50,10 @@ class CinderNetAppCharm(
|
|||||||
('netapp_login', cget('netapp-login')),
|
('netapp_login', cget('netapp-login')),
|
||||||
('netapp_password', cget('netapp-password')),
|
('netapp_password', cget('netapp-password')),
|
||||||
('volume_driver', volumedriver),
|
('volume_driver', volumedriver),
|
||||||
('volume_backend_name', service)]
|
('volume_backend_name', service),
|
||||||
|
('netapp_pool_name_search_pattern', cget(
|
||||||
|
'netapp-pool-name-search-pattern'))
|
||||||
|
]
|
||||||
|
|
||||||
if cget('netapp-server-port') == 443:
|
if cget('netapp-server-port') == 443:
|
||||||
driver_transport = [
|
driver_transport = [
|
||||||
@ -60,7 +63,6 @@ class CinderNetAppCharm(
|
|||||||
driver_options_extension = [
|
driver_options_extension = [
|
||||||
('netapp_controller_ips', cget('netapp-controller-ips')),
|
('netapp_controller_ips', cget('netapp-controller-ips')),
|
||||||
('netapp_sa_password', cget('netapp-array-password')),
|
('netapp_sa_password', cget('netapp-array-password')),
|
||||||
('netapp_storage_pools', cget('netapp-storage-pools')),
|
|
||||||
('use_multipath_for_image_xfer', cget('use-multipath'))]
|
('use_multipath_for_image_xfer', cget('use-multipath'))]
|
||||||
|
|
||||||
if cget('netapp-storage-protocol') == "nfs":
|
if cget('netapp-storage-protocol') == "nfs":
|
||||||
@ -74,8 +76,6 @@ class CinderNetAppCharm(
|
|||||||
else:
|
else:
|
||||||
lun_space_reservation = 'disabled'
|
lun_space_reservation = 'disabled'
|
||||||
driver_options_extension += [
|
driver_options_extension += [
|
||||||
('netapp_pool_name_search_pattern', cget(
|
|
||||||
'netapp-pool-name-search-pattern')),
|
|
||||||
('netapp_lun_space_reservation', lun_space_reservation)]
|
('netapp_lun_space_reservation', lun_space_reservation)]
|
||||||
|
|
||||||
return (driver_options_common + driver_transport +
|
return (driver_options_common + driver_transport +
|
||||||
|
@ -58,7 +58,7 @@ class TestCinderNetAppCharm(test_utils.PatchHelper):
|
|||||||
econfig = {'netapp-storage-family': 'eseries',
|
econfig = {'netapp-storage-family': 'eseries',
|
||||||
'netapp-controller-ips': '10.0.0.1',
|
'netapp-controller-ips': '10.0.0.1',
|
||||||
'netapp-array-password': 'abc123',
|
'netapp-array-password': 'abc123',
|
||||||
'netapp-storage-pools': 'somePool',
|
'netapp-pool-name-search-pattern': 'foo.*bar',
|
||||||
'use-multipath': True}
|
'use-multipath': True}
|
||||||
charm = self._patch_config_and_charm(econfig)
|
charm = self._patch_config_and_charm(econfig)
|
||||||
config = charm.cinder_configuration()
|
config = charm.cinder_configuration()
|
||||||
@ -66,8 +66,8 @@ class TestCinderNetAppCharm(test_utils.PatchHelper):
|
|||||||
econfig['netapp-controller-ips']), config)
|
econfig['netapp-controller-ips']), config)
|
||||||
self.assertIn(('netapp_sa_password',
|
self.assertIn(('netapp_sa_password',
|
||||||
econfig['netapp-array-password']), config)
|
econfig['netapp-array-password']), config)
|
||||||
self.assertIn(('netapp_storage_pools',
|
self.assertIn(('netapp_pool_name_search_pattern',
|
||||||
econfig['netapp-storage-pools']), config)
|
econfig['netapp-pool-name-search-pattern']), config)
|
||||||
self.assertIn(('use_multipath_for_image_xfer',
|
self.assertIn(('use_multipath_for_image_xfer',
|
||||||
econfig['use-multipath']), config)
|
econfig['use-multipath']), config)
|
||||||
self.assertFalse(any(q[0] == 'nfs_shares_config' for q in config))
|
self.assertFalse(any(q[0] == 'nfs_shares_config' for q in config))
|
||||||
@ -102,11 +102,8 @@ class TestCinderNetAppCharm(test_utils.PatchHelper):
|
|||||||
'enabled'), config)
|
'enabled'), config)
|
||||||
|
|
||||||
def test_cinder_iscsi_fc_options_not_included(self):
|
def test_cinder_iscsi_fc_options_not_included(self):
|
||||||
econfig = {'netapp-pool-name-search-pattern': 'foo.*bar',
|
econfig = {'netapp-lun-space-reservation': True}
|
||||||
'netapp-lun-space-reservation': True}
|
|
||||||
charm = self._patch_config_and_charm(econfig)
|
charm = self._patch_config_and_charm(econfig)
|
||||||
config = charm.cinder_configuration()
|
config = charm.cinder_configuration()
|
||||||
self.assertNotIn(('netapp_pool_name_search_pattern',
|
|
||||||
econfig['netapp-pool-name-search-pattern']), config)
|
|
||||||
self.assertNotIn(('netapp_lun_space_reservation',
|
self.assertNotIn(('netapp_lun_space_reservation',
|
||||||
'enabled'), config)
|
'enabled'), config)
|
||||||
|
Loading…
Reference in New Issue
Block a user