From 1d522cc6a0c5a88d68e2e05781262b50c080047e Mon Sep 17 00:00:00 2001 From: Ramakrishnan G Date: Mon, 21 Jul 2014 17:10:02 +0530 Subject: Mechanism to cleanup all ImageCaches This commit moves the cleanup code of ImageCache to a common place in image_cache.py so that it can be accessed from anywhere in the ironic source tree outside pxe driver. It also introduces a new decorator @image_cache.cleanup() for subclasses of ImageCache which wishes to be cleaned up. This also has provision for providing a priority for the order of cleanup. Implements: blueprint cleanup-all-imagecaches Change-Id: Idb54cee6cc1eee4f52ff07f8ca6e1f83378b2296 --- ironic/common/exception.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ironic/common') diff --git a/ironic/common/exception.py b/ironic/common/exception.py index 7c7dbdd09..1c93ab0a2 100644 --- a/ironic/common/exception.py +++ b/ironic/common/exception.py @@ -408,3 +408,9 @@ class FailedToGetSensorData(IronicException): class FailedToParseSensorData(IronicException): message = _("Failed to parse sensor data for node %(node)s. " "Error: %(error)s") + + +class InsufficientDiskSpace(IronicException): + message = _("Disk volume where '%(path)s' is located doesn't have " + "enough disk space. Required %(required)d MiB, " + "only %(actual)d MiB available space present.") -- cgit v1.2.1