summaryrefslogtreecommitdiffstats
path: root/deploy/cloud
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-09-28 14:47:22 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-28 14:47:22 +0000
commit0789fdc49305b2d8403960139beafe1064cef8ba (patch)
tree41dc723a6f339cbced804d37076be288295b4fa1 /deploy/cloud
parentdd4357385318eccfa82c8e079b07e9373ec93cfa (diff)
parentb2a63bfe5746729b4731a14d98c50fb7f59d875e (diff)
Merge "Support different format of fuel task info"
Diffstat (limited to 'deploy/cloud')
-rw-r--r--deploy/cloud/deployment.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py
index 75bd4ef97..ecccc241f 100644
--- a/deploy/cloud/deployment.py
+++ b/deploy/cloud/deployment.py
@@ -179,8 +179,13 @@ class Deployment(object):
out, _ = exec_cmd('fuel2 task show {} -f json'.format(id), False)
task_info = json.loads(out)
properties = {}
- for d in task_info:
- properties.update({d['Field']: d['Value']})
+ # for 9.0 this can be list of dicts or dict
+ # see https://bugs.launchpad.net/fuel/+bug/1625518
+ if isinstance(task_info, list):
+ for d in task_info:
+ properties.update({d['Field']: d['Value']})
+ else:
+ return task_info
return properties
except ValueError as e:
err('Unable to fetch task info: {}'.format(e))