Merge "Add name for instance in Watcher datamodel"
This commit is contained in:
@@ -344,7 +344,10 @@ class ModelBuilder(object):
|
|||||||
flavor = instance.flavor
|
flavor = instance.flavor
|
||||||
instance_attributes = {
|
instance_attributes = {
|
||||||
"uuid": instance.id,
|
"uuid": instance.id,
|
||||||
|
# TODO(chenker) human_id is deprecated for removal. For the reason,
|
||||||
|
# please reference bug 1833665.
|
||||||
"human_id": instance.human_id,
|
"human_id": instance.human_id,
|
||||||
|
"name": instance.name,
|
||||||
"memory": flavor["ram"],
|
"memory": flavor["ram"],
|
||||||
"disk": flavor["disk"],
|
"disk": flavor["disk"],
|
||||||
"disk_capacity": flavor["disk"],
|
"disk_capacity": flavor["disk"],
|
||||||
|
|||||||
@@ -74,7 +74,12 @@ class NovaNotification(base.NotificationEndpoint):
|
|||||||
instance.update({
|
instance.update({
|
||||||
'state': instance_data['state'],
|
'state': instance_data['state'],
|
||||||
'hostname': instance_data['host_name'],
|
'hostname': instance_data['host_name'],
|
||||||
|
# TODO(chenker) human_id is deprecated for removal. For the reason,
|
||||||
|
# please reference bug 1833665.
|
||||||
'human_id': instance_data['display_name'],
|
'human_id': instance_data['display_name'],
|
||||||
|
# this is the user-provided display name of the server which is not
|
||||||
|
# guaranteed to be unique nor is it immutable.
|
||||||
|
'name': instance_data['display_name'],
|
||||||
'memory': memory_mb,
|
'memory': memory_mb,
|
||||||
'vcpus': num_cores,
|
'vcpus': num_cores,
|
||||||
'disk': disk_gb,
|
'disk': disk_gb,
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class TestElement(base.TestCase):
|
|||||||
'state': 'state',
|
'state': 'state',
|
||||||
'hostname': 'hostname',
|
'hostname': 'hostname',
|
||||||
'human_id': 'human_id',
|
'human_id': 'human_id',
|
||||||
|
'name': 'name',
|
||||||
'memory': 111,
|
'memory': 111,
|
||||||
'vcpus': 222,
|
'vcpus': 222,
|
||||||
'disk': 333,
|
'disk': 333,
|
||||||
|
|||||||
Reference in New Issue
Block a user