summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCao Xuan Hoang <hoangcx@vn.fujitsu.com>2016-09-07 13:24:50 +0700
committerCao Xuan Hoang <hoangcx@vn.fujitsu.com>2016-09-07 13:28:38 +0700
commit8520aeafd9b12ce384a4cc49ecf0f21f2c3c15bd (patch)
treedd04c564298354e7bbd7cb1c39a1a9e0c830d234
parenta993603408331c61857d08264d0df7273c57f28c (diff)
Clean imports in code
This patch set modifies lines which are importing objects instead of modules. As per openstack import guide lines, user should import modules in a file not objects. http://docs.openstack.org/developer/hacking/#imports Change-Id: I5b4bdcb674b58ab419d00ca9c6bff105ce19aca8
Notes
Notes (review): Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+2: tatyana-leontovich <tleontovich@mirantis.com> Code-Review+1: Vladimir Khlyunev <vkhlyunev@mirantis.com> Code-Review+1: Artem Grechanichenko <agrechanichenko@mirantis.com> Workflow+1: tatyana-leontovich <tleontovich@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 08 Sep 2016 08:58:21 +0000 Reviewed-on: https://review.openstack.org/366516 Project: openstack/fuel-ostf Branch: refs/heads/master
-rw-r--r--fuel_health/cloudvalidation.py6
-rw-r--r--fuel_health/ironicmanager.py8
-rw-r--r--fuel_health/nmanager.py31
-rw-r--r--fuel_health/test.py10
-rw-r--r--fuel_health/tests/configuration/test_configuration.py14
-rw-r--r--fuel_health/tests/ha/test_haproxy.py8
-rw-r--r--fuel_health/tests/ha/test_mysql_replication.py28
-rw-r--r--fuel_health/tests/ha/test_mysql_status.py22
-rw-r--r--fuel_health/tests/sanity/test_sanity_infrastructure.py22
-rw-r--r--fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py4
-rw-r--r--fuel_plugin/ostf_adapter/nose_plugin/nose_utils.py4
-rw-r--r--fuel_plugin/testing/tests/functional/base.py6
-rw-r--r--fuel_plugin/testing/tests/unit/test_results_logger.py6
13 files changed, 85 insertions, 84 deletions
diff --git a/fuel_health/cloudvalidation.py b/fuel_health/cloudvalidation.py
index 04d1f6b..131f595 100644
--- a/fuel_health/cloudvalidation.py
+++ b/fuel_health/cloudvalidation.py
@@ -17,7 +17,7 @@ import logging
17 17
18LOG = logging.getLogger(__name__) 18LOG = logging.getLogger(__name__)
19 19
20from fuel_health.common.ssh import Client as SSHClient 20from fuel_health.common import ssh
21 21
22from fuel_health import nmanager 22from fuel_health import nmanager
23 23
@@ -43,8 +43,8 @@ class CloudValidationTest(nmanager.OfficialClientTest):
43 def _run_ssh_cmd(self, host, cmd): 43 def _run_ssh_cmd(self, host, cmd):
44 """Open SSH session with host and execute command.""" 44 """Open SSH session with host and execute command."""
45 try: 45 try:
46 sshclient = SSHClient(host, self.usr, self.pwd, 46 sshclient = ssh.Client(host, self.usr, self.pwd,
47 key_filename=self.key, timeout=self.timeout) 47 key_filename=self.key, timeout=self.timeout)
48 return sshclient.exec_longrun_command(cmd) 48 return sshclient.exec_longrun_command(cmd)
49 except Exception: 49 except Exception:
50 LOG.exception('Failure on ssh run cmd') 50 LOG.exception('Failure on ssh run cmd')
diff --git a/fuel_health/ironicmanager.py b/fuel_health/ironicmanager.py
index 3a6ac60..cbd1a63 100644
--- a/fuel_health/ironicmanager.py
+++ b/fuel_health/ironicmanager.py
@@ -18,7 +18,7 @@ import logging
18from fuel_health import nmanager 18from fuel_health import nmanager
19import fuel_health.test 19import fuel_health.test
20 20
21from fuel_health.common.ssh import Client as SSHClient 21from fuel_health.common import ssh
22from ironicclient.common import utils 22from ironicclient.common import utils
23from ironicclient import exc as ironic_exc 23from ironicclient import exc as ironic_exc
24 24
@@ -83,9 +83,9 @@ class IronicTest(nmanager.SanityChecksTest):
83 def check_services(): 83 def check_services():
84 succeed_count = 0 84 succeed_count = 0
85 for node in nodes: 85 for node in nodes:
86 remote = SSHClient(node, self.usr, self.pwd, 86 remote = ssh.Client(node, self.usr, self.pwd,
87 key_filename=self.key, 87 key_filename=self.key,
88 timeout=self.timeout) 88 timeout=self.timeout)
89 try: 89 try:
90 output = remote.exec_command(cmd) 90 output = remote.exec_command(cmd)
91 LOG.debug(output) 91 LOG.debug(output)
diff --git a/fuel_health/nmanager.py b/fuel_health/nmanager.py
index 31630d4..6086f82 100644
--- a/fuel_health/nmanager.py
+++ b/fuel_health/nmanager.py
@@ -71,7 +71,7 @@ import keystoneclient
71import novaclient.client 71import novaclient.client
72import novaclient.exceptions as nova_exc 72import novaclient.exceptions as nova_exc
73 73
74from fuel_health.common.ssh import Client as SSHClient 74from fuel_health.common import ssh as f_ssh
75from fuel_health.common.utils.data_utils import rand_int_id 75from fuel_health.common.utils.data_utils import rand_int_id
76from fuel_health.common.utils.data_utils import rand_name 76from fuel_health.common.utils.data_utils import rand_name
77from fuel_health import exceptions 77from fuel_health import exceptions
@@ -614,8 +614,9 @@ class NovaNetworkScenarioTest(OfficialClientTest):
614 '"online_controllers" parameter is empty.') 614 '"online_controllers" parameter is empty.')
615 615
616 try: 616 try:
617 sshclient = SSHClient(self.host[0], self.usr, self.pwd, 617 sshclient = f_ssh.Client(self.host[0], self.usr, self.pwd,
618 key_filename=self.key, timeout=self.timeout) 618 key_filename=self.key,
619 timeout=self.timeout)
619 return sshclient.exec_longrun_command(cmd) 620 return sshclient.exec_longrun_command(cmd)
620 except Exception: 621 except Exception:
621 LOG.exception() 622 LOG.exception()
@@ -828,10 +829,10 @@ class NovaNetworkScenarioTest(OfficialClientTest):
828 829
829 if self.host: 830 if self.host:
830 try: 831 try:
831 ssh = SSHClient(self.host[0], 832 ssh = f_ssh.Client(self.host[0],
832 self.usr, self.pwd, 833 self.usr, self.pwd,
833 key_filename=self.key, 834 key_filename=self.key,
834 timeout=timeout) 835 timeout=timeout)
835 except Exception: 836 except Exception:
836 LOG.exception() 837 LOG.exception()
837 838
@@ -858,10 +859,10 @@ class NovaNetworkScenarioTest(OfficialClientTest):
858 try: 859 try:
859 host = viaHost or self.host[0] 860 host = viaHost or self.host[0]
860 LOG.debug('Get ssh to instance') 861 LOG.debug('Get ssh to instance')
861 ssh = SSHClient(host, 862 ssh = f_ssh.Client(host,
862 self.usr, self.pwd, 863 self.usr, self.pwd,
863 key_filename=self.key, 864 key_filename=self.key,
864 timeout=timeout) 865 timeout=timeout)
865 866
866 except Exception: 867 except Exception:
867 LOG.exception() 868 LOG.exception()
@@ -888,10 +889,10 @@ class NovaNetworkScenarioTest(OfficialClientTest):
888 try: 889 try:
889 host = viaHost or self.host[0] 890 host = viaHost or self.host[0]
890 LOG.debug('Get ssh to instance') 891 LOG.debug('Get ssh to instance')
891 ssh = SSHClient(host, 892 ssh = f_ssh.Client(host,
892 self.usr, self.pwd, 893 self.usr, self.pwd,
893 key_filename=self.key, 894 key_filename=self.key,
894 timeout=timeout) 895 timeout=timeout)
895 LOG.debug('Host is {0}'.format(host)) 896 LOG.debug('Host is {0}'.format(host))
896 897
897 except Exception: 898 except Exception:
diff --git a/fuel_health/test.py b/fuel_health/test.py
index 9dc3b16..319a932 100644
--- a/fuel_health/test.py
+++ b/fuel_health/test.py
@@ -22,8 +22,8 @@ import testresources
22import unittest2 22import unittest2
23 23
24from fuel_health.common import log as logging 24from fuel_health.common import log as logging
25from fuel_health.common.ssh import Client as SSHClient 25from fuel_health.common import ssh
26from fuel_health.common.test_mixins import FuelTestAssertMixin 26from fuel_health.common import test_mixins
27from fuel_health import config 27from fuel_health import config
28 28
29 29
@@ -32,7 +32,7 @@ LOG = logging.getLogger(__name__)
32 32
33class BaseTestCase(unittest2.TestCase, 33class BaseTestCase(unittest2.TestCase,
34 testresources.ResourcedTestCase, 34 testresources.ResourcedTestCase,
35 FuelTestAssertMixin): 35 test_mixins.FuelTestAssertMixin):
36 36
37 def __init__(self, *args, **kwargs): 37 def __init__(self, *args, **kwargs):
38 super(BaseTestCase, self).__init__(*args, **kwargs) 38 super(BaseTestCase, self).__init__(*args, **kwargs)
@@ -137,8 +137,8 @@ class TestCase(BaseTestCase):
137 Fail if exit code != 0 137 Fail if exit code != 0
138 """ 138 """
139 try: 139 try:
140 sshclient = SSHClient(host, self.usr, self.pwd, 140 sshclient = ssh.Client(host, self.usr, self.pwd,
141 key_filename=self.key, timeout=self.timeout) 141 key_filename=self.key, timeout=self.timeout)
142 return sshclient.exec_command(cmd) 142 return sshclient.exec_command(cmd)
143 except Exception: 143 except Exception:
144 LOG.exception("Failed while opening ssh session with host") 144 LOG.exception("Failed while opening ssh session with host")
diff --git a/fuel_health/tests/configuration/test_configuration.py b/fuel_health/tests/configuration/test_configuration.py
index e95694d..0ba1c06 100644
--- a/fuel_health/tests/configuration/test_configuration.py
+++ b/fuel_health/tests/configuration/test_configuration.py
@@ -15,10 +15,10 @@
15import logging 15import logging
16import paramiko.ssh_exception as exc 16import paramiko.ssh_exception as exc
17 17
18from fuel_health.common.ssh import Client as SSHClient 18from fuel_health.common import ssh
19from fuel_health import exceptions 19from fuel_health import exceptions
20from fuel_health import nmanager 20from fuel_health import nmanager
21from keystoneclient.exceptions import Unauthorized 21from keystoneclient import exceptions as k_exceptions
22from keystoneclient.v2_0 import Client as keystoneclient 22from keystoneclient.v2_0 import Client as keystoneclient
23 23
24LOG = logging.getLogger(__name__) 24LOG = logging.getLogger(__name__)
@@ -52,10 +52,10 @@ class SanityConfigurationTest(nmanager.SanityChecksTest):
52 """ 52 """
53 ip = self.config.nailgun_host 53 ip = self.config.nailgun_host
54 54
55 ssh_client = SSHClient(ip, 55 ssh_client = ssh.Client(ip,
56 self.config.master.master_node_ssh_user, 56 self.config.master.master_node_ssh_user,
57 self.config.master.master_node_ssh_password, 57 self.config.master.master_node_ssh_password,
58 timeout=self.config.master.ssh_timeout) 58 timeout=self.config.master.ssh_timeout)
59 cmd = "date" 59 cmd = "date"
60 output = [] 60 output = []
61 try: 61 try:
@@ -122,7 +122,7 @@ class SanityConfigurationTest(nmanager.SanityChecksTest):
122 password=pwd, 122 password=pwd,
123 auth_url=url) 123 auth_url=url)
124 keystone.authenticate() 124 keystone.authenticate()
125 except Unauthorized: 125 except k_exceptions.Unauthorized:
126 pass 126 pass
127 else: 127 else:
128 self.fail('Step 1 failed: Default credentials ' 128 self.fail('Step 1 failed: Default credentials '
diff --git a/fuel_health/tests/ha/test_haproxy.py b/fuel_health/tests/ha/test_haproxy.py
index d75c15c..b09a2ec 100644
--- a/fuel_health/tests/ha/test_haproxy.py
+++ b/fuel_health/tests/ha/test_haproxy.py
@@ -14,7 +14,7 @@
14 14
15import logging 15import logging
16 16
17from fuel_health.common.ssh import Client as SSHClient 17from fuel_health.common import ssh
18from fuel_health import test 18from fuel_health import test
19 19
20 20
@@ -71,9 +71,9 @@ class HAProxyCheck(test.BaseTestCase):
71 """ 71 """
72 LOG.info("Controllers nodes are %s" % self.controllers) 72 LOG.info("Controllers nodes are %s" % self.controllers)
73 for controller in self.controllers: 73 for controller in self.controllers:
74 remote = SSHClient(controller, self.controller_user, 74 remote = ssh.Client(controller, self.controller_user,
75 key_filename=self.controller_key, 75 key_filename=self.controller_key,
76 timeout=100) 76 timeout=100)
77 ignore_services = [] 77 ignore_services = []
78 if 'neutron' not in self.config.network.network_provider: 78 if 'neutron' not in self.config.network.network_provider:
79 ignore_services.append('nova-metadata-api') 79 ignore_services.append('nova-metadata-api')
diff --git a/fuel_health/tests/ha/test_mysql_replication.py b/fuel_health/tests/ha/test_mysql_replication.py
index 385bf02..0df0cdd 100644
--- a/fuel_health/tests/ha/test_mysql_replication.py
+++ b/fuel_health/tests/ha/test_mysql_replication.py
@@ -14,14 +14,14 @@
14 14
15import logging 15import logging
16 16
17from fuel_health.common.ssh import Client as SSHClient 17from fuel_health.common import ssh
18from fuel_health.common.utils import data_utils 18from fuel_health.common.utils import data_utils
19from fuel_health.tests.ha.test_mysql_status import BaseMysqlTest 19from fuel_health.tests.ha import test_mysql_status
20 20
21LOG = logging.getLogger(__name__) 21LOG = logging.getLogger(__name__)
22 22
23 23
24class TestMysqlReplication(BaseMysqlTest): 24class TestMysqlReplication(test_mysql_status.BaseMysqlTest):
25 @classmethod 25 @classmethod
26 def setUpClass(cls): 26 def setUpClass(cls):
27 super(TestMysqlReplication, cls).setUpClass() 27 super(TestMysqlReplication, cls).setUpClass()
@@ -38,8 +38,8 @@ class TestMysqlReplication(BaseMysqlTest):
38 if cls.master_ip: 38 if cls.master_ip:
39 try: 39 try:
40 cmd = "mysql -h localhost -e 'DROP DATABASE %s'" % cls.database 40 cmd = "mysql -h localhost -e 'DROP DATABASE %s'" % cls.database
41 SSHClient(cls.master_ip, cls.node_user, 41 ssh.Client(cls.master_ip, cls.node_user,
42 key_filename=cls.node_key).exec_command(cmd) 42 key_filename=cls.node_key).exec_command(cmd)
43 except Exception: 43 except Exception:
44 LOG.exception("Failed to connect to mysql cmd:{0}".format(cmd)) 44 LOG.exception("Failed to connect to mysql cmd:{0}".format(cmd))
45 45
@@ -76,7 +76,7 @@ class TestMysqlReplication(BaseMysqlTest):
76 # check that mysql is running on all hosts 76 # check that mysql is running on all hosts
77 cmd = 'mysql -h localhost -e "" ' 77 cmd = 'mysql -h localhost -e "" '
78 for db_node in databases: 78 for db_node in databases:
79 ssh_client = SSHClient( 79 ssh_client = ssh.Client(
80 db_node, self.node_user, 80 db_node, self.node_user,
81 key_filename=self.node_key, timeout=100) 81 key_filename=self.node_key, timeout=100)
82 self.verify( 82 self.verify(
@@ -122,9 +122,9 @@ class TestMysqlReplication(BaseMysqlTest):
122 122
123 # create db, table, insert data on one node 123 # create db, table, insert data on one node
124 LOG.info('target node ip/hostname: "{0}" '.format(self.master_ip)) 124 LOG.info('target node ip/hostname: "{0}" '.format(self.master_ip))
125 master_ssh_client = SSHClient(self.master_ip, self.node_user, 125 master_ssh_client = ssh.Client(self.master_ip, self.node_user,
126 key_filename=self.node_key, 126 key_filename=self.node_key,
127 timeout=100) 127 timeout=100)
128 128
129 self.verify(20, master_ssh_client.exec_command, 2, 129 self.verify(20, master_ssh_client.exec_command, 2,
130 'Database creation failed', 'create database', 130 'Database creation failed', 'create database',
@@ -141,9 +141,9 @@ class TestMysqlReplication(BaseMysqlTest):
141 # Verify that data is replicated on other databases 141 # Verify that data is replicated on other databases
142 for db_node in databases: 142 for db_node in databases:
143 if db_node != self.master_ip: 143 if db_node != self.master_ip:
144 client = SSHClient(db_node, 144 client = ssh.Client(db_node,
145 self.node_user, 145 self.node_user,
146 key_filename=self.node_key) 146 key_filename=self.node_key)
147 147
148 output = self.verify( 148 output = self.verify(
149 20, client.exec_command, 5, 149 20, client.exec_command, 5,
@@ -155,8 +155,8 @@ class TestMysqlReplication(BaseMysqlTest):
155 failed_step='6') 155 failed_step='6')
156 156
157 # Drop created db 157 # Drop created db
158 ssh_client = SSHClient(self.master_ip, self.node_user, 158 ssh_client = ssh.Client(self.master_ip, self.node_user,
159 key_filename=self.node_key) 159 key_filename=self.node_key)
160 self.verify(20, ssh_client.exec_command, 7, 160 self.verify(20, ssh_client.exec_command, 7,
161 'Can not delete created database', 161 'Can not delete created database',
162 'database deletion', drop_db) 162 'database deletion', drop_db)
diff --git a/fuel_health/tests/ha/test_mysql_status.py b/fuel_health/tests/ha/test_mysql_status.py
index 428459b..6c4c19d 100644
--- a/fuel_health/tests/ha/test_mysql_status.py
+++ b/fuel_health/tests/ha/test_mysql_status.py
@@ -15,13 +15,13 @@
15from distutils import version 15from distutils import version
16import logging 16import logging
17 17
18from fuel_health.common.ssh import Client as SSHClient 18from fuel_health.common import ssh
19from fuel_health.test import BaseTestCase 19from fuel_health import test
20 20
21LOG = logging.getLogger(__name__) 21LOG = logging.getLogger(__name__)
22 22
23 23
24class BaseMysqlTest(BaseTestCase): 24class BaseMysqlTest(test.BaseTestCase):
25 """Base methods for MySQL DB tests 25 """Base methods for MySQL DB tests
26 """ 26 """
27 @classmethod 27 @classmethod
@@ -54,10 +54,10 @@ class BaseMysqlTest(BaseTestCase):
54 < version.StrictVersion('7.0'): 54 < version.StrictVersion('7.0'):
55 return cls.config.compute.online_controllers 55 return cls.config.compute.online_controllers
56 # retrieve data from controller 56 # retrieve data from controller
57 ssh_client = SSHClient(controller_ip, 57 ssh_client = ssh.Client(controller_ip,
58 username, 58 username,
59 key_filename=key, 59 key_filename=key,
60 timeout=100) 60 timeout=100)
61 61
62 hiera_cmd = ('ruby -e \'require "hiera"; ' 62 hiera_cmd = ('ruby -e \'require "hiera"; '
63 'db_h = Hiera.new().lookup("database_nodes", {}, {}); ' 63 'db_h = Hiera.new().lookup("database_nodes", {}, {}); '
@@ -118,7 +118,7 @@ class TestMysqlStatus(BaseMysqlTest):
118 LOG.info('Current database node is %s' % node) 118 LOG.info('Current database node is %s' % node)
119 cmd1 = cmd % {'database': database} 119 cmd1 = cmd % {'database': database}
120 LOG.info('Try to execute command %s' % cmd1) 120 LOG.info('Try to execute command %s' % cmd1)
121 tables = SSHClient( 121 tables = ssh.Client(
122 node, self.node_user, 122 node, self.node_user,
123 key_filename=self.node_key, 123 key_filename=self.node_key,
124 timeout=self.config.compute.ssh_timeout) 124 timeout=self.config.compute.ssh_timeout)
@@ -181,9 +181,9 @@ class TestMysqlStatus(BaseMysqlTest):
181 181
182 for db_node in databases: 182 for db_node in databases:
183 command = "mysql -h localhost -e \"SHOW STATUS LIKE 'wsrep_%'\"" 183 command = "mysql -h localhost -e \"SHOW STATUS LIKE 'wsrep_%'\""
184 ssh_client = SSHClient(db_node, self.node_user, 184 ssh_client = ssh.Client(db_node, self.node_user,
185 key_filename=self.node_key, 185 key_filename=self.node_key,
186 timeout=100) 186 timeout=100)
187 output = self.verify( 187 output = self.verify(
188 20, ssh_client.exec_command, 2, 188 20, ssh_client.exec_command, 2,
189 "Verification of galera cluster node status failed", 189 "Verification of galera cluster node status failed",
diff --git a/fuel_health/tests/sanity/test_sanity_infrastructure.py b/fuel_health/tests/sanity/test_sanity_infrastructure.py
index 6e500b3..eb625ca 100644
--- a/fuel_health/tests/sanity/test_sanity_infrastructure.py
+++ b/fuel_health/tests/sanity/test_sanity_infrastructure.py
@@ -17,7 +17,7 @@
17import logging 17import logging
18import time 18import time
19 19
20from fuel_health.common.ssh import Client as SSHClient 20from fuel_health.common import ssh
21from fuel_health import nmanager 21from fuel_health import nmanager
22 22
23LOG = logging.getLogger(__name__) 23LOG = logging.getLogger(__name__)
@@ -108,11 +108,11 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
108 108
109 cmd = "ping -q -c1 -w10 8.8.8.8" 109 cmd = "ping -q -c1 -w10 8.8.8.8"
110 110
111 ssh_client = SSHClient(self.computes[0], 111 ssh_client = ssh.Client(self.computes[0],
112 self.usr, 112 self.usr,
113 self.pwd, 113 self.pwd,
114 key_filename=self.key, 114 key_filename=self.key,
115 timeout=self.timeout) 115 timeout=self.timeout)
116 self.verify(100, self.retry_command, 1, 116 self.verify(100, self.retry_command, 1,
117 "'ping' command failed. Looks like there is no " 117 "'ping' command failed. Looks like there is no "
118 "Internet connection on the compute node.", 118 "Internet connection on the compute node.",
@@ -137,11 +137,11 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
137 137
138 dns = self.fuel_dns.spit(',') if self.fuel_dns else ['8.8.8.8'] 138 dns = self.fuel_dns.spit(',') if self.fuel_dns else ['8.8.8.8']
139 139
140 ssh_client = SSHClient(self.computes[0], 140 ssh_client = ssh.Client(self.computes[0],
141 self.usr, 141 self.usr,
142 self.pwd, 142 self.pwd,
143 key_filename=self.key, 143 key_filename=self.key,
144 timeout=self.timeout) 144 timeout=self.timeout)
145 expected_output = "{0}.in-addr.arpa domain name pointer".format(dns[0]) 145 expected_output = "{0}.in-addr.arpa domain name pointer".format(dns[0])
146 146
147 cmd = "host {0}".format(dns[0]) 147 cmd = "host {0}".format(dns[0])
diff --git a/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py b/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py
index f8e7d1f..07652fd 100644
--- a/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py
+++ b/fuel_plugin/ostf_adapter/nose_plugin/nose_adapter.py
@@ -23,7 +23,7 @@ except ImportError:
23 from oslo_config import cfg 23 from oslo_config import cfg
24 24
25from fuel_plugin import consts 25from fuel_plugin import consts
26from fuel_plugin.ostf_adapter.logger import ResultsLogger 26from fuel_plugin.ostf_adapter import logger
27from fuel_plugin.ostf_adapter.nose_plugin import nose_storage_plugin 27from fuel_plugin.ostf_adapter.nose_plugin import nose_storage_plugin
28from fuel_plugin.ostf_adapter.nose_plugin import nose_test_runner 28from fuel_plugin.ostf_adapter.nose_plugin import nose_test_runner
29from fuel_plugin.ostf_adapter.nose_plugin import nose_utils 29from fuel_plugin.ostf_adapter.nose_plugin import nose_utils
@@ -58,7 +58,7 @@ class NoseDriver(object):
58 else: 58 else:
59 argv_add = [test_set.test_path] + test_set.additional_arguments 59 argv_add = [test_set.test_path] + test_set.additional_arguments
60 60
61 results_log = ResultsLogger(test_set.id, test_run.cluster_id) 61 results_log = logger.ResultsLogger(test_set.id, test_run.cluster_id)
62 62
63 lock_path = cfg.CONF.adapter.lock_dir 63 lock_path = cfg.CONF.adapter.lock_dir
64 test_run.pid = nose_utils.run_proc(self._run_tests, 64 test_run.pid = nose_utils.run_proc(self._run_tests,
diff --git a/fuel_plugin/ostf_adapter/nose_plugin/nose_utils.py b/fuel_plugin/ostf_adapter/nose_plugin/nose_utils.py
index 19d8312..6dd8aca 100644
--- a/fuel_plugin/ostf_adapter/nose_plugin/nose_utils.py
+++ b/fuel_plugin/ostf_adapter/nose_plugin/nose_utils.py
@@ -21,7 +21,7 @@ import re
21import traceback 21import traceback
22 22
23from nose import case 23from nose import case
24from nose.suite import ContextSuite 24from nose import suite
25 25
26try: 26try:
27 from oslo.serialization import jsonutils 27 from oslo.serialization import jsonutils
@@ -172,7 +172,7 @@ def get_tests_to_update(test):
172 172
173 if isinstance(test, case.Test): 173 if isinstance(test, case.Test):
174 tests.append(test) 174 tests.append(test)
175 elif isinstance(test, ContextSuite): 175 elif isinstance(test, suite.ContextSuite):
176 for sub_test in test._tests: 176 for sub_test in test._tests:
177 tests.extend(get_tests_to_update(sub_test)) 177 tests.extend(get_tests_to_update(sub_test))
178 178
diff --git a/fuel_plugin/testing/tests/functional/base.py b/fuel_plugin/testing/tests/functional/base.py
index a7d8d91..b1f09de 100644
--- a/fuel_plugin/testing/tests/functional/base.py
+++ b/fuel_plugin/testing/tests/functional/base.py
@@ -15,7 +15,7 @@
15import functools 15import functools
16import unittest 16import unittest
17 17
18from fuel_plugin.ostf_client.client import TestingAdapterClient 18from fuel_plugin.ostf_client import client
19 19
20 20
21class EmptyResponseError(Exception): 21class EmptyResponseError(Exception):
@@ -66,10 +66,10 @@ class Response(object):
66class AdapterClientProxy(object): 66class AdapterClientProxy(object):
67 67
68 def __init__(self, url): 68 def __init__(self, url):
69 self.client = TestingAdapterClient(url) 69 self.client = client.TestingAdapterClient(url)
70 70
71 def __getattr__(self, item): 71 def __getattr__(self, item):
72 if item in TestingAdapterClient.__dict__: 72 if item in client.TestingAdapterClient.__dict__:
73 call = getattr(self.client, item) 73 call = getattr(self.client, item)
74 return self._decorate_call(call) 74 return self._decorate_call(call)
75 75
diff --git a/fuel_plugin/testing/tests/unit/test_results_logger.py b/fuel_plugin/testing/tests/unit/test_results_logger.py
index 8391be4..4d759dc 100644
--- a/fuel_plugin/testing/tests/unit/test_results_logger.py
+++ b/fuel_plugin/testing/tests/unit/test_results_logger.py
@@ -16,11 +16,11 @@
16 16
17import mock 17import mock
18 18
19from fuel_plugin.ostf_adapter.logger import ResultsLogger 19from fuel_plugin.ostf_adapter import logger
20from fuel_plugin.testing.tests import base 20from fuel_plugin.testing.tests import base
21 21
22 22
23@mock.patch.object(ResultsLogger, '_init_file_logger') 23@mock.patch.object(logger.ResultsLogger, '_init_file_logger')
24class TestResultsLogger(base.BaseUnitTest): 24class TestResultsLogger(base.BaseUnitTest):
25 25
26 def get_logger(self, **kwargs): 26 def get_logger(self, **kwargs):
@@ -29,7 +29,7 @@ class TestResultsLogger(base.BaseUnitTest):
29 'cluster_id': 1, 29 'cluster_id': 1,
30 } 30 }
31 options.update(kwargs) 31 options.update(kwargs)
32 return ResultsLogger(**options) 32 return logger.ResultsLogger(**options)
33 33
34 def test_filename(self, m_init_logger): 34 def test_filename(self, m_init_logger):
35 logger = self.get_logger(testset='testset_name', 35 logger = self.get_logger(testset='testset_name',