@@ -46,7 +46,7 @@ from .settings import LOG_NAME_SEP, NICS
from .ssh_connection import SSHConnection
from .test_result import ResultTable
from .utils import RED, remove_old_rsa_key
-from .virt_resource import VirtResource
+from framework.virt_resource import VirtResource
class Dut(Crb):
@@ -1,4 +1,3 @@
-import re
import threading
import time
import traceback
@@ -7,7 +6,6 @@ import threadpool
from .logger import getLogger
from .settings import DTS_ERR_TBL, DTS_PARALLEL_SETTING, save_global_setting
-from .utils import RED
class MultipleVM(object):
@@ -79,7 +77,7 @@ class MultipleVM(object):
self.logger.info("Parallel task start for DUT%d %s" % (dut_id, vm_name))
threading.current_thread().name = vm_name
- from .qemu_kvm import QEMUKvm
+ from tests.util.virt.qemu_kvm import QEMUKvm
# VM configured by configuration file
if "virt_config" in args:
@@ -31,13 +31,11 @@
import random
import re
-import sys
import time
import framework.utils as utils
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
-from framework.settings import get_nic_name
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
VM_CORES_MASK = "all"
@@ -30,15 +30,10 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import random
-import sys
import time
-from scapy.utils import rdpcap
-
-import framework.utils as utils
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
-from framework.settings import get_nic_name
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
VM_CORES_MASK = "all"
@@ -42,7 +42,7 @@ import time
import framework.utils as utils
import tests.vhost_peer_conf as peer
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestDPDKGROLib(TestCase):
@@ -41,9 +41,8 @@ import time
import framework.utils as utils
import tests.vhost_peer_conf as peer
-from framework.config import UserConf
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestDPDKGsoLib(TestCase):
@@ -38,14 +38,9 @@ Test Floating VEB Features by Poll Mode Drivers.
import re
import time
-from framework.dut import Dut
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_dut import VirtDut
class TestFloatingVEBSwitching(TestCase):
@@ -29,33 +29,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
-import random
import re
import time
from time import sleep
-import scapy.layers.inet
-from scapy.arch import get_if_hwaddr
-from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether
+from scapy.layers.inet import IP, TCP, UDP, Ether
from scapy.layers.inet6 import IPv6
-from scapy.layers.l2 import ARP, GRE, Dot1Q
-from scapy.layers.sctp import SCTP, SCTPChunkData
-from scapy.packet import Raw, bind_layers
-from scapy.route import *
-from scapy.sendrecv import sendp, sniff
-from scapy.utils import hexstr, rdpcap, wrpcap
-
-import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
-from framework.packet import Packet
+from scapy.layers.sctp import SCTP
+from scapy.utils import rdpcap, wrpcap
+
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_dut import VirtDut
class TestFlowClassifySoftnic(TestCase):
@@ -36,24 +36,14 @@ Test the support of generic flow API by Poll Mode Drivers.
"""
-import os
import random
import re
import time
-import scapy.layers.inet
-from scapy.utils import rdpcap
-
import framework.packet as packet
import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
from framework.test_case import TestCase, check_supported_nic
-from framework.virt_dut import VirtDut
MAX_VLAN = 4095
MAX_QUEUE = 15
@@ -36,16 +36,13 @@ Test some iavf function in i40e driver
"""
-import math
-import random
import re
import time
-from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE, get_nic_name
+from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "Default"
@@ -29,34 +29,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
-import random
import re
import time
from time import sleep
-import scapy.layers.inet
-from scapy.arch import get_if_hwaddr
-from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether
-from scapy.layers.l2 import ARP, GRE, Dot1Q
-from scapy.layers.sctp import SCTP, SCTPChunkData
-from scapy.packet import Raw, bind_layers
-from scapy.route import *
-from scapy.sendrecv import sendp, sniff
+from scapy.layers.inet import IP, TCP, Ether
+from scapy.packet import Raw
# from scapy.all import conf
-from scapy.utils import hexstr, rdpcap, wrpcap
-
-import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
-from framework.packet import Packet
-from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
+from scapy.utils import rdpcap, wrpcap
+
from framework.test_case import TestCase
-from framework.virt_dut import VirtDut
class TestIPPipeline(TestCase):
@@ -33,18 +33,14 @@
DPDK Test suite.
Test Niantic ixgbe_get_vf_queue Include Extra Information function.
"""
-import random
-import re
import time
-import framework.utils as utils
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
from framework.test_case import TestCase
-from framework.virt_common import VM
class TestIxgbeVfGetExtraInfo(TestCase):
@@ -44,10 +44,8 @@ import time
import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
MAX_VLAN = 4095
@@ -34,14 +34,12 @@ DPDK Test suite.
Test the support of Malicious Driver Detection
"""
-
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
send_pks_num = 2000
@@ -31,34 +31,18 @@
import itertools
import os
-import random
import re
import socket
import time
from time import sleep
-import scapy.layers.inet
-from scapy.arch import get_if_hwaddr
-from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether
-from scapy.layers.l2 import ARP, GRE, Dot1Q
-from scapy.layers.sctp import SCTP, SCTPChunkData
-from scapy.packet import Raw, bind_layers
-from scapy.route import *
-from scapy.sendrecv import sendp, sniff
+from scapy.layers.inet import IP, TCP, Ether
+from scapy.packet import Raw
# from scapy.all import conf
-from scapy.utils import hexstr, rdpcap, wrpcap
-
-import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
-from framework.packet import Packet
-from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
+from scapy.utils import rdpcap, wrpcap
+
from framework.test_case import TestCase
-from framework.virt_dut import VirtDut
TIMESTAMP = re.compile(r"\d{2}\:\d{2}\:\d{2}\.\d{6}")
PAYLOAD = re.compile(r"\t0x([0-9a-fA-F]+): ([0-9a-fA-F ]+)")
@@ -29,15 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
import re
import time
import framework.packet as packet
-import framework.utils as utils
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPortControl(TestCase):
@@ -38,7 +38,7 @@ import time
import traceback
from framework.exception import VerifyFailure
-from framework.qemu_libvirt import LibvirtKvm
+from tests.util.virt.qemu_libvirt import LibvirtKvm
from framework.test_case import TestCase
from framework.utils import create_mask as dts_create_mask
@@ -35,14 +35,10 @@ power negative test suite.
"""
import os
-import re
import time
-import traceback
-from framework.exception import VerifyFailure
-from framework.qemu_libvirt import LibvirtKvm
+from tests.util.virt.qemu_libvirt import LibvirtKvm
from framework.test_case import TestCase
-from framework.utils import create_mask as dts_create_mask
class TestPowerNegative(TestCase):
@@ -41,13 +41,10 @@ qemu =
import re
import time
-from scapy.utils import wrpcap
-
-import framework.utils as utils
from framework.pktgen import PacketGeneratorHelper
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostPVPDiffQemuVersion(TestCase):
@@ -41,11 +41,10 @@ port restart test with each path
import re
import time
-import framework.utils as utils
from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPVPQemuMultiPathPortRestart(TestCase):
@@ -43,7 +43,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPVPVhostUserReconnect(TestCase):
@@ -42,7 +42,7 @@ from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPVPVirtIOBonding(TestCase):
@@ -34,12 +34,9 @@
DPDK Test suite.
MTU Checks example.
"""
-import ipaddress
-import time
from typing import Callable
-import framework.utils as utils
-from framework.flow import generator
+from tests.util.flow import generator
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
@@ -39,7 +39,7 @@ import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
RSS_KEY = "6EA6A420D5138E712433B813AE45B3C4BECB2B405F31AD6C331835372D15E2D5E49566EE0ED1962AFA1B7932F3549520FD71C75E"
@@ -41,7 +41,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
@@ -36,8 +36,6 @@ Test Shutdown API Feature
"""
-import os
-import random
import re
import time
from random import randint
@@ -45,8 +43,8 @@ from random import randint
import framework.utils as utils
from framework.exception import VerifyFailure
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
-from framework.settings import DRIVERS, HEADER_SIZE, PROTOCOL_PACKET_SIZE, get_nic_name
+from tests.util.virt.qemu_kvm import QEMUKvm
+from framework.settings import DRIVERS, HEADER_SIZE
from framework.test_case import TestCase
#
@@ -37,15 +37,11 @@ Test userland 10Gb PMD.
"""
-import pdb
-import random
-import re
import time
from framework.pmd_output import PmdOutput
-from framework.settings import PROTOCOL_PACKET_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
FRAME_SIZE_64 = 64
VM_CORES_MASK = "all"
@@ -46,7 +46,7 @@ import time
import framework.utils as utils
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVdevPrimarySecondary(TestCase):
@@ -39,14 +39,9 @@ import re
import time
import framework.utils as utils
-from framework.dut import Dut
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_dut import VirtDut
class TestVEBSwitching(TestCase):
@@ -30,16 +30,11 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import random
-import sys
import time
-from scapy.utils import rdpcap
-
-import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
-from framework.settings import get_nic_name
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
VM_CORES_MASK = "all"
@@ -35,14 +35,10 @@ DPDK Test suite.
Test vf_interrupt_pmd.
"""
-import pdb
-import re
-import time
-
import framework.utils as utils
from framework.packet import Packet
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVfInterruptPmd(TestCase):
@@ -29,16 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
@@ -44,9 +44,9 @@ import time
import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
-from framework.utils import GREEN, RED
+from framework.utils import GREEN
class TestVfKernel(TestCase):
@@ -29,12 +29,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
@@ -30,17 +30,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import re
-import string
import time
import framework.utils as utils
-from framework.crb import Crb
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import GREEN, RED
-from framework.virt_common import VM
-from nics.net_device import NetDevice
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
DEFAULT_MTU = 1500
@@ -29,13 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
@@ -29,13 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
@@ -46,7 +46,7 @@ from framework.pmd_output import PmdOutput
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVfRss(TestCase):
@@ -33,14 +33,13 @@ DPDK Test suite
Test vf to vf nic bridge
"""
-import pdb
import re
import time
import framework.utils as utils
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VF_NUMS_ON_ONE_PF = 2
VF_TEMP_MAC = "52:54:12:45:67:1%d"
@@ -30,14 +30,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import random
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import get_nic_name
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
MAX_VLAN = 4095
@@ -37,9 +37,8 @@ Vhost event idx interrupt need test with l3fwd-power sample
import re
import time
-import framework.utils as utils
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostEventIdxInterrupt(TestCase):
@@ -43,7 +43,7 @@ from framework.pktgen import PacketGeneratorHelper
from framework.pmd_output import PmdOutput
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostMultiQueueQemu(TestCase):
@@ -37,13 +37,9 @@ vhost pmd xstats test suite.
import copy
import datetime
import re
-import time
-import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
ETHER_JUMBO_FRAME_MTU = 9000
@@ -32,12 +32,11 @@ import os.path
import re
import time
-import framework.utils as utils
from framework.config import UserConf
from framework.exception import VirtDutInitException
from framework.settings import CONFIG_ROOT_PATH
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostUserLiveMigration(TestCase):
@@ -41,7 +41,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostVirtioPmdInterrupt(TestCase):
@@ -38,10 +38,9 @@ import _thread
import re
import time
-import framework.utils as utils
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVirtioIdxInterrupt(TestCase):
@@ -33,14 +33,11 @@ DPDK Test suite
Test DPDK vhost + virtio scenarios
"""
import binascii
-import os
-import subprocess
-import time
import framework.utils as utils
import tests.cryptodev_common as cc
from framework.packet import Packet
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
@@ -32,12 +32,9 @@
DPDK Test suite
Test DPDK vhost + virtio scenarios
"""
-import os
-import subprocess
-import framework.utils as utils
import tests.cryptodev_common as cc
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
@@ -44,11 +44,10 @@ qemu =
import re
import time
-import framework.utils as utils
from framework.pktgen import PacketGeneratorHelper
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVirtioPVPRegression(TestCase):
@@ -34,12 +34,8 @@ DPDK Test suite
Test DPDK vhost + virtio scenarios
"""
-import os
-import subprocess
-
-import framework.utils as utils
import tests.cryptodev_common as cc
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
@@ -46,7 +46,7 @@ import time
import framework.utils as utils
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVM2VMVirtioNetPerf(TestCase):
@@ -45,7 +45,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVM2VMVirtioPMD(TestCase):
@@ -41,7 +41,7 @@ import re
import time
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.test_case import TestCase
VM_CORES_MASK = "all"
@@ -37,8 +37,7 @@ VM power manager test suite.
import re
import framework.utils as utils
-from framework.qemu_libvirt import LibvirtKvm
-from framework.settings import HEADER_SIZE
+from tests.util.virt.qemu_libvirt import LibvirtKvm
from framework.test_case import TestCase
@@ -36,7 +36,6 @@ virtual power manager policy (traffic/time) test suite.
import os
import random
import re
-import textwrap
import time
import traceback
from copy import deepcopy
@@ -48,7 +47,7 @@ from framework.exception import VerifyFailure
from framework.packet import Packet
from framework.pktgen import TRANSMIT_CONT
from framework.pmd_output import PmdOutput
-from framework.qemu_libvirt import LibvirtKvm
+from tests.util.virt.qemu_libvirt import LibvirtKvm
from framework.test_case import TestCase
from framework.utils import create_mask as dts_create_mask
@@ -45,7 +45,7 @@ from framework.pktgen import PacketGeneratorHelper
from framework.pmd_output import PmdOutput
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVswitchSampleCBDMA(TestCase):
similarity index 99%
rename from framework/qemu_kvm.py
rename to tests/util/virt/qemu_kvm.py
@@ -34,10 +34,10 @@ import os
import re
import time
-from .exception import StartVMFailedException
-from .settings import DTS_PARALLEL_SETTING, get_host_ip, load_global_setting
-from .utils import RED, parallel_lock
-from .virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN, VirtBase
+from framework.exception import StartVMFailedException
+from framework.settings import get_host_ip
+from framework.utils import RED, parallel_lock
+from tests.util.virt.virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN, VirtBase
# This name is directly defined in the qemu guest service
# So you can not change it except it is changed by the service
similarity index 99%
rename from framework/qemu_libvirt.py
rename to tests/util/virt/qemu_libvirt.py
@@ -36,15 +36,8 @@ import xml.etree.ElementTree as ET
from xml.dom import minidom
from xml.etree.ElementTree import ElementTree
-import framework.utils as utils
-
-from .config import VIRTCONF, VirtConf
-from .dut import Dut
-from .exception import StartVMFailedException
-from .logger import getLogger
-from .ssh_connection import SSHConnection
-from .virt_base import VirtBase
-from .virt_resource import VirtResource
+from framework.exception import StartVMFailedException
+from tests.util.virt.virt_base import VirtBase
class LibvirtKvm(VirtBase):
@@ -31,8 +31,8 @@
import os
from framework.config import VirtConf
-from framework.qemu_kvm import QEMUKvm
-from framework.qemu_libvirt import LibvirtKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_libvirt import LibvirtKvm
from framework.settings import CONFIG_ROOT_PATH
@@ -28,14 +28,13 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import time
import framework.utils as utils
-from framework.config import VIRTCONF, VirtConf
+from framework.config import VirtConf
from framework.exception import *
from framework.pmd_output import PmdOutput
-from framework.qemu_kvm import QEMUKvm
+from tests.util.virt.qemu_kvm import QEMUKvm
from framework.settings import CONFIG_ROOT_PATH, get_netdev
from framework.utils import create_mask