summaryrefslogtreecommitdiff
path: root/cloudinit/distros/rhel.py
AgeCommit message (Collapse)Author
2015-01-06tools/run-pep8: remove leading ',' fed to --ignoreScott Moser
--ignore was being called with ',E121,E...' rather than 'E121,E...'. that resulted in odd behavior, missing the pep8 errors that are fixed here.
2014-11-25Update with trunk and resolve conflictsJoshua Harlow
2014-11-21Added unittests for IPv6 support for RHELShraddha Pandhe
2014-11-21Add IPv6 Support for Rhel.Shraddha Pandhe
This patch does the following: 1. Adds support to process network config with IPv6 2. Adds support to display 'ifconfig -a' information for IPv6 3. Adds support to display routing information for IPv6
2014-10-17Allow the usr/lib/exec to vary and still work with write_keysJoshua Harlow
2014-10-17Expose uses_systemd as a distro functionJoshua Harlow
Without this change the tests are currently failing on rhel7 since a location where a hostname file is written no longer exists at that location when systemd is active. To avoid this allow the test to inspect if the distro has systemd enabled and avoid testing the file when systemd is being used so the test passes. We likely need to figure out a better way to test features that no longer exist as files but exist as commands with systemd in general.
2014-01-23remove some white spaceScott Moser
2014-01-22Split net-parsing into own moduleJoshua Harlow
The ubuntu/debian networking file parsing function really is more generic than just a rhel utility function and can be used by others that want to use this functionality for there own purposes (say in writing down a freebsd network format instead) so moving this to its own module to encourage its usage outside of rhel.
2013-08-06fix pep8 and pylint warningsScott Moser
2013-07-24Remove duplicate timezone file finding and error raising.Joshua Harlow
2013-06-27Remove 'Copyright SUSE' from the headersJuerg Haefliger
Per discussion with Robert @ SUSE since he can't sign the CCA.
2013-06-25Move some RHEL distro methods to their own new fileJuerg Haefliger
So that they can be used by other handlers.
2013-06-19fix and cleanup usage of util.logexcJuerg Haefliger
2013-03-26compatibility fixes for Fedora and RHELGreg Padgett
This patch fixes issues in Fedora 18 (and upcoming RHEL 7) which are present due to their use of systemd: - store locale configuration in /etc/locale.conf - store hostname in /etc/hostname - use a symlink for /etc/localtime (prior code would set the timezone but corrupt data in /usr/share/zoneinfo due to presence of symlink) It also contains fixes for issues unrelated to systemd adoption: - explicitly scan /dev/sr0 with blkid in order to get the optical drive in the blkid cache. This prevents an issue on systems running 2.6 kernels (such as RHEL 6) in which config disks on some devices won't be detected unless the device has previously been queried. (For reference, see https://patchwork.kernel.org/patch/1770241/) - append a newline when rewriting sysconfig files, as this is customary text configuration file formatting and is expected by some parsers (such as the ifcfg-rh plugin for NetworkManager)
2013-03-07pep8 and pylint fixesScott Moser
2013-01-27Adding package versioning logic to package_commandCraig Tracey
This change adds the ability to provide specific package versions to Distro.install_packages and subsequently Distro.package_command. In order to effectively use Distro.install_packages, one is now able to pass a variety of formats in order to easily manage package requirements. These are examples of what can be passed: - "package" - ["package1","package2"] - ("package",) - ("package", "version") - [("package1",)("package2",)] - [("package1", "version1"),("package2","version2")] This change also adds the option to install a specific version for the puppet configuration module. This is especially important here as successful puppet deployments are highly reliant on specific puppet versions.
2013-01-15add support for operating system familiesctracey
often it is convenient to classify a distro as being part of an operating system family. for instance, file templates may be identical for both debian and ubuntu, but to support this under the current templating code, one would need multiple templates for the same code. similarly, configuration handlers often fall into the same bucket: the configuraton is known to work/has been tested on a particular family of operating systems. right now this is handled with a declaration like: distros = ['fedora', 'rhel'] this fix seeks to address both of these issues. it allows for the simplification of the above line to: osfamilies = ['redhat'] and provides a mechanism for operating system family templates.
2012-11-12Pylint and pep8 cleanups.Joshua Harlow
2012-11-12Rebased with HEAD and resolved conflicts.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-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 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-25Resync with head.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-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-20Add a resolv.conf parser that can be easilyJoshua Harlow
used for adjusting a resolv.conf formatted file and use this to adjust the resolv.conf in the redhat distro instead of replacing the previous resolv.conf completely.
2012-09-19Use a common header creation functionJoshua Harlow
to avoid duplicating the same code in this file.
2012-09-19Rework the rhel sysconfig writing/updatingJoshua Harlow
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-19Fix the ifup so that if a list of devices is providedJoshua Harlow
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-19fix 'update_package_sources' on rhel to only update package sourcesGarrett Holmstrom
update_package_sources on RHEL called "yum update", which actually upgrades packages on the system. Thix fix makes it instead call "yum makecache" instead.
2012-09-19Add the translation from the ubuntu format for nameservers and dns searchJoshua Harlow
servers and add in the writing of /etc/resolv.conf in rhel from that translation.
2012-09-19Actually download yum metadata with update_package_sourcesGarrett Holmstrom
2012-09-18Make update_package_sources stop upgrading packages on RHELGarrett Holmstrom
2012-08-22fix pep8 complaints.Scott Moser
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
2012-08-10Add the translation from the ubuntu format for nameservers and dns searchJoshua Harlow
servers and add in the writing of /etc/resolv.conf in rhel from that translation.
2012-06-29Include the helpers import.harlowja
2012-06-29add update_package_sources to distro classScott Moser
Previously update_package_sources was a private class (_update_package_sources). The apt_update_upgrade class called it. It does make sense that things would want to call this independently of installing packages. Therefore, expose it as a non hidden method.
2012-06-221. Adjust for the cases of 'yes', 'no', 'true', 'false' byJoshua Harlow
leaving those unquoted 2. Add more comments as to why we are leaving single quoted strings alone.
2012-06-221. Fix the cfgobj to make sure it handles the quotingJoshua Harlow
of the keys and values in sysconfig specially by ensuring that it does the quoting so that the files written out can be sourced into bash scripts, which is typically what these files are used for.
2012-06-22Use configobj support for now to keep the comments and other k/v pairs that ↵Joshua Harlow
may already exist in these files
2012-06-21Use RuntimeError subclass instead of top level ExceptionJoshua Harlow
2012-06-21Updated so that the locale that is being written out currently in 'cc_locale'Joshua Harlow
now will be done by the distro classes (since its not the same for rhel and ubuntu). Remove the template also since it will just be created by the ubuntu distro class (its just one line).
2012-06-20Massive pylint + pep8 fixups!Joshua Harlow
2012-06-19Pylint line length fixups.Joshua Harlow
2012-06-19More cleanups around read/write rootsJoshua Harlow