mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-8235: Fixed test case in test_bugs.py to read variable data from configurableData section of test_data.py and also fixed wrong parameter name
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
parent
015aed9bef
commit
500baea9b6
@ -16,18 +16,34 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
# Import Local Modules
|
# Import Local Modules
|
||||||
from marvin.cloudstackTestCase import *
|
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
|
||||||
from marvin.cloudstackException import *
|
from marvin.cloudstackAPI import (updateStoragePool,
|
||||||
from marvin.cloudstackAPI import *
|
resizeVolume,
|
||||||
|
listCapacity,
|
||||||
|
addCluster)
|
||||||
from marvin.sshClient import SshClient
|
from marvin.sshClient import SshClient
|
||||||
from marvin.lib.utils import *
|
from marvin.lib.common import (get_zone,
|
||||||
from marvin.lib.base import *
|
get_template,
|
||||||
from marvin.lib.common import *
|
get_domain,
|
||||||
from marvin.codes import *
|
list_volumes,
|
||||||
|
get_pod,
|
||||||
|
is_config_suitable)
|
||||||
|
from marvin.lib.base import (Domain,
|
||||||
|
Account,
|
||||||
|
Template,
|
||||||
|
VirtualMachine,
|
||||||
|
Volume,
|
||||||
|
DiskOffering,
|
||||||
|
StoragePool,
|
||||||
|
ServiceOffering,
|
||||||
|
Configurations)
|
||||||
|
from marvin.lib.utils import cleanup_resources
|
||||||
from nose.plugins.attrib import attr
|
from nose.plugins.attrib import attr
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
class Test42xBugsMgmtSvr(cloudstackTestCase):
|
class Test42xBugsMgmtSvr(cloudstackTestCase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
try:
|
try:
|
||||||
@ -135,7 +151,7 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
|
|||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.account.domainid,
|
domainid=self.account.domainid,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
)
|
)
|
||||||
self.cleanup.append(virtual_machine)
|
self.cleanup.append(virtual_machine)
|
||||||
# Verify VM state
|
# Verify VM state
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@ -281,7 +297,7 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
|
|||||||
self.apiClient.connection.user,
|
self.apiClient.connection.user,
|
||||||
self.apiClient.connection.passwd
|
self.apiClient.connection.passwd
|
||||||
)
|
)
|
||||||
res = mgmt_ssh.execute("cloudstack-sccs")
|
mgmt_ssh.execute("cloudstack-sccs")
|
||||||
# Step2: It should return a commit hash
|
# Step2: It should return a commit hash
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -444,7 +460,7 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
|
|||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.account.domainid,
|
domainid=self.account.domainid,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
)
|
)
|
||||||
self.cleanup.append(virtual_machine)
|
self.cleanup.append(virtual_machine)
|
||||||
# Verify VM state
|
# Verify VM state
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@ -519,7 +535,9 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
|
|||||||
# register windows 2012 VM template as windows 8 template
|
# register windows 2012 VM template as windows 8 template
|
||||||
self.hypervisor = self.testClient.getHypervisorInfo()
|
self.hypervisor = self.testClient.getHypervisorInfo()
|
||||||
if self.hypervisor.lower() in ['lxc']:
|
if self.hypervisor.lower() in ['lxc']:
|
||||||
self.skipTest("windows VM is not supported on %s" % self.hypervisor.lower())
|
self.skipTest(
|
||||||
|
"windows VM is not supported on %s" %
|
||||||
|
self.hypervisor.lower())
|
||||||
self.win2012_template = Template.register(
|
self.win2012_template = Template.register(
|
||||||
self.apiClient,
|
self.apiClient,
|
||||||
self.services["win2012template"],
|
self.services["win2012template"],
|
||||||
@ -602,7 +620,7 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
|
|||||||
self.apiClient.connection.user,
|
self.apiClient.connection.user,
|
||||||
self.apiClient.connection.passwd
|
self.apiClient.connection.passwd
|
||||||
)
|
)
|
||||||
res = mgmt_ssh.execute("time telnet localhost 8250")
|
mgmt_ssh.execute("time telnet localhost 8250")
|
||||||
|
|
||||||
# Step2: It should return a commit hash
|
# Step2: It should return a commit hash
|
||||||
return
|
return
|
||||||
@ -622,15 +640,17 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
|
|||||||
cmd = addCluster.addClusterCmd()
|
cmd = addCluster.addClusterCmd()
|
||||||
cmd.zoneid = self.zone.id
|
cmd.zoneid = self.zone.id
|
||||||
cmd.hypervisor = self.hypervisor
|
cmd.hypervisor = self.hypervisor
|
||||||
cmd.clustertype = self.services["vmware_cluster"]["clustertype"]
|
cmd.clustertype = self.services["configurableData"][
|
||||||
cmd.podId = self.pod.id
|
"vmware_cluster"]["clustertype"]
|
||||||
cmd.username = self.services["vmware_cluster"]["username"]
|
cmd.podid = self.pod.id
|
||||||
cmd.password = self.services["vmware_cluster"]["password"]
|
cmd.username = self.services["configurableData"][
|
||||||
|
"vmware_cluster"]["username"]
|
||||||
|
cmd.password = self.services["configurableData"][
|
||||||
|
"vmware_cluster"]["password"]
|
||||||
cmd.publicswitchtype = 'vmwaredvs'
|
cmd.publicswitchtype = 'vmwaredvs'
|
||||||
cmd.guestswitchtype = 'vmwaredvs'
|
cmd.guestswitchtype = 'vmwaredvs'
|
||||||
cmd.url = self.services["vmware_cluster"]["url"]
|
cmd.url = self.services["configurableData"]["vmware_cluster"]["url"]
|
||||||
cmd.clustername = self.services["vmware_cluster"]["url"]
|
cmd.clustername = self.services[
|
||||||
|
"configurableData"]["vmware_cluster"]["url"]
|
||||||
self.apiClient.addCluster(cmd)
|
self.apiClient.addCluster(cmd)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@ -62,14 +62,6 @@ test_data = {
|
|||||||
"username": "test-account2",
|
"username": "test-account2",
|
||||||
"password": "password"
|
"password": "password"
|
||||||
},
|
},
|
||||||
"vmware_cluster" : {
|
|
||||||
"hypervisor": 'VMware',
|
|
||||||
"clustertype": 'ExternalManaged',
|
|
||||||
"username": 'administrator',
|
|
||||||
"password": 'password_123',
|
|
||||||
"url": 'http://10.147.60.15/42xescauto spaces/42xesc Clusters',
|
|
||||||
"clustername": 'VMWare Cluster with Space in DC name',
|
|
||||||
},
|
|
||||||
"small": {
|
"small": {
|
||||||
"displayname": "testserver",
|
"displayname": "testserver",
|
||||||
"username": "root",
|
"username": "root",
|
||||||
@ -931,6 +923,13 @@ test_data = {
|
|||||||
"customdisksize": 1,
|
"customdisksize": 1,
|
||||||
"diskname": "Custom disk",
|
"diskname": "Custom disk",
|
||||||
},
|
},
|
||||||
|
"upload_volume": {
|
||||||
|
"diskname": "UploadVol",
|
||||||
|
"format": "VHD",
|
||||||
|
"url":
|
||||||
|
"http://10.147.28.7/templates/393d3550-05ef-330f-9b8c-745b0e699759.vhd",
|
||||||
|
"checksum": "",
|
||||||
|
},
|
||||||
"recurring_snapshot": {
|
"recurring_snapshot": {
|
||||||
"maxsnaps": 2,
|
"maxsnaps": 2,
|
||||||
"timezone": "US/Arizona",
|
"timezone": "US/Arizona",
|
||||||
@ -1513,11 +1512,13 @@ test_data = {
|
|||||||
"ldapPassword": ""
|
"ldapPassword": ""
|
||||||
},
|
},
|
||||||
"systemVmDelay": 120,
|
"systemVmDelay": 120,
|
||||||
"upload_volume": {
|
"vmware_cluster" : {
|
||||||
"diskname": "UploadVol",
|
"hypervisor": 'VMware',
|
||||||
"format": "VHD",
|
"clustertype": 'ExternalManaged',
|
||||||
"url": "",
|
"username": '',
|
||||||
"checksum": "",
|
"password": '',
|
||||||
|
"url": '',
|
||||||
|
"clustername": 'VMWare Cluster with Space in DC name',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user