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
This commit is contained in:
parent
f46b23e20d
commit
546b4048aa
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user