update datamodel by nova notifications

Change-Id: Ib2676d6e69eb07644beae66bde22d308bbb836f1
Implements: blueprint update-datamodel-by-nova-notifications
This commit is contained in:
licanwei
2018-09-30 16:34:10 +08:00
parent b69fc584d8
commit a8eed9fc4c
39 changed files with 2602 additions and 712 deletions

View File

@@ -159,11 +159,7 @@ class NovaClusterDataModelCollector(base.BaseClusterDataModelCollector):
:rtype: List of :py:class:`~.EventsNotificationEndpoint` instances
"""
return [
nova.ServiceUpdated(self),
nova.InstanceCreated(self),
nova.InstanceUpdated(self),
nova.InstanceDeletedEnd(self),
nova.VersionedNotification(self),
]
def get_audit_scope_handler(self, audit_scope):
@@ -354,7 +350,8 @@ class ModelBuilder(object):
"vcpus": flavor["vcpus"],
"state": getattr(instance, "OS-EXT-STS:vm_state"),
"metadata": instance.metadata,
"project_id": instance.tenant_id}
"project_id": instance.tenant_id,
"locked": instance.locked}
# node_attributes = dict()
# node_attributes["layer"] = "virtual"