diff --git a/solum/api/controllers/v1/datamodel/app.py b/solum/api/controllers/v1/datamodel/app.py index a7713c243..cd7a0f302 100644 --- a/solum/api/controllers/v1/datamodel/app.py +++ b/solum/api/controllers/v1/datamodel/app.py @@ -58,6 +58,9 @@ class App(api_types.Base): repo_token = wtypes.text created_at = datetime.datetime raw_content = wtypes.text + scale_config = wtypes.DictType( + wtypes.text, + wtypes.DictType(wtypes.text, wtypes.text)) parameters = wtypes.DictType( wtypes.text, @@ -80,6 +83,7 @@ class App(api_types.Base): @classmethod def from_db_model(cls, m, host_url): + json = m.as_dict() json['type'] = m.__tablename__ json['uri'] = '%s/v1/apps/%s' % (host_url, m.id) @@ -101,7 +105,7 @@ class App(api_types.Base): 'trigger_actions', 'workflow_config', 'stack_id', - 'raw_content', + 'raw_content' ] base = super(App, self).as_dict(db_model) diff --git a/solum/api/handlers/workflow_handler.py b/solum/api/handlers/workflow_handler.py index a980beac9..74b9eafac 100644 --- a/solum/api/handlers/workflow_handler.py +++ b/solum/api/handlers/workflow_handler.py @@ -80,11 +80,11 @@ class WorkflowHandler(handler.Handler): current_config = app.scale_config if current_config: - current_config[app.name]['target'] = target + current_config[app.name]['target'] = str(target) scale_config['scale_config'] = current_config else: config_data = dict() - config_data['target'] = target + config_data['target'] = str(target) app_scale_config = dict() app_scale_config[app.name] = config_data scale_config = dict()