diff --git a/gso/services/netbox_client.py b/gso/services/netbox_client.py index 96d0cc8743e66a2c463cb6adbade8d197168de2a..562c5d26a9a3048af4e165fc952047bc35cb565f 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."""