diff --git a/aodh/notifier/zaqar.py b/aodh/notifier/zaqar.py index 2b33d4c8e..59078878b 100644 --- a/aodh/notifier/zaqar.py +++ b/aodh/notifier/zaqar.py @@ -41,7 +41,7 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier): def __init__(self, conf): super(ZaqarAlarmNotifier, self).__init__(conf) self.conf = conf - self.client = self.get_zaqar_client() + self._zclient = None def _get_endpoint(self): try: @@ -95,6 +95,12 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier): message = dict(body=body) self.notify_zaqar(action, message) + @property + def client(self): + if self._zclient is None: + self._zclient = self.get_zaqar_client() + return self._zclient + def notify_zaqar(self, action, message): queue_info = urlparse.parse_qs(action.query)