spelling: Fix spelling Occured to Occurred (#6061)

Fix typos
This commit is contained in:
John Bampton 2022-03-07 19:37:02 +10:00 committed by GitHub
parent 2f6fc56e74
commit 08bb4ad9fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 120 additions and 120 deletions

View File

@ -1290,7 +1290,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
return answer == null ? null : answer.getLoadBalancers(); return answer == null ? null : answer.getLoadBalancers();
} }
} catch (Exception ex) { } catch (Exception ex) {
s_logger.error("Exception Occured ", ex); s_logger.error("Exception Occurred ", ex);
} }
//null return is handled by clients //null return is handled by clients
return null; return null;

View File

@ -83,7 +83,7 @@ class TestConcurrentSnapshotLimit(cloudstackTestCase):
self.dbclient = self.testClient.getDbConnection() self.dbclient = self.testClient.getDbConnection()
self.cleanup = [] self.cleanup = []
self.exceptionOccured = False self.exceptionOccurred = False
if not self.supportedHypervisor: if not self.supportedHypervisor:
self.skipTest("Snapshot not supported on %s" % self.hypervisor) self.skipTest("Snapshot not supported on %s" % self.hypervisor)
@ -96,7 +96,7 @@ class TestConcurrentSnapshotLimit(cloudstackTestCase):
) )
except Exception as e: except Exception as e:
self.debug("Exception occurred: %s" % e) self.debug("Exception occurred: %s" % e)
self.exceptionOccured = True self.exceptionOccurred = True
def tearDown(self): def tearDown(self):
try: try:
@ -293,7 +293,7 @@ class TestConcurrentSnapshotLimit(cloudstackTestCase):
for thread in threads: for thread in threads:
thread.join() thread.join()
self.assertTrue(self.exceptionOccured, "Concurrent snapshots\ self.assertTrue(self.exceptionOccurred, "Concurrent snapshots\
more than concurrent.snapshots.threshold.perhost\ more than concurrent.snapshots.threshold.perhost\
value successfully created") value successfully created")
return return

View File

