Revert "Adding worker multiplier support"
This reverts commit 32abfe1733
.
Change-Id: Ic0602e980c07a71de9e2d68c86e83f46211ab2a7
This commit is contained in:
parent
32abfe1733
commit
6eeb59d6bd
|
@ -26,7 +26,6 @@ import charms.reactive.bus
|
|||
import charmhelpers.contrib.hahelpers.cluster as ch_cluster
|
||||
import charmhelpers.contrib.network.ip as ch_ip
|
||||
import charmhelpers.contrib.openstack.utils as ch_utils
|
||||
import charmhelpers.contrib.openstack.context as ch_context
|
||||
import charmhelpers.core.hookenv as hookenv
|
||||
import charmhelpers.core.host as ch_host
|
||||
import charms_openstack.ip as os_ip
|
||||
|
@ -488,7 +487,7 @@ class APIConfigurationAdapter(ConfigurationAdapter):
|
|||
|
||||
def __init__(self, port_map=None, service_name=None, charm_instance=None):
|
||||
"""
|
||||
Note passing port_map and service_name is deprecated, but supported for
|
||||
Note passing port_map and service_name is deprecated, but supporte for
|
||||
backwards compatibility. The port_map and service_name can be got from
|
||||
the self.charm_instance weak reference.
|
||||
:param port_map: Map containing service names and the ports used e.g.
|
||||
|
@ -530,14 +529,6 @@ class APIConfigurationAdapter(ConfigurationAdapter):
|
|||
self.service_name = None
|
||||
self.__network_addresses = None
|
||||
|
||||
@property
|
||||
def worker_config(self):
|
||||
"""Return the worker configuration used service templates"""
|
||||
return {
|
||||
k: v for k, v in ch_context.WSGIWorkerConfigContext()().items()
|
||||
if k in ('processes',
|
||||
'admin_processes', 'public_processes')}
|
||||
|
||||
@property
|
||||
def network_addresses(self):
|
||||
"""Return the network_addresses as a property for a consuming template.
|
||||
|
|
|
@ -28,8 +28,6 @@ sys.modules['charmhelpers.core.templating'] = charmhelpers.core.templating
|
|||
sys.modules['charmhelpers.core.unitdata'] = charmhelpers.core.unitdata
|
||||
sys.modules['charmhelpers.contrib'] = charmhelpers.contrib
|
||||
sys.modules['charmhelpers.contrib.openstack'] = charmhelpers.contrib.openstack
|
||||
sys.modules['charmhelpers.contrib.openstack.context'] = (
|
||||
charmhelpers.contrib.openstack.context)
|
||||
sys.modules['charmhelpers.contrib.openstack.utils'] = (
|
||||
charmhelpers.contrib.openstack.utils)
|
||||
sys.modules['charmhelpers.contrib.openstack.templating'] = (
|
||||
|
|
|
@ -26,8 +26,6 @@ import mock
|
|||
|
||||
import charms_openstack.adapters as adapters
|
||||
|
||||
from charmhelpers.contrib.openstack import context
|
||||
|
||||
|
||||
class TestCustomProperties(unittest.TestCase):
|
||||
|
||||
|
@ -408,16 +406,6 @@ class TestAPIConfigurationAdapter(unittest.TestCase):
|
|||
'internal': 9002,
|
||||
}}
|
||||
|
||||
def test_worker_config(self):
|
||||
worker_config = {'processes': 1.0, 'admin_processes': 0.75,
|
||||
'public_processes': 0.25}
|
||||
__call__mock = mock.Mock(return_value=worker_config)
|
||||
context.WSGIWorkerConfigContext.return_value = __call__mock
|
||||
wc = adapters.APIConfigurationAdapter().worker_config
|
||||
self.assertEqual(wc['processes'], 1.0)
|
||||
self.assertEqual(wc['admin_processes'], 0.75)
|
||||
self.assertEqual(wc['public_processes'], 0.25)
|
||||
|
||||
def test_class(self):
|
||||
test_config = {
|
||||
'prefer-ipv6': False,
|
||||
|
|
Loading…
Reference in New Issue