From d8a8a643ed8bd9d73623b0b8ea352c36fa603343 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Mon, 11 Jun 2012 19:47:18 +0000 Subject: [PATCH] Adds property to selectively enable image caching. The image-property `cache_in_nova` can be used to choose which images should be cached in Nova. One use-case would be to cache base images but not any customer snapshots. Change-Id: I1b8ac914a6effd4cd4653aae7e4eac9d14d0e7bd --- nova/flags.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nova/flags.py b/nova/flags.py index 25d5e0be..bc05901a 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -406,9 +406,12 @@ global_opts = [ cfg.ListOpt('isolated_hosts', default=[], help='Host reserved for specific images'), - cfg.BoolOpt('cache_images', - default=True, - help='Cache glance images locally'), + cfg.StrOpt('cache_images', + default='all', + help='Cache glance images locally. `all` will cache all' + ' images, `some` will only cache images that have the' + ' image_property `cache_in_nova=True`, and `none` turns' + ' off caching entirely'), cfg.BoolOpt('use_cow_images', default=True, help='Whether to use cow images'),