Lint: F841 local variable '<variable>' is assigned to but never used
This commit is contained in:
@ -545,11 +545,9 @@ def get_list_dhcp(zk_conn, network, limit, only_static=False, is_fuzzy=True):
|
||||
|
||||
if only_static:
|
||||
full_dhcp_list = getNetworkDHCPReservations(zk_conn, net_vni)
|
||||
reservations = True
|
||||
else:
|
||||
full_dhcp_list = getNetworkDHCPReservations(zk_conn, net_vni)
|
||||
full_dhcp_list += getNetworkDHCPLeases(zk_conn, net_vni)
|
||||
reservations = False
|
||||
|
||||
if limit:
|
||||
try:
|
||||
@ -693,6 +691,9 @@ def format_info(network_information, long_output):
|
||||
ainformation.append('{}Network firewall rules:{}'.format(ansiprint.bold(), ansiprint.end()))
|
||||
ainformation.append('')
|
||||
formatted_firewall_rules = get_list_firewall_rules(zk_conn, vni)
|
||||
for rule in formatted_firewall_rules:
|
||||
ainformation.append(rule)
|
||||
|
||||
|
||||
# Join it all together
|
||||
click.echo('\n'.join(ainformation))
|
||||
@ -771,11 +772,6 @@ def format_list(network_list):
|
||||
else:
|
||||
v6_flag = 'False'
|
||||
|
||||
if network_information['ip4']['dhcp_flag'] == "True":
|
||||
dhcp4_range = '{} - {}'.format(network_information['ip4']['dhcp_start'], network_information['ip4']['dhcp_end'])
|
||||
else:
|
||||
dhcp4_range = 'N/A'
|
||||
|
||||
network_list_output.append(
|
||||
'{bold}\
|
||||
{net_vni: <{net_vni_length}} \
|
||||
|
@ -427,9 +427,6 @@ def stop_vm(zk_conn, domain):
|
||||
if not dom_uuid:
|
||||
return False, 'ERROR: Could not find VM "{}" in the cluster!'.format(domain)
|
||||
|
||||
# Get state and verify we're OK to proceed
|
||||
current_state = zkhandler.readdata(zk_conn, '/domains/{}/state'.format(dom_uuid))
|
||||
|
||||
# Set the VM to start
|
||||
lock = zkhandler.exclusivelock(zk_conn, '/domains/{}/state'.format(dom_uuid))
|
||||
lock.acquire()
|
||||
|
@ -82,7 +82,6 @@ def renamekey(zk_conn, kv):
|
||||
def readdata(zk_conn, key):
|
||||
data_raw = zk_conn.get(key)
|
||||
data = data_raw[0].decode('utf8')
|
||||
meta = data_raw[1]
|
||||
return data
|
||||
|
||||
# Data write function
|
||||
|
Reference in New Issue
Block a user