From 52f6d8473d514a2a1eef86f3ec892d9f873c6da5 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 8 Jun 2012 17:55:23 -0700 Subject: Renamed this, since its more of settings, not all constants. --- cloudinit/constants.py | 37 ------------------------------------- cloudinit/settings.py | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 37 deletions(-) delete mode 100644 cloudinit/constants.py create mode 100644 cloudinit/settings.py diff --git a/cloudinit/constants.py b/cloudinit/constants.py deleted file mode 100644 index 7bc90f27..00000000 --- a/cloudinit/constants.py +++ /dev/null @@ -1,37 +0,0 @@ -import os - -VAR_LIB_DIR = '/var/lib/cloud' -CUR_INSTANCE_LINK = os.path.join(VAR_LIB_DIR, "instance") -BOOT_FINISHED = os.path.join(CUR_INSTANCE_LINK, "boot-finished") -SEED_DIR = os.path.join(VAR_LIB_DIR, "seed") - -CFG_ENV_NAME = "CLOUD_CFG" -CLOUD_CONFIG = '/etc/cloud/cloud.cfg' - -CFG_BUILTIN = { - 'datasource_list': ['NoCloud', - 'ConfigDrive', - 'OVF', - 'MAAS', - 'Ec2', - 'CloudStack'], - 'def_log_file': '/var/log/cloud-init.log', - 'log_cfgs': [], - 'syslog_fix_perms': 'syslog:adm' -} - -PATH_MAP = { - "handlers": "handlers", - "scripts": "scripts", - "sem": "sem", - "boothooks": "boothooks", - "userdata_raw": "user-data.txt", - "userdata": "user-data.txt.i", - "obj_pkl": "obj.pkl", - "cloud_config": "cloud-config.txt", - "data": "data", -} - -PER_INSTANCE = "once-per-instance" -PER_ALWAYS = "always" -PER_ONCE = "once" diff --git a/cloudinit/settings.py b/cloudinit/settings.py new file mode 100644 index 00000000..830d970d --- /dev/null +++ b/cloudinit/settings.py @@ -0,0 +1,40 @@ +import os + +VAR_LIB_DIR = '/var/lib/cloud' +CUR_INSTANCE_LINK = os.path.join(VAR_LIB_DIR, "instance") +BOOT_FINISHED = os.path.join(CUR_INSTANCE_LINK, "boot-finished") +SEED_DIR = os.path.join(VAR_LIB_DIR, "seed") + +CFG_ENV_NAME = "CLOUD_CFG" +CLOUD_CONFIG = '/etc/cloud/cloud.cfg' +OLD_CLOUD_CONFIG = '/etc/ec2-init/ec2-config.cfg' + +CFG_BUILTIN = { + 'datasource_list': ['NoCloud', + 'ConfigDrive', + 'OVF', + 'MAAS', + 'Ec2', + 'CloudStack'], + 'def_log_file': '/var/log/cloud-init.log', + 'log_cfgs': [], + 'syslog_fix_perms': 'syslog:adm' +} + +PATH_MAP = { + "handlers": "handlers", + "scripts": "scripts", + "sem": "sem", + "boothooks": "boothooks", + "userdata_raw": "user-data.txt", + "userdata": "user-data.txt.i", + "obj_pkl": "obj.pkl", + "cloud_config": "cloud-config.txt", + "data": "data", +} + +PER_INSTANCE = "once-per-instance" +PER_ALWAYS = "always" +PER_ONCE = "once" + +TEMPLATE_DIR = '/etc/cloud/templates/' -- cgit v1.2.3