def _remove_doctor_events(self):

        for i in range(self.num_of_sent_events):
            try:
                v_utils.generate_fake_host_alarm(
                    'nova.host-0-nova.zone-0-openstack.cluster-0',
                    'test_high_availability_events' + str(i),
                    enabled=False)
            except Exception:
                continue
 def do_create():
     while self.keep_sending_events:
         try:
             v_utils.generate_fake_host_alarm(
                 'nova.host-0-nova.zone-0-openstack.cluster-0',
                 'test_high_availability_events' +
                 str(self.num_of_sent_events))
             self.num_of_sent_events += 1
             time.sleep(spacing)
         except Exception:
             time.sleep(spacing)
             continue
 def _trigger_undo_action(self, trigger_name):
     vitrage_utils.generate_fake_host_alarm(self.orig_host.get('name'),
                                            enabled=False,
                                            event_type=trigger_name)
     time.sleep(2)