Skip to content

Commit eca1fcd

Browse files
committed
Include hosts in aggregate list --long
This makes it easier to get the total list of aggregates and the hosts belonging to each of them (specially for scripting purposes). Change-Id: I94833c15075ae655bc11e7c0fc47c0abad5846fc Signed-off-by: David Caro <me@dcaro.es>
1 parent 443c311 commit eca1fcd

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

openstackclient/compute/v2/aggregate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,14 @@ def take_action(self, parsed_args):
193193
"Name",
194194
"Availability Zone",
195195
"Properties",
196+
"Hosts",
196197
)
197198
columns = (
198199
"ID",
199200
"Name",
200201
"Availability Zone",
201202
"Metadata",
203+
"Hosts",
202204
)
203205
else:
204206
column_headers = columns = (

openstackclient/tests/unit/compute/v2/test_aggregate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ class TestAggregateList(TestAggregate):
234234
"Name",
235235
"Availability Zone",
236236
"Properties",
237+
"Hosts",
237238
)
238239

239240
list_data = ((
@@ -251,6 +252,7 @@ class TestAggregateList(TestAggregate):
251252
for key, value in TestAggregate.fake_ag.metadata.items()
252253
if key != 'availability_zone'
253254
}),
255+
format_columns.ListColumn(TestAggregate.fake_ag.hosts),
254256
), )
255257

256258
def setUp(self):

0 commit comments

Comments
 (0)