qa: import with full path

to be py3 compatible

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2020-03-24 16:33:22 +08:00
parent 3f5a801d97
commit 947a74349d
82 changed files with 116 additions and 116 deletions

View File

@ -4,21 +4,21 @@ ceph_objectstore_tool - Simple test of ceph-objectstore-tool utility
from io import BytesIO
import contextlib
import json
import logging
import ceph_manager
from teuthology import misc as teuthology
import time
import os
import six
import string
from teuthology.orchestra import run
import sys
import tempfile
import json
import time
from tasks import ceph_manager
from tasks.util.rados import (rados, create_replicated_pool, create_ec_pool)
from teuthology import misc as teuthology
from teuthology.orchestra import run
from teuthology.exceptions import CommandFailedError
from util.rados import (rados, create_replicated_pool, create_ec_pool)
# from util.rados import (rados, create_ec_pool,
# create_replicated_pool,
# create_cache_pool)

View File

@ -12,8 +12,8 @@ import json
import re
import uuid
from ceph_manager import CephManager
from tarfile import ReadError
from tasks.ceph_manager import CephManager
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run

View File

@ -8,7 +8,7 @@ from teuthology import misc
from teuthology.orchestra import remote as orchestra_remote
from teuthology.orchestra import run
from teuthology.contextutil import MaxWhileTries
from .mount import CephFSMount
from tasks.cephfs.mount import CephFSMount
log = logging.getLogger(__name__)

View File

@ -1,7 +1,7 @@
import logging
from io import BytesIO
from xfstests_dev import XFSTestsDev
from tasks.cephfs.xfstests_dev import XFSTestsDev
log = logging.getLogger(__name__)

View File

@ -4,7 +4,7 @@ import logging
import operator
from random import randint
from cephfs_test_case import CephFSTestCase
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.fuse_mount import FuseMount

View File

@ -1,6 +1,6 @@
import time
import logging
from cephfs_test_case import CephFSTestCase
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology

View File

@ -1,5 +1,5 @@
from cephfs_test_case import CephFSTestCase
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError

View File

@ -6,7 +6,7 @@ import os
import six
from util.workunit import get_refspec_after_overrides
from tasks.util.workunit import get_refspec_after_overrides
from teuthology import misc as teuthology
from teuthology.parallel import parallel

View File

@ -6,7 +6,7 @@ import logging
import time
from teuthology.orchestra import run
import ceph_manager
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)

View File

@ -5,7 +5,7 @@ import logging
import time
from teuthology import misc as teuthology
from util.rados import rados
from tasks.util.rados import rados
log = logging.getLogger(__name__)

View File

@ -6,7 +6,7 @@ import time
from teuthology.exceptions import CommandFailedError
from teuthology import misc as teuthology
from util.rados import rados
from tasks.util.rados import rados
import os

View File

@ -8,7 +8,7 @@ from teuthology import misc
from teuthology.exceptions import ConfigError
from teuthology import contextutil
from teuthology import packaging
from util import get_remote_for_role
from tasks.util import get_remote_for_role
log = logging.getLogger(__name__)

View File

@ -4,7 +4,7 @@ Dump_stuck command
import logging
import time
import ceph_manager
from tasks import ceph_manager
from teuthology import misc as teuthology

View File

@ -1,12 +1,12 @@
"""
Lost_unfound
"""
from teuthology.orchestra import run
import logging
import ceph_manager
from teuthology import misc as teuthology
from util.rados import rados
import time
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
from teuthology.orchestra import run
log = logging.getLogger(__name__)

View File

@ -3,10 +3,10 @@ Lost_unfound
"""
import logging
import time
import ceph_manager
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
from teuthology.orchestra import run
from util.rados import rados
log = logging.getLogger(__name__)

View File

@ -3,7 +3,7 @@
import logging
import contextlib
import time
import ceph_manager
from tasks import ceph_manager
from teuthology import misc
from teuthology.orchestra.run import CommandFailedError, Raw

View File

@ -3,7 +3,6 @@ Thrash mds by simulating failures
"""
import logging
import contextlib
import ceph_manager
import itertools
import random
import time
@ -13,6 +12,7 @@ from gevent.greenlet import Greenlet
from gevent.event import Event
from teuthology import misc as teuthology
from tasks import ceph_manager
from tasks.cephfs.filesystem import MDSCluster, Filesystem
from tasks.thrasher import Thrasher

