Show '-' for size when volume support disabled
When volume support is disabled trove list does not contain include a volume attribute in the response. Previously we would only add a value for size when the volume attribute was present. This change adds a value of '-' when there is no volume attribute. This makes the behaviour consistent with the behaviour of nova list where the task state has no value. Change-Id: I75e5f7c493f3d2fe938ecc8663457953c58f6b02 Closes-Bug:1394591
This commit is contained in:
@@ -177,6 +177,8 @@ def do_list(cs, args):
|
||||
setattr(instance, 'flavor_id', instance.flavor['id'])
|
||||
if hasattr(instance, 'volume'):
|
||||
setattr(instance, 'size', instance.volume['size'])
|
||||
else:
|
||||
setattr(instance, 'size', '-')
|
||||
if hasattr(instance, 'datastore'):
|
||||
if instance.datastore.get('version'):
|
||||
setattr(instance, 'datastore_version',
|
||||
|
||||
Reference in New Issue
Block a user