summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-08-09 10:21:34 +0000
committerGerrit Code Review <review@openstack.org>2018-08-09 10:21:34 +0000
commitfc79d56d9d4e643dda138f39a0fd9f983c96265b (patch)
treef9434e1aa556392bb36daf1310c1bf308b77b969
parent8ca06cfeafc94e739947cf89affa4db57b6bf3c9 (diff)
parent6b821beb4e712df5427f5fc3213fc6e597262274 (diff)
downloadheat-fc79d56d9d4e643dda138f39a0fd9f983c96265b.tar.gz
Merge "Drop ceilometerclient requirement"
-rw-r--r--README.rst1
-rw-r--r--heat/common/config.py2
-rw-r--r--heat/engine/clients/os/ceilometer.py51
-rw-r--r--heat/engine/resource.py3
-rw-r--r--heat/tests/clients/test_ceilometer_client.py27
-rw-r--r--heat/tests/clients/test_clients.py33
-rw-r--r--releasenotes/notes/drop-ceilometerclient-868ee47eedf2dff4.yaml7
-rw-r--r--requirements.txt1
-rw-r--r--setup.cfg1
9 files changed, 8 insertions, 118 deletions
diff --git a/README.rst b/README.rst
index 9eb9fd3d8..3f3beed11 100644
--- a/README.rst
+++ b/README.rst
@@ -58,7 +58,6 @@ We have integration with
* 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-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-cinderclient (block storage)
* https://git.openstack.org/cgit/openstack/python-glanceclient (image service)
diff --git a/heat/common/config.py b/heat/common/config.py
index b33516dc0..e64d97061 100644
--- a/heat/common/config.py
+++ b/heat/common/config.py
@@ -421,7 +421,7 @@ def list_opts():
yield profiler.list_opts()[0]
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',
'monasca', 'neutron', 'nova', 'octavia', 'sahara', 'senlin',
'swift', 'trove', 'zaqar'
diff --git a/heat/engine/clients/os/ceilometer.py b/heat/engine/clients/os/ceilometer.py
deleted file mode 100644
index 1436b3290..000000000
--- a/heat/engine/clients/os/ceilometer.py
+++ /dev/null
@@ -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)
diff --git a/heat/engine/resource.py b/heat/engine/resource.py
index 0965370ff..ca3cfc1f1 100644
--- a/heat/engine/resource.py
+++ b/heat/engine/resource.py
@@ -848,9 +848,6 @@ class Resource(status.ResourceStatus):
def trove(self):
return self.client('trove')
- def ceilometer(self):
- return self.client('ceilometer')
-
def heat(self):
return self.client('heat')
diff --git a/heat/tests/clients/test_ceilometer_client.py b/heat/tests/clients/test_ceilometer_client.py
deleted file mode 100644
index c3d3dbd57..000000000
--- a/heat/tests/clients/test_ceilometer_client.py
+++ /dev/null
@@ -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)
diff --git a/heat/tests/clients/test_clients.py b/heat/tests/clients/test_clients.py
index 0c57c99ad..83fd36ac9 100644
--- a/heat/tests/clients/test_clients.py
+++ b/heat/tests/clients/test_clients.py
@@ -12,7 +12,6 @@
# under the License.
from aodhclient import exceptions as aodh_exc
-from ceilometerclient import exc as ceil_exc
from cinderclient import exceptions as cinder_exc
from glanceclient import exc as glance_exc
from heatclient import client as heatclient
@@ -340,38 +339,6 @@ class TestClientPluginsInitialise(common.HeatTestCase):
class TestIsNotFound(common.HeatTestCase):
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(
is_not_found=True,
is_over_limit=False,
diff --git a/releasenotes/notes/drop-ceilometerclient-868ee47eedf2dff4.yaml b/releasenotes/notes/drop-ceilometerclient-868ee47eedf2dff4.yaml
new file mode 100644
index 000000000..734a9c8e6
--- /dev/null
+++ b/releasenotes/notes/drop-ceilometerclient-868ee47eedf2dff4.yaml
@@ -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. \ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index af7fb54a7..5be9c7903 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -33,7 +33,6 @@ PasteDeploy>=1.5.0 # MIT
aodhclient>=0.9.0 # Apache-2.0
python-barbicanclient>=4.5.2 # 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-designateclient>=2.7.0 # Apache-2.0
python-glanceclient>=2.8.0 # Apache-2.0
diff --git a/setup.cfg b/setup.cfg
index 4cdd0b5db..21078c38f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -66,7 +66,6 @@ heat.clients =
aodh = heat.engine.clients.os.aodh:AodhClientPlugin
barbican = heat.engine.clients.os.barbican:BarbicanClientPlugin
blazar = heat.engine.clients.os.blazar:BlazarClientPlugin
- ceilometer = heat.engine.clients.os.ceilometer:CeilometerClientPlugin
cinder = heat.engine.clients.os.cinder:CinderClientPlugin
designate = heat.engine.clients.os.designate:DesignateClientPlugin
glance = heat.engine.clients.os.glance:GlanceClientPlugin