示例#1
0
 def filter_rule(self):
     """Nova instance.update notification filter"""
     return filtering.NotificationFilter(
         publisher_id=self.publisher_id_regex,
         event_type='instance.update',
         # To be "fully" created, an instance transitions
         # from the 'building' state to the 'active' one.
         # See http://docs.openstack.org/developer/nova/vmstates.html
         payload={
             'nova_object.data': {
                 'state': element.InstanceState.ACTIVE.value,
                 'state_update': {
                     'nova_object.data': {
                         'old_state': element.InstanceState.BUILDING.value,
                         'state': element.InstanceState.ACTIVE.value,
                     },
                     'nova_object.name': 'InstanceStateUpdatePayload',
                     'nova_object.namespace': 'nova',
                 },
             }
         })
示例#2
0
 def filter_rule(self):
     """Nova *.live_migration.post.dest.end notification filter"""
     return filtering.NotificationFilter(
         publisher_id=self.publisher_id_regex,
         event_type='compute.instance.live_migration.post.dest.end',
     )
示例#3
0
 def filter_rule(self):
     """Nova compute.instance.delete.end notification filter"""
     return filtering.NotificationFilter(
         publisher_id=self.publisher_id_regex,
         event_type='compute.instance.delete.end',
     )
示例#4
0
 def filter_rule(self):
     """Nova service.update notification filter"""
     return filtering.NotificationFilter(
         publisher_id=self.publisher_id_regex,
         event_type='instance.delete.end',
     )
示例#5
0
文件: cinder.py 项目: sue-fly/watcher
 def filter_rule(self):
     """Cinder volume notification filter"""
     return filtering.NotificationFilter(
         publisher_id=self.publisher_id_regex,
         event_type='volume.delete.end',
     )
示例#6
0
文件: cinder.py 项目: sue-fly/watcher
 def filter_rule(self):
     """Cinder capacity notification filter"""
     return filtering.NotificationFilter(
         publisher_id=r'capacity.*',
         event_type='capacity.pool',
     )
示例#7
0
 def filter_rule(self):
     """Nova notification filter"""
     return filtering.NotificationFilter(
         publisher_id=self.publisher_id_regex, )