This is an automated email from the ASF dual-hosted git repository.
weizhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 597a8030b7c integration test fixes for 4.18 (#7190)
597a8030b7c is described below
commit 597a8030b7c3235e59207041634206bead379c08
Author: dahn <[email protected]>
AuthorDate: Mon Feb 13 23:20:11 2023 -0800
integration test fixes for 4.18 (#7190)
* cleanup in resource housekeeping
* cleanup in resource housekeeping
* Update test/integration/smoke/test_deploy_vm_extra_config_data.py
Co-authored-by: dahn <[email protected]>
* revert most cleanup code
* Revert "cleanup in resource housekeeping"
This reverts commit 1d140bd215b29c7a5ec4cbfb9eabf0465a8864d9.
* add extra config to VirtualMachine.create(..)
---------
Co-authored-by: Wei Zhou <[email protected]>
---
.../smoke/test_deploy_vm_extra_config_data.py | 18 +++++-------------
tools/marvin/marvin/lib/base.py | 6 +++++-
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/test/integration/smoke/test_deploy_vm_extra_config_data.py
b/test/integration/smoke/test_deploy_vm_extra_config_data.py
index 80b046102ca..318febb7a1e 100644
--- a/test/integration/smoke/test_deploy_vm_extra_config_data.py
+++ b/test/integration/smoke/test_deploy_vm_extra_config_data.py
@@ -63,34 +63,26 @@ class TestAddConfigtoDeployVM(cloudstackTestCase):
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+ cls._cleanup = []
# Create an account, network, and IP addresses
cls.account = Account.create(
cls.apiclient,
cls.services["account"],
domainid=cls.domain.id
)
+ cls._cleanup.append(cls.account)
cls.service_offering = ServiceOffering.create(
cls.apiclient,
cls.services["service_offerings"]["small"]
)
-
- cls.cleanup = [
- cls.account,
- cls.service_offering
- ]
+ cls._cleanup.append(cls.service_offering)
cls.hosts_hugepages = cls.set_hosts_hugepages()
@classmethod
def tearDownClass(cls):
- try:
- cls.apiclient = super(TestAddConfigtoDeployVM,
cls).getClsTestClient().getApiClient()
- cls.reset_hosts_hugepages()
- # Clean up, terminate the created templates
- cleanup_resources(cls.apiclient, cls.cleanup)
-
- except Exception as e:
- raise Exception("Warning: Exception during cleanup : %s" % e)
+ cls.reset_hosts_hugepages()
+ super(TestAddConfigtoDeployVM, cls).tearDownClass()
@classmethod
def set_hosts_hugepages(cls):
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index a9f8e06cddd..9d28d5a3f2a 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -522,7 +522,8 @@ class VirtualMachine:
method='GET', hypervisor=None, customcpunumber=None,
customcpuspeed=None, custommemory=None, rootdisksize=None,
rootdiskcontroller=None, vpcid=None, macaddress=None,
datadisktemplate_diskoffering_list={},
- properties=None, nicnetworklist=None, bootmode=None,
boottype=None, dynamicscalingenabled=None, userdataid=None,
userdatadetails=None):
+ properties=None, nicnetworklist=None, bootmode=None,
boottype=None, dynamicscalingenabled=None,
+ userdataid=None, userdatadetails=None, extraconfig=None):
"""Create the instance"""
cmd = deployVirtualMachine.deployVirtualMachineCmd()
@@ -678,6 +679,9 @@ class VirtualMachine:
if boottype:
cmd.boottype = boottype
+ if extraconfig:
+ cmd.extraconfig = extraconfig
+
virtual_machine = apiclient.deployVirtualMachine(cmd, method=method)
if 'password' in list(virtual_machine.__dict__.keys()):