Drop ceilometerclient requirement

ceilometerclient is dead in queens cycle, lets drop the
integration and remove the requirement.

Change-Id: I5267746e63fd27ad0ce8e36fb843efd4988d6eb7
This commit is contained in:
Pradeep Kilambi 2018-01-10 14:42:45 -05:00 committed by Zane Bitter
parent 26cfb9a676
commit 6b821beb4e
9 changed files with 8 additions and 118 deletions

View File

@ -48,7 +48,6 @@ We have integration with
* https://git.openstack.org/cgit/openstack/python-keystoneclient (auth) * https://git.openstack.org/cgit/openstack/python-keystoneclient (auth)
* https://git.openstack.org/cgit/openstack/python-swiftclient (object storage) * https://git.openstack.org/cgit/openstack/python-swiftclient (object storage)
* https://git.openstack.org/cgit/openstack/python-neutronclient (networking) * https://git.openstack.org/cgit/openstack/python-neutronclient (networking)
* https://git.openstack.org/cgit/openstack/python-ceilometerclient (metering)
* https://git.openstack.org/cgit/openstack/python-aodhclient (alarming service) * https://git.openstack.org/cgit/openstack/python-aodhclient (alarming service)
* https://git.openstack.org/cgit/openstack/python-cinderclient (block storage) * https://git.openstack.org/cgit/openstack/python-cinderclient (block storage)
* https://git.openstack.org/cgit/openstack/python-glanceclient (image service) * https://git.openstack.org/cgit/openstack/python-glanceclient (image service)

View File

