On 05/27/11 - 10:06:48AM, Mark McLoughlin wrote:
For consistency with other config and allow it to work if the config
file is not found.
---
imagefactory/ApplicationConfiguration.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/imagefactory/ApplicationConfiguration.py
b/imagefactory/ApplicationConfiguration.py
index 6b0e5ea..212319c 100644
--- a/imagefactory/ApplicationConfiguration.py
+++ b/imagefactory/ApplicationConfiguration.py
@@ -71,6 +71,7 @@ class ApplicationConfiguration(object):
argparser.add_argument('--foreground', action='store_true',
default=False, help='Stay in the foreground and avoid launching a daemon. (default:
%(default)s)')
argparser.add_argument('--config',
default='/etc/imagefactory.conf', help='Configuration file to use. (default:
%(default)s)')
argparser.add_argument('--imgdir', default='/tmp',
help='Build image files in location specified. (default: %(default)s)')
+ argparser.add_argument('--ec2_build_style', default='snapshot',
help='Whether EC2 builds should be done snapshot or upload style. (default:
%(default)s)')
argparser.add_argument('--timeout', type=int, default=3600,
help='Set the timeout period for image building in seconds. (default:
%(default)s)')
argparser.add_argument('--tmpdir', default='/tmp', help='Use
the specified location for temporary files. (default: %(default)s)')
group_qmf = argparser.add_argument_group(title='QMF agent',
description=qmf_description)
sloranz and I had a conversation on IRC last night that is relevant to this.
I suggested that it might be a good idea to start removing command-line
arguments in favor of putting things in the configuration file. Actually, more
generally I suggested making things like the build-style dynamic; that is, it
is specified on a per-build-request basis. I believe that is already the case
for the ec2-build-style, but there are other things it is not the case for.
Anyway, I think my preference here would be to move this to the config file.
But I think sloranz needs to weigh in here.
--
Chris Lalancette