Lint: W293 blank line contains whitespace

This commit is contained in:
2020-11-06 19:05:48 -05:00
parent 2deee9a329
commit ebf254f62d
16 changed files with 68 additions and 68 deletions

View File

@ -603,7 +603,7 @@ def add_pool(zk_conn, name, pgs, replcfg):
retcode, stdout, stderr = common.run_os_command('ceph osd pool create {} {} replicated'.format(name, pgs))
if retcode:
return False, 'ERROR: Failed to create pool "{}" with {} PGs: {}'.format(name, pgs, stderr)
# 2. Set the size and minsize
retcode, stdout, stderr = common.run_os_command('ceph osd pool set {} size {}'.format(name, copies))
if retcode:
@ -656,7 +656,7 @@ def get_list_pool(zk_conn, limit, is_fuzzy=True):
if limit:
if not is_fuzzy:
limit = '^' + limit + '$'
for pool in full_pool_list:
if limit:
try:
@ -1231,7 +1231,7 @@ def add_snapshot(zk_conn, pool, volume, name):
'/ceph/snapshots/{}/{}/{}'.format(pool, volume, name): '',
'/ceph/snapshots/{}/{}/{}/stats'.format(pool, volume, name): '{}'
})
return True, 'Created RBD snapshot "{}" of volume "{}" in pool "{}".'.format(name, volume, pool)
def rename_snapshot(zk_conn, pool, volume, name, new_name):

View File

@ -101,7 +101,7 @@ def getDomainXML(zk_conn, dom_uuid):
xml = zkhandler.readdata(zk_conn, '/domains/{}/xml'.format(dom_uuid))
except:
return None
# Parse XML using lxml.objectify
parsed_xml = lxml.objectify.fromstring(xml)
return parsed_xml
@ -208,7 +208,7 @@ def getDomainDiskList(zk_conn, dom_uuid):
disk_list = []
for disk in domain_information['disks']:
disk_list.append(disk['name'])
return disk_list
#
@ -269,7 +269,7 @@ def getInformationFromXML(zk_conn, uuid):
domain_features = getDomainCPUFeatures(parsed_xml)
domain_disks = getDomainDisks(parsed_xml, stats_data)
domain_controllers = getDomainControllers(parsed_xml)
if domain_lastnode:
domain_migrated = 'from {}'.format(domain_lastnode)
else:

View File

@ -175,7 +175,7 @@ def getDHCPLeaseInformation(zk_conn, vni, mac_address):
except kazoo.exceptions.NoNodeError:
zkhandler.readdata(zk_conn, '/networks/{}/dhcp4_reservations/{}'.format(vni, mac_address))
type_key = 'dhcp4_reservations'
hostname = zkhandler.readdata(zk_conn, '/networks/{}/{}/{}/hostname'.format(vni, type_key, mac_address))
ip4_address = zkhandler.readdata(zk_conn, '/networks/{}/{}/{}/ipaddr'.format(vni, type_key, mac_address))
if type_key == 'dhcp4_leases':

View File

@ -170,7 +170,7 @@ def ready_node(zk_conn, node, wait=False):
return False, 'ERROR: No node named "{}" is present in the cluster.'.format(node)
retmsg = 'Restoring hypervisor {} to active service.'.format(node)
# Add the new domain to Zookeeper
zkhandler.writedata(zk_conn, {
'/nodes/{}/domainstate'.format(node): 'unflush'
@ -396,7 +396,7 @@ Mem (M): {node_mem_total: <{mem_total_length}} {node_mem_used: <{mem_used_length
node_mem_provisioned='VMs Total'
)
)
# Format the string (elements)
for node_information in node_list:
daemon_state_colour, coordinator_state_colour, domain_state_colour = getOutputColours(node_information)

View File

@ -927,7 +927,7 @@ def format_list(zk_conn, vm_list, raw):
vm_migrated='Migrated'
)
)
# Format the string (elements)
for domain_information in vm_list:
if domain_information['state'] == 'start':