You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2022/11/13 10:00:14 UTC

[cloudstack] branch main updated: Enable Flake8 rule W391 (#6606)

This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 8e538028b23 Enable Flake8 rule W391 (#6606)
8e538028b23 is described below

commit 8e538028b23cf0763d75371a8b5eb3fc395bff7f
Author: John Bampton <jb...@users.noreply.github.com>
AuthorDate: Sun Nov 13 20:00:07 2022 +1000

    Enable Flake8 rule W391 (#6606)
    
    Best practice is to have one blank line at the end of Python files.
    
    Remove unneeded blank lines from the end of files
---
 .github/linters/.flake8                            |  7 +++-
 cloud-cli/cloudapis/__init__.py                    |  1 -
 cloud-cli/cloudapis/cloud.py                       |  2 --
 .../scripts/vm/hypervisor/ovm/ConfigFileOps.py     |  1 -
 .../scripts/vm/hypervisor/ovm/OvmCommonModule.py   |  1 -
 .../vm/hypervisor/ovm/OvmHaHeartBeatModule.py      |  1 -
 .../scripts/vm/hypervisor/ovm/OvmOCFS2Module.py    |  1 -
 .../vm/hypervisor/ovm/OvmSecurityGroupModule.py    | 38 ----------------------
 .../vm/hypervisor/ovm/OvmStoragePoolModule.py      |  2 --
 .../scripts/vm/hypervisor/ovm/OvmVolumeModule.py   |  3 --
 python/lib/cloud_utils.py                          |  1 -
 python/lib/cloudutils/networkConfig.py             |  1 -
 scripts/network/exdhcp/dhcpd_edithosts.py          |  1 -
 .../ping/prepare_kickstart_kernel_initrd.py        |  1 -
 scripts/vm/hypervisor/xenserver/perfmon.py         |  1 -
 scripts/vm/network/vnet/ovstunnel.py               |  1 -
 .../broken/test_ps_resource_limits_volume.py       |  1 -
 test/integration/broken/test_vr_metadata.py        |  1 -
 .../maint/test_ip_resource_count_for_vpc.py        |  2 --
 .../component/test_acl_isolatednetwork_delete.py   |  1 -
 .../component/test_acl_sharednetwork.py            |  2 --
 .../component/test_affinity_groups_projects.py     |  3 --
 test/integration/component/test_baremetal.py       |  1 -
 test/integration/component/test_brocade_vcs.py     |  1 -
 .../test_concurrent_create_volume_from_snapshot.py |  1 -
 .../integration/component/test_dhcp_dns_offload.py |  1 -
 test/integration/component/test_egress_rules.py    |  3 --
 .../component/test_escalations_instances.py        |  3 --
 .../component/test_escalations_templates.py        |  3 --
 .../component/test_escalations_vmware.py           |  3 --
 .../component/test_hypervisor_capabilities.py      |  1 -
 test/integration/component/test_invalid_gw_nm.py   |  1 -
 test/integration/component/test_ldap.py            |  1 -
 .../integration/component/test_ldap_auto_import.py |  2 --
 .../component/test_multiple_nic_support.py         |  1 -
 .../component/test_redundant_router_services.py    |  1 -
 .../plugins/solidfire/TestAddRemoveHosts.py        |  1 -
 .../plugins/solidfire/TestManagedSystemVMs.py      |  1 -
 .../integration/plugins/solidfire/TestSnapshots.py |  1 -
 test/integration/plugins/solidfire/TestVolumes.py  |  1 -
 .../plugins/storpool/TestStorPoolVolumes.py        |  2 --
 test/integration/plugins/storpool/sp_util.py       |  1 -
 test/integration/smoke/test_create_network.py      |  1 -
 .../smoke/test_deploy_vm_root_resize.py            |  3 --
 .../test_enable_role_based_users_in_projects.py    |  1 -
 test/integration/smoke/test_metrics_api.py         |  1 -
 test/integration/smoke/test_network_permissions.py |  2 +-
 test/integration/smoke/test_non_contigiousvlan.py  |  1 -
 .../testpaths/testpath_delta_snapshots.py          |  1 -
 test/selenium/browser/firefox.py                   |  1 -
 test/selenium/common/__init__.py                   |  2 --
 test/selenium/common/shared.py                     |  1 -
 test/selenium/cspages/__init__.py                  |  2 --
 test/selenium/cspages/cspage.py                    |  1 -
 test/selenium/cspages/dashboard/__init__.py        |  2 --
 test/selenium/cspages/dashboard/dashboardpage.py   |  1 -
 test/selenium/cspages/login/__init__.py            |  2 --
 test/selenium/cstests/__init__.py                  |  1 -
 test/selenium/cstests/regressiontests/__init__.py  |  1 -
 test/selenium/cstests/smoketests/__init__.py       |  1 -
 test/selenium/cstests/smoketests/smokecfg.py       |  1 -
 test/selenium/lib/Global_Locators.py               |  2 --
 test/selenium/smoke/main.py                        |  3 --
 tools/marvin/marvin/cloudstackException.py         |  1 -
 tools/marvin/marvin/lib/utils.py                   |  1 -
 tools/marvin/marvin/misc/build/bashUtils.py        |  1 -
 tools/marvin/marvin/misc/build/restartMgmt.py      |  1 -
 tools/marvin/marvin/sandbox/__init__.py            |  2 --
 tools/marvin/marvin/sandbox/advanced/__init__.py   |  2 --
 tools/marvin/marvin/sandbox/advancedsg/__init__.py |  2 --
 tools/marvin/marvin/sandbox/basic/__init__.py      |  2 --
 tools/marvin/marvin/sandbox/demo/__init__.py       |  1 -
 tools/marvin/marvin/sandbox/demo/live/__init__.py  |  1 -
 .../marvin/sandbox/demo/simulator/__init__.py      |  2 --
 .../sandbox/demo/simulator/testcase/__init__.py    |  2 --
 .../demo/simulator/testcase/libs/__init__.py       |  2 --
 76 files changed, 7 insertions(+), 147 deletions(-)

diff --git a/.github/linters/.flake8 b/.github/linters/.flake8
index 823c9ada608..f8a49a61f20 100644
--- a/.github/linters/.flake8
+++ b/.github/linters/.flake8
@@ -15,5 +15,10 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# W291 Trailing whitespace
+# W292 No newline at end of file
+# W293 Blank line contains whitespace
+# W391 Blank line at end of file
+
 [flake8]
-select = W291,W292,W293
+select = W291,W292,W293,W391
diff --git a/cloud-cli/cloudapis/__init__.py b/cloud-cli/cloudapis/__init__.py
index 00dcc6bcb55..dd84d7b5c9b 100644
--- a/cloud-cli/cloudapis/__init__.py
+++ b/cloud-cli/cloudapis/__init__.py
@@ -40,4 +40,3 @@ def lookup_api(api_name):
     else: api = matchingapi[0]
     if api: api = getattr(api,"implementor")
     return api
-
diff --git a/cloud-cli/cloudapis/cloud.py b/cloud-cli/cloudapis/cloud.py
index 489118382b8..60175b9401d 100644
--- a/cloud-cli/cloudapis/cloud.py
+++ b/cloud-cli/cloudapis/cloud.py
@@ -194,5 +194,3 @@ for name,meth in load_dynamic_methods():
 implementor = CloudAPI
 
 del name,meth,describe,load_dynamic_methods
-
-
diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/ConfigFileOps.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/ConfigFileOps.py
index a574ada0936..bd922623656 100755
--- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/ConfigFileOps.py
+++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/ConfigFileOps.py
@@ -172,4 +172,3 @@ class ConfigFileOps:
                 self.add_lines(oldLine, False)
             else:
                 self.replace_lines(newLine, oldLine, False)
-
diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmCommonModule.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmCommonModule.py
index 21532d6993b..8cd715dd3b3 100755
--- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmCommonModule.py
+++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmCommonModule.py
@@ -156,4 +156,3 @@ def makeOwnerFileName():
     hostIp = successToMap(get_master_ip())['ip']
     ownerFileName = OWNER_FILE_PREFIX + hostIp.replace('.', '_')
     return ownerFileName
-
diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmHaHeartBeatModule.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmHaHeartBeatModule.py
index ec57f0c850b..05e934184fb 100755
--- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmHaHeartBeatModule.py
+++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmHaHeartBeatModule.py
@@ -102,4 +102,3 @@ class OvmHaHeartBeat(object):
             stopOldHeartBeat(pid)
 
         setupHeartBeat()
-
diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmOCFS2Module.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmOCFS2Module.py
index 650d868d358..06e1e28f28e 100755
--- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmOCFS2Module.py
+++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmOCFS2Module.py
@@ -77,4 +77,3 @@ EOF
         doCmd(cmd)
         cmd = ['service o2cb start %s'%cluster]
         doCmd(cmd)
-
diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py
index 076ffada2b0..c7c83cb87bc 100755
--- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py
+++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py
@@ -438,41 +438,3 @@ class OvmSecurityGroup(OvmObject):
             return [True, True, True, True, True, True]
 
         return [(vm_name != _vm_name), (vm_id != _vm_id), (vm_ip != _vm_ip), (dom_id != _dom_id), (signature != _signature), (seqno != _seqno)]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py
index 2a7e1592971..f60e7fd576c 100755
--- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py
+++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py
@@ -427,5 +427,3 @@ if this doesn't resolve the problem, please check oracle manual to see how to of
             errmsg = fmt_err_msg(e)
             logger.error(OvmStoragePool.copyVolume, errmsg)
             raise XmlRpcFault(toErrCode(OvmStoragePool, OvmStoragePool.copyVolume), errmsg)
-
-
diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmVolumeModule.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmVolumeModule.py
index b1552767039..0723276e9a2 100755
--- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmVolumeModule.py
+++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmVolumeModule.py
@@ -153,6 +153,3 @@ class OvmVolume(OvmObject):
 
 if __name__ == "__main__":
     print OvmVolume.detachOrAttachIso(sys.argv[1], '', False)
-
-
-
diff --git a/python/lib/cloud_utils.py b/python/lib/cloud_utils.py
index 6f6575188f0..d424bf1f023 100644
--- a/python/lib/cloud_utils.py
+++ b/python/lib/cloud_utils.py
@@ -679,4 +679,3 @@ class MigrationContext:
 	def rollback(self):raise NotImplementedError
 	def get_schema_level(self):raise NotImplementedError
 	def set_schema_level(self,l):raise NotImplementedError
-
diff --git a/python/lib/cloudutils/networkConfig.py b/python/lib/cloudutils/networkConfig.py
index 6a18b28ddff..2d1f9936d39 100644
--- a/python/lib/cloudutils/networkConfig.py
+++ b/python/lib/cloudutils/networkConfig.py
@@ -163,4 +163,3 @@ class networkConfig:
             type = "dev"
 
         return networkConfig.devInfo(macAddr, ipAddr, netmask, None, type, dev)
-
diff --git a/scripts/network/exdhcp/dhcpd_edithosts.py b/scripts/network/exdhcp/dhcpd_edithosts.py
index 97bccd81d33..4df996dc032 100644
--- a/scripts/network/exdhcp/dhcpd_edithosts.py
+++ b/scripts/network/exdhcp/dhcpd_edithosts.py
@@ -120,4 +120,3 @@ if __name__ == "__main__":
 
 	ret = insert_host_entry(mac, ip, hostname, dns, gateway, next_server)
 	sys.exit(ret)
-
diff --git a/scripts/network/ping/prepare_kickstart_kernel_initrd.py b/scripts/network/ping/prepare_kickstart_kernel_initrd.py
index 116d179e5e5..510a5cc11ca 100755
--- a/scripts/network/ping/prepare_kickstart_kernel_initrd.py
+++ b/scripts/network/ping/prepare_kickstart_kernel_initrd.py
@@ -72,4 +72,3 @@ if __name__ == "__main__":
 
     (kernel, initrd, copy_to) = sys.argv[1:]
     sys.exit(prepare())
-
diff --git a/scripts/vm/hypervisor/xenserver/perfmon.py b/scripts/vm/hypervisor/xenserver/perfmon.py
index e4b0101a520..7e0fdd11567 100755
--- a/scripts/vm/hypervisor/xenserver/perfmon.py
+++ b/scripts/vm/hypervisor/xenserver/perfmon.py
@@ -258,4 +258,3 @@ def get_vm_group_perfmon(args={}):
                 else:
                     result += ',' + str(vm_count) +  '.' +  str(counter_count) + ':' + str(average_memory)
     return result
-
diff --git a/scripts/vm/network/vnet/ovstunnel.py b/scripts/vm/network/vnet/ovstunnel.py
index 92e2f621446..304e4920895 100755
--- a/scripts/vm/network/vnet/ovstunnel.py
+++ b/scripts/vm/network/vnet/ovstunnel.py
@@ -309,4 +309,3 @@ if __name__ == '__main__':
     else:
         logging.debug("Unknown command: " + cmd)
         sys.exit(1)
-
diff --git a/test/integration/broken/test_ps_resource_limits_volume.py b/test/integration/broken/test_ps_resource_limits_volume.py
index c07487bc27b..86e0d6da6ab 100644
--- a/test/integration/broken/test_ps_resource_limits_volume.py
+++ b/test/integration/broken/test_ps_resource_limits_volume.py
@@ -169,4 +169,3 @@ class TestPrimaryResourceLimitsVolume(cloudstackTestCase):
         self.assertEqual(response[0], PASS, response[1])
 
         return
-
diff --git a/test/integration/broken/test_vr_metadata.py b/test/integration/broken/test_vr_metadata.py
index c566510379d..296a2db8b25 100644
--- a/test/integration/broken/test_vr_metadata.py
+++ b/test/integration/broken/test_vr_metadata.py
@@ -334,4 +334,3 @@ class TestDeployVmWithMetaData(cloudstackTestCase):
                               )
 
         return
-
diff --git a/test/integration/component/maint/test_ip_resource_count_for_vpc.py b/test/integration/component/maint/test_ip_resource_count_for_vpc.py
index 2099995f505..b5d9c4bb76e 100644
--- a/test/integration/component/maint/test_ip_resource_count_for_vpc.py
+++ b/test/integration/component/maint/test_ip_resource_count_for_vpc.py
@@ -349,5 +349,3 @@ class TestIPResourceCountVPC(cloudstackTestCase):
         account_list = Account.list(self.apiclient, id=self.account.id)
         totalip = account_list[0].iptotal
         self.assertTrue(totalip - totalip_1 == 3, "publicip count is 3")
-
-
diff --git a/test/integration/component/test_acl_isolatednetwork_delete.py b/test/integration/component/test_acl_isolatednetwork_delete.py
index 122e9edf190..4a9fe12ebad 100644
--- a/test/integration/component/test_acl_isolatednetwork_delete.py
+++ b/test/integration/component/test_acl_isolatednetwork_delete.py
@@ -546,4 +546,3 @@ class TestIsolatedNetworkDelete(cloudstackTestCase):
         )
         cls._cleanup.append(network)
         return network
-
diff --git a/test/integration/component/test_acl_sharednetwork.py b/test/integration/component/test_acl_sharednetwork.py
index 170dc157b1f..42f4a899e12 100644
--- a/test/integration/component/test_acl_sharednetwork.py
+++ b/test/integration/component/test_acl_sharednetwork.py
@@ -1124,5 +1124,3 @@ class TestSharedNetwork(cloudstackTestCase):
                         apiclient,
                         user.id
                       ))