@ -1162,11 +1162,11 @@ class TestFailureScnarios(cloudstackTestCase):
response = verifyNetworkState(self.apiclient, isolated_persistent_network.id,\ response = verifyNetworkState(self.apiclient, isolated_persistent_network.id,\
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
guest_vm_cidr = subnet +".0/29" guest_vm_cidr = subnet +".0/29"

View File

@ -1761,11 +1761,11 @@ class TestNetworkOperations(cloudstackTestCase):
self.api_client, self.api_client,
self.virtual_machine.nic[0].networkid, self.virtual_machine.nic[0].networkid,
"allocated") "allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
routers = Router.list( routers = Router.list(
@ -1788,11 +1788,11 @@ class TestNetworkOperations(cloudstackTestCase):
self.api_client, self.api_client,
self.virtual_machine.nic[0].networkid, self.virtual_machine.nic[0].networkid,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
routers = Router.list( routers = Router.list(

View File

@ -257,11 +257,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.apiclient, self.apiclient,
network.id, network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
network.vlan, network.vlan,
@ -291,11 +291,11 @@ class TestPersistentNetworks(cloudstackTestCase):
"network.gc.interval", "network.gc.wait"]) "network.gc.interval", "network.gc.wait"])
verifyNetworkState(self.api_client, network.id, "implemented") verifyNetworkState(self.api_client, network.id, "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return
@ -420,11 +420,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.api_client, self.api_client,
isolated_network.id, isolated_network.id,
"allocated") "allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
# Update the network with persistent network offering # Update the network with persistent network offering
@ -500,11 +500,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.api_client, self.api_client,
isolated_network.id, isolated_network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return
@ -543,11 +543,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.api_client, self.api_client,
isolated_network.id, isolated_network.id,
"allocated") "allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
# Update network with network offering which has RVR # Update network with network offering which has RVR
@ -619,11 +619,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.api_client, self.api_client,
isolated_network.id, isolated_network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return
@ -670,11 +670,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.api_client, self.api_client,
isolated_network.id, isolated_network.id,
"allocated") "allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
isolated_network.update( isolated_network.update(
@ -746,11 +746,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.api_client, self.api_client,
isolated_network.id, isolated_network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return
@ -1365,11 +1365,11 @@ class TestPersistentNetworks(cloudstackTestCase):
# Check network state now, this will bolster that network updation has # Check network state now, this will bolster that network updation has
# taken effect # taken effect
response = verifyNetworkState(self.api_client, network.id, "allocated") response = verifyNetworkState(self.api_client, network.id, "allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return
@ -1494,11 +1494,11 @@ class TestPersistentNetworks(cloudstackTestCase):
self.apiclient, self.apiclient,
network.id, network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
network.vlan, network.vlan,
@ -1742,11 +1742,11 @@ class TestAssignVirtualMachine(cloudstackTestCase):
self.api_client, self.api_client,
network.id, network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
network.vlan, network.vlan,
@ -1890,11 +1890,11 @@ class TestProjectAccountOperations(cloudstackTestCase):
self.api_client, self.api_client,
network.id, network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
network.vlan, network.vlan,
@ -1934,11 +1934,11 @@ class TestProjectAccountOperations(cloudstackTestCase):
self.api_client, self.api_client,
networks[0].id, networks[0].id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
networks[0].vlan, networks[0].vlan,
@ -2026,11 +2026,11 @@ class TestProjectAccountOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
network.id, network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return
@ -2206,11 +2206,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase):
self.apiclient, self.apiclient,
isolated_persistent_network.id, isolated_persistent_network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
isolated_persistent_network.vlan, isolated_persistent_network.vlan,
@ -2275,11 +2275,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase):
networks) networks)
verifyNetworkState(self.apiclient, networks[0].id, "implemented") verifyNetworkState(self.apiclient, networks[0].id, "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
networks[0].vlan, networks[0].vlan,
@ -2345,11 +2345,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase):
self.apiclient, self.apiclient,
isolated_persistent_network.id, isolated_persistent_network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
isolated_persistent_network.vlan, isolated_persistent_network.vlan,
@ -2408,11 +2408,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase):
self.apiclient, self.apiclient,
networks[0].id, networks[0].id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
networks[0].vlan, networks[0].vlan,
@ -2700,11 +2700,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_1.id, persistent_network_1.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_1.vlan, persistent_network_1.vlan,
@ -2725,11 +2725,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_2.id, persistent_network_2.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_2.vlan, persistent_network_2.vlan,
@ -2743,21 +2743,21 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_1.id, persistent_network_1.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
response = verifyNetworkState( response = verifyNetworkState(
self.apiclient, self.apiclient,
persistent_network_2.id, persistent_network_2.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
elif value == "delete": elif value == "delete":
@ -2858,11 +2858,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
persistent_network_1.id, persistent_network_1.id,
"implemented" "implemented"
) )
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
raise Exception(exceptionMessage) raise Exception(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_1.vlan, persistent_network_1.vlan,
@ -2879,11 +2879,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_2.id, persistent_network_2.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
raise Exception(exceptionMessage) raise Exception(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_2.vlan, persistent_network_2.vlan,
@ -2977,11 +2977,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_1.id, persistent_network_1.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
raise Exception(exceptionMessage) raise Exception(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_1.vlan, persistent_network_1.vlan,
@ -3002,11 +3002,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_2.id, persistent_network_2.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
raise Exception(exceptionMessage) raise Exception(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_2.vlan, persistent_network_2.vlan,
@ -3193,11 +3193,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_1.id, persistent_network_1.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_1.vlan, persistent_network_1.vlan,
@ -3218,11 +3218,11 @@ class TestVPCNetworkOperations(cloudstackTestCase):
self.apiclient, self.apiclient,
persistent_network_2.id, persistent_network_2.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
persistent_network_2.vlan, persistent_network_2.vlan,

View File

@ -639,10 +639,10 @@ class TestAssociatePublicIp(cloudstackTestCase):
self.debug("created public ip address (portable): %s" % portableip.ipaddress.ipaddress) self.debug("created public ip address (portable): %s" % portableip.ipaddress.ipaddress)
response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
ipInDesiredState = response[1] ipInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not ipInDesiredState)): if (exceptionOccurred or (not ipInDesiredState)):
portableip.delete(self.apiclient) portableip.delete(self.apiclient)
self.fail(exceptionMessage) self.fail(exceptionMessage)
@ -893,10 +893,10 @@ class TestDisassociatePublicIp(cloudstackTestCase):
) )
response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
ipInDesiredState = response[1] ipInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not ipInDesiredState)): if (exceptionOccurred or (not ipInDesiredState)):
portableip.delete(self.apiclient) portableip.delete(self.apiclient)
self.fail(exceptionMessage) self.fail(exceptionMessage)
@ -1124,10 +1124,10 @@ class TestDeleteAccount(cloudstackTestCase):
self.debug("created public ip address (portable): %s" % portableip.ipaddress.ipaddress) self.debug("created public ip address (portable): %s" % portableip.ipaddress.ipaddress)
response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
ipInDesiredState = response[1] ipInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not ipInDesiredState)): if (exceptionOccurred or (not ipInDesiredState)):
portableip.delete(self.apiclient) portableip.delete(self.apiclient)
self.account.delete(self.apiclient) self.account.delete(self.apiclient)
self.fail(exceptionMessage) self.fail(exceptionMessage)
@ -1309,10 +1309,10 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
) )
response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated")
exceptionOccured = response[0] exceptionOccurred = response[0]
ipInDesiredState = response[1] ipInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not ipInDesiredState)): if (exceptionOccurred or (not ipInDesiredState)):
portableip.delete(self.apiclient) portableip.delete(self.apiclient)
self.fail(exceptionMessage) self.fail(exceptionMessage)

