summaryrefslogtreecommitdiff
path: root/ceilometer/volume
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2013-07-24 17:23:11 +0200
committerJulien Danjou <julien@danjou.info>2013-08-07 10:55:27 +0200
commite49c949f394c20321d0fe01c060ec3b4e19d94e6 (patch)
tree5d84fe19d2905c390454ce4d2ddbba9aa714ee0a /ceilometer/volume
parentd7fb018905002690e476c799844d9a77a6406376 (diff)
downloadceilometer-e49c949f394c20321d0fe01c060ec3b4e19d94e6.tar.gz
Handle more Nova and Neutron events
This introduces a simpler matching system for event types that supports wildcard. We use this to grab all Nova instances notifications and a bit more Neutron events. We also change the get_event_types to a property to simplify the code a bit. Change-Id: Ica133ff2e9348a5d2640f068251d034bbd8a4f43
Diffstat (limited to 'ceilometer/volume')
-rw-r--r--ceilometer/volume/notifications.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ceilometer/volume/notifications.py b/ceilometer/volume/notifications.py
index 6f02c350..d4beafe9 100644
--- a/ceilometer/volume/notifications.py
+++ b/ceilometer/volume/notifications.py
@@ -38,6 +38,12 @@ cfg.CONF.register_opts(OPTS)
class _Base(plugin.NotificationBase):
"""Convert volume notifications into Counters."""
+ event_types = [
+ 'volume.exists',
+ 'volume.create.*',
+ 'volume.delete.*',
+ ]
+
@staticmethod
def get_exchange_topics(conf):
"""Return a sequence of ExchangeTopics defining the exchange and
@@ -50,12 +56,6 @@ class _Base(plugin.NotificationBase):
for topic in conf.notification_topics)),
]
- @staticmethod
- def get_event_types():
- return ['volume.exists',
- 'volume.create.end',
- 'volume.delete.start']
-
class Volume(_Base):
def process_notification(self, message):