summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin CAMEY <martin.camey@objectif-libre.com>2018-04-10 18:48:23 +0200
committerMartin CAMEY <martin.camey@objectif-libre.com>2018-04-11 11:45:06 +0200
commitee29136f6e9f63bfc5375aacc204dddd6bcb2d9d (patch)
tree66e6355c3aec683d69ba825f690fa368046b7d5a
parent8e49b19ba2a7d41857df23fbc6b2ed21ee077170 (diff)
Update client and tests for services endpointsHEADmaster
Cloudkitty is now based on metrics and no more on services for the metrology part. This reflects the changes from cloudkitty in the tempest plugin. The tests retrieving services are updated and commented until the corresponding patch in Cloudkitty is merged. Change-Id: Ib829090a43e13e4b66917a66f6e865783b9216f0
Notes
Notes (review): Code-Review+2: Luka Peschke <luka.peschke@objectif-libre.com> Workflow+1: Maxime Cottret <maxime.cottret@objectif-libre.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 11 Apr 2018 14:24:19 +0000 Reviewed-on: https://review.openstack.org/560082 Project: openstack/cloudkitty-tempest-plugin Branch: refs/heads/master
-rw-r--r--cloudkitty_tempest_plugin/services/client.py8
-rw-r--r--cloudkitty_tempest_plugin/tests/api/test_cloudkitty_api.py12
2 files changed, 10 insertions, 10 deletions
diff --git a/cloudkitty_tempest_plugin/services/client.py b/cloudkitty_tempest_plugin/services/client.py
index 4fcbf81..a04e271 100644
--- a/cloudkitty_tempest_plugin/services/client.py
+++ b/cloudkitty_tempest_plugin/services/client.py
@@ -92,10 +92,10 @@ class RatingClient(rest_client.RestClient):
92 uri = '/info/config/' 92 uri = '/info/config/'
93 return self._do_request('GET', uri) 93 return self._do_request('GET', uri)
94 94
95 def get_service(self, service_name=None): 95 def get_metric(self, metric_name=None):
96 uri = '/info/services/' 96 uri = '/info/metrics/'
97 if service_name: 97 if metric_name:
98 uri += service_name + '/' 98 uri += metric_name + '/'
99 return self._do_request('GET', uri) 99 return self._do_request('GET', uri)
100 100
101 def get_rating_module(self, module_name=None): 101 def get_rating_module(self, module_name=None):
diff --git a/cloudkitty_tempest_plugin/tests/api/test_cloudkitty_api.py b/cloudkitty_tempest_plugin/tests/api/test_cloudkitty_api.py
index 6cd6760..ed0b125 100644
--- a/cloudkitty_tempest_plugin/tests/api/test_cloudkitty_api.py
+++ b/cloudkitty_tempest_plugin/tests/api/test_cloudkitty_api.py
@@ -134,13 +134,13 @@ class CloudkittyPrimaryAPITest(base.BaseRatingTest):
134 def test_get_config(self): 134 def test_get_config(self):
135 self.rating_client.get_config() 135 self.rating_client.get_config()
136 136
137 @decorators.idempotent_id('43b03099-0493-4291-9749-85cd8d512811') 137 # @decorators.idempotent_id('43b03099-0493-4291-9749-85cd8d512811')
138 def test_get_services(self): 138 # def test_get_metrics(self):
139 self.rating_client.get_service() 139 # self.rating_client.get_metric()
140 140
141 @decorators.idempotent_id('64ecae87-0138-41bd-829f-91302dae7802') 141 # @decorators.idempotent_id('64ecae87-0138-41bd-829f-91302dae7802')
142 def test_get_service(self): 142 # def test_get_metric(self):
143 self.rating_client.get_service('compute') 143 # self.rating_client.get_metric('cpu')
144 144
145 @decorators.idempotent_id('cccbff8a-24b2-4251-8f7b-ea941d048b9d') 145 @decorators.idempotent_id('cccbff8a-24b2-4251-8f7b-ea941d048b9d')
146 def test_report_summary(self): 146 def test_report_summary(self):