cleanup NovaObjectDictCompat from external_event
cleanup subclassing on NovaObjectDictCompat in nova/objects/external_event.py Due to the exhaustive nature of changes, the cleanup is done one object at a time. There shall be more patches to follow for other objects. Related to blueprint liberty-objects Change-Id: I4265ba55677d82388f78a846ac064244f11c07b7
This commit is contained in:
parent
46568ccc09
commit
a9f487b57a
@ -83,7 +83,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
||||
except exception.InstanceNotFound:
|
||||
LOG.debug('Dropping event %(name)s:%(tag)s for unknown '
|
||||
'instance %(instance_uuid)s',
|
||||
dict(event))
|
||||
{'name': event.name, 'tag': event.tag,
|
||||
'instance_uuid': event.instance_uuid})
|
||||
_event['status'] = 'failed'
|
||||
_event['code'] = 404
|
||||
result = 207
|
||||
@ -97,7 +98,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
||||
accepted_instances.add(instance)
|
||||
LOG.info(_LI('Creating event %(name)s:%(tag)s for '
|
||||
'instance %(instance_uuid)s'),
|
||||
dict(event))
|
||||
{'name': event.name, 'tag': event.tag,
|
||||
'instance_uuid': event.instance_uuid})
|
||||
# NOTE: as the event is processed asynchronously verify
|
||||
# whether 202 is a more suitable response code than 200
|
||||
_event['status'] = 'completed'
|
||||
|
@ -71,7 +71,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
||||
except exception.InstanceNotFound:
|
||||
LOG.debug('Dropping event %(name)s:%(tag)s for unknown '
|
||||
'instance %(instance_uuid)s',
|
||||
dict(event))
|
||||
{'name': event.name, 'tag': event.tag,
|
||||
'instance_uuid': event.instance_uuid})
|
||||
_event['status'] = 'failed'
|
||||
_event['code'] = 404
|
||||
result = 207
|
||||
@ -85,7 +86,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
||||
accepted_instances.add(instance)
|
||||
LOG.info(_LI('Creating event %(name)s:%(tag)s for '
|
||||
'instance %(instance_uuid)s'),
|
||||
dict(event))
|
||||
{'name': event.name, 'tag': event.tag,
|
||||
'instance_uuid': event.instance_uuid})
|
||||
# NOTE: as the event is processed asynchronously verify
|
||||
# whether 202 is a more suitable response code than 200
|
||||
_event['status'] = 'completed'
|
||||
|
@ -29,10 +29,8 @@ EVENT_NAMES = [
|
||||
EVENT_STATUSES = ['failed', 'completed', 'in-progress']
|
||||
|
||||
|
||||
# TODO(berrange): Remove NovaObjectDictCompat
|
||||
@obj_base.NovaObjectRegistry.register
|
||||
class InstanceExternalEvent(obj_base.NovaObject,
|
||||
obj_base.NovaObjectDictCompat):
|
||||
class InstanceExternalEvent(obj_base.NovaObject):
|
||||
# Version 1.0: Initial version
|
||||
# Supports network-changed and vif-plugged
|
||||
# Version 1.1: adds network-vif-deleted event
|
||||
|
Loading…
x
Reference in New Issue
Block a user