Remove oslo-incubator use in other client plugins
oslo incubator code is planned to be removed from the clients this cycle. Remove the redundant usage of it from other client plugins. This also includes an unrelated change(to remove the vpnaas post configuration, as we have removed the plugin from the gate jobs), to fix the gate. Last but not least, it limits the number of connections to the database to work around a convergence issue. Change-Id: I01c46197dfebb1eb674817ce81792972a06e529f
This commit is contained in:
parent
674c34bfd2
commit
2045a8d880
@ -13,7 +13,6 @@
|
||||
|
||||
from ceilometerclient import client as cc
|
||||
from ceilometerclient import exc
|
||||
from ceilometerclient.openstack.common.apiclient import exceptions as api_exc
|
||||
|
||||
from heat.engine.clients import client_plugin
|
||||
|
||||
@ -22,7 +21,7 @@ CLIENT_NAME = 'ceilometer'
|
||||
|
||||
class CeilometerClientPlugin(client_plugin.ClientPlugin):
|
||||
|
||||
exceptions_module = [exc, api_exc]
|
||||
exceptions_module = exc
|
||||
|
||||
service_types = [METERING, ALARMING] = ['metering', 'alarming']
|
||||
|
||||
@ -43,7 +42,7 @@ class CeilometerClientPlugin(client_plugin.ClientPlugin):
|
||||
return cc.get_client('2', **args)
|
||||
|
||||
def is_not_found(self, ex):
|
||||
return isinstance(ex, (exc.HTTPNotFound, api_exc.NotFound))
|
||||
return isinstance(ex, exc.HTTPNotFound)
|
||||
|
||||
def is_over_limit(self, ex):
|
||||
return isinstance(ex, exc.HTTPOverLimit)
|
||||
|
@ -11,7 +11,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from magnumclient.common.apiclient import exceptions as mc_exc
|
||||
from magnumclient import exceptions as mc_exc
|
||||
from magnumclient.v1 import client as magnum_client
|
||||
|
||||
from heat.common import exception
|
||||
|
@ -12,7 +12,7 @@
|
||||
# under the License.
|
||||
|
||||
from troveclient import client as tc
|
||||
from troveclient.openstack.common.apiclient import exceptions
|
||||
from troveclient import exceptions
|
||||
|
||||
from heat.common import exception
|
||||
from heat.common.i18n import _
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
from aodhclient import exceptions as aodh_exc
|
||||
from ceilometerclient import exc as ceil_exc
|
||||
from ceilometerclient.openstack.common.apiclient import exceptions as c_a_exc
|
||||
from cinderclient import exceptions as cinder_exc
|
||||
from glanceclient import exc as glance_exc
|
||||
from glanceclient.openstack.common.apiclient import exceptions as g_a_exc
|
||||
@ -395,14 +394,6 @@ class TestIsNotFound(common.HeatTestCase):
|
||||
plugin='ceilometer',
|
||||
exception=lambda: ceil_exc.HTTPNotFound(details='gone'),
|
||||
)),
|
||||
('ceilometer_not_found_apiclient', dict(
|
||||
is_not_found=True,
|
||||
is_over_limit=False,
|
||||
is_client_exception=True,
|
||||
is_conflict=False,
|
||||
plugin='ceilometer',
|
||||
exception=lambda: c_a_exc.NotFound(details='gone'),
|
||||
)),
|
||||
('ceilometer_exception', dict(
|
||||
is_not_found=False,
|
||||
is_over_limit=False,
|
||||
|
@ -12,7 +12,7 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from magnumclient.common.apiclient import exceptions as mc_exc
|
||||
from magnumclient import exceptions as mc_exc
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
@ -14,7 +14,7 @@
|
||||
import copy
|
||||
import mock
|
||||
import six
|
||||
from troveclient.openstack.common.apiclient import exceptions as troveexc
|
||||
from troveclient import exceptions as troveexc
|
||||
|
||||
from heat.common import exception
|
||||
from heat.common import template_format
|
||||
|
@ -15,7 +15,7 @@ import uuid
|
||||
|
||||
import mock
|
||||
import six
|
||||
from troveclient.openstack.common.apiclient import exceptions as troveexc
|
||||
from troveclient import exceptions as troveexc
|
||||
from troveclient.v1 import users
|
||||
|
||||
from heat.common import exception
|
||||
|
@ -624,10 +624,8 @@ class WatchRuleTest(common.HeatTestCase):
|
||||
self.assertEqual(['DummyAction'], actions)
|
||||
self.assertTrue(mock_get_resource.call_count > 0)
|
||||
|
||||
@mock.patch('ceilometerclient.openstack.common.apiclient.'
|
||||
'client.HTTPClient.client_request')
|
||||
@mock.patch('heat.engine.stack.Stack.resource_by_refid')
|
||||
def test_to_ceilometer(self, mock_get_resource, mock_client_request):
|
||||
def test_to_ceilometer(self, mock_get_resource):
|
||||
# Setup
|
||||
rule = {u'EvaluationPeriods': u'1',
|
||||
u'AlarmDescription': u'test alarm',
|
||||
|
@ -33,6 +33,8 @@ echo -e 'notification_driver=messagingv2\n' >> $localconf
|
||||
echo -e 'hidden_stack_tags=hidden\n' >> $localconf
|
||||
echo -e 'encrypt_parameters_and_properties=True\n' >> $localconf
|
||||
echo -e 'logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s\n' >> $localconf
|
||||
# Limit the number of connections, we're overflowing mysql
|
||||
echo -e 'executor_thread_pool_size=8\n' >> $localconf
|
||||
|
||||
echo -e '[heat_api]\nworkers=2\n' >> $localconf
|
||||
echo -e '[heat_api_cfn]\nworkers=2\n' >> $localconf
|
||||
@ -40,9 +42,6 @@ echo -e '[heat_api_cloudwatch]\nworkers=2\n' >> $localconf
|
||||
|
||||
echo -e '[cache]\nenabled=True\n' >> $localconf
|
||||
|
||||
echo -e '[[post-config|/etc/neutron/neutron_vpnaas.conf]]\n' >> $localconf
|
||||
echo -e '[service_providers]\nservice_provider=VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default\n' >> $localconf
|
||||
|
||||
# Use the lbaas v2 namespace driver for devstack integration testing since
|
||||
# octavia uses nested vms.
|
||||
if [[ $OVERRIDE_ENABLED_SERVICES =~ "q-lbaasv2" ]]
|
||||
|
Loading…
Reference in New Issue
Block a user