summaryrefslogtreecommitdiff
path: root/novaclient/v3/shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'novaclient/v3/shell.py')
-rw-r--r--novaclient/v3/shell.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/novaclient/v3/shell.py b/novaclient/v3/shell.py
index a50e1a5a..15026604 100644
--- a/novaclient/v3/shell.py
+++ b/novaclient/v3/shell.py
@@ -1334,6 +1334,13 @@ def _print_server(cs, args, server=None):
info['flavor'] = '%s (%s)' % (_find_flavor(cs, flavor_id).name,
flavor_id)
+ if 'security_groups' in info:
+ # 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.
+ info['security_groups'] = ', '.join(
+ sorted(set(group['name'] for group in info['security_groups'])))
+
image = info.get('image', {})
if image:
image_id = image.get('id', '')