-
-
diff --git a/test/integration/component/test_affinity_groups_projects.py b/test/integration/component/test_affinity_groups_projects.py
index ae5da06b792..1c0b4c2bdd8 100644
--- a/test/integration/component/test_affinity_groups_projects.py
+++ b/test/integration/component/test_affinity_groups_projects.py
@@ -1082,6 +1082,3 @@ class TestDeployVMAffinityGroups(cloudstackTestCase):
 
         wait_for_cleanup(self.api_client, ["expunge.delay", "expunge.interval"])
         self.cleanup.append(aff_grp)
-
-
-
diff --git a/test/integration/component/test_baremetal.py b/test/integration/component/test_baremetal.py
index 352e79764bb..b57671d09e9 100644
--- a/test/integration/component/test_baremetal.py
+++ b/test/integration/component/test_baremetal.py
@@ -120,4 +120,3 @@ class TestBaremetal(cloudstackTestCase):
         cmd.endip = "10.1.1.40"
         cmd.forVirtualNetwork="false"
         self.apiclient.createVlanIpRange(cmd)
-
diff --git a/test/integration/component/test_brocade_vcs.py b/test/integration/component/test_brocade_vcs.py
index ab3bd313d0b..1f45d93b0e5 100644
--- a/test/integration/component/test_brocade_vcs.py
+++ b/test/integration/component/test_brocade_vcs.py
@@ -329,4 +329,3 @@ class TestBrocadeVcs(cloudstackTestCase):
         Network.delete(self.network, self.apiclient)
 
         return
