Removes a module-level variable that was just a
pointer to the httplib.HTTPConnection class. It's
purpose was to give mock.patch a target that wouldn't
affect other code using the httplib.HTTPConnection
library. However, it is unnecessary now that the
root cause of the original patches not being stopped
by mock.patch.stopall was fixed in bug
1303605 (change
Ia5b374c5f8d3a7905d915de4f1f8d4f3a6f0e58d).
Closes-Bug: #
1304558
Change-Id: Idf814b075a80245bb9751466c2b58d719a1b81f3
HASH_MATCH_HEADER = 'X-BSN-BVS-HASH-MATCH'
# error messages
NXNETWORK = 'NXVNS'
-# NOTE(kevinbenton): This following is to give mock a target that doesn't
-# affect other users of httplib.HTTPConnection
-HTTPConnection = httplib.HTTPConnection
class RemoteRestError(exceptions.NeutronException):
return 0, None, None, None
self.currentconn.combined_cert = self.combined_cert
else:
- self.currentconn = HTTPConnection(
+ self.currentconn = httplib.HTTPConnection(
self.server, self.port, timeout=timeout)
if self.currentconn is None:
LOG.error(_('ServerProxy: Could not establish HTTP '
CALLBACKS = 'neutron.plugins.bigswitch.plugin.RestProxyCallbacks'
CERTFETCH = 'neutron.plugins.bigswitch.servermanager.ServerPool._fetch_cert'
SERVER_MANAGER = 'neutron.plugins.bigswitch.servermanager'
-HTTPCON = 'neutron.plugins.bigswitch.servermanager.HTTPConnection'
+HTTPCON = 'neutron.plugins.bigswitch.servermanager.httplib.HTTPConnection'
SPAWN = 'neutron.plugins.bigswitch.plugin.eventlet.GreenPool.spawn_n'
CWATCH = SERVER_MANAGER + '.ServerPool._consistency_watchdog'
SERVERMANAGER = PLUGIN + '.servermanager'
SERVERPOOL = SERVERMANAGER + '.ServerPool'
SERVERRESTCALL = SERVERMANAGER + '.ServerProxy.rest_call'
-HTTPCON = SERVERMANAGER + '.HTTPConnection'
+HTTPCON = SERVERMANAGER + '.httplib.HTTPConnection'
class CapabilitiesTests(test_router_db.RouterDBTestBase):
import neutron.tests.unit.test_extension_allowedaddresspairs as test_addr_pair
patch = mock.patch
-HTTPCON = 'neutron.plugins.bigswitch.servermanager.HTTPConnection'
+HTTPCON = 'neutron.plugins.bigswitch.servermanager.httplib.HTTPConnection'
class BigSwitchProxyPluginV2TestCase(test_base.BigSwitchTestBase,
from neutron.tests.unit import test_l3_plugin
-HTTPCON = 'neutron.plugins.bigswitch.servermanager.HTTPConnection'
+HTTPCON = 'neutron.plugins.bigswitch.servermanager.httplib.HTTPConnection'
_uuid = uuidutils.generate_uuid
from neutron.tests.unit.bigswitch import test_restproxy_plugin as test_rp
SERVERMANAGER = 'neutron.plugins.bigswitch.servermanager'
-HTTPCON = SERVERMANAGER + '.HTTPConnection'
+HTTPCON = SERVERMANAGER + '.httplib.HTTPConnection'
HTTPSCON = SERVERMANAGER + '.HTTPSConnectionWithValidation'