Merge "Hide 'nodes' field from chassis OSC subcommands output"

This commit is contained in:
Jenkins 2016-09-21 13:31:18 +00:00 committed by Gerrit Code Review
commit c4f7e66531
3 changed files with 9 additions and 0 deletions

View File

@ -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()))

View File

@ -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,

View File

@ -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.