-
diff --git a/test/integration/component/test_concurrent_create_volume_from_snapshot.py b/test/integration/component/test_concurrent_create_volume_from_snapshot.py
index 8e31cc835b4..8b6c966335e 100644
--- a/test/integration/component/test_concurrent_create_volume_from_snapshot.py
+++ b/test/integration/component/test_concurrent_create_volume_from_snapshot.py
@@ -303,4 +303,3 @@ class TestSnapshotRootDisk(cloudstackTestCase):
         )
 
         return
-
diff --git a/test/integration/component/test_dhcp_dns_offload.py b/test/integration/component/test_dhcp_dns_offload.py
index d012bcb1763..a825f79160c 100644
--- a/test/integration/component/test_dhcp_dns_offload.py
+++ b/test/integration/component/test_dhcp_dns_offload.py
@@ -2124,4 +2124,3 @@ class TestDeployVMs(cloudstackTestCase):
                 self.debug("Success: Updating dhcp config params with invalid values is not allowed\
                            and throws following message: %s" % e)
         return
-
diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py
index 98b891bc1fe..c1d12d11c01 100644
--- a/test/integration/component/test_egress_rules.py
+++ b/test/integration/component/test_egress_rules.py
@@ -2125,6 +2125,3 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
                                     domainid=self.account.domainid
                                     )
         return
