From 107d8bb663083cd2e5fc09417ccd41560bc272c9 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Fri, 18 Dec 2020 12:16:57 -0500 Subject: Reduce log spam: deletion on resource bundles should be deprecated Signed-off-by: Sawyer Bergeron Change-Id: I6bffc393f7a6f93c4b8cd8d4c8bacba0c23fb256 Signed-off-by: Sawyer Bergeron --- src/dashboard/tasks.py | 2 +- src/resource_inventory/resource_manager.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dashboard/tasks.py b/src/dashboard/tasks.py index 8554f6c..fec8384 100644 --- a/src/dashboard/tasks.py +++ b/src/dashboard/tasks.py @@ -84,7 +84,7 @@ def free_hosts(): resource__isnull=False ) for booking in bookings: - ResourceManager.getInstance().deleteResourceBundle(booking.resource) + ResourceManager.getInstance().releaseResourceBundle(booking.resource) @shared_task diff --git a/src/resource_inventory/resource_manager.py b/src/resource_inventory/resource_manager.py index 140cc09..f587a82 100644 --- a/src/resource_inventory/resource_manager.py +++ b/src/resource_inventory/resource_manager.py @@ -64,9 +64,11 @@ class ResourceManager: # public interface def deleteResourceBundle(self, resourceBundle): + raise NotImplementedError("Resource Bundle Deletion Not Implemented") + + def releaseResourceBundle(self, resourceBundle): for resource in resourceBundle.get_resources(): resource.release() - resourceBundle.delete() def get_vlans(self, resourceTemplate): networks = {} -- cgit 1.2.3-korg