From 36735e244abff9e19b85bac4db8041dbdf285206 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Wed, 16 Nov 2016 22:32:02 +0100 Subject: [PATCH] Update replication property in capabilities Our current standard capabilities are reporting the nonexistent "replication" property to the scheduler, and this is then exposed to the users via the "get_capabilities" REST API. Currently users will see a "replication" property defined as: {u'type': u'boolean', u'description': u'Enables replication.', u'title': u'Replication'} And while the definition is correct, the name of the property isn't, since replication v2.1 uses "replication_enabled" instead, which defeats the whole purpose of reporting the standard properties. This patch updates the reported name so it matches existing implementation. Closes-Bug: #1642403 Change-Id: Ia39c24d1b256fb3b1d1ee2f1a8c47a04dbb1c3b7 --- cinder/tests/unit/test_volume.py | 2 +- cinder/volume/driver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/tests/unit/test_volume.py b/cinder/tests/unit/test_volume.py index c05e60ecf47..25877bad8ef 100644 --- a/cinder/tests/unit/test_volume.py +++ b/cinder/tests/unit/test_volume.py @@ -4526,7 +4526,7 @@ class VolumeTestCase(base.BaseVolumeTestCase): 'title': 'QoS', 'description': 'Enables QoS.', 'type': 'boolean'}, - 'replication': { + 'replication_enabled': { 'title': 'Replication', 'description': 'Enables replication.', 'type': 'boolean'}, diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index b154d6a4cf7..a5532af79d6 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -625,7 +625,7 @@ class BaseVD(object): self._set_property( properties, - "replication", + "replication_enabled", "Replication", _("Enables replication."), "boolean")