diff options
Diffstat (limited to 'catalog/pub/Dmaap_lib/dmaap')
-rw-r--r-- | catalog/pub/Dmaap_lib/dmaap/consumer.py | 3 | ||||
-rw-r--r-- | catalog/pub/Dmaap_lib/dmaap/identity.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/catalog/pub/Dmaap_lib/dmaap/consumer.py b/catalog/pub/Dmaap_lib/dmaap/consumer.py index d817b81..d5b5351 100644 --- a/catalog/pub/Dmaap_lib/dmaap/consumer.py +++ b/catalog/pub/Dmaap_lib/dmaap/consumer.py @@ -23,6 +23,7 @@ import requests from catalog.pub.Dmaap_lib.pub.exceptions import DmaapClientException +requests.packages.urllib3.disable_warnings() logger = logging.getLogger(__name__) @@ -75,7 +76,7 @@ class ConsumerClient: url = self.create_url() if self.api_key: headers = self.create_headers() - ret = requests.get(url=url, headers=headers) + ret = requests.get(url=url, headers=headers, verify=False) else: ret = requests.get(url) logger.info("Status code is %s, detail is %s.", ret.status_code, ret.json()) diff --git a/catalog/pub/Dmaap_lib/dmaap/identity.py b/catalog/pub/Dmaap_lib/dmaap/identity.py index 9ca68cd..57f4016 100644 --- a/catalog/pub/Dmaap_lib/dmaap/identity.py +++ b/catalog/pub/Dmaap_lib/dmaap/identity.py @@ -19,6 +19,7 @@ import requests from catalog.pub.Dmaap_lib.pub.exceptions import DmaapClientException +requests.packages.urllib3.disable_warnings() logger = logging.getLogger(__name__) @@ -35,7 +36,7 @@ class IdentityClient: } data = json.JSONEncoder().encode(data) url = self.base_url + "/apiKeys/create" - ret = requests.post(url=url, data=data, headers=headers) + ret = requests.post(url=url, data=data, headers=headers, verify=False) logger.info('create apiKey, response status_code: %s, body: %s', ret.status_code, ret.json()) if ret.status_code != 200: raise DmaapClientException(ret.json()) |