Merge "Hide 'ports' field from node OSC subcommands output"
This commit is contained in:
commit
4194840935
@ -327,6 +327,7 @@ class CreateBaremetalNode(command.ShowOne):
|
|||||||
node = baremetal_client.node.create(**fields)._info
|
node = baremetal_client.node.create(**fields)._info
|
||||||
|
|
||||||
node.pop('links', None)
|
node.pop('links', None)
|
||||||
|
node.pop('ports', None)
|
||||||
|
|
||||||
return self.dict2columns(node)
|
return self.dict2columns(node)
|
||||||
|
|
||||||
@ -965,6 +966,7 @@ class ShowBaremetalNode(command.ShowOne):
|
|||||||
node = baremetal_client.node.get(
|
node = baremetal_client.node.get(
|
||||||
parsed_args.node, fields=fields)._info
|
parsed_args.node, fields=fields)._info
|
||||||
node.pop("links", None)
|
node.pop("links", None)
|
||||||
|
node.pop("ports", None)
|
||||||
|
|
||||||
return zip(*sorted(node.items()))
|
return zip(*sorted(node.items()))
|
||||||
|
|
||||||
|
@ -278,6 +278,7 @@ class TestBaremetalCreate(TestBaremetal):
|
|||||||
|
|
||||||
collist = copy.copy(self.collist)
|
collist = copy.copy(self.collist)
|
||||||
self.assertEqual(collist, columns)
|
self.assertEqual(collist, columns)
|
||||||
|
self.assertNotIn('ports', columns)
|
||||||
|
|
||||||
datalist = copy.copy(self.datalist)
|
datalist = copy.copy(self.datalist)
|
||||||
self.assertEqual(datalist, tuple(data))
|
self.assertEqual(datalist, tuple(data))
|
||||||
@ -1335,6 +1336,7 @@ class TestBaremetalShow(TestBaremetal):
|
|||||||
'uuid'
|
'uuid'
|
||||||
)
|
)
|
||||||
self.assertEqual(collist, columns)
|
self.assertEqual(collist, columns)
|
||||||
|
self.assertNotIn('ports', columns)
|
||||||
datalist = (
|
datalist = (
|
||||||
'yyy-yyyyyy-yyyy',
|
'yyy-yyyyyy-yyyy',
|
||||||
baremetal_fakes.baremetal_maintenance,
|
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