Adding size field cue cluster list command

Closes-bug: 1438939
Change-Id: I54aee8e9f7f088b4f9a9d1b9c75d8260ace0f154
This commit is contained in:
dagnello 2015-08-06 09:58:40 -07:00
parent 0c7559b9a1
commit 14e5f05af0
2 changed files with 5 additions and 4 deletions

View File

@ -23,14 +23,15 @@ class TestListClusters(base.TestCueBase):
verifylist = []
expected = {'00000000-0000-0000-0000-000000001234':
('00000000-0000-0000-0000-000000001234',
'test-cluster', 'ACTIVE', []),
'test-cluster', 'ACTIVE', 1, []),
'00000000-0000-0000-0000-000000005678':
('00000000-0000-0000-0000-000000005678',
'test-cluster2', 'BUILDING', [])}
'test-cluster2', 'BUILDING', 3, [])}
result = self.execute(clusters.ListClustersCommand, arglist,
verifylist)
self.assertEqual(['id', 'name', 'status', 'endpoints'], result[0])
self.assertEqual(['id', 'name', 'status', 'size', 'endpoints'],
result[0])
self.assert_called('GET', '/clusters')
for cluster in result[1]:
self.assertEqual(expected[cluster[0]], cluster)

View File

@ -29,7 +29,7 @@ LOG = logging.getLogger(__name__)
class ListClustersCommand(lister.Lister):
"""List Clusters"""
columns = ['id', 'name', 'status', 'endpoints']
columns = ['id', 'name', 'status', 'size', 'endpoints']
def get_parser(self, prog_name):
parser = super(ListClustersCommand, self).get_parser(prog_name)