diff --git a/.zuul.yaml b/.zuul.yaml index b3037e9..6909233 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,5 +1,5 @@ - project: templates: - - python35-charm-jobs + - python36-charm-jobs - openstack-python3-ussuri-jobs - openstack-cover-jobs diff --git a/requirements.txt b/requirements.txt index b786b42..a68620f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 # Build requirements +cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. charm-tools==2.8.3 simplejson diff --git a/src/README.md b/src/README.md index 2e70115..90e79aa 100644 --- a/src/README.md +++ b/src/README.md @@ -50,8 +50,10 @@ host will never be overwritten. ## Deployment -To deploy, add a relation to the cinder charm: +Specify a block device (here we choose `/dev/sdb`) and then add a relation to +the cinder charm: + juju deploy --config block-device=sdb cinder-lvm juju add-relation cinder-lvm:storage-backend cinder:storage-backend # Documentation diff --git a/src/config.yaml b/src/config.yaml index c8caab5..c341829 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -102,7 +102,7 @@ options: Volume group name to use within LVM. If empty, the volume group name will be constructed by concatenating the 'alias' config option to the prefix 'cinder-volumes-'. - backend-name: + volume-backend-name: type: string default: description: | diff --git a/src/lib/charm/openstack/cinder_lvm.py b/src/lib/charm/openstack/cinder_lvm.py index d03b7a5..6b229c6 100644 --- a/src/lib/charm/openstack/cinder_lvm.py +++ b/src/lib/charm/openstack/cinder_lvm.py @@ -63,7 +63,7 @@ def get_backend_name(): hostname = socket.gethostname() alias = ch_hookenv.config('alias') unique_backend = ch_hookenv.config('unique-backend') - backend_name = ch_hookenv.config('backend-name') + backend_name = ch_hookenv.config('volume-backend-name') if backend_name: pass diff --git a/tox.ini b/tox.ini index 22159df..fb00734 100644 --- a/tox.ini +++ b/tox.ini @@ -55,11 +55,6 @@ basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} -[testenv:py35] -basepython = python3.5 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - [testenv:py36] basepython = python3.6 deps = -r{toxinidir}/test-requirements.txt diff --git a/unit_tests/test_lib_charm_openstack_cinder_lvm.py b/unit_tests/test_lib_charm_openstack_cinder_lvm.py index 0f23697..a64c1c3 100644 --- a/unit_tests/test_lib_charm_openstack_cinder_lvm.py +++ b/unit_tests/test_lib_charm_openstack_cinder_lvm.py @@ -207,9 +207,10 @@ class TestCinderLVMCharm(test_utils.PatchHelper): self.assertNotIn('a', list(x[0] for x in config)) def test_cinder_vg_and_backend(self): - base = {'volume-group': 'test-vg', 'backend-name': 'test-bn'} + base = {'volume-group': 'test-vg', 'volume-backend-name': 'test-bn'} self._patch_config_and_charm(base) - self.assertEqual(cinder_lvm.get_backend_name(), base['backend-name']) + self.assertEqual(cinder_lvm.get_backend_name(), + base['volume-backend-name']) self.assertEqual(cinder_lvm.get_volume_group_name(), base['volume-group'])