summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-06-16Make the top level __init__ similar to the other top level __inits__ where ↵Joshua Harlow
just util functions and base classes are defined there.
2012-06-16Content handlers does not need the paths variable anymore so removed that.Joshua Harlow
2012-06-16For the different base classes, ensure we are using the 'abc' module + ↵Joshua Harlow
appropriate annotations + metaclasses.
2012-06-16Unused import removedJoshua Harlow
2012-06-161. Add a constant for the "cc_" prefix, so that it can be easily changed if ↵Joshua Harlow
desired.
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-161. Change to fixup transform/form transform nameJoshua Harlow
2. Check lowercase name against .py instead of unknown case.
2012-06-16Rename to fixup transform/fixup handler/form transform name instead of form mod*Joshua Harlow
2012-06-16Have the ensure file function be able to take in a file permission.Joshua Harlow
2012-06-161. Add comment as to what http proxy setting meansJoshua Harlow
2. Adjust so file contents will join with a string instead of appending to something that might not be a string
2012-06-16Clean up this log statement to be more useful.Joshua Harlow
2012-06-16Allow file rendering to pass in a file permission when writing.Joshua Harlow
2012-06-16Adjust how config is extracted in that it now can be extracted via 3 ↵Joshua Harlow
different modes. 1. Restricted - which doesn't give back the system info (used by handlers/transforms/public cfg api) 2. System - which only gives back the system info (used by distro class) 3. Paths - gives back only the system/path info (used by the path class)
2012-06-16Fix pylint line length to big issue.Joshua Harlow
2012-06-16For now just stick to using newline joining.Joshua Harlow
2012-06-161. Remove content handler iid param, not used.Joshua Harlow
2. Ensure if iid is found that it is converted to a string before path joining.
2012-06-16Have the contents formed on a previous line which seems prettier.Joshua Harlow
2012-06-161. Remove path function, since we have a path classJoshua Harlow
2. Be explict with file perms (even though its duplicated)
2012-06-16Cleanups around the usage of the apt pipe line value.Joshua Harlow
1. Add a comment onto why this is done 2. Fix the usage of range to search the list and not a string 3. Make the filecontents template just one multiline variable.
2012-06-16Some simple fixes that will make the python 3 translation easierJoshua Harlow
2012-06-16Some simple fixes that will make the python 3 translation easierJoshua Harlow
2012-06-16Some simple fixes that will make the python 3 translation easierJoshua Harlow
2012-06-16Only set an env variable for instance id if we actually got one.Joshua Harlow
2012-06-16Adjust the usage of map items() to iteritems() which will help later ↵Joshua Harlow
translation to python 3.
2012-06-16Adjust the usage of map items() to iteritems() which will help later ↵Joshua Harlow
translation to python 3.
2012-06-16Adjust the usage of map items() to iteritems() which will help later ↵Joshua Harlow
translation to python 3.
2012-06-161. Add in one function that will do output redirection from config for a ↵Joshua Harlow
given mode. 2. Adjust the usage of items() to iteritems() which will help translation to python 3.
2012-06-16Add the running of 2to3 via the makefile.Joshua Harlow
2012-06-15Fixups to ensure that pylint does not find anything major wrong.Joshua Harlow
2012-06-15Ensure that this directory is treated as a module.Joshua Harlow
2012-06-15Self variable missingJoshua Harlow
2012-06-15Variable name mismatchJoshua Harlow
2012-06-15Cleanup and renaming that should mostly complete this new module.Joshua Harlow
1. Renamed config to modules, then renamed to transforms 2. Enabled checking of transform frequencies before usage (warning the user that something is bad) 3. Adjusting how the cloud object is formed to comply with its new api.
2012-06-15Update comment about distro handling its timezoneJoshua Harlow
2012-06-15Inclusion of more utility functions included:Joshua Harlow
1. Adjustments to using more selinux guards around directory creation, chmod... 2. Adding util functions to check if values are false or true (used internally and externally) 3. Move find_devs_with to util.py and allow it to serve multiple use cases 4. Add fork_cb which will fork a process and then call a certain callback (used right now by the resize nonblocking mode) 5. Move functions that performed time_rfc2822 time fetching and uptime fetching to here. 6. Allow the subp util function to act in shell mode 7. Increase logging usefulness in shellify function
2012-06-151. Modify the check http code function to allow or not allow redirect status ↵Joshua Harlow
from being valid codes. 2. Log how much we will sleep for 3. If not headers are provided, add a set which will have a cloud init user agent + version
2012-06-15Ensure when an exception is captured that we use the util.logexc helper.Joshua Harlow
2012-06-15Complete initial cleanup for refactoring/rework.Joshua Harlow
Some of the cleanups were the following 1. Using standard (logged) utility functions for sub process work, writing, reading files, and other file system/operating system options 2. Having distrobutions impelement there own subclasses to handle system specifics (if applicable) 3. Having a cloud wrapper that provides just the functionality we want to expose (cloud.py) 4. Using a path class instead of globals for all cloud init paths (it is configured via config) 5. Removal of as much shared global state as possible (there should be none, minus a set of constants) 6. Other various cleanups that remove transforms/handlers/modules from reading/writing/chmoding there own files. a. They should be using util functions to take advantage of the logging that is now enabled in those util functions (very useful for debugging) 7. Urls being read and checked from a single module that serves this and only this purpose (+1 for code organization) 8. Updates to log whenever a transform decides not to run 9. Ensure whenever a exception is thrown (and possibly captured) that the util.logexc function is called a. For debugging, tracing this is important to not just drop them on the floor. 10. Code shuffling into utils.py where it makes sense (and where it could serve a benefit for other code now or in the future)
2012-06-15Complete cleanup for refactoring/rework that makes it comptabile with the ↵Joshua Harlow
new structure, using unified util functions, logging and eliminating code and calls.
2012-06-15Update applying network esttings to use the distro function to handle this, ↵Joshua Harlow
use logexc instead of log.exception
2012-06-15Split up time calculation, use logexc instead of log.exceptionJoshua Harlow
2012-06-15Add more comments around what the settings mean, add in a list that can be ↵Joshua Harlow
used to check if user provided frequencies are actually valid or not
2012-06-15Logic test on split up line length (just incase).Joshua Harlow
Removed un-used pre debug info option, since this is not used in the prettytable case.
2012-06-15Ensure that the root logger is manipulated instead of just the cloudinit ↵Joshua Harlow
logger, show how many configs were tried if none succeeded, and for basic logging setup try to mirror more of what is in the default configuration file if all else fails
2012-06-151. Handle returning values from handlers better.Joshua Harlow
2. Throw lock specific exception when semaphores can't be obtained 3. Make the paths constructor config variable named better to its actual usage.
2012-06-15Moved as many distro specific actions to here as should be needed. Joshua Harlow
Mainly this is the following: 1. Hostname updating 2. Package command invocation 3. Network settings writings 4. Timezone setting (needs cleanup)
2012-06-15Change variable names to reflect usage correctlyJoshua Harlow
2012-06-15Continued adding distro specific functionality to this new parent distro ↵Joshua Harlow
class as needed.
2012-06-15Instead of having the cloud pass large references to its constructor, this ↵Joshua Harlow
has been reduced to actual objects. Added a get template filename helper which can be used to locate template files for various handlers/transforms. Ensured that the config that we give back out is copied, so that it can't be modified by any 'malicous' handlers/transforms. Added helper method cycle_logging that can resetup logging, this is mainly used by the rsyslog transform.
2012-06-15Continued adding more comments about what each section/option does.Joshua Harlow
Continued adding more system info sections as needed for various components. Enabled the welcome transform.