Fix backend_name and section name mismatch
Change-Id: I16a56250dfea62630bcc096fcda194b81316da48
This commit is contained in:
parent
ad443c2d8e
commit
c6b3544ae3
@ -77,7 +77,7 @@ class CinderStoragePluginCharm(ops_openstack.core.OSBaseCharm):
|
|||||||
|
|
||||||
def set_data(self, data, config, app_name):
|
def set_data(self, data, config, app_name):
|
||||||
"""Inform another charm of the backend name and configuration."""
|
"""Inform another charm of the backend name and configuration."""
|
||||||
data['backend_name'] = config['volume-backend-name'] or app_name
|
data['backend_name'] = app_name
|
||||||
data['stateless'] = str(self.stateless)
|
data['stateless'] = str(self.stateless)
|
||||||
data['active_active'] = str(self.active_active)
|
data['active_active'] = str(self.active_active)
|
||||||
data['subordinate_configuration'] = self.render_config(
|
data['subordinate_configuration'] = self.render_config(
|
||||||
|
@ -127,19 +127,12 @@ class TestBaseCinderCharm(unittest.TestCase):
|
|||||||
juju-info:
|
juju-info:
|
||||||
interface: juju-info
|
interface: juju-info
|
||||||
scope: container
|
scope: container
|
||||||
''',
|
|
||||||
config='''
|
|
||||||
options:
|
|
||||||
volume-backend-name:
|
|
||||||
default: ""
|
|
||||||
type: string
|
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
self.addCleanup(self.harness.cleanup)
|
self.addCleanup(self.harness.cleanup)
|
||||||
self.harness.begin()
|
self.harness.begin()
|
||||||
self.harness.set_leader(True)
|
self.harness.set_leader(True)
|
||||||
backend = self.harness.add_relation('storage-backend', 'cinder')
|
backend = self.harness.add_relation('storage-backend', 'cinder')
|
||||||
self.harness.update_config({'volume-backend-name': 'test'})
|
|
||||||
self.harness.add_relation_unit(backend, 'cinder/0')
|
self.harness.add_relation_unit(backend, 'cinder/0')
|
||||||
|
|
||||||
def test_cinder_base(self):
|
def test_cinder_base(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user