fix get node detail when creating VM is failed

Change-Id: Ice4ea35bb7c91612e79d2a7d707dca24605a3f3b
Closes-Bug: #1820823
This commit is contained in:
Thai Nguyen Ngoc 2019-03-19 16:21:36 +07:00
parent 9707977825
commit 0ff5aabd1f
1 changed files with 3 additions and 2 deletions

View File

@ -1339,8 +1339,9 @@ class ServerProfile(base.Profile):
# process security groups
sgroups = []
if 'security_groups' in server_data:
for sg in server_data['security_groups']:
sgroups.append(sg['name'])
if server_data['security_groups'] is not None:
for sg in server_data['security_groups']:
sgroups.append(sg['name'])
# when we have multiple nics the info will include the
# security groups N times where N == number of nics. Be nice
# and only display it once.