Reversed CLEANUP
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3.7
|
||||
#!/usr/bin/python3
|
||||
"""Programmatically configure Aviat INUes using their undocumented protocol."""
|
||||
|
||||
# import os
|
||||
@@ -40,8 +40,8 @@ CLEANUP = arguments.cleanup
|
||||
@dataclass
|
||||
class INUeCommand():
|
||||
"""Command to be sent to an INUe, including the context and possible value"""
|
||||
context: str = ""
|
||||
command: str = ""
|
||||
context: str
|
||||
command: str
|
||||
position: int = 0
|
||||
value: int = None
|
||||
reverse: bool = False
|
||||
@@ -126,15 +126,6 @@ class Worker(threading.Thread):
|
||||
]
|
||||
|
||||
elif CLEANUP:
|
||||
commands = [
|
||||
INUeCommand("Slot%s_I" % rstp_dac, "ceConfigNmsVid", 0, VLAN),
|
||||
INUeCommand("Terminal_I", "ipConfigAdEntAddress", rstp_dac + 1, new_ip),
|
||||
INUeCommand("Terminal_I", "ipConfigAdEntNetMask", rstp_dac + 1, NET_MASK),
|
||||
INUeCommand("Terminal_I", "ipConfigAutoroutingOspfEnable", rstp_dac + 1, 2),
|
||||
INUeCommand("Terminal_I", "ipCidrRouteIfIndex", rstp_dac + 48, GATEWAY, True),
|
||||
]
|
||||
|
||||
else:
|
||||
commands = [
|
||||
INUeCommand("Slot%s_I" % rstp_dac, "ceConfigNmsVid", 0, 0),
|
||||
INUeCommand("Terminal_I", "ipConfigAdEntAddress", rstp_dac + 1, '0.0.0.0'),
|
||||
@@ -142,6 +133,15 @@ class Worker(threading.Thread):
|
||||
# INUeCommand("Terminal_I", "ipConfigAutoroutingOspfEnable", rstp_dac + 1, 2),
|
||||
# INUeCommand("Terminal_I", "ipCidrRouteIfIndex", rstp_dac + 48, GATEWAY, True),
|
||||
]
|
||||
|
||||
else:
|
||||
commands = [
|
||||
INUeCommand("Slot%s_I" % rstp_dac, "ceConfigNmsVid", 0, VLAN),
|
||||
INUeCommand("Terminal_I", "ipConfigAdEntAddress", rstp_dac + 1, new_ip),
|
||||
INUeCommand("Terminal_I", "ipConfigAdEntNetMask", rstp_dac + 1, NET_MASK),
|
||||
INUeCommand("Terminal_I", "ipConfigAutoroutingOspfEnable", rstp_dac + 1, 2),
|
||||
INUeCommand("Terminal_I", "ipCidrRouteIfIndex", rstp_dac + 48, GATEWAY, True),
|
||||
]
|
||||
|
||||
fail = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user