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
This commit is contained in:
Gorka Eguileor
2016-11-16 22:32:02 +01:00
parent 063aa59ce9
commit 36735e244a
2 changed files with 2 additions and 2 deletions

View File

@@ -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'},

View File

@@ -625,7 +625,7 @@ class BaseVD(object):
self._set_property(
properties,
"replication",
"replication_enabled",
"Replication",
_("Enables replication."),
"boolean")