View File

@ -3535,11 +3535,11 @@ class TestSharedNetworks(cloudstackTestCase):
self.api_client.stopRouter(cmd) self.api_client.stopRouter(cmd)
response = verifyRouterState(self.api_client, router.id, "stopped") response = verifyRouterState(self.api_client, router.id, "stopped")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.debug("Starting the router with ID: %s" % router.id) self.debug("Starting the router with ID: %s" % router.id)
@ -3549,11 +3549,11 @@ class TestSharedNetworks(cloudstackTestCase):
self.api_client.startRouter(cmd) self.api_client.startRouter(cmd)
response = verifyRouterState(self.api_client, router.id, "running") response = verifyRouterState(self.api_client, router.id, "running")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return

View File

@ -2731,11 +2731,11 @@ class TestRouterOperations(cloudstackTestCase):
(vpcvr.id, e)) (vpcvr.id, e))
response = verifyRouterState(self.apiclient, vpcvr.id, "stopped") response = verifyRouterState(self.apiclient, vpcvr.id, "stopped")
exceptionOccured = response[0] exceptionOccurred = response[0]
isRouterInDesiredState = response[1] isRouterInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isRouterInDesiredState)): if (exceptionOccurred or (not isRouterInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.debug("Starting the router with ID: %s" % vpcvr.id) self.debug("Starting the router with ID: %s" % vpcvr.id)
@ -2749,10 +2749,10 @@ class TestRouterOperations(cloudstackTestCase):
(vpcvr.id, e)) (vpcvr.id, e))
response = verifyRouterState(self.apiclient, vpcvr.id, "running") response = verifyRouterState(self.apiclient, vpcvr.id, "running")
exceptionOccured = response[0] exceptionOccurred = response[0]
isRouterInDesiredState = response[1] isRouterInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isRouterInDesiredState)): if (exceptionOccurred or (not isRouterInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
return return

View File

@ -296,11 +296,11 @@ class TestL2PersistentNetworks(cloudstackTestCase):
self.apiclient, self.apiclient,
network.id, network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
networkVlan, networkVlan,
@ -336,11 +336,11 @@ class TestL2PersistentNetworks(cloudstackTestCase):
self.apiclient, self.apiclient,
network.id, network.id,
"implemented") "implemented")
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
network_vlan, network_vlan,
@ -363,11 +363,11 @@ class TestL2PersistentNetworks(cloudstackTestCase):
network.id, network.id,
"implemented") "implemented")
logger.debug(response) logger.debug(response)
exceptionOccured = response[0] exceptionOccurred = response[0]
isNetworkInDesiredState = response[1] isNetworkInDesiredState = response[1]
exceptionMessage = response[2] exceptionMessage = response[2]
if (exceptionOccured or (not isNetworkInDesiredState)): if (exceptionOccurred or (not isNetworkInDesiredState)):
self.fail(exceptionMessage) self.fail(exceptionMessage)
self.assertIsNotNone( self.assertIsNotNone(
network_vlan, network_vlan,

View File

@ -48,7 +48,7 @@ def VerifyChangeInServiceOffering(self, virtualmachine, serviceoffering):
"""List the VM and verify that the new values for cpuspeed, """List the VM and verify that the new values for cpuspeed,
cpunumber and memory match with the new service offering""" cpunumber and memory match with the new service offering"""
exceptionOccured = False exceptionOccurred = False
exceptionMessage = "" exceptionMessage = ""
try: try:
vmlist = VirtualMachine.list(self.userapiclient, id=virtualmachine.id) vmlist = VirtualMachine.list(self.userapiclient, id=virtualmachine.id)
@ -74,9 +74,9 @@ def VerifyChangeInServiceOffering(self, virtualmachine, serviceoffering):
service offering %s" % service offering %s" %
(vm.memory, serviceoffering.memory)) (vm.memory, serviceoffering.memory))
except Exception as e: except Exception as e:
exceptionOccured = True exceptionOccurred = True
exceptionMessage = e exceptionMessage = e
return [exceptionOccured, exceptionMessage] return [exceptionOccurred, exceptionMessage]
def VerifyRouterState(apiclient, account, domainid, desiredState, def VerifyRouterState(apiclient, account, domainid, desiredState,
@ -634,8 +634,8 @@ class TestAdvancedZoneStoppedVM(cloudstackTestCase):
virtual_machine, virtual_machine,
self.service_offering_2 self.service_offering_2
) )
exceptionOccured, exceptionMessage = response[0], response[1] exceptionOccurred, exceptionMessage = response[0], response[1]
self.assertFalse(exceptionOccured, exceptionMessage) self.assertFalse(exceptionOccurred, exceptionMessage)
virtual_machine.detach_volume( virtual_machine.detach_volume(
self.userapiclient, self.userapiclient,

View File

@ -1273,7 +1273,7 @@ def isIpInDesiredState(apiclient, ipaddressid, state):
and return True/False accordingly""" and return True/False accordingly"""
retriesCount = 10 retriesCount = 10
ipInDesiredState = False ipInDesiredState = False
exceptionOccured = False exceptionOccurred = False
exceptionMessage = "" exceptionMessage = ""
try: try:
while retriesCount >= 0: while retriesCount >= 0:
@ -1286,9 +1286,9 @@ def isIpInDesiredState(apiclient, ipaddressid, state):
retriesCount -= 1 retriesCount -= 1
time.sleep(60) time.sleep(60)
except Exception as e: except Exception as e:
exceptionOccured = True exceptionOccurred = True
exceptionMessage = e exceptionMessage = e
return [exceptionOccured, ipInDesiredState, e] return [exceptionOccurred, ipInDesiredState, e]
if not ipInDesiredState: if not ipInDesiredState:
exceptionMessage = "Ip should be in %s state, it is in %s" %\ exceptionMessage = "Ip should be in %s state, it is in %s" %\
(state, portableips[0].state) (state, portableips[0].state)
@ -1349,7 +1349,7 @@ def verifyNetworkState(apiclient, networkid, state, listall=True):
"""List networks and check if the network state matches the given state""" """List networks and check if the network state matches the given state"""
retriesCount = 10 retriesCount = 10
isNetworkInDesiredState = False isNetworkInDesiredState = False
exceptionOccured = False exceptionOccurred = False
exceptionMessage = "" exceptionMessage = ""
try: try:
while retriesCount >= 0: while retriesCount >= 0:
@ -1365,10 +1365,10 @@ def verifyNetworkState(apiclient, networkid, state, listall=True):
exceptionMessage = "Network state should be %s, it is %s" %\ exceptionMessage = "Network state should be %s, it is %s" %\
(state, networks[0].state) (state, networks[0].state)
except Exception as e: except Exception as e:
exceptionOccured = True exceptionOccurred = True
exceptionMessage = e exceptionMessage = e
return [exceptionOccured, isNetworkInDesiredState, exceptionMessage] return [exceptionOccurred, isNetworkInDesiredState, exceptionMessage]
return [exceptionOccured, isNetworkInDesiredState, exceptionMessage] return [exceptionOccurred, isNetworkInDesiredState, exceptionMessage]
def verifyComputeOfferingCreation(apiclient, computeofferingid): def verifyComputeOfferingCreation(apiclient, computeofferingid):
"""List Compute offerings by ID and verify that the offering exists""" """List Compute offerings by ID and verify that the offering exists"""
@ -1557,17 +1557,17 @@ def isDomainResourceCountEqualToExpectedCount(apiclient, domainid, expectedcount
resourcetype): resourcetype):
"""Get the resource count of specific domain and match """Get the resource count of specific domain and match
it with the expected count it with the expected count
Return list [isExceptionOccured, reasonForException, isResourceCountEqual]""" Return list [isExceptionOccurred, reasonForException, isResourceCountEqual]"""
isResourceCountEqual = False isResourceCountEqual = False
isExceptionOccured = False isExceptionOccurred = False
reasonForException = None reasonForException = None
try: try:
response = Resources.updateCount(apiclient, domainid=domainid, response = Resources.updateCount(apiclient, domainid=domainid,
resourcetype=resourcetype) resourcetype=resourcetype)
except Exception as e: except Exception as e:
reasonForException = "Failed while updating resource count: %s" % e reasonForException = "Failed while updating resource count: %s" % e
isExceptionOccured = True isExceptionOccurred = True
return [isExceptionOccured, reasonForException, isResourceCountEqual] return [isExceptionOccurred, reasonForException, isResourceCountEqual]
if resourcetype == RESOURCE_PRIMARY_STORAGE or resourcetype == RESOURCE_SECONDARY_STORAGE: if resourcetype == RESOURCE_PRIMARY_STORAGE or resourcetype == RESOURCE_SECONDARY_STORAGE:
resourcecount = (response[0].resourcecount / (1024**3)) resourcecount = (response[0].resourcecount / (1024**3))
@ -1576,23 +1576,23 @@ def isDomainResourceCountEqualToExpectedCount(apiclient, domainid, expectedcount
if resourcecount == expectedcount: if resourcecount == expectedcount:
isResourceCountEqual = True isResourceCountEqual = True
return [isExceptionOccured, reasonForException, isResourceCountEqual] return [isExceptionOccurred, reasonForException, isResourceCountEqual]
def isAccountResourceCountEqualToExpectedCount(apiclient, domainid, account, expectedcount, def isAccountResourceCountEqualToExpectedCount(apiclient, domainid, account, expectedcount,
resourcetype): resourcetype):
"""Get the resource count of specific account and match """Get the resource count of specific account and match
it with the expected count it with the expected count
Return list [isExceptionOccured, reasonForException, isResourceCountEqual]""" Return list [isExceptionOccurred, reasonForException, isResourceCountEqual]"""
isResourceCountEqual = False isResourceCountEqual = False
isExceptionOccured = False isExceptionOccurred = False
reasonForException = None reasonForException = None
try: try:
response = Resources.updateCount(apiclient, domainid=domainid, account=account, response = Resources.updateCount(apiclient, domainid=domainid, account=account,
resourcetype=resourcetype) resourcetype=resourcetype)
except Exception as e: except Exception as e:
reasonForException = "Failed while updating resource count: %s" % e reasonForException = "Failed while updating resource count: %s" % e
isExceptionOccured = True isExceptionOccurred = True
return [isExceptionOccured, reasonForException, isResourceCountEqual] return [isExceptionOccurred, reasonForException, isResourceCountEqual]
if resourcetype == RESOURCE_PRIMARY_STORAGE or resourcetype == RESOURCE_SECONDARY_STORAGE: if resourcetype == RESOURCE_PRIMARY_STORAGE or resourcetype == RESOURCE_SECONDARY_STORAGE:
resourcecount = (response[0].resourcecount / (1024**3)) resourcecount = (response[0].resourcecount / (1024**3))
@ -1601,7 +1601,7 @@ def isAccountResourceCountEqualToExpectedCount(apiclient, domainid, account, exp
if resourcecount == expectedcount: if resourcecount == expectedcount:
isResourceCountEqual = True isResourceCountEqual = True
return [isExceptionOccured, reasonForException, isResourceCountEqual] return [isExceptionOccurred, reasonForException, isResourceCountEqual]
def isNetworkDeleted(apiclient, networkid, timeout=600): def isNetworkDeleted(apiclient, networkid, timeout=600):
""" List the network and check that the list is empty or not""" """ List the network and check that the list is empty or not"""
@ -1763,7 +1763,7 @@ def verifyRouterState(apiclient, routerid, state, listall=True):
"""List router and check if the router state matches the given state""" """List router and check if the router state matches the given state"""
retriesCount = 10 retriesCount = 10
isRouterInDesiredState = False isRouterInDesiredState = False
exceptionOccured = False exceptionOccurred = False
exceptionMessage = "" exceptionMessage = ""
try: try:
while retriesCount >= 0: while retriesCount >= 0:
@ -1779,10 +1779,10 @@ def verifyRouterState(apiclient, routerid, state, listall=True):
exceptionMessage = "Router state should be %s, it is %s" %\ exceptionMessage = "Router state should be %s, it is %s" %\
(state, routers[0].state) (state, routers[0].state)
except Exception as e: except Exception as e:
exceptionOccured = True exceptionOccurred = True
exceptionMessage = e exceptionMessage = e
return [exceptionOccured, isRouterInDesiredState, exceptionMessage] return [exceptionOccurred, isRouterInDesiredState, exceptionMessage]
return [exceptionOccured, isRouterInDesiredState, exceptionMessage] return [exceptionOccurred, isRouterInDesiredState, exceptionMessage]
def isIpRangeInUse(api_client, publicIpRange): def isIpRangeInUse(api_client, publicIpRange):
''' Check that if any Ip in the IP Range is in use ''' Check that if any Ip in the IP Range is in use

View File

@ -207,7 +207,7 @@ class NCC:
return res return res
except Exception as e: except Exception as e:
self.__lastError = e self.__lastError = e
# self.logger.exception("sendGetRequestToNCC : Exception Occured: %s" % # self.logger.exception("sendGetRequestToNCC : Exception Occurred: %s" %
# str(self.__lastError)) # str(self.__lastError))
return FAILED return FAILED
@ -217,7 +217,7 @@ class NCC:
return res return res
except Exception as e: except Exception as e:
self.__lastError = e self.__lastError = e
# self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" %
# str(self.__lastError)) # str(self.__lastError))
return FAILED return FAILED
@ -227,7 +227,7 @@ class NCC:
return res return res
except Exception as e: except Exception as e:
self.__lastError = e self.__lastError = e
# self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" %
# str(self.__lastError)) # str(self.__lastError))
return FAILED return FAILED
@ -237,7 +237,7 @@ class NCC:
return res return res
except Exception as e: except Exception as e:
self.__lastError = e self.__lastError = e
# self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" %
# str(self.__lastError)) # str(self.__lastError))
return FAILED return FAILED
@ -263,7 +263,7 @@ class NCC:
return res return res
except Exception as e: except Exception as e:
self.__lastError = e self.__lastError = e
# self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" %
# str(self.__lastError)) # str(self.__lastError))
return FAILED return FAILED
@ -273,7 +273,7 @@ class NCC:
return res return res
except Exception as e: except Exception as e:
self.__lastError = e self.__lastError = e
# self.logger.exception("sendGetRequestToNCC : Exception Occured: %s" % # self.logger.exception("sendGetRequestToNCC : Exception Occurred: %s" %
# str(self.__lastError)) # str(self.__lastError))
return FAILED return FAILED