enrich_event should not be a static method
Change-Id: I6ccbf39e3a5547905919522cc10dcd2bc65070bf
This commit is contained in:
parent
d66ea62522
commit
ffe967ba38
@ -44,8 +44,7 @@ class CinderVolumeDriver(DriverBase):
|
||||
datasource_action,
|
||||
'manager')
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
event[DSProps.EVENT_TYPE] = event_type
|
||||
|
||||
return CinderVolumeDriver.make_pickleable([event],
|
||||
|
@ -81,9 +81,7 @@ class DriverBase(object):
|
||||
def _add_datasource_action(entity, datasource_action):
|
||||
entity[DSProps.DATASOURCE_ACTION] = datasource_action
|
||||
|
||||
@staticmethod
|
||||
@abc.abstractmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
"""Return the given event with extra fields
|
||||
|
||||
We add extra data, which the transformer uses later on.
|
||||
|
@ -63,8 +63,7 @@ class HeatStackDriver(DriverBase):
|
||||
'orchestration.stack.resume.error',
|
||||
'orchestration.stack.resume.end']
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
# TODO(Nofar): add call to get resources of the stack if not deleted
|
||||
# change transformer that if delete we remove the stack from the graph
|
||||
# and hence all the edges to it
|
||||
|
@ -27,8 +27,7 @@ class NetworkDriver(NeutronBase):
|
||||
'network.update.end',
|
||||
'network.delete.end']
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
event[DSProps.EVENT_TYPE] = event_type
|
||||
|
||||
return NetworkDriver.make_pickleable([event],
|
||||
|
@ -27,8 +27,7 @@ class PortDriver(NeutronBase):
|
||||
'port.update.end',
|
||||
'port.delete.end']
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
event[DSProps.EVENT_TYPE] = event_type
|
||||
|
||||
return PortDriver.make_pickleable([event], NEUTRON_PORT_DATASOURCE,
|
||||
|
@ -34,8 +34,7 @@ class InstanceDriver(NovaDriverBase):
|
||||
'OS-EXT-SRV-ATTR:user_data',
|
||||
'_info')
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
event[DSProps.EVENT_TYPE] = event_type
|
||||
|
||||
return InstanceDriver.make_pickleable([event],
|
||||
|
@ -45,8 +45,7 @@ class StaticDriver(DriverBase):
|
||||
def get_event_types():
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
pass
|
||||
|
||||
def get_all(self, datasource_action):
|
||||
|
@ -32,8 +32,7 @@ class StaticPhysicalDriver(DriverBase):
|
||||
def get_event_types():
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
pass
|
||||
|
||||
ENTITIES_SECTION = 'entities'
|
||||
|
@ -171,8 +171,7 @@ class ZabbixDriver(AlarmDriverBase):
|
||||
LOG.exception('failed in init %s ', e)
|
||||
return {}
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
event[DSProps.EVENT_TYPE] = event_type
|
||||
|
||||
if ZabbixDriver.conf_map:
|
||||
|
@ -27,8 +27,7 @@ class MockNagiosDriver(NagiosDriver):
|
||||
def get_event_types():
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
pass
|
||||
|
||||
def __init__(self, conf):
|
||||
|
@ -27,8 +27,7 @@ class MockZabbixDriver(ZabbixDriver):
|
||||
def get_event_types():
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
def enrich_event(self, event, event_type):
|
||||
pass
|
||||
|
||||
def __init__(self, conf):
|
||||
|
Loading…
Reference in New Issue
Block a user