aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dashboard/tasks.py2
-rw-r--r--src/resource_inventory/resource_manager.py4
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 = {}