Fix all_tenants doesn't work for group list
all_tenants is forgotten to pass by group list. This patch fixed it. Change-Id: I419430e929038c35747c59600be83f2e2d084802 Closes-bug: #1671293
This commit is contained in:
@@ -236,6 +236,11 @@ class ShellTest(utils.TestCase):
|
|||||||
self.run_command('--os-volume-api-version 3.13 group-list')
|
self.run_command('--os-volume-api-version 3.13 group-list')
|
||||||
self.assert_called_anytime('GET', '/groups/detail')
|
self.assert_called_anytime('GET', '/groups/detail')
|
||||||
|
|
||||||
|
def test_group_list__with_all_tenant(self):
|
||||||
|
self.run_command(
|
||||||
|
'--os-volume-api-version 3.13 group-list --all-tenants')
|
||||||
|
self.assert_called_anytime('GET', '/groups/detail?all_tenants=1')
|
||||||
|
|
||||||
def test_group_show(self):
|
def test_group_show(self):
|
||||||
self.run_command('--os-volume-api-version 3.13 '
|
self.run_command('--os-volume-api-version 3.13 '
|
||||||
'group-show 1234')
|
'group-show 1234')
|
||||||
|
@@ -753,11 +753,13 @@ def do_manageable_list(cs, args):
|
|||||||
nargs='?',
|
nargs='?',
|
||||||
type=int,
|
type=int,
|
||||||
const=1,
|
const=1,
|
||||||
default=0,
|
default=utils.env('ALL_TENANTS', default=0),
|
||||||
help='Shows details for all tenants. Admin only.')
|
help='Shows details for all tenants. Admin only.')
|
||||||
def do_group_list(cs, args):
|
def do_group_list(cs, args):
|
||||||
"""Lists all groups."""
|
"""Lists all groups."""
|
||||||
groups = cs.groups.list()
|
search_opts = {'all_tenants': args.all_tenants}
|
||||||
|
|
||||||
|
groups = cs.groups.list(search_opts=search_opts)
|
||||||
|
|
||||||
columns = ['ID', 'Status', 'Name']
|
columns = ['ID', 'Status', 'Name']
|
||||||
utils.print_list(groups, columns)
|
utils.print_list(groups, columns)
|
||||||
|
Reference in New Issue
Block a user