mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
multiple fixes to regression tests in test/component
- invalid variable references - syntax/indentation errors - self/cls reference errors - some logic fixes in redundant router suite Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
8f57a851be
commit
a92abaa916
@ -150,7 +150,7 @@ class TestEIP(cloudstackTestCase):
|
|||||||
else:
|
else:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"No Source NAT IP found for guest network: %s" %
|
"No Source NAT IP found for guest network: %s" %
|
||||||
guest_network.id)
|
cls.guest_network.id)
|
||||||
cls._cleanup = [
|
cls._cleanup = [
|
||||||
cls.account,
|
cls.account,
|
||||||
cls.service_offering,
|
cls.service_offering,
|
||||||
@ -759,7 +759,7 @@ class TestEIP(cloudstackTestCase):
|
|||||||
with self.assertRaises(Exception):
|
with self.assertRaises(Exception):
|
||||||
cmd = disassociateIpAddress.disassociateIpAddressCmd()
|
cmd = disassociateIpAddress.disassociateIpAddressCmd()
|
||||||
cmd.id = static_nat.id
|
cmd.id = static_nat.id
|
||||||
apiclient.disassociateIpAddress(cmd)
|
self.api_client.disassociateIpAddress(cmd)
|
||||||
|
|
||||||
self.debug("Disassociate system IP failed")
|
self.debug("Disassociate system IP failed")
|
||||||
return
|
return
|
||||||
|
|||||||
@ -878,7 +878,7 @@ class TestRVRInternals(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
result = get_process_status(
|
result = get_process_status(
|
||||||
host.ipaddress,
|
master_host.ipaddress,
|
||||||
self.services['host']["publicport"],
|
self.services['host']["publicport"],
|
||||||
self.services['host']["username"],
|
self.services['host']["username"],
|
||||||
self.services['host']["password"],
|
self.services['host']["password"],
|
||||||
@ -914,7 +914,7 @@ class TestRVRInternals(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
result = get_process_status(
|
result = get_process_status(
|
||||||
host.ipaddress,
|
backup_host.ipaddress,
|
||||||
self.services['host']["publicport"],
|
self.services['host']["publicport"],
|
||||||
self.services['host']["username"],
|
self.services['host']["username"],
|
||||||
self.services['host']["password"],
|
self.services['host']["password"],
|
||||||
@ -1107,7 +1107,7 @@ class TestRedundancy(cloudstackTestCase):
|
|||||||
|
|
||||||
self.debug("Stopping the MASTER router")
|
self.debug("Stopping the MASTER router")
|
||||||
try:
|
try:
|
||||||
cmd = stopRouter.stopRouter(cmd)
|
cmd = stopRouter.stopRouterCmd()
|
||||||
cmd.id = master_router.id
|
cmd.id = master_router.id
|
||||||
self.apiclient.stopRouter(cmd)
|
self.apiclient.stopRouter(cmd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -1234,7 +1234,7 @@ class TestRedundancy(cloudstackTestCase):
|
|||||||
|
|
||||||
self.debug("Stopping the BACKUP router")
|
self.debug("Stopping the BACKUP router")
|
||||||
try:
|
try:
|
||||||
cmd = stopRouter.stopRouter(cmd)
|
cmd = stopRouter.stopRouterCmd()
|
||||||
cmd.id = backup_router.id
|
cmd.id = backup_router.id
|
||||||
self.apiclient.stopRouter(cmd)
|
self.apiclient.stopRouter(cmd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -1355,7 +1355,7 @@ class TestRedundancy(cloudstackTestCase):
|
|||||||
|
|
||||||
self.debug("Rebooting the master router")
|
self.debug("Rebooting the master router")
|
||||||
try:
|
try:
|
||||||
cmd = rebootRouter.rebootRouter(cmd)
|
cmd = rebootRouter.rebootRouterCmd()
|
||||||
cmd.id = master_router.id
|
cmd.id = master_router.id
|
||||||
self.apiclient.rebootRouter(cmd)
|
self.apiclient.rebootRouter(cmd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -1449,7 +1449,7 @@ class TestRedundancy(cloudstackTestCase):
|
|||||||
|
|
||||||
self.debug("Rebooting the backuo router")
|
self.debug("Rebooting the backuo router")
|
||||||
try:
|
try:
|
||||||
cmd = rebootRouter.rebootRouter(cmd)
|
cmd = rebootRouter.rebootRouterCmd()
|
||||||
cmd.id = backup_router.id
|
cmd.id = backup_router.id
|
||||||
self.apiclient.rebootRouter(cmd)
|
self.apiclient.rebootRouter(cmd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -1543,7 +1543,7 @@ class TestRedundancy(cloudstackTestCase):
|
|||||||
|
|
||||||
self.debug("Stopping the backup router")
|
self.debug("Stopping the backup router")
|
||||||
try:
|
try:
|
||||||
cmd = stopRouter.stopRouter(cmd)
|
cmd = stopRouter.stopRouterCmd()
|
||||||
cmd.id = backup_router.id
|
cmd.id = backup_router.id
|
||||||
self.apiclient.stopRouter(cmd)
|
self.apiclient.stopRouter(cmd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -1574,9 +1574,9 @@ class TestRedundancy(cloudstackTestCase):
|
|||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.account.account.domainid,
|
domainid=self.account.account.domainid,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
networkids=[str(network.id)]
|
networkids=[str(self.network.id)]
|
||||||
)
|
)
|
||||||
self.debug("Deployed VM in network: %s" % network.id)
|
self.debug("Deployed VM in network: %s" % self.network.id)
|
||||||
|
|
||||||
vms = VirtualMachine.list(
|
vms = VirtualMachine.list(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
|
|||||||
@ -988,7 +988,7 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
|
|||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
self.domain = get_domain(self.apiclient, self.services)
|
self.domain = get_domain(self.apiclient, self.services)
|
||||||
self.zone = get_zone(self.apiclient, self.services)
|
self.zone = get_zone(self.apiclient, self.services)
|
||||||
self.services['mode'] = cls.zone.networktype
|
self.services['mode'] = self.zone.networktype
|
||||||
|
|
||||||
template = get_template(
|
template = get_template(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
@ -1234,7 +1234,7 @@ class TestIngressRule(cloudstackTestCase):
|
|||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
self.domain = get_domain(self.apiclient, self.services)
|
self.domain = get_domain(self.apiclient, self.services)
|
||||||
self.zone = get_zone(self.apiclient, self.services)
|
self.zone = get_zone(self.apiclient, self.services)
|
||||||
self.services['mode'] = cls.zone.networktype
|
self.services['mode'] = self.zone.networktype
|
||||||
|
|
||||||
template = get_template(
|
template = get_template(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
|
|||||||
@ -2567,8 +2567,7 @@ class TestVPCHostMaintenance(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
if hosts_states[0].resourcestate != 'Enabled':
|
if hosts_states[0].resourcestate != 'Enabled':
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"Failed to cancel maintenance mode on %s, e" % (
|
"Failed to cancel maintenance mode on %s" % (host.name))
|
||||||
host.name, e))
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -1900,7 +1900,7 @@ class TestVMDeployVPC(cloudstackTestCase):
|
|||||||
vpcid=vpc.id
|
vpcid=vpc.id
|
||||||
)
|
)
|
||||||
self.debug("Associated %s with network %s" % (
|
self.debug("Associated %s with network %s" % (
|
||||||
public_ip.ipaddress.ipaddress,
|
public_ip_1.ipaddress.ipaddress,
|
||||||
network_1.id
|
network_1.id
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -2365,7 +2365,7 @@ class TestVMDeployVPC(cloudstackTestCase):
|
|||||||
|
|
||||||
self.debug("Verifying if we can ping to outside world from VM?")
|
self.debug("Verifying if we can ping to outside world from VM?")
|
||||||
# Ping to outsite world
|
# Ping to outsite world
|
||||||
res = ssh_5.execute("ping -c 1 www.google.com")
|
res = ssh_4.execute("ping -c 1 www.google.com")
|
||||||
# res = 64 bytes from maa03s17-in-f20.1e100.net (74.125.236.212):
|
# res = 64 bytes from maa03s17-in-f20.1e100.net (74.125.236.212):
|
||||||
# icmp_req=1 ttl=57 time=25.9 ms
|
# icmp_req=1 ttl=57 time=25.9 ms
|
||||||
# --- www.l.google.com ping statistics ---
|
# --- www.l.google.com ping statistics ---
|
||||||
|
|||||||
@ -91,7 +91,6 @@ class Services:
|
|||||||
|
|
||||||
|
|
||||||
class TestVPNUsers(cloudstackTestCase):
|
class TestVPNUsers(cloudstackTestCase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.api_client = super(TestVPNUsers,
|
cls.api_client = super(TestVPNUsers,
|
||||||
@ -100,6 +99,7 @@ class TestVPNUsers(cloudstackTestCase):
|
|||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.domain = get_domain(cls.api_client, cls.services)
|
cls.domain = get_domain(cls.api_client, cls.services)
|
||||||
cls.zone = get_zone(cls.api_client, cls.services)
|
cls.zone = get_zone(cls.api_client, cls.services)
|
||||||
|
|
||||||
cls.services["mode"] = cls.zone.networktype
|
cls.services["mode"] = cls.zone.networktype
|
||||||
|
|
||||||
cls.template = get_template(
|
cls.template = get_template(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user