SSH port to str and vlan bad slice
This commit is contained in:
parent
112223314d
commit
648a3fcc07
2 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ def insert_router_ipv4(insert: [(IPv4Address, str, IPv4Address, int)], interface
|
|||
|
||||
for i in insert:
|
||||
if ((i[0] not in ipl) or not (ipl[ipl.find(i[0]):5].replace(" ", ""))) and (i[1] not in ipl):
|
||||
cmd = ["ssh", "-i", key, "-o", "StrictHostKeyChecking no", f"{user}@{host}", "-p", port, f"/ip arp add address={i[0]} mac-address={i[1]} interface={interface}".replace("'", "")]
|
||||
cmd = ["ssh", "-i", key, "-o", "StrictHostKeyChecking no", f"{user}@{host}", "-p", str(port), f"/ip arp add address={i[0]} mac-address={i[1]} interface={interface}".replace("'", "")]
|
||||
if not debug:
|
||||
run(cmd)
|
||||
else:
|
||||
|
|
|
@ -21,7 +21,7 @@ def insert_whmcs_ipv4(insert: [(IPv4Address, str, IPv4Address, int)], interface:
|
|||
gateway = insert[0][0]
|
||||
del insert[0]
|
||||
# Get vlan if given
|
||||
if interface[:5] == "vlan":
|
||||
if interface[:4] == "vlan":
|
||||
try:
|
||||
vlan = int(interface[4:])
|
||||
except ValueError:
|
||||
|
|
Loading…
Reference in a new issue