Fix datastore abnormal display with trove list
According bug description, the datastore display abnormal when use trove list. Change-Id: Ia1dda1c2fb6822ea991afbdf3a67819c262e49a8 Closes-Bug: #1734846
This commit is contained in:
parent
7e14c4f2b0
commit
b626a08450
|
@ -309,13 +309,13 @@ def _print_instances(instances, is_admin=False):
|
|||
setattr(instance, 'size', instance.volume['size'])
|
||||
else:
|
||||
setattr(instance, 'size', '-')
|
||||
if not hasattr(instance, 'region'):
|
||||
setattr(instance, 'region', '')
|
||||
if hasattr(instance, 'datastore'):
|
||||
if instance.datastore.get('version'):
|
||||
setattr(instance, 'datastore_version',
|
||||
instance.datastore['version'])
|
||||
setattr(instance, 'datastore', instance.datastore['type'])
|
||||
if not hasattr(instance, 'region'):
|
||||
setattr(instance, 'region', '')
|
||||
fields = ['id', 'name', 'datastore',
|
||||
'datastore_version', 'status',
|
||||
'flavor_id', 'size', 'region']
|
||||
|
|
Loading…
Reference in New Issue