From d7acdd0fb6d5ddebdec972c2a55aec5bb924e023 Mon Sep 17 00:00:00 2001
From: Jorge Sasiain <jorge.sasiain@ehu.eus>
Date: Tue, 26 Sep 2023 11:53:07 +0000
Subject: [PATCH] NAT-244: black/tox

---
 gso/services/netbox_client.py |  1 -
 utils/netboxcli.py            | 15 ++++++---------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/gso/services/netbox_client.py b/gso/services/netbox_client.py
index 6177c168..178f6996 100644
--- a/gso/services/netbox_client.py
+++ b/gso/services/netbox_client.py
@@ -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
diff --git a/utils/netboxcli.py b/utils/netboxcli.py
index 0b6b2832..6b69c5b1 100644
--- a/utils/netboxcli.py
+++ b/utils/netboxcli.py
@@ -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:
-- 
GitLab