Use tempest-plugin service client registration
Tempest is going to expose a new optional interface in the plugin
class, to automatically register service clients implemented in
a plugin. Along with this the former client manager, renamed to
ServiceClients, is going to move to a stable interface in
tempest.lib.
Co-Authored-By: Raissa Sarmento <rdearauj@redhat.com>
Change-Id: I4cc9e2b9cd5cb09dff04ee16edcf85e59aec554f
diff --git a/manila_tempest_tests/plugin.py b/manila_tempest_tests/plugin.py
index dfec0b1..0c32ce1 100644
--- a/manila_tempest_tests/plugin.py
+++ b/manila_tempest_tests/plugin.py
@@ -16,6 +16,7 @@
import os
+from tempest import config
from tempest.test_discover import plugins
from manila_tempest_tests import config as config_share
@@ -54,3 +55,21 @@
def get_opt_lists(self):
return [(config_share.share_group.name, config_share.ShareGroup),
('service_available', [config_share.service_option])]
+
+ def get_service_clients(self):
+ shares_config = config.service_client_config('share')
+ v1_params = {
+ 'name': 'share_v1',
+ 'service_version': 'share.v1',
+ 'module_path': 'manila_tempest_tests.services.share.json',
+ 'client_names': ['SharesClient'],
+ }
+ v2_params = {
+ 'name': 'share_v2',
+ 'service_version': 'share.v2',
+ 'module_path': 'manila_tempest_tests.services.share.v2',
+ 'client_names': ['SharesV2Client'],
+ }
+ v1_params.update(shares_config)
+ v2_params.update(shares_config)
+ return [v1_params, v2_params]