-
-
-
diff --git a/test/integration/component/test_escalations_instances.py b/test/integration/component/test_escalations_instances.py
index f2f11679fb9..d2ff9b5aa8d 100644
--- a/test/integration/component/test_escalations_instances.py
+++ b/test/integration/component/test_escalations_instances.py
@@ -4492,6 +4492,3 @@ class TestInstances(cloudstackTestCase):
                 "Warning: Exception in expunging vms vm3 and vm4 : %s" %
                 e)
         return
-
-
-
diff --git a/test/integration/component/test_escalations_templates.py b/test/integration/component/test_escalations_templates.py
index 18c2da7f2e3..9cf482ea763 100644
--- a/test/integration/component/test_escalations_templates.py
+++ b/test/integration/component/test_escalations_templates.py
@@ -861,6 +861,3 @@ class TestTemplates(cloudstackTestCase):
             )
         del self.services["privatetemplate"]["ostype"]
         return
-
-
-
diff --git a/test/integration/component/test_escalations_vmware.py b/test/integration/component/test_escalations_vmware.py
index 2939e613296..888c44afcec 100644
--- a/test/integration/component/test_escalations_vmware.py
+++ b/test/integration/component/test_escalations_vmware.py
@@ -367,6 +367,3 @@ class TestVMware(cloudstackTestCase):
             snapshot_created_1,
             "VM Snapshot creation failed"
         )
