From 391e88b4f74bc5702da50fd78bcc164aa6b35643 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 15 Jun 2012 17:56:10 -0700 Subject: [PATCH] Add more comments around what the settings mean, add in a list that can be used to check if user provided frequencies are actually valid or not --- cloudinit/settings.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cloudinit/settings.py b/cloudinit/settings.py index f58c4b52..8a1eaeb3 100644 --- a/cloudinit/settings.py +++ b/cloudinit/settings.py @@ -20,10 +20,17 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Set and read for determining the cloud config file location CFG_ENV_NAME = "CLOUD_CFG" + +# This is expected to be a yaml formatted file CLOUD_CONFIG = '/etc/cloud/cloud.cfg' + +# This legacy format is expected to be readable by +# configobj, see http://pypi.python.org/pypi/configobj OLD_CLOUD_CONFIG = '/etc/ec2-init/ec2-config.cfg' +# What u get if no config is provided CFG_BUILTIN = { 'datasource_list': [ 'NoCloud', @@ -45,7 +52,10 @@ CFG_BUILTIN = { }, } +# Valid frequencies of handlers/modules PER_INSTANCE = "once-per-instance" PER_ALWAYS = "always" PER_ONCE = "once" +# Used to sanity check incoming handlers/modules frequencies +FREQUENCIES = [PER_INSTANCE, PER_ALWAYS, PER_ONCE]