Hide 'nodes' field from chassis OSC subcommands output
Hide 'nodes' field from output of subcommands: * baremetal chassis create * baremetal chassis show Change-Id: I1dc10abef99aaacbfb71c23e5d1d5848cefc963f Closes-Bug: #1621021
This commit is contained in:
parent
ae5e6c4152
commit
9f135f377c
@ -63,6 +63,7 @@ class CreateBaremetalChassis(command.ShowOne):
|
||||
chassis = baremetal_client.chassis.create(**fields)._info
|
||||
|
||||
chassis.pop('links', None)
|
||||
chassis.pop('nodes', None)
|
||||
|
||||
return self.dict2columns(chassis)
|
||||
|
||||
@ -260,6 +261,7 @@ class ShowBaremetalChassis(command.ShowOne):
|
||||
chassis = baremetal_client.chassis.get(parsed_args.chassis,
|
||||
fields=fields)._info
|
||||
chassis.pop("links", None)
|
||||
chassis.pop("nodes", None)
|
||||
|
||||
return zip(*sorted(chassis.items()))
|
||||
|
||||
|
@ -72,6 +72,7 @@ class TestChassisCreate(TestChassis):
|
||||
|
||||
collist = copy.copy(self.collist)
|
||||
self.assertEqual(collist, columns)
|
||||
self.assertNotIn('nodes', columns)
|
||||
|
||||
datalist = copy.copy(self.datalist)
|
||||
self.assertEqual(datalist, tuple(data))
|
||||
@ -431,6 +432,7 @@ class TestChassisShow(TestChassis):
|
||||
'uuid'
|
||||
)
|
||||
self.assertEqual(collist, columns)
|
||||
self.assertNotIn('nodes', columns)
|
||||
datalist = (
|
||||
baremetal_fakes.baremetal_chassis_description,
|
||||
baremetal_fakes.baremetal_chassis_extra,
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- Hide nodes field in 'chasiss create' and 'chassis show'
|
||||
OSC subcommand output because this field is not meant
|
||||
for CLI users.
|
Loading…
Reference in New Issue
Block a user