-
-
-
diff --git a/test/integration/component/test_hypervisor_capabilities.py b/test/integration/component/test_hypervisor_capabilities.py
index ba02ef7f6ce..3eb1d16917a 100644
--- a/test/integration/component/test_hypervisor_capabilities.py
+++ b/test/integration/component/test_hypervisor_capabilities.py
@@ -286,4 +286,3 @@ class TestHypervisorCapabilities(cloudstackTestCase):
         cmd = listHypervisorCapabilities.listHypervisorCapabilitiesCmd()
         cmd.id = id
         return self.apiclient.listHypervisorCapabilities(cmd)
-
diff --git a/test/integration/component/test_invalid_gw_nm.py b/test/integration/component/test_invalid_gw_nm.py
index eb4043a2824..f6c8639f9e7 100644
--- a/test/integration/component/test_invalid_gw_nm.py
+++ b/test/integration/component/test_invalid_gw_nm.py
@@ -124,4 +124,3 @@ class TestIsolatedNetworkInvalidGw(cloudstackTestCase):
                 netmask="255.0.255.0",
             )
         return
-
diff --git a/test/integration/component/test_ldap.py b/test/integration/component/test_ldap.py
index 5591d21ecc9..56f844ac21a 100644
--- a/test/integration/component/test_ldap.py
+++ b/test/integration/component/test_ldap.py
@@ -304,4 +304,3 @@ class TestLdap(cloudstackTestCase):
         except Exception as p:
             self.debug("login operation failed %s" % p)
             self.reason = "Login operation Failed %s" % p
-
diff --git a/test/integration/component/test_ldap_auto_import.py b/test/integration/component/test_ldap_auto_import.py
index 028e53db2c8..c2cc6b5a23c 100644
--- a/test/integration/component/test_ldap_auto_import.py
+++ b/test/integration/component/test_ldap_auto_import.py
@@ -594,5 +594,3 @@ class TestLdap(cloudstackTestCase):
             "", "", self.parent_domain.name, method="POST")
         self.debug(loginRes)
         self.assertEqual(loginRes, None, self.reason)
-
-
diff --git a/test/integration/component/test_multiple_nic_support.py b/test/integration/component/test_multiple_nic_support.py
index 098f04277a2..d9ae681b3c2 100644
--- a/test/integration/component/test_multiple_nic_support.py
+++ b/test/integration/component/test_multiple_nic_support.py
@@ -621,4 +621,3 @@ class TestMulipleNicSupport(cloudstackTestCase):
             self.fail("Exception occurred: %s" % e)
 
         self.verify_network_rules(self.virtual_machine1.id)
-
diff --git a/test/integration/component/test_redundant_router_services.py b/test/integration/component/test_redundant_router_services.py
index 66e987077d4..b796eca7b5f 100644
--- a/test/integration/component/test_redundant_router_services.py
+++ b/test/integration/component/test_redundant_router_services.py
@@ -380,4 +380,3 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
                          "List remote VPNs should not return empty response"
                          )
         return
-
diff --git a/test/integration/plugins/solidfire/TestAddRemoveHosts.py b/test/integration/plugins/solidfire/TestAddRemoveHosts.py
index 858d8e128ea..1f67f771c82 100644
--- a/test/integration/plugins/solidfire/TestAddRemoveHosts.py
+++ b/test/integration/plugins/solidfire/TestAddRemoveHosts.py
@@ -955,4 +955,3 @@ class TestAddRemoveHosts(cloudstackTestCase):
             xen_server = cls.testdata[TestData.xenServer]
 
             cls.xen_session.xenapi.login_with_password(xen_server[TestData.username], xen_server[TestData.password])
-
diff --git a/test/integration/plugins/solidfire/TestManagedSystemVMs.py b/test/integration/plugins/solidfire/TestManagedSystemVMs.py
index c3807e07a53..4f2558756e6 100644
--- a/test/integration/plugins/solidfire/TestManagedSystemVMs.py
+++ b/test/integration/plugins/solidfire/TestManagedSystemVMs.py
@@ -624,4 +624,3 @@ class TestManagedSystemVMs(cloudstackTestCase):
             xen_server = cls.testdata[TestData.xenServer]
 
             cls.xen_session.xenapi.login_with_password(xen_server[TestData.username], xen_server[TestData.password])
-
diff --git a/test/integration/plugins/solidfire/TestSnapshots.py b/test/integration/plugins/solidfire/TestSnapshots.py
index d9ab3b2b3e9..722400385ed 100644
--- a/test/integration/plugins/solidfire/TestSnapshots.py
+++ b/test/integration/plugins/solidfire/TestSnapshots.py
@@ -1767,4 +1767,3 @@ class TestSnapshots(cloudstackTestCase):
         sf_volumes = sf_util.get_active_sf_volumes(self.sfe, sf_account_id)
 
         sf_util.check_list(sf_volumes, expected_num_volumes, self, volume_err_msg)