View File

@ -11,7 +11,7 @@ import requests
import six
from teuthology.exceptions import CommandFailedError
from ..mgr_test_case import MgrTestCase
from tasks.mgr.mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)

View File

@ -6,7 +6,7 @@ import time
import jwt
from .helper import DashboardTestCase, JObj, JLeaf
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JLeaf
class AuthTest(DashboardTestCase):

View File

@ -4,7 +4,7 @@ from __future__ import absolute_import
import six
from contextlib import contextmanager
from .helper import DashboardTestCase, JObj, JList, JLeaf
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JList, JLeaf
class CephfsTest(DashboardTestCase):

View File

@ -2,7 +2,7 @@ from __future__ import absolute_import
import time
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
class ClusterConfigurationTest(DashboardTestCase):

View File

@ -4,7 +4,7 @@ from __future__ import absolute_import
import six
from .helper import DashboardTestCase, JObj, JList
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JList
class CrushRuleTest(DashboardTestCase):

View File

@ -4,7 +4,7 @@ from __future__ import absolute_import
import six
from .helper import DashboardTestCase, JObj, JList
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JList
class ECPTest(DashboardTestCase):

View File

@ -4,7 +4,7 @@
from __future__ import absolute_import
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
class GaneshaTest(DashboardTestCase):

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JAny, JLeaf, JList, JObj
from tasks.mgr.dashboard.helper import DashboardTestCase, JAny, JLeaf, JList, JObj
class HealthTest(DashboardTestCase):

View File

@ -2,8 +2,8 @@
from __future__ import absolute_import
import json
from .helper import DashboardTestCase, JList, JObj
from .test_orchestrator import test_data
from tasks.mgr.dashboard.helper import DashboardTestCase, JList, JObj
from tasks.mgr.dashboard.test_orchestrator import test_data
class HostControllerTest(DashboardTestCase):

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JList, JObj
from tasks.mgr.dashboard.helper import DashboardTestCase, JList, JObj
class LogsTest(DashboardTestCase):

View File

@ -4,7 +4,7 @@ from __future__ import absolute_import
import logging
import requests
from .helper import DashboardTestCase, JAny, JObj, JList, JLeaf
from tasks.mgr.dashboard.helper import DashboardTestCase, JAny, JObj, JList, JLeaf
logger = logging.getLogger(__name__)

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
class MonitorTest(DashboardTestCase):

View File