@ -421,7 +421,7 @@ def list_opts():
yield profiler.list_opts()[0] yield profiler.list_opts()[0]
yield 'clients', default_clients_opts yield 'clients', default_clients_opts
for client in ('aodh', 'barbican', 'ceilometer', 'cinder', 'designate', for client in ('aodh', 'barbican', 'cinder', 'designate',
'glance', 'heat', 'keystone', 'magnum', 'manila', 'mistral', 'glance', 'heat', 'keystone', 'magnum', 'manila', 'mistral',
'monasca', 'neutron', 'nova', 'octavia', 'sahara', 'senlin', 'monasca', 'neutron', 'nova', 'octavia', 'sahara', 'senlin',
'swift', 'trove', 'zaqar' 'swift', 'trove', 'zaqar'

View File

@ -1,51 +0,0 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from ceilometerclient import client as cc
from ceilometerclient import exc
from heat.engine.clients import client_plugin
CLIENT_NAME = 'ceilometer'
class CeilometerClientPlugin(client_plugin.ClientPlugin):
exceptions_module = exc
service_types = [METERING, ALARMING] = ['metering', 'alarming']
def _create(self):
con = self.context
interface = self._get_client_option(CLIENT_NAME, 'endpoint_type')
aodh_endpoint = self.url_for(service_type=self.ALARMING,
endpoint_type=interface)
args = {
'session': con.keystone_session,
'interface': interface,
'service_type': self.METERING,
'aodh_endpoint': aodh_endpoint,
'region_name': self._get_region_name()
}
return cc.get_client('2', **args)
def is_not_found(self, ex):
return isinstance(ex, exc.HTTPNotFound)
def is_over_limit(self, ex):
return isinstance(ex, exc.HTTPOverLimit)
def is_conflict(self, ex):
return isinstance(ex, exc.HTTPConflict)

View File

@ -847,9 +847,6 @@ class Resource(status.ResourceStatus):
def trove(self): def trove(self):
return self.client('trove') return self.client('trove')
def ceilometer(self):
return self.client('ceilometer')
def heat(self): def heat(self):
return self.client('heat') return self.client('heat')

View File

@ -1,27 +0,0 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from ceilometerclient import client as cc
from heat.tests import common
from heat.tests import utils
class CeilometerClientPluginTest(common.HeatTestCase):
def test_create(self):
self.patchobject(cc.SessionClient, 'request')
context = utils.dummy_context()
plugin = context.clients.client_plugin('ceilometer')
client = plugin.client()
self.assertIsNotNone(client.alarms)

View File

@ -12,7 +12,6 @@
# under the License. # under the License.
from aodhclient import exceptions as aodh_exc from aodhclient import exceptions as aodh_exc
from ceilometerclient import exc as ceil_exc
from cinderclient import exceptions as cinder_exc from cinderclient import exceptions as cinder_exc
from glanceclient import exc as glance_exc from glanceclient import exc as glance_exc
from heatclient import client as heatclient from heatclient import client as heatclient
@ -340,38 +339,6 @@ class TestClientPluginsInitialise(common.HeatTestCase):
class TestIsNotFound(common.HeatTestCase): class TestIsNotFound(common.HeatTestCase):
scenarios = [ scenarios = [
('ceilometer_not_found', dict(
is_not_found=True,
is_over_limit=False,
is_client_exception=True,
is_conflict=False,
plugin='ceilometer',
exception=lambda: ceil_exc.HTTPNotFound(details='gone'),
)),
('ceilometer_exception', dict(
is_not_found=False,
is_over_limit=False,
is_client_exception=False,
is_conflict=False,
plugin='ceilometer',
exception=lambda: Exception()
)),
('ceilometer_overlimit', dict(
is_not_found=False,
is_over_limit=True,
is_client_exception=True,
is_conflict=False,
plugin='ceilometer',
exception=lambda: ceil_exc.HTTPOverLimit(details='over'),
)),
('ceilometer_conflict', dict(
is_not_found=False,
is_over_limit=False,
is_client_exception=True,
is_conflict=True,
plugin='ceilometer',
exception=lambda: ceil_exc.HTTPConflict(),
)),
('aodh_not_found', dict( ('aodh_not_found', dict(
is_not_found=True, is_not_found=True,
is_over_limit=False, is_over_limit=False,

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
The ceilometer client plugin is no longer provided,
due to the Ceilometer API no longer being available from
Queens and the python-ceilometerclient library being
unmaintained.

View File

@ -33,7 +33,6 @@ PasteDeploy>=1.5.0 # MIT
aodhclient>=0.9.0 # Apache-2.0 aodhclient>=0.9.0 # Apache-2.0
python-barbicanclient>=4.5.2 # Apache-2.0 python-barbicanclient>=4.5.2 # Apache-2.0
python-blazarclient>=1.0.0 # Apache-2.0 python-blazarclient>=1.0.0 # Apache-2.0
python-ceilometerclient>=2.5.0 # Apache-2.0
python-cinderclient>=3.3.0 # Apache-2.0 python-cinderclient>=3.3.0 # Apache-2.0
python-designateclient>=2.7.0 # Apache-2.0 python-designateclient>=2.7.0 # Apache-2.0
python-glanceclient>=2.8.0 # Apache-2.0 python-glanceclient>=2.8.0 # Apache-2.0

View File

@ -66,7 +66,6 @@ heat.clients =
aodh = heat.engine.clients.os.aodh:AodhClientPlugin aodh = heat.engine.clients.os.aodh:AodhClientPlugin
barbican = heat.engine.clients.os.barbican:BarbicanClientPlugin barbican = heat.engine.clients.os.barbican:BarbicanClientPlugin
blazar = heat.engine.clients.os.blazar:BlazarClientPlugin blazar = heat.engine.clients.os.blazar:BlazarClientPlugin
ceilometer = heat.engine.clients.os.ceilometer:CeilometerClientPlugin
cinder = heat.engine.clients.os.cinder:CinderClientPlugin cinder = heat.engine.clients.os.cinder:CinderClientPlugin
designate = heat.engine.clients.os.designate:DesignateClientPlugin designate = heat.engine.clients.os.designate:DesignateClientPlugin
glance = heat.engine.clients.os.glance:GlanceClientPlugin glance = heat.engine.clients.os.glance:GlanceClientPlugin