diff options
author | Craig Vyvial <cp16net@gmail.com> | 2014-10-13 10:56:44 -0500 |
---|---|---|
committer | Nikhil Manchanda <SlickNik@gmail.com> | 2014-10-14 09:38:25 -0700 |
commit | 08af8e029d6e3d785f6387eef294eafad28ad3e1 (patch) | |
tree | 9aacb1641ac48d3d7de7e857fcfb6fd947c899f3 | |
parent | e94c68c7861ea82324f8078ccfbc3037ef286d99 (diff) | |
download | trove-08af8e029d6e3d785f6387eef294eafad28ad3e1.tar.gz |
restart_required cfg-param is bool and not string
There was a break to the previous version of the configuration
paramenters API when the configurations parameters were moved to
the database. The actual type of the restart_required parameter
should be a JSON boolean value, and not a string to be compatible
with the previous configuration parameters API.
Change-Id: If45944e25a55813ddf8f80010811da04d667ca19
Closes-Bug: #1379665
-rw-r--r-- | trove/configuration/views.py | 4 | ||||
-rw-r--r-- | trove/extensions/mgmt/configuration/views.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/trove/configuration/views.py b/trove/configuration/views.py index db8fa7fc..bde5dcce 100644 --- a/trove/configuration/views.py +++ b/trove/configuration/views.py @@ -118,8 +118,8 @@ class ConfigurationParameterView(object): self.config = config def data(self): - # v1 api expects this to be a 'true' or 'false' string instead of 1/0 - restart_required = 'true' if self.config.restart_required else 'false' + # v1 api is to be a 'true' or 'false' json boolean instead of 1/0 + restart_required = True if self.config.restart_required else False ret = { "name": self.config.name, "datastore_version_id": self.config.datastore_version_id, diff --git a/trove/extensions/mgmt/configuration/views.py b/trove/extensions/mgmt/configuration/views.py index fa45e824..08b51563 100644 --- a/trove/extensions/mgmt/configuration/views.py +++ b/trove/extensions/mgmt/configuration/views.py @@ -24,10 +24,12 @@ class MgmtConfigurationParameterView(object): self.config = config def data(self): + # v1 api is to be a 'true' or 'false' json boolean instead of 1/0 + restart_required = True if self.config.restart_required else False ret = { "name": self.config.name, "datastore_version_id": self.config.datastore_version_id, - "restart_required": self.config.restart_required, + "restart_required": restart_required, "type": self.config.data_type, "deleted": self.config.deleted, "deleted_at": self.config.deleted_at, |