summaryrefslogtreecommitdiff
path: root/cloudinit/__init__.py
AgeCommit message (Collapse)Author
2016-12-22LICENSE: Allow dual licensing GPL-3 or Apache 2.0Jon Grimm
This has been a recurring ask and we had initially just made the change to the cloud-init 2.0 codebase. As the current thinking is we'll just continue to enhance the current codebase, its desirable to relicense to match what we'd intended as part of the 2.0 plan here. - put a brief description of license in LICENSE file - put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0 - simplify the per-file header to reference LICENSE - tox: ignore H102 (Apache License Header check) Add license header to files that ship. Reformat headers, make sure everything has vi: at end of file. Non-shipping files do not need the copyright header, but at the moment tests/ have it.
2012-06-11Moved these functions to utils.Joshua Harlow
2012-06-09Move most of this functionality to either cloud-init object or utils.Joshua Harlow
2012-06-08Remove parsed config cache, and cleanup cmdline function.Joshua Harlow
2012-06-08This now only holds some simple top level functions.Joshua Harlow
TODO: maybe just move them to utils?
2012-06-071. Move cloud init and cloud config objects to a cloud file.Joshua Harlow
2. Cleanup main __init__ file with shell additions, constants usage, os.path usage.
2012-04-05move the reading of the cmdline cloud-config url to cloud-init.pyScott Moser
The reason for moving this from cloudinit/__init__.py was that it was running too late there. The cloudinit.parsed_cfgs variable was already filled by cloud-init.py's reading of cloud config. I'm sure I had done this so that it would not have to re-parse configs. I think the right way to handle this is to move that logic back to cloudinit/__init__.py and add some function like 'reread_configs()' that would re-read all releavent cofnigs and re-setup logging. That seemed more error prone at the moment, with limited time.
2012-04-04initial checkin of kernel commandline cloud-config url supportScott Moser
2012-03-16rename DataSourceMaaS to DataSourceMAAS, generally use MAAS everywhereScott Moser
instead of MaaS or Maas, use MAAS consistently. The only non 'MAAS' left are all lower case.
2012-03-12Warn in user-data processing on non-multipart, non-handled dataScott Moser
If user-data is supplied that is not multipart, and is unhandled, then log a warning. A warning by default will get to the console, so the user can see it even if they cannot get into the instance. If they don't see it there, it would still be available in the cloud-init log.
2012-03-12import CloudStack data source [Cosmin Luta]Scott Moser
2012-03-12Restrict warning to userdata without MIME wrapping only while still ignoring ↵Martin Packman
most types
2012-03-08Put a warning in the log when userdata parts are not handledMartin Packman
2012-03-08add MaaS datasource to default searchedScott Moser
2012-02-28Catch exceptions from part-handlers and log the error before continuing.Scott Moser
This branch also adds tests for part-handler registration and part-handler handling.
2012-02-21Cleanups.Mike Milner
2012-02-21Lint fixes.Mike Milner
2012-02-21Add test and fix for catching exceptions.Mike Milner
2012-02-16initial version of DataSourceConfigDriveScott Moser
2012-01-18Add HP to Copyright, and Juerg Haefliger Authors.Scott Moser
This copyright change reflects previous changes that Juerg made for pylint and pep8 cleanups. From: Juerg Haefliger <juerg.haefliger@hp.com> Date: Mon, 16 Jan 2012 10:45:12 +0100
2012-01-17remove duplicate importsScott Moser
2012-01-17[PATCH] PEP8 coding style fixes.Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com> This pulls in the named patch for LP: #914739 with a few other changes.
2012-01-17[PATCH 4/4] Fix pylint conventions C0301 (line too long)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-17[PATCH 3/4] Fix pylint conventions C0324 (comma not followed by a space)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-17[PATCH 2/4] Fix pylint conventions C0322 (operator not preceded by a space)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-17[PATCH 1/4] Fix pylint conventions C0321 (more than one statement on a ↵Scott Moser
single line) From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 12/13] Fix pylint warnings W0201 (attribute xyz definedScott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com> outside __init__)
2012-01-12[PATCH 11/13] Fix pylint warnings W0141 (used builtin function xyz)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com> Replace superseded builtin functions 'filter' and 'map' using list comprehension.
2012-01-12[PATCH 10/13] Fix pylint warnings W0102 (dangerous default value asScott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com> argument)
2012-01-12[PATCH 09/13] Fix pylint warnings W0107 (unnecessary pass statement)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 06/13] Fix pylint warnings W0612 (unused variable)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 05/13] Fix pylint warnings W0613 (unused argument)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2011-08-02This fixes LP: #819507, to make consume_userdata run 'always'Scott Moser
consume_userdata should really run always, rather than once per instance. The documentation says that boothooks were on their own for per-instance but since this routine was only being called once, they would only get called once. This modifies the behavior to be: user_script: per_always cloud_config : per_always upstart_job : per_instance cloud_boothook: per_always In order to not break part handlers that are existing, and expect to only be called once per instance, this adds a 'handler_version' item in a handler that can indicate the version (currently 1 or 2). If it is 2, then the hander will be passed the frequency (per-instance or per-always) that this is being run. That way the handler can differenciate between them. This also makes 'bootcmd' run every boot. That should be changable in cloud-config though, so users who dont like the behavior can modify it. LP: #819507
2011-07-19improve the updating of /etc/hosts with correct fqdn when possibleScott Moser
Thanks to Adam Gandalman and Marc Cluet for this fix. LP: #812539
2011-06-17make the "cloud-config ready" command configurable (LP: #785551)Scott Moser
Previously, when cloud-config was ready, cloud-init would emit an upstart event with: initctl emit cloud-config Now, that command is configurable via the 'cc_ready_cmd' value in cloud.cfg or user data. The default behavior is not changed. LP: #785551
2011-04-04convert some user input from dos to unix (LP: #744965)Scott Moser
If user input is a consumed as a user-script, a boothook, or a upstart job and appears to be dos-formated, then change it to unix formated LP: #744965
2011-03-21fix bug in part-handler code, that broke working part-handlers (LP: #739694)Scott Moser
LP: #739694
2011-02-07rename 'datadir' key to 'data' in pathmapScott Moser
2011-02-07call DataSource classes with sys_cfg argumentScott Moser
2011-02-07add config option 'manual_cache_clean'.Scott Moser
This option allows user to specify manual cleaning of the /var/lib/cloud/instance/ link, for a data source that might not be present on every boot.
2011-02-04fix logging in DataSource modulesScott Moser
Previous logging was getting 'None' set in the DataSource collections. Thus, 'log.debug' would throw error. I think it is proper to pull in the base cloudinit's log.
2011-02-01remove double slash returned by get_ipath_curScott Moser
2011-02-01fix the path for user scripts.Scott Moser
A bug caused user scripts to get stored in /var/lib/cloud/instance/scripts/<instance-id>/ which meant they would not get run by 'run-user-scripts'. LP: #711480
2011-01-31make write_to_cache raise errors if it fails rather than surpressingScott Moser
2011-01-31replace DataSource's self.logScott Moser
After adding the 'log' element to the DataSource class, pickling would fail with TypeError: can't pickle file objects Instead of having the object with a log reference, use one from 'DataSource.log' and have that set by cloudinit
2011-01-31close file descriptors given to cPickle.load and cPickle.dumpScott Moser
2011-01-28add previous-instance-id and previous-datasource files to cloud/dataScott Moser
add 'datasource' file to instance dir
2011-01-27fix the filename of the processed userdataScott Moser
Change /var/lib/cloud/instance/ user-data-raw.txt.i to user-data.txt.i
2011-01-27take correct action if def_log_file and syslog_fix_perms are emptyScott Moser
2011-01-27fix bug in fixing permission on default log fileScott Moser