Skip to content
Snippets Groups Projects
Commit c345d51e authored by Jake Taylor's avatar Jake Taylor
Browse files

fix var name

parent 38407d2f
No related branches found
No related tags found
1 merge request!9Remove truncate and add on conflict clause instead
......@@ -229,8 +229,8 @@ def revoke_auth(to_revoke):
:param to_revoke: list of node IP addresses
"""
log.info(f"Revoking access to {len(to_revoke)} nodes...")
for nid in to_revoke:
cmd = f"sudo nft -a list chain inet filter input | grep '{nid}' | awk -F'handle ' '{{print $2}}' | xargs -Ixxx sudo nft delete rule inet filter input handle xxx"
for node_ip in to_revoke:
cmd = f"sudo nft -a list chain inet filter input | grep '{node_ip}' | awk -F'handle ' '{{print $2}}' | xargs -Ixxx sudo nft delete rule inet filter input handle xxx"
log.debug(cmd)
p = subprocess.Popen(cmd.split())
output, error = p.communicate()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment