Merge "Allow display project-id for server groups"

This commit is contained in:
Jenkins 2015-08-17 16:19:01 +00:00 committed by Gerrit Code Review
commit a695683775
2 changed files with 9 additions and 2 deletions
novaclient
tests/unit/v2
v2

@ -2471,7 +2471,8 @@ class ShellTest(utils.TestCase):
self.run_command('server-group-create wjsg affinity')
self.assert_called('POST', '/os-server-groups',
{'server_group': {'name': 'wjsg',
'policies': ['affinity']}})
'policies': ['affinity']}},
pos=0)
def test_delete_multi_server_groups(self):
self.run_command('server-group-delete 12345 56789')

@ -4422,7 +4422,13 @@ def do_availability_zone_list(cs, _args):
def _print_server_group_details(server_group):
columns = ['Id', 'Name', 'Policies', 'Members', 'Metadata']
# This is for compatible with Nova v2 API, remove after v2
# is dropped.
if hasattr(server_group, 'project_id'):
columns = ['Id', 'Name', 'Project_id', 'Policies',
'Members', 'Metadata']
else:
columns = ['Id', 'Name', 'Policies', 'Members', 'Metadata']
utils.print_list(server_group, columns)