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:
@@ -83,7 +83,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
|||||||
except exception.InstanceNotFound:
|
except exception.InstanceNotFound:
|
||||||
LOG.debug('Dropping event %(name)s:%(tag)s for unknown '
|
LOG.debug('Dropping event %(name)s:%(tag)s for unknown '
|
||||||
'instance %(instance_uuid)s',
|
'instance %(instance_uuid)s',
|
||||||
dict(event))
|
{'name': event.name, 'tag': event.tag,
|
||||||
|
'instance_uuid': event.instance_uuid})
|
||||||
_event['status'] = 'failed'
|
_event['status'] = 'failed'
|
||||||
_event['code'] = 404
|
_event['code'] = 404
|
||||||
result = 207
|
result = 207
|
||||||
@@ -97,7 +98,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
|||||||
accepted_instances.add(instance)
|
accepted_instances.add(instance)
|
||||||
LOG.info(_LI('Creating event %(name)s:%(tag)s for '
|
LOG.info(_LI('Creating event %(name)s:%(tag)s for '
|
||||||
'instance %(instance_uuid)s'),
|
'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
|
# NOTE: as the event is processed asynchronously verify
|
||||||
# whether 202 is a more suitable response code than 200
|
# whether 202 is a more suitable response code than 200
|
||||||
_event['status'] = 'completed'
|
_event['status'] = 'completed'
|
||||||
|
@@ -71,7 +71,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
|||||||
except exception.InstanceNotFound:
|
except exception.InstanceNotFound:
|
||||||
LOG.debug('Dropping event %(name)s:%(tag)s for unknown '
|
LOG.debug('Dropping event %(name)s:%(tag)s for unknown '
|
||||||
'instance %(instance_uuid)s',
|
'instance %(instance_uuid)s',
|
||||||
dict(event))
|
{'name': event.name, 'tag': event.tag,
|
||||||
|
'instance_uuid': event.instance_uuid})
|
||||||
_event['status'] = 'failed'
|
_event['status'] = 'failed'
|
||||||
_event['code'] = 404
|
_event['code'] = 404
|
||||||
result = 207
|
result = 207
|
||||||
@@ -85,7 +86,8 @@ class ServerExternalEventsController(wsgi.Controller):
|
|||||||
accepted_instances.add(instance)
|
accepted_instances.add(instance)
|
||||||
LOG.info(_LI('Creating event %(name)s:%(tag)s for '
|
LOG.info(_LI('Creating event %(name)s:%(tag)s for '
|
||||||
'instance %(instance_uuid)s'),
|
'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
|
# NOTE: as the event is processed asynchronously verify
|
||||||
# whether 202 is a more suitable response code than 200
|
# whether 202 is a more suitable response code than 200
|
||||||
_event['status'] = 'completed'
|
_event['status'] = 'completed'
|
||||||
|
@@ -29,10 +29,8 @@ EVENT_NAMES = [
|
|||||||
EVENT_STATUSES = ['failed', 'completed', 'in-progress']
|
EVENT_STATUSES = ['failed', 'completed', 'in-progress']
|
||||||
|
|
||||||
|
|
||||||
# TODO(berrange): Remove NovaObjectDictCompat
|
|
||||||
@obj_base.NovaObjectRegistry.register
|
@obj_base.NovaObjectRegistry.register
|
||||||
class InstanceExternalEvent(obj_base.NovaObject,
|
class InstanceExternalEvent(obj_base.NovaObject):
|
||||||
obj_base.NovaObjectDictCompat):
|
|
||||||
# Version 1.0: Initial version
|
# Version 1.0: Initial version
|
||||||
# Supports network-changed and vif-plugged
|
# Supports network-changed and vif-plugged
|
||||||
# Version 1.1: adds network-vif-deleted event
|
# Version 1.1: adds network-vif-deleted event
|
||||||
|
Reference in New Issue
Block a user