Lint: W291 trailing whitespace

This commit is contained in:
Joshua Boniface 2020-11-06 19:44:14 -05:00
parent db9c6eecad
commit fde8ea2fea
10 changed files with 21 additions and 21 deletions

View File

@ -1,7 +1,7 @@
"""PVC version 0.6
Revision ID: 2d1daa722a0a
Revises:
Revises:
Create Date: 2020-02-15 23:14:14.733134
"""

View File

@ -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]

View File

@ -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()

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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')

View File

@ -315,7 +315,7 @@ class AXFRDaemonInstance(object):
)
# Start the thread
self.thread.start()
self.thread.start()
def stop(self):
self.thread_stopper.set()

View File

@ -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;
"""

View File

@ -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)))