Hide 'ports' field from node OSC subcommands output
Hide 'ports' field from output of subcommands: * baremetal node create * baremetal node show Change-Id: Iff42e49a1d2b0b9fe380834bdbcd78760b7ba281 Closes-Bug: #1620737
This commit is contained in:
parent
ae5e6c4152
commit
728063c1af
@ -327,6 +327,7 @@ class CreateBaremetalNode(command.ShowOne):
|
||||
node = baremetal_client.node.create(**fields)._info
|
||||
|
||||
node.pop('links', None)
|
||||
node.pop('ports', None)
|
||||
|
||||
return self.dict2columns(node)
|
||||
|
||||
@ -965,6 +966,7 @@ class ShowBaremetalNode(command.ShowOne):
|
||||
node = baremetal_client.node.get(
|
||||
parsed_args.node, fields=fields)._info
|
||||
node.pop("links", None)
|
||||
node.pop("ports", None)
|
||||
|
||||
return zip(*sorted(node.items()))
|
||||
|
||||
|
@ -278,6 +278,7 @@ class TestBaremetalCreate(TestBaremetal):
|
||||
|
||||
collist = copy.copy(self.collist)
|
||||
self.assertEqual(collist, columns)
|
||||
self.assertNotIn('ports', columns)
|
||||
|
||||
datalist = copy.copy(self.datalist)
|
||||
self.assertEqual(datalist, tuple(data))
|
||||
@ -1335,6 +1336,7 @@ class TestBaremetalShow(TestBaremetal):
|
||||
'uuid'
|
||||
)
|
||||
self.assertEqual(collist, columns)
|
||||
self.assertNotIn('ports', columns)
|
||||
datalist = (
|
||||
'yyy-yyyyyy-yyyy',
|
||||
baremetal_fakes.baremetal_maintenance,
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- Hide ports field in 'node create' and 'node show'
|
||||
OSC subcommand output because this field is not meant
|
||||
for CLI users.
|
Loading…
Reference in New Issue
Block a user