-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "Closes-Bug: #1494892. Backporting SSL changes from 2.22-dev to…
… 2.20 svc monitor changes to have keystone certificate based ssl handshake Change-Id: I37c48f1faf5d9599489e967c5c40b8445c71b1db" into R2.20
- Loading branch information
Showing
10 changed files
with
294 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
# @author: Sanju Abraham, Juniper Networks, OpenContrail | ||
from requests.adapters import HTTPAdapter | ||
try: | ||
from urllib3.poolmanager import PoolManager | ||
except ImportError: | ||
# This is required for redhat7 as it does not have | ||
# separate urllib3 package installed | ||
from requests.packages.urllib3.poolmanager import PoolManager | ||
import ssl | ||
|
||
class SSLAdapter(HTTPAdapter): | ||
'''An HTTPS Transport Adapter that can be configured with SSL/TLS version.''' | ||
def __init__(self, ssl_version=None, **kwargs): | ||
self.ssl_version = ssl_version | ||
|
||
super(SSLAdapter, self).__init__(**kwargs) | ||
|
||
def init_poolmanager(self, connections, maxsize, block=False): | ||
self.poolmanager = PoolManager(num_pools=connections, | ||
maxsize=maxsize, | ||
block=block, | ||
ssl_version=self.ssl_version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.