diff --git a/magnumclient/tests/v1/test_bays_shell.py b/magnumclient/tests/v1/test_bays_shell.py index f021ccb6..5194829c 100644 --- a/magnumclient/tests/v1/test_bays_shell.py +++ b/magnumclient/tests/v1/test_bays_shell.py @@ -53,13 +53,14 @@ class ShellTest(shell_test_base.TestCommandLineArgument): def test_bay_list_ignored_duplicated_field(self, mock_list): mock_list.return_value = [FakeBay()] self._test_arg_success('bay-list --fields status,status,status,name', - keyword='\n| uuid | name | Status |\n') + keyword=('\n| uuid | name | node_count | ' + 'master_count | status |\n')) # Output should be - # +------+------+--------+ - # | uuid | name | Status | - # +------+------+--------+ - # | x | x | x | - # +------+------+--------+ + # +------+------+------------+--------------+--------+ + # | uuid | name | node_count | master_count | status | + # +------+------+------------+--------------+--------+ + # | x | x | x | x | x | + # +------+------+------------+--------------+--------+ self.assertTrue(mock_list.called) @mock.patch('magnumclient.v1.bays.BayManager.list') diff --git a/magnumclient/v1/bays_shell.py b/magnumclient/v1/bays_shell.py index 05275783..935c625a 100644 --- a/magnumclient/v1/bays_shell.py +++ b/magnumclient/v1/bays_shell.py @@ -51,7 +51,7 @@ def do_bay_list(cs, args): bays = cs.bays.list(marker=args.marker, limit=args.limit, sort_key=args.sort_key, sort_dir=args.sort_dir) - columns = ['uuid', 'name'] + columns = ['uuid', 'name', 'node_count', 'master_count', 'status'] columns += utils._get_list_table_columns_and_formatters( args.fields, bays, exclude_fields=(c.lower() for c in columns))[0]