delete useless input parameter
In the function of `get_event_types`, the input parameter of `conf` is not be used. Change-Id: I405b13c183ac3f928f77f0afeea03d46cba5b755 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
This commit is contained in:
parent
d38d7ee159
commit
c50bf9e68e
@ -53,7 +53,7 @@ class CinderVolumeDriver(DriverBase):
|
||||
SyncMode.UPDATE)[0]
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return ['volume.create.start',
|
||||
'volume.create.end',
|
||||
'volume.attach.start',
|
||||
|
@ -97,7 +97,7 @@ class DriverBase(object):
|
||||
|
||||
@staticmethod
|
||||
@abc.abstractmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
"""Return a list of all event types relevant to this datasource
|
||||
|
||||
Example:
|
||||
|
@ -55,7 +55,7 @@ class HeatStackDriver(DriverBase):
|
||||
return conf[HEAT_STACK_DATASOURCE].notification_topic
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return ['orchestration.stack.create.end',
|
||||
'orchestration.stack.delete.end',
|
||||
'orchestration.stack.update.error',
|
||||
|
@ -57,7 +57,7 @@ class ListenerService(os_service.Service):
|
||||
push_drivers = cls._get_push_drivers(drivers, conf)
|
||||
|
||||
for driver in push_drivers:
|
||||
for event in driver.get_event_types(conf):
|
||||
for event in driver.get_event_types():
|
||||
ret[event].append(driver.enrich_event)
|
||||
|
||||
return ret
|
||||
|
@ -22,7 +22,7 @@ from vitrage.datasources.neutron.network import NEUTRON_NETWORK_DATASOURCE
|
||||
class NetworkDriver(NeutronBase):
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return ['network.create.end',
|
||||
'network.update.end',
|
||||
'network.delete.end']
|
||||
|
@ -22,7 +22,7 @@ from vitrage.datasources.neutron.port import NEUTRON_PORT_DATASOURCE
|
||||
class PortDriver(NeutronBase):
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return ['port.create.end',
|
||||
'port.update.end',
|
||||
'port.delete.end']
|
||||
|
@ -43,7 +43,7 @@ class InstanceDriver(NovaDriverBase):
|
||||
SyncMode.UPDATE)[0]
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
# Add event_types to receive notifications about
|
||||
return ['compute.instance.create.error',
|
||||
'compute.instance.create.end',
|
||||
|
@ -25,7 +25,7 @@ from vitrage.datasources.static_physical import STATIC_PHYSICAL_DATASOURCE
|
||||
|
||||
class StaticPhysicalDriver(DriverBase):
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
|
@ -186,5 +186,5 @@ class ZabbixDriver(AlarmDriverBase):
|
||||
SyncMode.UPDATE)[0]
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return ['zabbix.alarm.ok', 'zabbix.alarm.problem']
|
||||
|
@ -24,7 +24,7 @@ class MockNagiosDriver(NagiosDriver):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
|
@ -24,7 +24,7 @@ class MockZabbixDriver(ZabbixDriver):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
def get_event_types():
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user