-
diff --git a/test/integration/plugins/solidfire/TestVolumes.py b/test/integration/plugins/solidfire/TestVolumes.py
index 30b5c0f1ab6..64a8eee0fe4 100644
--- a/test/integration/plugins/solidfire/TestVolumes.py
+++ b/test/integration/plugins/solidfire/TestVolumes.py
@@ -2710,4 +2710,3 @@ class TestVolumes(cloudstackTestCase):
             xen_server = cls.testdata[TestData.xenServer]
 
             cls.xen_session.xenapi.login_with_password(xen_server[TestData.username], xen_server[TestData.password])
-
diff --git a/test/integration/plugins/storpool/TestStorPoolVolumes.py b/test/integration/plugins/storpool/TestStorPoolVolumes.py
index f5152887071..68e2a705440 100644
--- a/test/integration/plugins/storpool/TestStorPoolVolumes.py
+++ b/test/integration/plugins/storpool/TestStorPoolVolumes.py
@@ -2149,5 +2149,3 @@ class TestStoragePool(cloudstackTestCase):
         host, port = cfg['SP_API_HTTP'].split(':')
         auth = cfg['SP_AUTH_TOKEN']
         return host, int(port), auth
-
-
diff --git a/test/integration/plugins/storpool/sp_util.py b/test/integration/plugins/storpool/sp_util.py
index 054ace4a6e3..68da18d0075 100644
--- a/test/integration/plugins/storpool/sp_util.py
+++ b/test/integration/plugins/storpool/sp_util.py
@@ -745,4 +745,3 @@ class StorPoolHelper():
         cmd.id = vmid
         cmd.hostid = hostid
         return (apiclient.startVirtualMachine(cmd))
-
diff --git a/test/integration/smoke/test_create_network.py b/test/integration/smoke/test_create_network.py
index 19c63e94bfd..c1b7d93d89c 100644
--- a/test/integration/smoke/test_create_network.py
+++ b/test/integration/smoke/test_create_network.py
@@ -289,4 +289,3 @@ class TestNetworkManagement(cloudstackTestCase):
         )
 
         self.cleanup.append(self.network_offering)
-
diff --git a/test/integration/smoke/test_deploy_vm_root_resize.py b/test/integration/smoke/test_deploy_vm_root_resize.py
index f3b42a389b9..b71276f5377 100644
--- a/test/integration/smoke/test_deploy_vm_root_resize.py
+++ b/test/integration/smoke/test_deploy_vm_root_resize.py
@@ -394,6 +394,3 @@ class TestDeployVmRootSize(cloudstackTestCase):
             self.assertEqual(success, True, "Check if passing rootdisksize < templatesize fails appropriately")
         else:
             self.debug("test 02 does not support hypervisor type " + self.hypervisor)
-
-
-
diff --git a/test/integration/smoke/test_enable_role_based_users_in_projects.py b/test/integration/smoke/test_enable_role_based_users_in_projects.py
index 16cce8c37cd..24fed74438a 100644
--- a/test/integration/smoke/test_enable_role_based_users_in_projects.py
+++ b/test/integration/smoke/test_enable_role_based_users_in_projects.py
@@ -268,4 +268,3 @@ class TestRoleBasedUsersInProjects(cloudstackTestCase):
             )
         except Exception as e:
             pass
-
diff --git a/test/integration/smoke/test_metrics_api.py b/test/integration/smoke/test_metrics_api.py
index e870dadee83..aeb3d883cfa 100644
--- a/test/integration/smoke/test_metrics_api.py
+++ b/test/integration/smoke/test_metrics_api.py
@@ -376,4 +376,3 @@ class TestMetrics(cloudstackTestCase):
             return True
         except ValueError:
             return False
-
diff --git a/test/integration/smoke/test_network_permissions.py b/test/integration/smoke/test_network_permissions.py
index 334a5618857..cd55c5af745 100644
--- a/test/integration/smoke/test_network_permissions.py
+++ b/test/integration/smoke/test_network_permissions.py
@@ -791,4 +791,4 @@ class TestNetworkPermissions(cloudstackTestCase):
 
         self.remove_network_permission(self.apiclient, self.user_network, self.other_user, None, expected=True)
         self.list_network(self.apiclient, self.other_user, self.user_network, None, None, expected=False)