@ -2,7 +2,7 @@
from __future__ import absolute_import
import json
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
test_data = {

View File

@ -4,7 +4,7 @@ from __future__ import absolute_import
import json
from .helper import DashboardTestCase, JObj, JAny, JList, JLeaf, JTuple
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JAny, JList, JLeaf, JTuple
class OsdTest(DashboardTestCase):

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JObj
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj
class PerfCountersControllerTest(DashboardTestCase):

View File

@ -6,7 +6,7 @@ import six
import time
from contextlib import contextmanager
from .helper import DashboardTestCase, JAny, JList, JObj
from tasks.mgr.dashboard.helper import DashboardTestCase, JAny, JList, JObj
log = logging.getLogger(__name__)

View File

@ -5,7 +5,7 @@ from __future__ import absolute_import
import time
from .helper import DashboardTestCase, JObj, JLeaf, JList
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JLeaf, JList
class RbdTest(DashboardTestCase):

View File

@ -3,7 +3,7 @@
from __future__ import absolute_import
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
class RbdMirroringTest(DashboardTestCase):

View File

@ -2,7 +2,7 @@
from __future__ import absolute_import
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
class RequestsTest(DashboardTestCase):

View File

@ -10,7 +10,7 @@ from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.twofactor.totp import TOTP
from cryptography.hazmat.primitives.hashes import SHA1
from .helper import DashboardTestCase, JObj, JList, JLeaf
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JList, JLeaf
logger = logging.getLogger(__name__)

View File

@ -2,7 +2,7 @@
from __future__ import absolute_import
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
class RoleTest(DashboardTestCase):

View File

@ -2,7 +2,7 @@
from __future__ import absolute_import
from .helper import DashboardTestCase, JList, JObj, JAny
from tasks.mgr.dashboard.helper import DashboardTestCase, JList, JObj, JAny
class SettingsTest(DashboardTestCase):

View File

@ -1,6 +1,6 @@
from __future__ import absolute_import
from .helper import DashboardTestCase
from tasks.mgr.dashboard.helper import DashboardTestCase
class SummaryTest(DashboardTestCase):

View File

@ -6,7 +6,7 @@ import time
from datetime import datetime, timedelta
from .helper import DashboardTestCase, JObj, JLeaf
from tasks.mgr.dashboard.helper import DashboardTestCase, JObj, JLeaf
class UserTest(DashboardTestCase):

View File

@ -1,6 +1,6 @@
from mgr_test_case import MgrTestCase
from tasks.mgr.mgr_test_case import MgrTestCase
import logging
import requests

View File

@ -2,7 +2,8 @@ import logging
import json
import datetime
import time
from mgr_test_case import MgrTestCase
from tasks.mgr.mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
UUID = 'd5775432-0742-44a3-a435-45095e32e6b2'

View File

@ -5,7 +5,7 @@ from time import sleep
from teuthology.exceptions import CommandFailedError
from mgr_test_case import MgrTestCase
from tasks.mgr.mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)

View File

@ -3,7 +3,7 @@ import json
import logging
import time
from mgr_test_case import MgrTestCase
from tasks.mgr.mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)

View File

@ -1,6 +1,4 @@
from mgr_test_case import MgrTestCase
from tasks.mgr.mgr_test_case import MgrTestCase
import json
import logging

View File

@ -2,8 +2,8 @@
Handle clock skews in monitors.
"""
import logging
import ceph_manager
import time
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)

View File

@ -2,7 +2,7 @@
Monitor recovery
"""
import logging
import ceph_manager
from tasks import ceph_manager
from teuthology import misc as teuthology

View File

@ -3,11 +3,12 @@ Multibench testing
"""
import contextlib
import logging
import radosbench
import time
import copy
import gevent
from tasks import radosbench
log = logging.getLogger(__name__)
@contextlib.contextmanager

View File

@ -2,10 +2,10 @@
Test Object locations going down
"""
import logging
import ceph_manager
import time
from teuthology import misc as teuthology
from util.rados import rados
from tasks import ceph_manager
from tasks.util.rados import rados
log = logging.getLogger(__name__)

View File

@ -2,8 +2,8 @@
Osd backfill test
"""
import logging
import ceph_manager
import time
from tasks import ceph_manager
from teuthology import misc as teuthology

View File

@ -7,7 +7,7 @@ import six
import time
from teuthology.orchestra import run
from util.rados import rados
from tasks.util.rados import rados
from teuthology import misc as teuthology
log = logging.getLogger(__name__)

View File

@ -2,8 +2,8 @@
osd recovery
"""
import logging
import ceph_manager
import time
from tasks import ceph_manager
from teuthology import misc as teuthology

View File

@ -5,9 +5,9 @@ import logging
import json
import time
import ceph_manager
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
from util.rados import rados
log = logging.getLogger(__name__)

View File

