Format server partitions output
Change-Id: Ib3b16d1f90509ec161b12cb73b51ff13b0256f2d
This commit is contained in:
parent
a473f6a541
commit
6307baa3f5
@ -138,6 +138,7 @@ class ManageServer(command.ShowOne):
|
||||
data._info.update(
|
||||
{
|
||||
'properties': utils.format_dict(data._info.pop('metadata')),
|
||||
'partitions': utils.format_dict(data._info.pop('partitions')),
|
||||
'flavor': cli_utils.flavor_formatter(
|
||||
bc_client, data._info.pop('flavor_uuid')),
|
||||
'image': cli_utils.image_formatter(
|
||||
|
@ -247,6 +247,7 @@ class CreateServer(command.ShowOne):
|
||||
data._info.update(
|
||||
{
|
||||
'properties': utils.format_dict(data._info.pop('metadata')),
|
||||
'partitions': utils.format_dict(data._info.pop('partitions')),
|
||||
'image': '%s (%s)' % (image_data.name, image_data.id),
|
||||
'flavor': '%s (%s)' % (flavor_data.name, flavor_data.uuid)
|
||||
},
|
||||
@ -456,6 +457,7 @@ class ShowServer(command.ShowOne):
|
||||
data._info.update(
|
||||
{
|
||||
'properties': utils.format_dict(data._info.pop('metadata')),
|
||||
'partitions': utils.format_dict(data._info.pop('partitions')),
|
||||
'addresses': cli_utils.addresses_formatter(
|
||||
network_client,
|
||||
data._info.pop('addresses')),
|
||||
|
@ -273,7 +273,8 @@ class FakeServer(object):
|
||||
dashed=False),
|
||||
"availability_zone": "zone-name-" + uuidutils.generate_uuid(
|
||||
dashed=False),
|
||||
'metadata': {}
|
||||
'metadata': {},
|
||||
'partitions': {}
|
||||
}
|
||||
|
||||
# Overwrite default attributes.
|
||||
|
@ -38,6 +38,7 @@ class TestManageableServer(test_base.TestBaremetalComputeV1):
|
||||
'links',
|
||||
'name',
|
||||
'node_uuid',
|
||||
'partitions',
|
||||
'properties',
|
||||
'updated_at',
|
||||
'uuid')
|
||||
@ -170,6 +171,7 @@ class TestServerManage(TestManageableServer):
|
||||
fk_server.links,
|
||||
fk_server.name,
|
||||
fk_server.node_uuid,
|
||||
utils.format_dict(fk_server.partitions),
|
||||
utils.format_dict(fk_server.metadata),
|
||||
fk_server.updated_at,
|
||||
fk_server.uuid)
|
||||
|
@ -40,6 +40,7 @@ class TestServer(test_base.TestBaremetalComputeV1):
|
||||
'max_count',
|
||||
'min_count',
|
||||
'name',
|
||||
'partitions',
|
||||
'properties',
|
||||
'updated_at',
|
||||
'uuid')
|
||||
@ -140,6 +141,7 @@ class TestServerCreate(TestServer):
|
||||
1,
|
||||
1,
|
||||
fk_server.name,
|
||||
utils.format_dict(fk_server.partitions),
|
||||
utils.format_dict(fk_server.metadata),
|
||||
fk_server.updated_at,
|
||||
fk_server.uuid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user