Added default value for allowed_direct_url_schemes
Included 'allowed_direct_url_schemes' in driver options of cinder configuration with a default value of 'cinder' Also, added to unit test and functional test as part of change. - modified cinder_purestorage.py - modified tests_cinder_purestorage.py to include a functional test - modified test_lib_charm_openstack_cinder_purestorage.py to extend the unit tests - rebased Closes-Bug: #1957848 Change-Id: I26a033b03f6d03fa5e68d9e26aa741c6529ecac2
This commit is contained in:
parent
f004c6a228
commit
ee5c5d92d8
@ -37,7 +37,8 @@ class CinderpurestorageCharm(
|
||||
('pure_automatic_max_oversubscription_ratio',
|
||||
self.config.get('automatic-max-oversubscription')),
|
||||
('volume_driver', volumedriver),
|
||||
('volume_backend_name', service)]
|
||||
('volume_backend_name', service),
|
||||
('allowed_direct_url_schemes', 'cinder')]
|
||||
|
||||
if self.config.get('protocol') == 'iscsi':
|
||||
if self.config.get('iscsi-cidr'):
|
||||
|
@ -50,3 +50,15 @@ class CinderpurestorageTest(test_utils.OpenStackBaseTest):
|
||||
getattr(test_vol, 'os-vol-host-attr:host').split('#')[0],
|
||||
'cinder@cinder-purestorage')
|
||||
self.cinder_client.volumes.delete(vol_new)
|
||||
|
||||
# Check to see if allowed_direct_url_schemes gets propagated to
|
||||
# /etc/cinder/cinder.conf
|
||||
def test_config_propagation(self):
|
||||
expected_contents = {
|
||||
'cinder-purestorage': {
|
||||
'allowed_direct_url_schemes': ['cinder']}}
|
||||
zaza.model.block_until_oslo_config_entries_match(
|
||||
'cinder',
|
||||
'/etc/cinder/cinder.conf',
|
||||
expected_contents,
|
||||
model_name=self.model_name)
|
||||
|
@ -51,4 +51,5 @@ class TestCinderpurestorageCharm(test_utils.PatchHelper):
|
||||
('pure_automatic_max_oversubscription_ratio',
|
||||
None),
|
||||
('volume_driver', None),
|
||||
('volume_backend_name', None)])
|
||||
('volume_backend_name', None),
|
||||
('allowed_direct_url_schemes', 'cinder')])
|
||||
|
Loading…
x
Reference in New Issue
Block a user