@ -6,7 +6,7 @@ import time
log = logging.getLogger(__name__)
from args import argify
from teuthology.task.args import argify
POOLNAME = "POOLNAME"
ARGS = [

View File

@ -8,13 +8,12 @@ import os
import yaml
import time
from teuthology import misc as teuthology
from teuthology import contextutil
from tasks import rbd
from teuthology.orchestra import run
from tasks.util.workunit import get_refspec_after_overrides
from teuthology import contextutil
from teuthology import misc as teuthology
from teuthology.config import config as teuth_config
from util.workunit import get_refspec_after_overrides
from teuthology.orchestra import run
log = logging.getLogger(__name__)

View File

@ -28,7 +28,7 @@ import boto.s3.acl
import httplib2
from util.rgw import rgwadmin, get_user_summary, get_user_successful_ops
from tasks.util.rgw import rgwadmin, get_user_summary, get_user_successful_ops
log = logging.getLogger(__name__)
@ -196,7 +196,7 @@ def ignore_this_entry(cat, bucket, user, out, b_in, err):
pass
class requestlog_queue():
def __init__(self, add):
self.q = Queue.Queue(1000)
self.q = queue.Queue(1000)
self.adder = add
def handle_request_data(self, request, response, error=False):
now = datetime.datetime.now()

View File

@ -19,7 +19,7 @@ import time
from boto.connection import AWSAuthConnection
from teuthology import misc as teuthology
from util.rgw import get_user_summary, get_user_successful_ops, rgwadmin
from tasks.util.rgw import get_user_summary, get_user_successful_ops, rgwadmin
log = logging.getLogger(__name__)

View File

@ -8,7 +8,7 @@ from teuthology.orchestra import run
from teuthology import misc
from teuthology.exceptions import ConfigError
from teuthology.task import Task
from util import get_remote_for_role
from tasks.util import get_remote_for_role
log = logging.getLogger(__name__)

View File

@ -8,7 +8,7 @@ import os.path
import shutil
import tempfile
import ceph_manager
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)

View File

@ -12,7 +12,7 @@ import time
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra import run
from teuthology import misc as teuthology
from util.rados import rados
from tasks.util.rados import rados
import os

View File

@ -2,11 +2,12 @@
Lost_unfound
"""
import logging
from teuthology.orchestra import run
import ceph_manager
import time
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
from util.rados import rados
from teuthology.orchestra import run
log = logging.getLogger(__name__)

View File

@ -5,7 +5,7 @@ import logging
import time
from teuthology import misc as teuthology
from util.rados import rados
from tasks.util.rados import rados
log = logging.getLogger(__name__)

View File

@ -5,7 +5,7 @@ from io import BytesIO
from configobj import ConfigObj
import contextlib
import logging
import s3tests
from tasks import s3tests
from teuthology import misc as teuthology
from teuthology import contextutil

View File

@ -6,11 +6,11 @@ import logging
import random
import string
from copy import deepcopy
from util.rgw import rgwadmin, wait_for_radosgw
from util.rados import create_ec_pool, create_replicated_pool
from rgw_multi import multisite
from rgw_multi.zone_rados import RadosZone as RadosZone
from rgw_multi.zone_ps import PSZone as PSZone
from tasks.util.rgw import rgwadmin, wait_for_radosgw
from tasks.util.rados import create_ec_pool, create_replicated_pool
from tasks.rgw_multi import multisite
from tasks.rgw_multi.zone_rados import RadosZone as RadosZone
from tasks.rgw_multi.zone_ps import PSZone as PSZone
from teuthology.orchestra import run
from teuthology import misc

View File

@ -9,7 +9,7 @@ from teuthology.exceptions import ConfigError
from teuthology.task import Task
from teuthology import misc
from rgw_multi import multisite, tests, tests_ps
from tasks.rgw_multi import multisite, tests, tests_ps
log = logging.getLogger(__name__)

View File

@ -7,7 +7,7 @@ import os
import time
import tempfile
import ceph_manager
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)

View File

@ -1,6 +1,6 @@
from textwrap import dedent
from .. import devstack
from tasks import devstack
class TestDevstack(object):

View File

@ -1,6 +1,6 @@
from mock import Mock
from .. import radosgw_admin
from tasks import radosgw_admin
acl_with_version = """<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>foo</ID><DisplayName>Foo</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>foo</ID><DisplayName>Foo</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>
""" # noqa

View File

@ -26,7 +26,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
from .. import rados
from tasks.util import rados
class TestRados(object):

View File

@ -129,7 +129,7 @@ try:
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.kernel_mount import KernelMount
from tasks.cephfs.filesystem import Filesystem, MDSCluster, CephCluster
from mgr.mgr_test_case import MgrCluster
from tasks.mgr.mgr_test_case import MgrCluster
from teuthology.contextutil import MaxWhileTries
from teuthology.task import interactive
except ImportError:

View File

@ -3,10 +3,10 @@ test_stress_watch task
"""
import contextlib
import logging
import proc_thrasher
import six
from teuthology.orchestra import run
from teuthology.task import proc_thrasher
log = logging.getLogger(__name__)

