summaryrefslogtreecommitdiff
path: root/cloudinit/distros
AgeCommit message (Collapse)Author
2012-11-12Remove these lines which are not needed.Joshua Harlow
2012-11-12Pylint and pep8 cleanups.Joshua Harlow
2012-11-12Fix variable.Joshua Harlow
2012-11-12Rebased with HEAD and resolved conflicts.Joshua Harlow
2012-11-12Cleanup of /etc/hosts ordering and pep8/pylint adjustments.Joshua Harlow
Fix how the comparison of a fqdn and its aliases was done via sorting instead of existence checking which is the better way to check if a alias already exists as well as cleanup the new files pep8/pylint issues. LP: #1078097
2012-11-10whitespace / indentation cleanupsScott Moser
These changes were pulled out of the previous merge (cc_yum_add_repo) as they were unrelated there. Re-applying them here.
2012-11-10Sudoers.d creation cleanups + tests.Joshua Harlow
2012-11-09Fix the merging of group configurationJoshua Harlow
when that group configuration is a dict => members. LP: #1077245
2012-11-09Fix pep8 warnings.Joshua Harlow
2012-11-08Fix the case where on a redhat based systemJoshua Harlow
the fully qualified domain name should end up in /etc/sysconfig/network by passing the fqdn to the update and set hostname methods and using it accordingly. LP: #1076759
2012-10-27Helpful cleanups.harlowja
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
2012-10-23use only util methods for reading/loading/appending/peekingScott Moser
Use only util methods for reading/loading/appending/peeking at files since it is likely soon that we will add a new way of adjusting the root of files read, also it is useful for debugging to track what is being read/written in a central fashion.
2012-10-23No need for the get defaultJoshua Harlow
users groups function when its provided by the get user function.
2012-10-23Make sure that /etc/sudoers.d is used by /etc/sudoersScott Moser
Create /etc/sudoers.d if not present. Attempt to determine if /etc/sudoers.d will be used by /etc/sudoers. If determined not, then add a line to /etc/sudoers.
2012-10-23fix pep8/pylintScott Moser
2012-10-23move default user info out of code and into configScott Moser
Remove the need to have 'default_user' and 'default_user_groups' groups be hard coded into the distro class, instead let that set of configuration be located in the config file where it should be specified instead.
2012-10-11Add some more sysconfig tests + pylint cleanups.Joshua Harlow
2012-10-11Fix the single item string quoting function.Joshua Harlow
2012-10-11Handle the case where the value contains shellJoshua Harlow
variables to be expanded which when using pipes.quote will now not be expanded, so add some checks to ensure that this case will still happen.
2012-10-11Update to use pipes.quote to ensure that Joshua Harlow
variables adjusted in sysconfig files are properly quoted for there common use case, that being sourced into shell scripts.
2012-10-11Update log message to use the more appropriate 'non-persistently' wording.Joshua Harlow
2012-10-11More adjustments/cleanups for the system configurationJoshua Harlow
helper objects. 1. Add in a parser for the /etc/hostname file that can be shared 2. Adjust the sysconfig configobj parser to not always quote fields that it does not need to quote + add in tests around this to ensure that we don't go nuts with quoting again.
2012-10-10Add comment explaining why the '_apply_hostname'Joshua Harlow
function will not be permanent and catch the exception that occurs if it fails and log that instead of blowing up (which isn't typically useful for something that is temporary anyway).
2012-10-10Add comments as to a future refactoringJoshua Harlow
of this function that needs to occur since its pretty much the same now.
2012-10-10System config niceness!Joshua Harlow
1. Move out the old helpers that provided oop access/reading/writing to various standard conf files and place those in parsers instead. 2. Unify the 'update_hostname' which varied very little between distros and make it generic so that subclasses can only provide a couple of functions to obtain the hostname updating functionality 3. Implement that new set of functions in rhel/debian 4. Use the new parsers chop_comment function for similar use cases as well as add a new utils make header function that can be used for configuration files that are newly generated to use (less duplication here of this same thing being done in multiple places. 5. Add in a distro '_apply_hostname' which calls out to the 'hostname' program to set the system hostname (more duplication elimination). 6. Make the 'constant' filenames being written to for configuration by the various distros be instance members instead of string constants 'sprinkled' throughout the code
2012-10-10Merge the resolv.conf branch inJoshua Harlow
preparation for having a new branch for all of these changes.
2012-09-30Ensure that the include dir starts the lineJoshua Harlow
and is not a part of a comment or other part of the line.
2012-09-28Update the log statement used here to beJoshua Harlow
a little more relevant.
2012-09-28Dir should be 0755, not 0440Joshua Harlow
2012-09-28Ensure that the directory where the sudoersJoshua Harlow
file is being added actually exists before it is written into and ensure that the directory is included in the main sudoers file.
2012-09-28Sync with head and fix conflicts.Joshua Harlow
2012-09-28Rework the rest of the locations that usedJoshua Harlow
the previous 'user' and make those locations go through the new distros functions to select the default user or the user list (depending on usage). Adjust the tests to check the new 'default' field that signifies the default user + test the new method to extract just the default user from a normalized user dictionary.
2012-09-28rpm spec and rpm build, better handle case with no package_mirrorsJoshua Harlow
2012-09-28Also ensure that if mirror info is not invalidJoshua Harlow
before we start iterating over it (it could be sent is as none).
2012-09-28Stop the bad habit of using 'or'.Joshua Harlow
2012-09-27cleanup the user/group listsJoshua Harlow
The primary utility here is normalize_user_groups, which would be called by config modules to get a list of users or groups. This centralizes what was copied code into this one location.
2012-09-25Resync with head.Joshua Harlow
2012-09-25Allow package_mirrors to be non-existent.Joshua Harlow
2012-09-24Avoid rechecking if old users is availabile.Joshua Harlow
2012-09-24Handle the case where 'user' is defined but 'users' isn't.Joshua Harlow
2012-09-24Add a netconfig format test + if rhel is passed the 'all'Joshua Harlow
device name, throw an error since rhel can not currently handle this case.
2012-09-24Update to bring inline with trunk/head.Joshua Harlow
2012-09-24Refactor the ug normalization to take in a distroJoshua Harlow
and produce a user and group list. Clean this up to be simpler as well as handle the old 'user' case when it exists in configuration.
2012-09-24cleanups for rhel network configJoshua Harlow
Rework the rhel sysconfig writing/updating so that it goes through a single function which helps ensure correctness. Also write to /etc/sysconfig/network when we have written out devices to ensure that networking is on.
2012-09-24fix pep8Scott Moser
2012-09-24Oopies, missed u.Joshua Harlow
2012-09-24Bring up to date with trunk.Joshua Harlow
2012-09-24handle ifup on RH distros by iterating over 'ifup devname'Joshua Harlow
Fix the ifup so that if a list of devices is provided then each interface is brought up individually instead of using the '--all' which isn't on rhel. The default debian behavior will be to use this still though as it overrides the new bring up interfaces function for this case.
2012-09-24fix make pep8Scott Moser
2012-09-23Make the normalization a module level functionJoshua Harlow
since it has little dependence on the distros class itself. Readjust the using code to use this new module level function instead.