From 2298ac8d5198b2832524b051e685233d23869e6e Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Mon, 23 Mar 2015 15:42:43 +0200 Subject: [PATCH] Refactor installation process Change-Id: I72eb7917b3800bdabfae46e1605e78f7066b4941 --- .../cloudv_client => cloudv_client}/__init__.py | 0 .../cloudv_client => cloudv_client}/client.py | 6 +++--- .../cloudv_client => cloudv_client}/plugins.py | 0 .../cloudv_client => cloudv_client}/suites.py | 0 .../cloudv_client => cloudv_client}/tests.py | 0 cloudv_ostf_adapter/cmd/client.py | 8 +++++++- setup.cfg | 3 ++- 7 files changed, 12 insertions(+), 5 deletions(-) rename {cloudv_ostf_adapter/cloudv_client => cloudv_client}/__init__.py (100%) rename {cloudv_ostf_adapter/cloudv_client => cloudv_client}/client.py (86%) rename {cloudv_ostf_adapter/cloudv_client => cloudv_client}/plugins.py (100%) rename {cloudv_ostf_adapter/cloudv_client => cloudv_client}/suites.py (100%) rename {cloudv_ostf_adapter/cloudv_client => cloudv_client}/tests.py (100%) diff --git a/cloudv_ostf_adapter/cloudv_client/__init__.py b/cloudv_client/__init__.py similarity index 100% rename from cloudv_ostf_adapter/cloudv_client/__init__.py rename to cloudv_client/__init__.py diff --git a/cloudv_ostf_adapter/cloudv_client/client.py b/cloudv_client/client.py similarity index 86% rename from cloudv_ostf_adapter/cloudv_client/client.py rename to cloudv_client/client.py index 086b57f..efe523c 100644 --- a/cloudv_ostf_adapter/cloudv_client/client.py +++ b/cloudv_client/client.py @@ -13,9 +13,9 @@ # under the License. from cloudv_ostf_adapter.common import cfg -from cloudv_ostf_adapter.cloudv_client import plugins -from cloudv_ostf_adapter.cloudv_client import suites -from cloudv_ostf_adapter.cloudv_client import tests +from cloudv_client import plugins +from cloudv_client import suites +from cloudv_client import tests CONF = cfg.CONF diff --git a/cloudv_ostf_adapter/cloudv_client/plugins.py b/cloudv_client/plugins.py similarity index 100% rename from cloudv_ostf_adapter/cloudv_client/plugins.py rename to cloudv_client/plugins.py diff --git a/cloudv_ostf_adapter/cloudv_client/suites.py b/cloudv_client/suites.py similarity index 100% rename from cloudv_ostf_adapter/cloudv_client/suites.py rename to cloudv_client/suites.py diff --git a/cloudv_ostf_adapter/cloudv_client/tests.py b/cloudv_client/tests.py similarity index 100% rename from cloudv_ostf_adapter/cloudv_client/tests.py rename to cloudv_client/tests.py diff --git a/cloudv_ostf_adapter/cmd/client.py b/cloudv_ostf_adapter/cmd/client.py index a600c56..edfb642 100644 --- a/cloudv_ostf_adapter/cmd/client.py +++ b/cloudv_ostf_adapter/cmd/client.py @@ -17,7 +17,7 @@ import sys from oslo_config import cfg from cloudv_ostf_adapter.common import cfg as config -from cloudv_ostf_adapter.cloudv_client import client +from cloudv_client import client from cloudv_ostf_adapter.common import utils from cloudv_ostf_adapter.cmd import _common as cmd @@ -35,6 +35,7 @@ class ClientV1Shell(object): """ List plugins """ + resp = self._client.plugins.list(load_tests=False) for plugin in resp: suites = plugin['suites'] @@ -49,6 +50,7 @@ class ClientV1Shell(object): Required options: --validation-plugin """ + resp = self._client.suites.list_suites(validation_plugin_name) suites = resp['suites'] resp['suites'] = "\n".join(suites) @@ -62,6 +64,7 @@ class ClientV1Shell(object): Required options: --validation-plugin """ + resp = self._client.suites.list_tests_for_suites( validation_plugin_name) tests = resp['tests'] @@ -76,6 +79,7 @@ class ClientV1Shell(object): Required options: --validation-plugin """ + resp = self._client.suites.run_suites(validation_plugin_name) utils.print_list(resp, ['test', 'duration', 'result', 'report'], @@ -90,6 +94,7 @@ class ClientV1Shell(object): --validation-plugin --suite """ + resp = self._client.suites.run_suite_tests( suite, validation_plugin_name) suite_test_reports = resp['report'] @@ -106,6 +111,7 @@ class ClientV1Shell(object): --validation-plugin --test """ + resp = self._client.tests.run(test, validation_plugin_name) utils.print_list(resp, ['test', 'duration', 'result', 'report'], diff --git a/setup.cfg b/setup.cfg index 53ac31f..43b1287 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,6 +19,7 @@ classifier = [files] packages = cloudv_ostf_adapter + cloudv_client [compile_catalog] domain = cloudv_ostf_adapter @@ -27,7 +28,7 @@ domain = cloudv_ostf_adapter console_scripts = cloudvalidation-cli = cloudv_ostf_adapter.cmd.cli:main cloudvalidation-server = cloudv_ostf_adapter.cmd.server:main - cloudvalidation = cloudv_ostf_adapter.cmd.client:main + cloudvalidation = cloudv_client.cmd.client:main [global] setup-hooks =