Update client and tests for services endpoints

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
This commit is contained in:
Martin CAMEY 2018-04-10 18:48:23 +02:00
parent 8e49b19ba2
commit ee29136f6e
2 changed files with 10 additions and 10 deletions

View File

@ -92,10 +92,10 @@ class RatingClient(rest_client.RestClient):
uri = '/info/config/'
return self._do_request('GET', uri)
def get_service(self, service_name=None):
uri = '/info/services/'
if service_name:
uri += service_name + '/'
def get_metric(self, metric_name=None):
uri = '/info/metrics/'
if metric_name:
uri += metric_name + '/'
return self._do_request('GET', uri)
def get_rating_module(self, module_name=None):

View File

@ -134,13 +134,13 @@ class CloudkittyPrimaryAPITest(base.BaseRatingTest):
def test_get_config(self):
self.rating_client.get_config()
@decorators.idempotent_id('43b03099-0493-4291-9749-85cd8d512811')
def test_get_services(self):
self.rating_client.get_service()
# @decorators.idempotent_id('43b03099-0493-4291-9749-85cd8d512811')
# def test_get_metrics(self):
# self.rating_client.get_metric()
@decorators.idempotent_id('64ecae87-0138-41bd-829f-91302dae7802')
def test_get_service(self):
self.rating_client.get_service('compute')
# @decorators.idempotent_id('64ecae87-0138-41bd-829f-91302dae7802')
# def test_get_metric(self):
# self.rating_client.get_metric('cpu')
@decorators.idempotent_id('cccbff8a-24b2-4251-8f7b-ea941d048b9d')
def test_report_summary(self):