Remove redundant human_id fields when creating and updating datamodel

For the reason, please see:
[1]. http://eavesdrop.openstack.org/irclogs/%23openstack-watcher/%23openstack-watcher.2019-06-19.log.html
[2]. http://eavesdrop.openstack.org/meetings/watcher/2019/watcher.2019-06-19-08.00.log.html#l-47

Change-Id: I4284397aa987565f4cfc2697907a879d7d6492e9
Related-Bug: #1833665
This commit is contained in:
chenke
2019-07-08 14:13:32 +08:00
parent a01b4ddc81
commit 6dd35a0058
19 changed files with 185 additions and 195 deletions

View File

@@ -357,9 +357,6 @@ class ModelBuilder(object):
flavor = instance.flavor
instance_attributes = {
"uuid": instance.id,
# TODO(chenker) human_id is deprecated for removal. For the reason,
# please reference bug 1833665.
"human_id": instance.human_id,
"name": instance.name,
"memory": flavor["ram"],
"disk": flavor["disk"],

View File

@@ -29,5 +29,4 @@ class ComputeResource(base.Element):
fields = {
"uuid": wfields.StringField(),
"human_id": wfields.StringField(default=""),
}

View File

@@ -74,9 +74,6 @@ class NovaNotification(base.NotificationEndpoint):
instance.update({
'state': instance_data['state'],
'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'],
# 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'],