Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions test/integration/smoke/test_deploy_vm_extra_config_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,26 @@ def setUpClass(cls):

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):
Expand Down
6 changes: 5 additions & 1 deletion tools/marvin/marvin/lib/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,8 @@ def create(cls, apiclient, services, templateid=None, accountid=None,
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()
Expand Down Expand Up @@ -678,6 +679,9 @@ def create(cls, apiclient, services, templateid=None, accountid=None,
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()):
Expand Down