summaryrefslogtreecommitdiff
path: root/novaclient/v1_1/shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'novaclient/v1_1/shell.py')
-rw-r--r--novaclient/v1_1/shell.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py
index 662cb51b..4f82b02c 100644
--- a/novaclient/v1_1/shell.py
+++ b/novaclient/v1_1/shell.py
@@ -1626,8 +1626,11 @@ def _print_server(cs, args, server=None):
flavor_id)
if 'security_groups' in info:
- info['security_groups'] = \
- ', '.join(group['name'] for group in info['security_groups'])
+ # 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: