summaryrefslogtreecommitdiff
path: root/cloudinit/user_data.py
AgeCommit message (Collapse)Author
2012-08-31When a parts content type is found to be different thanJoshua Harlow
its original content type said it is, make sure we set the new value, also unsure if the old top level message should have the same header (which will flip-flop).
2012-08-31Don't look into cloud-archive (after processing) for launchJoshua Harlow
indexes (since they will be handled beforehand) and fix the types being checked on the root of the archive format to be a tuple instead of a list (which oddly causes complaints).
2012-08-27Update so that the content types searched for launch-indexJoshua Harlow
variable has a little more meaning and by default look in metadata for 'launch-index' and have ec2 instead look for a different variable (thus allowing more datasources to just work).
2012-08-26Ensure when an archive is exploded and if it contains theJoshua Harlow
'launch-index' key that we copy that key over to the right header (which will then be used later when assigning the 'real' header when the message is attached)
2012-08-26Fix tests running and add in a check on the content typeJoshua Harlow
before we look into the payload as well as make the skip test a function that the datasource module can also use.
2012-08-26Add the capability to understand and filter onJoshua Harlow
userdata based on a launch-index (or leave userdata alone if none is provided by the datasource). This works by doing the following. 1. Adjusting the userdata processor to attempt to inject a "Launch-Index" header into the messages headers (by either taking a header that already exists or by looking into the payload to see if it exists there). 2. Adjust the get_userdata ds function to apply a filter on the returned userdata (defaulting to false) that will now use the datasources get_launch_index value to restrict the 'final' message used in consuming user data (the same behavior if not existent). 3. Further down the line processes that use the 'resultant' userdata now will only see the ones for there own launch index (ie cloud-config will be restricted automatically and so on) and are unaffected (although they can now ask the cloud object or the datasource for its launch index via the above new ds method.
2012-08-22fix pep8 complaints.Scott Moser
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
2012-07-10Fixes 1012854 by implementing file writing, adjustsJoshua Harlow
other code to have user/group parsing in util instead of in stages.py, renames decomp_str to decomp_gzip since it is more meaningful when named that (as thats all it can decompress).
2012-06-221. Adjust the logging of phone home module when its not enabledharlowja
2. Fix pylint warning in userdata about unused variable
2012-06-22Constant adding for content type, allow the part filename to be over-ridden ↵Joshua Harlow
easily
2012-06-20Massive pylint + pep8 fixups!Joshua Harlow
2012-06-18Fix include once always staying on, only turn it on until a include says to ↵Joshua Harlow
turn it back off, if one of those is encountered
2012-06-171. Add a url response class that urlreading now returns (instead of a tuple). harlowja
a. This allows for more properties to be added as needed in the future, instead of being very restrictive. 2. Fix up all uses of the url reading to now use this new response object. 3. Also fixup user data including, such that if no response actual occurs the url content is not further processed.
2012-06-16Add todo to see if we should turn back off include onceJoshua Harlow
2012-06-16Fix include on enabling, simplify statements around include skipping, allow ↵Joshua Harlow
for case insensitive include statements to be used
2012-06-16Move the helper functions for handlers to the handler __init__ instead of ↵Joshua Harlow
being in here. This class will now just contain user data parsing, leaving the handler running to happen elsewhere.
2012-06-16For the different base classes, ensure we are using the 'abc' module + ↵Joshua Harlow
appropriate annotations + metaclasses.
2012-06-161. Change to fixup handler instead of fixup moduleJoshua Harlow
2. Add logging of unknown content types + seperate payload logging detail message into a separate function.
2012-06-16Some simple fixes that will make the python 3 translation easierJoshua Harlow
2012-06-15Fixups to ensure that pylint does not find anything major wrong.Joshua Harlow
2012-06-15Moved the common user data classes and functionality back to this file since ↵Joshua Harlow
for now it seems to make organizational sense to put it here.
2012-06-09Rename these to user_data module + submodules.Joshua Harlow
2012-06-08Large amounts of refactoring.Joshua Harlow
Now there exists a class which processes the user data down to a mime message and just some small utility methods to walk and determine types. Large amount of content type cleanups & constant creation.
2012-06-071. Adding some new helper files that split off file inclusion, templating, ↵Joshua Harlow
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.