diff options
author | Bin Yang <bin.yang@windriver.com> | 2018-11-10 12:48:44 +0000 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2018-11-10 12:59:35 +0000 |
commit | ce3fffda433531666295e5c9b3148e9128e57f16 (patch) | |
tree | 085a51687d1f28ccc6d1ba04ce8bafd92b064563 /windriver/titanium_cloud/resource/views | |
parent | 5eea270e67a262e9ace8637cb54307c23d247066 (diff) |
Support infra_workload api without oof_directives
Change-Id: I8eb05ff2acdef8811b3eec8e1a0efe47b12bdd73
Issue-ID: MULTICLOUD-401
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/resource/views')
-rw-r--r-- | windriver/titanium_cloud/resource/views/infra_workload.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/windriver/titanium_cloud/resource/views/infra_workload.py b/windriver/titanium_cloud/resource/views/infra_workload.py index ef57e657..ec1e5744 100644 --- a/windriver/titanium_cloud/resource/views/infra_workload.py +++ b/windriver/titanium_cloud/resource/views/infra_workload.py @@ -47,9 +47,9 @@ class InfraWorkload(APIView): try : data = request.data - oof_directive = data["oof_directives"] - template_type = data["template_type"] - template_data = data["template_data"] + oof_directive = data.get("oof_directives", {}) + template_type = data.get("template_type", None) + template_data = data.get("template_data", {}) resp_template = None if template_type and "heat" == template_type.lower(): # update heat parameters from oof_directive |