From 8d3ce08e7b5431ee5817f17fb30bbf370549003c Mon Sep 17 00:00:00 2001
From: Neda Moeini <neda.moeini@geant.org>
Date: Wed, 25 Oct 2023 17:19:30 +0200
Subject: [PATCH] Deleted extra functionality from NetboxClient

---
 gso/services/netbox_client.py | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/gso/services/netbox_client.py b/gso/services/netbox_client.py
index 96d0cc87..562c5d26 100644
--- a/gso/services/netbox_client.py
+++ b/gso/services/netbox_client.py
@@ -268,26 +268,6 @@ class NetboxClient:
             interface.save()
         return
 
-    def deallocate_interface(self, device_name: str, iface_name: str) -> Interfaces:
-        """Allocate an interface by marking it as connected."""
-
-        device = self.get_device_by_name(device_name)
-        interface = self.netbox.dcim.interfaces.get(device_id=device.id, name=iface_name)
-
-        # Check if interface is available
-        if interface is None:
-            raise NotFoundError(f"Interface: {iface_name} on device: {device_name} not found.")
-
-        # Check if interface is reserved
-        if interface.mark_connected:
-            raise WorkflowStateError(f"The interface: {iface_name} on device: {device_name} is already allocated.")
-
-        # allocate interface by mark as connected
-        interface.mark_connected = False
-        interface.save()
-
-        return interface
-
     def get_available_lags(self, router_id: UUID) -> list[str]:
         """Return all available :term:`LAG`s not assigned to a device."""
 
-- 
GitLab