diff --git a/tests/virtualization/qemu_001/Makefile b/tests/virtualization/VM_ATTACH_DISK_QEMU/Makefile similarity index 100% rename from tests/virtualization/qemu_001/Makefile rename to tests/virtualization/VM_ATTACH_DISK_QEMU/Makefile diff --git a/tests/virtualization/qemu_007/qemu_007.py b/tests/virtualization/VM_ATTACH_DISK_QEMU/VM_ATTACH_DISK_QEMU.py similarity index 79% rename from tests/virtualization/qemu_007/qemu_007.py rename to tests/virtualization/VM_ATTACH_DISK_QEMU/VM_ATTACH_DISK_QEMU.py index 1fc20f9eeff64a331f5af7d5da7700262522c067..12c39449d019bf15aa28fc027ddd3ec624ee752b 100644 --- a/tests/virtualization/qemu_007/qemu_007.py +++ b/tests/virtualization/VM_ATTACH_DISK_QEMU/VM_ATTACH_DISK_QEMU.py @@ -1,17 +1,3 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import re import time @@ -24,7 +10,7 @@ from hwcompatible.test import Test dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -NAME = 'qemu_007' +NAME = 'VM_ATTACH_DISK_QEMU' PASSWORD = 'openEuler12#$' DISK_FILE = f'{dir_path}/disk_007' DISK_SIZE = '5' @@ -40,14 +26,10 @@ DISK_CONTENT = f''' ''' -class Qemu007(Test): - - def __init__(self): - Test.__init__(self) - self.requirements = ["python3-paramiko"] +class VM_ATTACH_DISK_QEMU(Test): def test(self): - self.logger.info('Start testcase qemu_007.') + self.logger.info('Start testcase VM_ATTACH_DISK_QEMU.') # 创建 result = self.create_vm('qemu', NAME) @@ -90,7 +72,7 @@ class Qemu007(Test): return True def teardown(self): - self.logger.info('Teardown testcase qemu_007.') + self.logger.info('Teardown testcase VM_ATTACH_DISK_QEMU.') r = self.command.run_cmd(f'virsh destroy {NAME}') if r[2]: self.logger.error('Destroy vm failed.') diff --git a/tests/virtualization/qemu_003/Makefile b/tests/virtualization/VM_BASIC_INFO_QEMU/Makefile similarity index 100% rename from tests/virtualization/qemu_003/Makefile rename to tests/virtualization/VM_BASIC_INFO_QEMU/Makefile diff --git a/tests/virtualization/qemu_005/qemu_005.py b/tests/virtualization/VM_BASIC_INFO_QEMU/VM_BASIC_INFO_QEMU.py similarity index 75% rename from tests/virtualization/qemu_005/qemu_005.py rename to tests/virtualization/VM_BASIC_INFO_QEMU/VM_BASIC_INFO_QEMU.py index 82fe447f58153b3a74ca0e00ff6b39123f1c9157..7d319018c5c37e2ce3fbfc537dfdb9cd2d0e718b 100644 --- a/tests/virtualization/qemu_005/qemu_005.py +++ b/tests/virtualization/VM_BASIC_INFO_QEMU/VM_BASIC_INFO_QEMU.py @@ -1,17 +1,3 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import re import time @@ -21,7 +7,7 @@ import paramiko from hwcompatible.constants import FILE_FLAGS, FILE_MODES from hwcompatible.test import Test -NAME = 'qemu_005' +NAME = 'VM_BASIC_INFO_QEMU' PASSWORD = 'openEuler12#$' VCPU_NUM = '4' @@ -29,14 +15,10 @@ dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -class Qemu005(Test): - - def __init__(self): - Test.__init__(self) - self.requirements = ["python3-paramiko"] +class VM_BASIC_INFO_QEMU(Test): def test(self): - self.logger.info('Start testcase qemu_005.') + self.logger.info('Start testcase VM_BASIC_INFO_QEMU.') # 创建 result = self.create_vm('qemu', NAME, VCPU_NUM) @@ -74,7 +56,7 @@ class Qemu005(Test): return True def teardown(self): - self.logger.info('Teardown testcase qemu_005.') + self.logger.info('Teardown testcase VM_BASIC_INFO_QEMU.') r = self.command.run_cmd(f'virsh destroy {NAME}') if r[2]: self.logger.error('Destroy vm failed.') diff --git a/tests/virtualization/qemu_005/Makefile b/tests/virtualization/VM_BASIC_INFO_STRATOVIRT/Makefile similarity index 100% rename from tests/virtualization/qemu_005/Makefile rename to tests/virtualization/VM_BASIC_INFO_STRATOVIRT/Makefile diff --git a/tests/virtualization/stratovirt_004/stratovirt_004.py b/tests/virtualization/VM_BASIC_INFO_STRATOVIRT/VM_BASIC_INFO_STRATOVIRT.py similarity index 75% rename from tests/virtualization/stratovirt_004/stratovirt_004.py rename to tests/virtualization/VM_BASIC_INFO_STRATOVIRT/VM_BASIC_INFO_STRATOVIRT.py index 4e1d491f005fda42bd4a6ad036c0efb20e85c83c..7e3255771d1abc0a4e4d3a76d44c70e1bb3e2ce2 100644 --- a/tests/virtualization/stratovirt_004/stratovirt_004.py +++ b/tests/virtualization/VM_BASIC_INFO_STRATOVIRT/VM_BASIC_INFO_STRATOVIRT.py @@ -1,17 +1,3 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import re import time @@ -21,7 +7,7 @@ import paramiko from hwcompatible.constants import FILE_FLAGS, FILE_MODES from hwcompatible.test import Test -NAME = 'stratovirt_004' +NAME = 'VM_BASIC_INFO_STRATOVIRT' PASSWORD = 'openEuler12#$' IP = '192.168.122.2' VCPU_NUM = '22' @@ -30,14 +16,10 @@ dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -class Stratovirt004(Test): - - def __init__(self): - Test.__init__(self) - self.requirements = ["python3-paramiko"] +class VM_BASIC_INFO_STRATOVIRT(Test): def test(self): - self.logger.info('Start testcase stratovirt_004.') + self.logger.info('Start testcase VM_BASIC_INFO_STRATOVIRT.') # 创建 result = self.create_vm('stratovirt', NAME, VCPU_NUM) @@ -78,7 +60,7 @@ class Stratovirt004(Test): return True def teardown(self): - self.logger.info('Teardown testcase stratovirt_004.') + self.logger.info('Teardown testcase VM_BASIC_INFO_STRATOVIRT.') r = self.command.run_cmd(f'virsh destroy {NAME}') if r[2]: self.logger.error('Destroy vm failed.') diff --git a/tests/virtualization/qemu_007/Makefile b/tests/virtualization/VM_CREATE_QEMU/Makefile similarity index 100% rename from tests/virtualization/qemu_007/Makefile rename to tests/virtualization/VM_CREATE_QEMU/Makefile diff --git a/tests/virtualization/qemu_001/qemu_001.py b/tests/virtualization/VM_CREATE_QEMU/VM_CREATE_QEMU.py similarity index 68% rename from tests/virtualization/qemu_001/qemu_001.py rename to tests/virtualization/VM_CREATE_QEMU/VM_CREATE_QEMU.py index c43a800acef19b51b44ebc34ad32345914b6c1a4..0b54f0222d9047b56b3709a83a20363476d3e4d7 100644 --- a/tests/virtualization/qemu_001/qemu_001.py +++ b/tests/virtualization/VM_CREATE_QEMU/VM_CREATE_QEMU.py @@ -1,24 +1,10 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import time from hwcompatible.constants import FILE_FLAGS, FILE_MODES from hwcompatible.test import Test -NAME = 'qemu_001' +NAME = 'VM_CREATE_QEMU' PASSWORD = 'openEuler12#$' VCPU_NUM = '4' @@ -26,10 +12,10 @@ dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -class Qemu001(Test): +class VM_CREATE_QEMU(Test): def test(self): - self.logger.info('Start testcase qemu_001.') + self.logger.info('Start testcase VM_CREATE_QEMU.') # 创建 result = self.create_vm('qemu', NAME, VCPU_NUM) @@ -48,7 +34,7 @@ class Qemu001(Test): return True def teardown(self): - self.logger.info('Teardown testcase qemu_001.') + self.logger.info('Teardown testcase VM_CREATE_QEMU.') r = self.command.run_cmd(f'virsh destroy {NAME}') if r[2]: self.logger.error('Destroy vm failed.') diff --git a/tests/virtualization/qemu_008/Makefile b/tests/virtualization/VM_DELETE_QEMU/Makefile similarity index 100% rename from tests/virtualization/qemu_008/Makefile rename to tests/virtualization/VM_DELETE_QEMU/Makefile diff --git a/tests/virtualization/qemu_008/qemu_008.py b/tests/virtualization/VM_DELETE_QEMU/VM_DELETE_QEMU.py similarity index 77% rename from tests/virtualization/qemu_008/qemu_008.py rename to tests/virtualization/VM_DELETE_QEMU/VM_DELETE_QEMU.py index 74dbec839a6540317240e81ef698d2b49154ddc4..f6c761f6192a4bcffe83fb6c9791114648140b60 100644 --- a/tests/virtualization/qemu_008/qemu_008.py +++ b/tests/virtualization/VM_DELETE_QEMU/VM_DELETE_QEMU.py @@ -1,17 +1,3 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import time @@ -21,7 +7,7 @@ from hwcompatible.test import Test dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -NAME = 'qemu_008' +NAME = 'VM_DELETE_QEMU' PASSWORD = 'openEuler12#$' DISK_FILE = f'{dir_path}/disk_008' DISK_SIZE = '5' @@ -37,10 +23,10 @@ DISK_CONTENT = f''' ''' -class Qemu008(Test): +class VM_DELETE_QEMU(Test): def test(self): - self.logger.info('Start testcase qemu_008.') + self.logger.info('Start testcase VM_DELETE_QEMU.') # 创建 result = self.create_vm('qemu', NAME) @@ -71,7 +57,7 @@ class Qemu008(Test): return True def teardown(self): - self.logger.info('Teardown testcase qemu_008.') + self.logger.info('Teardown testcase VM_DELETE_QEMU.') self.command.run_cmd(f'virsh destroy {NAME}') r = self.command.run_cmd(f'rm -f {DISK_FILE}') if r[2]: diff --git a/tests/virtualization/qemu_010/Makefile b/tests/virtualization/VM_IO_QEMU/Makefile similarity index 100% rename from tests/virtualization/qemu_010/Makefile rename to tests/virtualization/VM_IO_QEMU/Makefile diff --git a/tests/virtualization/qemu_010/qemu_010.py b/tests/virtualization/VM_IO_QEMU/VM_IO_QEMU.py similarity index 75% rename from tests/virtualization/qemu_010/qemu_010.py rename to tests/virtualization/VM_IO_QEMU/VM_IO_QEMU.py index 485f6e0d92f03dc4229bc1d4ec49505002d8f73b..00a9cc2527536001ab6daeee965ca22df3b766fe 100644 --- a/tests/virtualization/qemu_010/qemu_010.py +++ b/tests/virtualization/VM_IO_QEMU/VM_IO_QEMU.py @@ -1,17 +1,3 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import re import time @@ -21,21 +7,17 @@ import paramiko from hwcompatible.constants import FILE_FLAGS, FILE_MODES from hwcompatible.test import Test -NAME = 'qemu_010' +NAME = 'VM_IO_QEMU' PASSWORD = 'openEuler12#$' dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -class Qemu010(Test): - - def __init__(self): - Test.__init__(self) - self.requirements = ["python3-paramiko"] +class VM_IO_QEMU(Test): def test(self): - self.logger.info('Start testcase qemu_010.') + self.logger.info('Start testcase VM_IO_QEMU.') # 创建 result = self.create_vm('qemu', NAME) @@ -76,7 +58,7 @@ class Qemu010(Test): return True def teardown(self): - self.logger.info('Teardown testcase qemu_010.') + self.logger.info('Teardown testcase VM_IO_QEMU.') r = self.command.run_cmd(f'virsh destroy {NAME}') if r[2]: self.logger.error('Destroy vm failed.') diff --git a/tests/virtualization/stratovirt_004/Makefile b/tests/virtualization/VM_IO_STRATOVIRT/Makefile similarity index 100% rename from tests/virtualization/stratovirt_004/Makefile rename to tests/virtualization/VM_IO_STRATOVIRT/Makefile diff --git a/tests/virtualization/stratovirt_010/stratovirt_010.py b/tests/virtualization/VM_IO_STRATOVIRT/VM_IO_STRATOVIRT.py similarity index 75% rename from tests/virtualization/stratovirt_010/stratovirt_010.py rename to tests/virtualization/VM_IO_STRATOVIRT/VM_IO_STRATOVIRT.py index add4ec8fb3df500fa26e9bc728dc2d6b8e7e28e8..42b6c669865bb401cd5f626a132c7f7715d6a076 100644 --- a/tests/virtualization/stratovirt_010/stratovirt_010.py +++ b/tests/virtualization/VM_IO_STRATOVIRT/VM_IO_STRATOVIRT.py @@ -1,17 +1,3 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import time @@ -20,7 +6,7 @@ import paramiko from hwcompatible.constants import FILE_FLAGS, FILE_MODES from hwcompatible.test import Test -NAME = 'stratovirt_010' +NAME = 'VM_IO_STRATOVIRT' PASSWORD = 'openEuler12#$' IP = '192.168.122.2' @@ -28,14 +14,10 @@ dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -class Stratovirt010(Test): - - def __init__(self): - Test.__init__(self) - self.requirements = ["python3-paramiko"] +class VM_IO_STRATOVIRT(Test): def test(self): - self.logger.info('Start testcase stratovirt_010.') + self.logger.info('Start testcase VM_IO_STRATOVIRT.') # 创建 result = self.create_vm('stratovirt', NAME) @@ -79,7 +61,7 @@ class Stratovirt010(Test): return True def teardown(self): - self.logger.info('Teardown testcase stratovirt_010.') + self.logger.info('Teardown testcase VM_IO_STRATOVIRT.') r = self.command.run_cmd(f'virsh destroy {NAME}') if r[2]: self.logger.error('Destroy vm failed.') diff --git a/tests/virtualization/stratovirt_010/Makefile b/tests/virtualization/VM_RESTART_QEMU/Makefile similarity index 100% rename from tests/virtualization/stratovirt_010/Makefile rename to tests/virtualization/VM_RESTART_QEMU/Makefile diff --git a/tests/virtualization/qemu_003/qemu_003.py b/tests/virtualization/VM_RESTART_QEMU/VM_RESTART_QEMU.py similarity index 73% rename from tests/virtualization/qemu_003/qemu_003.py rename to tests/virtualization/VM_RESTART_QEMU/VM_RESTART_QEMU.py index b670798898e0a870aa7f6d911fffc89d56546577..8554c7b9e73a0192d549815ab8852178c99a8ee7 100644 --- a/tests/virtualization/qemu_003/qemu_003.py +++ b/tests/virtualization/VM_RESTART_QEMU/VM_RESTART_QEMU.py @@ -1,17 +1,3 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# Copyright (c) 2023 Huawei Technologies Co., Ltd. -# oec-hardware is licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# Create: 2023-11-28 - import os import re import time @@ -21,7 +7,7 @@ import paramiko from hwcompatible.constants import FILE_FLAGS, FILE_MODES from hwcompatible.test import Test -NAME = 'qemu_003' +NAME = 'VM_RESTART_QEMU' PASSWORD = 'openEuler12#$' LOCAL_IP = '192.168.122.1' @@ -29,14 +15,10 @@ dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) -class Qemu003(Test): - - def __init__(self): - Test.__init__(self) - self.requirements = ["python3-paramiko"] +class VM_RESTART_QEMU(Test): def test(self): - self.logger.info('Start testcase qemu_003.') + self.logger.info('Start testcase VM_RESTART_QEMU.') # 创建 result = self.create_vm('qemu', NAME) @@ -72,7 +54,7 @@ class Qemu003(Test): return True def teardown(self): - self.logger.info('Teardown testcase qemu_003.') + self.logger.info('Teardown testcase VM_RESTART_QEMU.') r = self.command.run_cmd(f'virsh destroy {NAME}') if r[2]: self.logger.error('Destroy vm failed.')