-        self.list_network(self.otheruser_apiclient, self.other_user, self.user_network, None, None, expected=False)
\ No newline at end of file
+        self.list_network(self.otheruser_apiclient, self.other_user, self.user_network, None, None, expected=False)
diff --git a/test/integration/smoke/test_non_contigiousvlan.py b/test/integration/smoke/test_non_contigiousvlan.py
index 3838e431655..d24638cc5d3 100644
--- a/test/integration/smoke/test_non_contigiousvlan.py
+++ b/test/integration/smoke/test_non_contigiousvlan.py
@@ -88,4 +88,3 @@ class TestUpdatePhysicalNetwork(cloudstackTestCase):
         updateResponse = self.network.update(self.apiClient, id = self.networkid, vlan=self.existing_vlan)
         self.assertTrue(updateResponse.vlan.find(self.vlan["full_range"]) < 0,
             "VLAN was not removed successfully")
-
diff --git a/test/integration/testpaths/testpath_delta_snapshots.py b/test/integration/testpaths/testpath_delta_snapshots.py
index cb8461b4394..90cda5376ce 100644
--- a/test/integration/testpaths/testpath_delta_snapshots.py
+++ b/test/integration/testpaths/testpath_delta_snapshots.py
@@ -537,4 +537,3 @@ class TestDeltaSnapshots(cloudstackTestCase):
             "Check: Snapshot 1 is still on Secondary Storage. Not Deleted.")
 
         return
-
diff --git a/test/selenium/browser/firefox.py b/test/selenium/browser/firefox.py
index f915e3acab4..e4e8e1c6262 100644
--- a/test/selenium/browser/firefox.py
+++ b/test/selenium/browser/firefox.py
@@ -53,4 +53,3 @@ if __name__ == "__main__":
     browser.set_url("http://10.88.90.84:8080/client/")
     time.sleep(3)
     browser.quit_browser()
-
diff --git a/test/selenium/common/__init__.py b/test/selenium/common/__init__.py
index a595c844418..13a83393a91 100644
--- a/test/selenium/common/__init__.py
+++ b/test/selenium/common/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/test/selenium/common/shared.py b/test/selenium/common/shared.py
index e87b0daffce..21c598ebbee 100644
--- a/test/selenium/common/shared.py
+++ b/test/selenium/common/shared.py
@@ -146,4 +146,3 @@ class Shared(object):
 
         #this method isn't as slick as I hoped :(
         time.sleep(1)
-
diff --git a/test/selenium/cspages/__init__.py b/test/selenium/cspages/__init__.py
index a595c844418..13a83393a91 100644
--- a/test/selenium/cspages/__init__.py
+++ b/test/selenium/cspages/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/test/selenium/cspages/cspage.py b/test/selenium/cspages/cspage.py
index 087dc7e9f85..4f52e4d116d 100644
--- a/test/selenium/cspages/cspage.py
+++ b/test/selenium/cspages/cspage.py
@@ -18,4 +18,3 @@
 class CloudStackPage(object):
     def __init__():
         self.browser = None
-
diff --git a/test/selenium/cspages/dashboard/__init__.py b/test/selenium/cspages/dashboard/__init__.py
index a595c844418..13a83393a91 100644
--- a/test/selenium/cspages/dashboard/__init__.py
+++ b/test/selenium/cspages/dashboard/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/test/selenium/cspages/dashboard/dashboardpage.py b/test/selenium/cspages/dashboard/dashboardpage.py
index c4b7711155f..12a38a1978b 100644
--- a/test/selenium/cspages/dashboard/dashboardpage.py
+++ b/test/selenium/cspages/dashboard/dashboardpage.py
@@ -71,4 +71,3 @@ class DashboardPage(CloudStackPage):
                 li.click()
                 time.sleep(3)
                 return
-
diff --git a/test/selenium/cspages/login/__init__.py b/test/selenium/cspages/login/__init__.py
index a595c844418..13a83393a91 100644
--- a/test/selenium/cspages/login/__init__.py
+++ b/test/selenium/cspages/login/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/test/selenium/cstests/__init__.py b/test/selenium/cstests/__init__.py
index 245692337bc..13a83393a91 100644
--- a/test/selenium/cstests/__init__.py
+++ b/test/selenium/cstests/__init__.py
@@ -14,4 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
diff --git a/test/selenium/cstests/regressiontests/__init__.py b/test/selenium/cstests/regressiontests/__init__.py
index 245692337bc..13a83393a91 100644
--- a/test/selenium/cstests/regressiontests/__init__.py
+++ b/test/selenium/cstests/regressiontests/__init__.py
@@ -14,4 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
diff --git a/test/selenium/cstests/smoketests/__init__.py b/test/selenium/cstests/smoketests/__init__.py
index 245692337bc..13a83393a91 100644
--- a/test/selenium/cstests/smoketests/__init__.py
+++ b/test/selenium/cstests/smoketests/__init__.py
@@ -14,4 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
diff --git a/test/selenium/cstests/smoketests/smokecfg.py b/test/selenium/cstests/smoketests/smokecfg.py
index 901c3adc1d2..b6c09a660d9 100644
--- a/test/selenium/cstests/smoketests/smokecfg.py
+++ b/test/selenium/cstests/smoketests/smokecfg.py
@@ -60,4 +60,3 @@ smokecfg = {
                                },
 
            }
