diff options
author | Ramakrishnan G <rameshg87@gmail.com> | 2014-07-21 17:10:02 +0530 |
---|---|---|
committer | Ramakrishnan G <rameshg87@gmail.com> | 2014-08-13 09:34:23 +0530 |
commit | 1d522cc6a0c5a88d68e2e05781262b50c080047e (patch) | |
tree | edf511b1f2315cafcd2aa710f3507375a9c83565 /ironic/common | |
parent | df8b6f06a51779d13c94a9f364f730586d5d48b2 (diff) | |
download | ironic-1d522cc6a0c5a88d68e2e05781262b50c080047e.tar.gz |
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
Diffstat (limited to 'ironic/common')
-rw-r--r-- | ironic/common/exception.py | 6 |
1 files changed, 6 insertions, 0 deletions
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.") |