Skip to content
Snippets Groups Projects
Commit d7acdd0f authored by JORGE SASIAIN's avatar JORGE SASIAIN Committed by Neda Moeini
Browse files

NAT-244: black/tox

parent 17c74a1f
No related branches found
No related tags found
1 merge request!94Feature/Netbox integration terminate ip trunk
......@@ -194,7 +194,6 @@ class NetboxClient:
raise WorkflowStateError(
f"The interface: {iface_name} on device: {device_name} already belongs to a LAG: {iface.lag.name}."
)
iface.lag = lag.id
# Set description if provided
......
......@@ -137,17 +137,14 @@ def delete() -> None:
pass
@attach.command()
@click.option("--fqdn", help="Device name where to attach interface to lag")
@click.option("--iface", help="Interface name to attach to lag")
@click.option("--lag", help="LAG name to attach interface")
def interface_to_lag(fqdn: str, iface: str, lag: str) -> None:
click.echo(f"Attaching interface to lag: device ={fqdn}, interface name={iface} to lag={lag}")
new_iface = NetboxClient().attach_interface_to_lag(fqdn, lag, iface)
click.echo(new_iface)
@delete.command() # type: ignore[no-redef]
@click.option("--fqdn", help="Name of device to delete")
def device(fqdn: str) -> None:
click.echo(f"Deleting device: device={fqdn}")
NetboxClient().delete_device(fqdn)
@delete.command()
@delete.command() # type: ignore[no-redef]
@click.option("--fqdn", help="Device name from where to get interface to delete")
@click.option("--iface", help="Name of interface name to delete")
def interface(fqdn: str, iface: str) -> None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment