Merge "tempest: add telemetry client manager"
diff --git a/ceilometer/tests/tempest/client.py b/ceilometer/tests/tempest/client.py
index 05530b1..b0173ef 100644
--- a/ceilometer/tests/tempest/client.py
+++ b/ceilometer/tests/tempest/client.py
@@ -17,6 +17,11 @@
from six.moves.urllib import parse as urllib
from tempest.common import service_client
+from tempest import config
+from tempest import manager
+
+
+CONF = config.CONF
class TelemetryClient(service_client.ServiceClient):
@@ -90,3 +95,22 @@
self.expected_success(200, resp.status)
body = self.deserialize(body)
return service_client.ResponseBody(resp, body)
+
+
+class Manager(manager.Manager):
+
+ def __init__(self, credentials=None, service=None):
+ super(Manager, self).__init__(credentials, service)
+ self._set_telemetry_client()
+
+ def _set_telemetry_client(self):
+ if CONF.service_available.ceilometer:
+ self.telemetry_client = TelemetryClient(
+ self.auth_provider,
+ CONF.telemetry.catalog_type,
+ CONF.identity.region,
+ endpoint_type=CONF.telemetry.endpoint_type,
+ disable_ssl_certificate_validation=(
+ CONF.identity.disable_ssl_certificate_validation),
+ ca_certs=CONF.identity.ca_certificates_file,
+ trace_requests=CONF.debug.trace_requests)