diff --git a/api-daemon/migrations/versions/2d1daa722a0a_pvc_version_0_6.py b/api-daemon/migrations/versions/2d1daa722a0a_pvc_version_0_6.py index 8a0da4bd..57ebf58f 100644 --- a/api-daemon/migrations/versions/2d1daa722a0a_pvc_version_0_6.py +++ b/api-daemon/migrations/versions/2d1daa722a0a_pvc_version_0_6.py @@ -1,7 +1,7 @@ """PVC version 0.6 Revision ID: 2d1daa722a0a -Revises: +Revises: Create Date: 2020-02-15 23:14:14.733134 """ diff --git a/api-daemon/provisioner/examples/debootstrap_script.py b/api-daemon/provisioner/examples/debootstrap_script.py index 892b38dc..7ce216f3 100644 --- a/api-daemon/provisioner/examples/debootstrap_script.py +++ b/api-daemon/provisioner/examples/debootstrap_script.py @@ -205,7 +205,7 @@ GRUB_DISABLE_LINUX_UUID=false os.system( "grub-install --force /dev/rbd/{}/{}_{}".format(root_disk['pool'], vm_name, root_disk['disk_id']) ) - os.system( + os.system( "update-grub" ) # Set a really dumb root password [TEMPORARY] diff --git a/api-daemon/pvcapid-manage.py b/api-daemon/pvcapid-manage.py index 60d2349d..fd3e94e3 100755 --- a/api-daemon/pvcapid-manage.py +++ b/api-daemon/pvcapid-manage.py @@ -28,7 +28,7 @@ from pvcapid.flaskapi import app, db migrate = Migrate(app, db) manager = Manager(app) -manager.add_command('db', MigrateCommand) +manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager.run() diff --git a/api-daemon/pvcapid/benchmark.py b/api-daemon/pvcapid/benchmark.py index d2ce29c6..8be2a77e 100755 --- a/api-daemon/pvcapid/benchmark.py +++ b/api-daemon/pvcapid/benchmark.py @@ -312,19 +312,19 @@ def run_benchmark(self, pool): # 7: IOPS # 8: runtime (msec) # Total latency - # 37: min - # 38: max + # 37: min + # 38: max # 39: mean # 40: stdev # Bandwidth - # 41: min - # 42: max + # 41: min + # 42: max # 44: mean # 45: stdev # 46: # samples # IOPS - # 47: min - # 48: max + # 47: min + # 48: max # 49: mean # 50: stdev # 51: # samples @@ -393,7 +393,7 @@ def run_benchmark(self, pool): # 96: mean # 97: stdev # 98: # samples - # CPU + # CPU # 146: user # 147: system # 148: ctx switches diff --git a/api-daemon/pvcapid/helper.py b/api-daemon/pvcapid/helper.py index ea79980c..eee40707 100755 --- a/api-daemon/pvcapid/helper.py +++ b/api-daemon/pvcapid/helper.py @@ -228,7 +228,7 @@ def node_secondary(node): """ Take NODE out of primary router mode. """ - zk_conn = pvc_common.startZKConnection(config['coordinators']) + zk_conn = pvc_common.startZKConnection(config['coordinators']) retflag, retdata = pvc_node.secondary_node(zk_conn, node) pvc_common.stopZKConnection(zk_conn) @@ -246,7 +246,7 @@ def node_primary(node): """ Set NODE to primary router mode. """ - zk_conn = pvc_common.startZKConnection(config['coordinators']) + zk_conn = pvc_common.startZKConnection(config['coordinators']) retflag, retdata = pvc_node.primary_node(zk_conn, node) pvc_common.stopZKConnection(zk_conn) diff --git a/api-daemon/pvcapid/ova.py b/api-daemon/pvcapid/ova.py index 3fe2b71a..7ea1b8df 100755 --- a/api-daemon/pvcapid/ova.py +++ b/api-daemon/pvcapid/ova.py @@ -432,7 +432,7 @@ class OVFParser(object): path = "{{{schema}}}References/{{{schema}}}File".format(schema=self.OVF_SCHEMA) id_attr = "{{{schema}}}id".format(schema=self.OVF_SCHEMA) href_attr = "{{{schema}}}href".format(schema=self.OVF_SCHEMA) - current_list = self.xml.findall(path) + current_list = self.xml.findall(path) results = [(x.get(id_attr), x.get(href_attr)) for x in current_list] return results @@ -442,12 +442,12 @@ class OVFParser(object): ref_attr = "{{{schema}}}fileRef".format(schema=self.OVF_SCHEMA) cap_attr = "{{{schema}}}capacity".format(schema=self.OVF_SCHEMA) cap_units = "{{{schema}}}capacityAllocationUnits".format(schema=self.OVF_SCHEMA) - current_list = self.xml.findall(path) + current_list = self.xml.findall(path) results = [(x.get(id_attr), x.get(ref_attr), x.get(cap_attr), x.get(cap_units)) for x in current_list] return results def _getAttributes(self, virtual_system, path, attribute): - current_list = virtual_system.findall(path) + current_list = virtual_system.findall(path) results = [x.get(attribute) for x in current_list] return results diff --git a/client-cli/pvc.py b/client-cli/pvc.py index 5672b092..8e374fff 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -1777,7 +1777,7 @@ def ceph_osd_set(osd_property): Valid properties are: - full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent|sortbitwise|recovery_deletes|require_jewel_osds|require_kraken_osds + full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent|sortbitwise|recovery_deletes|require_jewel_osds|require_kraken_osds """ retcode, retmsg = pvc_ceph.ceph_osd_option(config, osd_property, 'set') @@ -1797,7 +1797,7 @@ def ceph_osd_unset(osd_property): Valid properties are: - full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent|sortbitwise|recovery_deletes|require_jewel_osds|require_kraken_osds + full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent|sortbitwise|recovery_deletes|require_jewel_osds|require_kraken_osds """ retcode, retmsg = pvc_ceph.ceph_osd_option(config, osd_property, 'unset') diff --git a/node-daemon/pvcnoded/DNSAggregatorInstance.py b/node-daemon/pvcnoded/DNSAggregatorInstance.py index 11cb2a71..e7256bda 100644 --- a/node-daemon/pvcnoded/DNSAggregatorInstance.py +++ b/node-daemon/pvcnoded/DNSAggregatorInstance.py @@ -315,7 +315,7 @@ class AXFRDaemonInstance(object): ) # Start the thread - self.thread.start() + self.thread.start() def stop(self): self.thread_stopper.set() diff --git a/node-daemon/pvcnoded/MetadataAPIInstance.py b/node-daemon/pvcnoded/MetadataAPIInstance.py index 4a7a0536..5aca7cfb 100644 --- a/node-daemon/pvcnoded/MetadataAPIInstance.py +++ b/node-daemon/pvcnoded/MetadataAPIInstance.py @@ -142,7 +142,7 @@ class MetadataAPIInstance(object): # Obtain a list of templates def get_profile_userdata(self, vm_profile): - query = """SELECT userdata.userdata FROM profile + query = """SELECT userdata.userdata FROM profile JOIN userdata ON profile.userdata = userdata.id WHERE profile.name = %s; """ diff --git a/node-daemon/pvcnoded/VXNetworkInstance.py b/node-daemon/pvcnoded/VXNetworkInstance.py index f84f4f97..4862ad67 100644 --- a/node-daemon/pvcnoded/VXNetworkInstance.py +++ b/node-daemon/pvcnoded/VXNetworkInstance.py @@ -437,7 +437,7 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out for order in sorted(ordered_acls_out.keys()): sorted_acl_list['out'].append(ordered_acls_out[order]) - for direction in 'in', 'out': + for direction in 'in', 'out': for acl in sorted_acl_list[direction]: rule_prefix = "add rule inet filter vxlan{}-{} counter".format(self.vni, direction) rule_data = zkhandler.readdata(self.zk_conn, '/networks/{}/firewall_rules/{}/{}/rule'.format(self.vni, direction, acl)) @@ -701,7 +701,7 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out else: dhcp_configuration += dhcp_configuration_v4 if self.dhcp4_flag: - dhcp_configuration += dhcp_configuration_v4_dhcp + dhcp_configuration += dhcp_configuration_v4_dhcp # Start the dnsmasq process in a thread print('/usr/sbin/dnsmasq {}'.format(' '.join(dhcp_configuration)))