View File

@ -3,7 +3,7 @@ from six import StringIO
import json
from .conn import get_gateway_connection, get_gateway_secure_connection
from tasks.rgw_multi.conn import get_gateway_connection, get_gateway_secure_connection
class Cluster:
""" interface to run commands against a distinct ceph cluster """

View File

@ -22,10 +22,10 @@ from nose.tools import eq_ as eq
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
from .multisite import Zone, ZoneGroup, Credentials
from tasks.rgw_multi.multisite import Zone, ZoneGroup, Credentials
from .conn import get_gateway_connection
from .tools import assert_raises
from tasks.rgw_multi.conn import get_gateway_connection
from tasks.rgw_multi.tools import assert_raises
class Config:
""" test configuration """

View File

@ -5,7 +5,7 @@ from nose.tools import assert_not_equal, assert_equal
from boto.s3.deletemarker import DeleteMarker
from .tests import get_realm, \
from tasks.rgw_multi.tests import get_realm, \
ZonegroupConns, \
zonegroup_meta_checkpoint, \
zone_meta_checkpoint, \
@ -17,7 +17,7 @@ from .tests import get_realm, \
get_user, \
get_tenant
from .zone_az import print_connection_info
from tasks.rgw_multi.zone_az import print_connection_info
# configure logging for the tests module

View File

@ -9,9 +9,9 @@ import dateutil
from nose.tools import eq_ as eq
from rgw_multi.multisite import *
from rgw_multi.tests import *
from rgw_multi.zone_es import *
from tasks.rgw_multi.multisite import *
from tasks.rgw_multi.tests import *
from tasks.rgw_multi.zone_es import *
log = logging.getLogger(__name__)

View File

@ -10,7 +10,7 @@ import socket
import time
import os
from random import randint
from .tests import get_realm, \
from tasks.rgw_multi.tests import get_realm, \
ZonegroupConns, \
zonegroup_meta_checkpoint, \
zone_meta_checkpoint, \
@ -21,7 +21,7 @@ from .tests import get_realm, \
gen_bucket_name, \
get_user, \
get_tenant
from .zone_ps import PSTopic, \
from tasks.rgw_multi.zone_ps import PSTopic, \
PSTopicS3, \
PSNotification, \
PSSubscription, \
@ -31,7 +31,7 @@ from .zone_ps import PSTopic, \
put_object_tagging, \
get_object_tagging, \
delete_all_objects
from multisite import User
from tasks.rgw_multi.multisite import User
from nose import SkipTest
from nose.tools import assert_not_equal, assert_equal
import boto.s3.tagging

View File

@ -1,6 +1,6 @@
import logging
from .multisite import Zone
from tasks.rgw_multi.multisite import Zone
log = logging.getLogger('rgw_multi.tests')

View File

@ -18,8 +18,8 @@ except ImportError:
from six.moves.urllib.parse import urlparse
from .multisite import *
from .tools import *
from tasks.rgw_multi.multisite import *
from tasks.rgw_multi.tools import *
log = logging.getLogger(__name__)

View File

@ -13,8 +13,8 @@ try:
except ImportError:
from itertools import zip_longest
from .multisite import *
from .tools import *
from tasks.rgw_multi.multisite import *
from tasks.rgw_multi.tools import *
log = logging.getLogger(__name__)

View File

@ -8,7 +8,7 @@ import hashlib
import base64
import xmltodict
from time import gmtime, strftime
from .multisite import Zone
from tasks.rgw_multi.multisite import Zone
import boto3
from botocore.client import Config

View File

@ -8,7 +8,7 @@ except ImportError:
from nose.tools import eq_ as eq
from .multisite import *
from tasks.rgw_multi.multisite import *
log = logging.getLogger(__name__)