diff --git a/server/src/main/java/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java b/server/src/main/java/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java index 961d93429f9..2ee34180b7a 100644 --- a/server/src/main/java/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java +++ b/server/src/main/java/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java @@ -1290,7 +1290,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase return answer == null ? null : answer.getLoadBalancers(); } } catch (Exception ex) { - s_logger.error("Exception Occured ", ex); + s_logger.error("Exception Occurred ", ex); } //null return is handled by clients return null; diff --git a/test/integration/component/test_concurrent_snapshots_limit.py b/test/integration/component/test_concurrent_snapshots_limit.py index 96d936e3e12..bba3a527973 100644 --- a/test/integration/component/test_concurrent_snapshots_limit.py +++ b/test/integration/component/test_concurrent_snapshots_limit.py @@ -83,7 +83,7 @@ class TestConcurrentSnapshotLimit(cloudstackTestCase): self.dbclient = self.testClient.getDbConnection() self.cleanup = [] - self.exceptionOccured = False + self.exceptionOccurred = False if not self.supportedHypervisor: self.skipTest("Snapshot not supported on %s" % self.hypervisor) @@ -96,7 +96,7 @@ class TestConcurrentSnapshotLimit(cloudstackTestCase): ) except Exception as e: self.debug("Exception occurred: %s" % e) - self.exceptionOccured = True + self.exceptionOccurred = True def tearDown(self): try: @@ -293,7 +293,7 @@ class TestConcurrentSnapshotLimit(cloudstackTestCase): for thread in threads: thread.join() - self.assertTrue(self.exceptionOccured, "Concurrent snapshots\ + self.assertTrue(self.exceptionOccurred, "Concurrent snapshots\ more than concurrent.snapshots.threshold.perhost\ value successfully created") return diff --git a/test/integration/component/test_ip_reservation.py b/test/integration/component/test_ip_reservation.py index 7eaaec46cc6..0ea01be4799 100644 --- a/test/integration/component/test_ip_reservation.py +++ b/test/integration/component/test_ip_reservation.py @@ -1162,11 +1162,11 @@ class TestFailureScnarios(cloudstackTestCase): response = verifyNetworkState(self.apiclient, isolated_persistent_network.id,\ "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) guest_vm_cidr = subnet +".0/29" diff --git a/test/integration/component/test_lb_secondary_ip.py b/test/integration/component/test_lb_secondary_ip.py index de61eb639ec..f5e785f55ad 100644 --- a/test/integration/component/test_lb_secondary_ip.py +++ b/test/integration/component/test_lb_secondary_ip.py @@ -1761,11 +1761,11 @@ class TestNetworkOperations(cloudstackTestCase): self.api_client, self.virtual_machine.nic[0].networkid, "allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) routers = Router.list( @@ -1788,11 +1788,11 @@ class TestNetworkOperations(cloudstackTestCase): self.api_client, self.virtual_machine.nic[0].networkid, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) routers = Router.list( diff --git a/test/integration/component/test_persistent_networks.py b/test/integration/component/test_persistent_networks.py index 1da00094b58..e37c31375ed 100644 --- a/test/integration/component/test_persistent_networks.py +++ b/test/integration/component/test_persistent_networks.py @@ -257,11 +257,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.apiclient, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( network.vlan, @@ -291,11 +291,11 @@ class TestPersistentNetworks(cloudstackTestCase): "network.gc.interval", "network.gc.wait"]) verifyNetworkState(self.api_client, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) return @@ -420,11 +420,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.api_client, isolated_network.id, "allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) # Update the network with persistent network offering @@ -500,11 +500,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.api_client, isolated_network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) return @@ -543,11 +543,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.api_client, isolated_network.id, "allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) # Update network with network offering which has RVR @@ -619,11 +619,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.api_client, isolated_network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) return @@ -670,11 +670,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.api_client, isolated_network.id, "allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) isolated_network.update( @@ -746,11 +746,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.api_client, isolated_network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) return @@ -1365,11 +1365,11 @@ class TestPersistentNetworks(cloudstackTestCase): # Check network state now, this will bolster that network updation has # taken effect response = verifyNetworkState(self.api_client, network.id, "allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) return @@ -1494,11 +1494,11 @@ class TestPersistentNetworks(cloudstackTestCase): self.apiclient, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( network.vlan, @@ -1742,11 +1742,11 @@ class TestAssignVirtualMachine(cloudstackTestCase): self.api_client, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( network.vlan, @@ -1890,11 +1890,11 @@ class TestProjectAccountOperations(cloudstackTestCase): self.api_client, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( network.vlan, @@ -1934,11 +1934,11 @@ class TestProjectAccountOperations(cloudstackTestCase): self.api_client, networks[0].id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( networks[0].vlan, @@ -2026,11 +2026,11 @@ class TestProjectAccountOperations(cloudstackTestCase): self.apiclient, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) return @@ -2206,11 +2206,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase): self.apiclient, isolated_persistent_network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( isolated_persistent_network.vlan, @@ -2275,11 +2275,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase): networks) verifyNetworkState(self.apiclient, networks[0].id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( networks[0].vlan, @@ -2345,11 +2345,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase): self.apiclient, isolated_persistent_network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( isolated_persistent_network.vlan, @@ -2408,11 +2408,11 @@ class TestRestartPersistentNetwork(cloudstackTestCase): self.apiclient, networks[0].id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( networks[0].vlan, @@ -2700,11 +2700,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_1.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( persistent_network_1.vlan, @@ -2725,11 +2725,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_2.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( persistent_network_2.vlan, @@ -2743,21 +2743,21 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_1.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) response = verifyNetworkState( self.apiclient, persistent_network_2.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) elif value == "delete": @@ -2858,11 +2858,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): persistent_network_1.id, "implemented" ) - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): raise Exception(exceptionMessage) self.assertIsNotNone( persistent_network_1.vlan, @@ -2879,11 +2879,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_2.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): raise Exception(exceptionMessage) self.assertIsNotNone( persistent_network_2.vlan, @@ -2977,11 +2977,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_1.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): raise Exception(exceptionMessage) self.assertIsNotNone( persistent_network_1.vlan, @@ -3002,11 +3002,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_2.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): raise Exception(exceptionMessage) self.assertIsNotNone( persistent_network_2.vlan, @@ -3193,11 +3193,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_1.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( persistent_network_1.vlan, @@ -3218,11 +3218,11 @@ class TestVPCNetworkOperations(cloudstackTestCase): self.apiclient, persistent_network_2.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( persistent_network_2.vlan, diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index 32f8a208b35..fc967a7c4e2 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -639,10 +639,10 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("created public ip address (portable): %s" % portableip.ipaddress.ipaddress) response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] ipInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not ipInDesiredState)): + if (exceptionOccurred or (not ipInDesiredState)): portableip.delete(self.apiclient) self.fail(exceptionMessage) @@ -893,10 +893,10 @@ class TestDisassociatePublicIp(cloudstackTestCase): ) response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] ipInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not ipInDesiredState)): + if (exceptionOccurred or (not ipInDesiredState)): portableip.delete(self.apiclient) self.fail(exceptionMessage) @@ -1124,10 +1124,10 @@ class TestDeleteAccount(cloudstackTestCase): self.debug("created public ip address (portable): %s" % portableip.ipaddress.ipaddress) response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] ipInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not ipInDesiredState)): + if (exceptionOccurred or (not ipInDesiredState)): portableip.delete(self.apiclient) self.account.delete(self.apiclient) self.fail(exceptionMessage) @@ -1309,10 +1309,10 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase): ) response = isIpInDesiredState(self.apiclient, portableip.ipaddress.id, state="allocated") - exceptionOccured = response[0] + exceptionOccurred = response[0] ipInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not ipInDesiredState)): + if (exceptionOccurred or (not ipInDesiredState)): portableip.delete(self.apiclient) self.fail(exceptionMessage) diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 1954011513b..c7e265674dd 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -3535,11 +3535,11 @@ class TestSharedNetworks(cloudstackTestCase): self.api_client.stopRouter(cmd) response = verifyRouterState(self.api_client, router.id, "stopped") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.debug("Starting the router with ID: %s" % router.id) @@ -3549,11 +3549,11 @@ class TestSharedNetworks(cloudstackTestCase): self.api_client.startRouter(cmd) response = verifyRouterState(self.api_client, router.id, "running") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) return diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py index 9d1d7ea5234..bf3f368de9c 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -2731,11 +2731,11 @@ class TestRouterOperations(cloudstackTestCase): (vpcvr.id, e)) response = verifyRouterState(self.apiclient, vpcvr.id, "stopped") - exceptionOccured = response[0] + exceptionOccurred = response[0] isRouterInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isRouterInDesiredState)): + if (exceptionOccurred or (not isRouterInDesiredState)): self.fail(exceptionMessage) self.debug("Starting the router with ID: %s" % vpcvr.id) @@ -2749,10 +2749,10 @@ class TestRouterOperations(cloudstackTestCase): (vpcvr.id, e)) response = verifyRouterState(self.apiclient, vpcvr.id, "running") - exceptionOccured = response[0] + exceptionOccurred = response[0] isRouterInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isRouterInDesiredState)): + if (exceptionOccurred or (not isRouterInDesiredState)): self.fail(exceptionMessage) return diff --git a/test/integration/smoke/test_persistent_network.py b/test/integration/smoke/test_persistent_network.py index 65f37bfa0e1..9cb8da94b55 100644 --- a/test/integration/smoke/test_persistent_network.py +++ b/test/integration/smoke/test_persistent_network.py @@ -296,11 +296,11 @@ class TestL2PersistentNetworks(cloudstackTestCase): self.apiclient, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( networkVlan, @@ -336,11 +336,11 @@ class TestL2PersistentNetworks(cloudstackTestCase): self.apiclient, network.id, "implemented") - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( network_vlan, @@ -363,11 +363,11 @@ class TestL2PersistentNetworks(cloudstackTestCase): network.id, "implemented") logger.debug(response) - exceptionOccured = response[0] + exceptionOccurred = response[0] isNetworkInDesiredState = response[1] exceptionMessage = response[2] - if (exceptionOccured or (not isNetworkInDesiredState)): + if (exceptionOccurred or (not isNetworkInDesiredState)): self.fail(exceptionMessage) self.assertIsNotNone( network_vlan, diff --git a/test/integration/testpaths/testpath_stopped_vm.py b/test/integration/testpaths/testpath_stopped_vm.py index 927dbd99d9c..da37567ff14 100644 --- a/test/integration/testpaths/testpath_stopped_vm.py +++ b/test/integration/testpaths/testpath_stopped_vm.py @@ -48,7 +48,7 @@ def VerifyChangeInServiceOffering(self, virtualmachine, serviceoffering): """List the VM and verify that the new values for cpuspeed, cpunumber and memory match with the new service offering""" - exceptionOccured = False + exceptionOccurred = False exceptionMessage = "" try: vmlist = VirtualMachine.list(self.userapiclient, id=virtualmachine.id) @@ -74,9 +74,9 @@ def VerifyChangeInServiceOffering(self, virtualmachine, serviceoffering): service offering %s" % (vm.memory, serviceoffering.memory)) except Exception as e: - exceptionOccured = True + exceptionOccurred = True exceptionMessage = e - return [exceptionOccured, exceptionMessage] + return [exceptionOccurred, exceptionMessage] def VerifyRouterState(apiclient, account, domainid, desiredState, @@ -634,8 +634,8 @@ class TestAdvancedZoneStoppedVM(cloudstackTestCase): virtual_machine, self.service_offering_2 ) - exceptionOccured, exceptionMessage = response[0], response[1] - self.assertFalse(exceptionOccured, exceptionMessage) + exceptionOccurred, exceptionMessage = response[0], response[1] + self.assertFalse(exceptionOccurred, exceptionMessage) virtual_machine.detach_volume( self.userapiclient, diff --git a/tools/marvin/marvin/lib/common.py b/tools/marvin/marvin/lib/common.py index 07fbbca402f..1c5fc32c3a7 100644 --- a/tools/marvin/marvin/lib/common.py +++ b/tools/marvin/marvin/lib/common.py @@ -1273,7 +1273,7 @@ def isIpInDesiredState(apiclient, ipaddressid, state): and return True/False accordingly""" retriesCount = 10 ipInDesiredState = False - exceptionOccured = False + exceptionOccurred = False exceptionMessage = "" try: while retriesCount >= 0: @@ -1286,9 +1286,9 @@ def isIpInDesiredState(apiclient, ipaddressid, state): retriesCount -= 1 time.sleep(60) except Exception as e: - exceptionOccured = True + exceptionOccurred = True exceptionMessage = e - return [exceptionOccured, ipInDesiredState, e] + return [exceptionOccurred, ipInDesiredState, e] if not ipInDesiredState: exceptionMessage = "Ip should be in %s state, it is in %s" %\ (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""" retriesCount = 10 isNetworkInDesiredState = False - exceptionOccured = False + exceptionOccurred = False exceptionMessage = "" try: while retriesCount >= 0: @@ -1365,10 +1365,10 @@ def verifyNetworkState(apiclient, networkid, state, listall=True): exceptionMessage = "Network state should be %s, it is %s" %\ (state, networks[0].state) except Exception as e: - exceptionOccured = True + exceptionOccurred = True exceptionMessage = e - return [exceptionOccured, isNetworkInDesiredState, exceptionMessage] - return [exceptionOccured, isNetworkInDesiredState, exceptionMessage] + return [exceptionOccurred, isNetworkInDesiredState, exceptionMessage] + return [exceptionOccurred, isNetworkInDesiredState, exceptionMessage] def verifyComputeOfferingCreation(apiclient, computeofferingid): """List Compute offerings by ID and verify that the offering exists""" @@ -1557,17 +1557,17 @@ def isDomainResourceCountEqualToExpectedCount(apiclient, domainid, expectedcount resourcetype): """Get the resource count of specific domain and match it with the expected count - Return list [isExceptionOccured, reasonForException, isResourceCountEqual]""" + Return list [isExceptionOccurred, reasonForException, isResourceCountEqual]""" isResourceCountEqual = False - isExceptionOccured = False + isExceptionOccurred = False reasonForException = None try: response = Resources.updateCount(apiclient, domainid=domainid, resourcetype=resourcetype) except Exception as e: reasonForException = "Failed while updating resource count: %s" % e - isExceptionOccured = True - return [isExceptionOccured, reasonForException, isResourceCountEqual] + isExceptionOccurred = True + return [isExceptionOccurred, reasonForException, isResourceCountEqual] if resourcetype == RESOURCE_PRIMARY_STORAGE or resourcetype == RESOURCE_SECONDARY_STORAGE: resourcecount = (response[0].resourcecount / (1024**3)) @@ -1576,23 +1576,23 @@ def isDomainResourceCountEqualToExpectedCount(apiclient, domainid, expectedcount if resourcecount == expectedcount: isResourceCountEqual = True - return [isExceptionOccured, reasonForException, isResourceCountEqual] + return [isExceptionOccurred, reasonForException, isResourceCountEqual] def isAccountResourceCountEqualToExpectedCount(apiclient, domainid, account, expectedcount, resourcetype): """Get the resource count of specific account and match it with the expected count - Return list [isExceptionOccured, reasonForException, isResourceCountEqual]""" + Return list [isExceptionOccurred, reasonForException, isResourceCountEqual]""" isResourceCountEqual = False - isExceptionOccured = False + isExceptionOccurred = False reasonForException = None try: response = Resources.updateCount(apiclient, domainid=domainid, account=account, resourcetype=resourcetype) except Exception as e: reasonForException = "Failed while updating resource count: %s" % e - isExceptionOccured = True - return [isExceptionOccured, reasonForException, isResourceCountEqual] + isExceptionOccurred = True + return [isExceptionOccurred, reasonForException, isResourceCountEqual] if resourcetype == RESOURCE_PRIMARY_STORAGE or resourcetype == RESOURCE_SECONDARY_STORAGE: resourcecount = (response[0].resourcecount / (1024**3)) @@ -1601,7 +1601,7 @@ def isAccountResourceCountEqualToExpectedCount(apiclient, domainid, account, exp if resourcecount == expectedcount: isResourceCountEqual = True - return [isExceptionOccured, reasonForException, isResourceCountEqual] + return [isExceptionOccurred, reasonForException, isResourceCountEqual] def isNetworkDeleted(apiclient, networkid, timeout=600): """ 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""" retriesCount = 10 isRouterInDesiredState = False - exceptionOccured = False + exceptionOccurred = False exceptionMessage = "" try: while retriesCount >= 0: @@ -1779,10 +1779,10 @@ def verifyRouterState(apiclient, routerid, state, listall=True): exceptionMessage = "Router state should be %s, it is %s" %\ (state, routers[0].state) except Exception as e: - exceptionOccured = True + exceptionOccurred = True exceptionMessage = e - return [exceptionOccured, isRouterInDesiredState, exceptionMessage] - return [exceptionOccured, isRouterInDesiredState, exceptionMessage] + return [exceptionOccurred, isRouterInDesiredState, exceptionMessage] + return [exceptionOccurred, isRouterInDesiredState, exceptionMessage] def isIpRangeInUse(api_client, publicIpRange): ''' Check that if any Ip in the IP Range is in use diff --git a/tools/marvin/marvin/lib/ncc.py b/tools/marvin/marvin/lib/ncc.py index 7144558d8e1..f4000cec296 100755 --- a/tools/marvin/marvin/lib/ncc.py +++ b/tools/marvin/marvin/lib/ncc.py @@ -207,7 +207,7 @@ class NCC: return res except Exception as e: self.__lastError = e - # self.logger.exception("sendGetRequestToNCC : Exception Occured: %s" % + # self.logger.exception("sendGetRequestToNCC : Exception Occurred: %s" % # str(self.__lastError)) return FAILED @@ -217,7 +217,7 @@ class NCC: return res except Exception as e: self.__lastError = e - # self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % + # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" % # str(self.__lastError)) return FAILED @@ -227,7 +227,7 @@ class NCC: return res except Exception as e: self.__lastError = e - # self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % + # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" % # str(self.__lastError)) return FAILED @@ -237,7 +237,7 @@ class NCC: return res except Exception as e: self.__lastError = e - # self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % + # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" % # str(self.__lastError)) return FAILED @@ -263,7 +263,7 @@ class NCC: return res except Exception as e: self.__lastError = e - # self.logger.exception("sendPostRequstToNCC: Exception Occured: %s" % + # self.logger.exception("sendPostRequstToNCC: Exception Occurred: %s" % # str(self.__lastError)) return FAILED @@ -273,7 +273,7 @@ class NCC: return res except Exception as e: self.__lastError = e - # self.logger.exception("sendGetRequestToNCC : Exception Occured: %s" % + # self.logger.exception("sendGetRequestToNCC : Exception Occurred: %s" % # str(self.__lastError)) return FAILED