diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-07 12:42:38 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-07 12:42:38 -0700 |
commit | 8900f9cba622eeaf3810003c5a6ff7522312277b (patch) | |
tree | 96dd5295a29c69eabfede0630f697325149926f3 /cloudinit/constants.py | |
parent | 87ebd91af8c230b8f1deed8e734297e40397eea0 (diff) | |
download | vyos-cloud-init-8900f9cba622eeaf3810003c5a6ff7522312277b.tar.gz vyos-cloud-init-8900f9cba622eeaf3810003c5a6ff7522312277b.zip |
1. Adding some new helper files that split off file inclusion, templating, importing, constant usage.
1. Move all datasources to a new sources directory
1. Rename some files to be more consistent with python file/module naming.
Diffstat (limited to 'cloudinit/constants.py')
-rw-r--r-- | cloudinit/constants.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cloudinit/constants.py b/cloudinit/constants.py new file mode 100644 index 00000000..7bc90f27 --- /dev/null +++ b/cloudinit/constants.py @@ -0,0 +1,37 @@ +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" |