From 674cdfb707b19046bb692822d46a80ce425aeb08 Mon Sep 17 00:00:00 2001 From: Michael James Hoppal Date: Thu, 13 Apr 2017 13:39:49 -0600 Subject: [PATCH] Insecure and verify were being treated equally Change-Id: I64bc34e3c2e22352990a7f456baedf191688724f --- monasca_notification/plugins/hipchat_notifier.py | 4 ++-- monasca_notification/plugins/slack_notifier.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monasca_notification/plugins/hipchat_notifier.py b/monasca_notification/plugins/hipchat_notifier.py index c1ca082..a2b271d 100644 --- a/monasca_notification/plugins/hipchat_notifier.py +++ b/monasca_notification/plugins/hipchat_notifier.py @@ -1,4 +1,4 @@ -# (C) Copyright 2016 Hewlett Packard Enterprise Development LP +# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -95,7 +95,7 @@ class HipChatNotifier(abstract_notifier.AbstractNotifier): url = urlparse.urljoin(notification.address, urlparse.urlparse(notification.address).path) # Default option is to do cert verification - verify = self._config.get('insecure', False) + verify = not self._config.get('insecure', True) # If ca_certs is specified, do cert validation and ignore insecure flag if (self._config.get("ca_certs")): verify = self._config.get("ca_certs") diff --git a/monasca_notification/plugins/slack_notifier.py b/monasca_notification/plugins/slack_notifier.py index 96af33a..0be4a0f 100644 --- a/monasca_notification/plugins/slack_notifier.py +++ b/monasca_notification/plugins/slack_notifier.py @@ -1,4 +1,4 @@ -# (C) Copyright 2016 Hewlett Packard Enterprise Development LP +# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ class SlackNotifier(abstract_notifier.AbstractNotifier): url = urlparse.urljoin(address, urlparse.urlparse(address).path) # Default option is to do cert verification - verify = self._config.get('insecure', False) + verify = not self._config.get('insecure', True) # If ca_certs is specified, do cert validation and ignore insecure flag if (self._config.get("ca_certs")): verify = self._config.get("ca_certs")