-
diff --git a/test/selenium/lib/Global_Locators.py b/test/selenium/lib/Global_Locators.py
index 1bd395842f7..111e1549353 100644
--- a/test/selenium/lib/Global_Locators.py
+++ b/test/selenium/lib/Global_Locators.py
@@ -220,5 +220,3 @@ login_password_css = "body.login > div.login > form > div.fields > div.field.pas
 
 # Click ok to login
 login_submit_css = "body.login > div.login > form > div.fields > input[type=\"submit\"]" # Login>Login Button (Submit button)
-
-
diff --git a/test/selenium/smoke/main.py b/test/selenium/smoke/main.py
index d2ac4dd3c0e..609bf8f86f3 100644
--- a/test/selenium/smoke/main.py
+++ b/test/selenium/smoke/main.py
@@ -140,6 +140,3 @@ runner = xmlrunner.XMLTestRunner(output='test-reports')
 
 # Leave following as is for either XML or HTML
 runner.run(suite)
-
-
-
diff --git a/tools/marvin/marvin/cloudstackException.py b/tools/marvin/marvin/cloudstackException.py
index a5cd72e80d8..5a2f72d8c59 100644
--- a/tools/marvin/marvin/cloudstackException.py
+++ b/tools/marvin/marvin/cloudstackException.py
@@ -92,4 +92,3 @@ class CloudstackAclException():
             return True
         else:
             return False
-
diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py
index 89898121230..0f97c9d95c3 100644
--- a/tools/marvin/marvin/lib/utils.py
+++ b/tools/marvin/marvin/lib/utils.py
@@ -551,4 +551,3 @@ def wait_until(retry_interval=2, no_of_times=2, callback=None, *callback_args):
             break
 
     return wait_result, return_val
-
diff --git a/tools/marvin/marvin/misc/build/bashUtils.py b/tools/marvin/marvin/misc/build/bashUtils.py
index a428315f3ef..14355ad61cc 100644
--- a/tools/marvin/marvin/misc/build/bashUtils.py
+++ b/tools/marvin/marvin/misc/build/bashUtils.py
@@ -145,4 +145,3 @@ class bash:
             return self.getStdout()
         else:
             return self.getStderr()
-
diff --git a/tools/marvin/marvin/misc/build/restartMgmt.py b/tools/marvin/marvin/misc/build/restartMgmt.py
index e82ae2b0e3f..3c060d5dd0a 100644
--- a/tools/marvin/marvin/misc/build/restartMgmt.py
+++ b/tools/marvin/marvin/misc/build/restartMgmt.py
@@ -50,4 +50,3 @@ if __name__ == '__main__':
             timeout = timeout - 1
     if tn is None:
         raise socket.error("Unable to reach API port")
-
diff --git a/tools/marvin/marvin/sandbox/__init__.py b/tools/marvin/marvin/sandbox/__init__.py
index a595c844418..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/__init__.py
+++ b/tools/marvin/marvin/sandbox/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/tools/marvin/marvin/sandbox/advanced/__init__.py b/tools/marvin/marvin/sandbox/advanced/__init__.py
index a595c844418..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/advanced/__init__.py
+++ b/tools/marvin/marvin/sandbox/advanced/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/tools/marvin/marvin/sandbox/advancedsg/__init__.py b/tools/marvin/marvin/sandbox/advancedsg/__init__.py
index a595c844418..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/advancedsg/__init__.py
+++ b/tools/marvin/marvin/sandbox/advancedsg/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/tools/marvin/marvin/sandbox/basic/__init__.py b/tools/marvin/marvin/sandbox/basic/__init__.py
index a595c844418..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/basic/__init__.py
+++ b/tools/marvin/marvin/sandbox/basic/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/tools/marvin/marvin/sandbox/demo/__init__.py b/tools/marvin/marvin/sandbox/demo/__init__.py
index 245692337bc..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/demo/__init__.py
+++ b/tools/marvin/marvin/sandbox/demo/__init__.py
@@ -14,4 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
diff --git a/tools/marvin/marvin/sandbox/demo/live/__init__.py b/tools/marvin/marvin/sandbox/demo/live/__init__.py
index 245692337bc..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/demo/live/__init__.py
+++ b/tools/marvin/marvin/sandbox/demo/live/__init__.py
@@ -14,4 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/__init__.py b/tools/marvin/marvin/sandbox/demo/simulator/__init__.py
index a595c844418..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/__init__.py
+++ b/tools/marvin/marvin/sandbox/demo/simulator/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/testcase/__init__.py b/tools/marvin/marvin/sandbox/demo/simulator/testcase/__init__.py
index a595c844418..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/testcase/__init__.py
+++ b/tools/marvin/marvin/sandbox/demo/simulator/testcase/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/__init__.py b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/__init__.py
index a595c844418..13a83393a91 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/__init__.py
+++ b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/__init__.py
@@ -14,5 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-