Merge "fix get node detail when creating VM is failed"

This commit is contained in:
Zuul 2019-03-21 11:38:52 +00:00 committed by Gerrit Code Review
commit e9115df713
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.