Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
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
|
|
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.
|
|
of this function that needs to occur since
its pretty much the same now.
|
|
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
|
|
preparation for having a new branch
for all of these changes.
|
|
|
|
device name, throw an error since rhel can not currently
handle this case.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
to avoid duplicating the same code in
this file.
|
|
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.
|
|
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.
|
|
update_package_sources on RHEL called "yum update", which actually
upgrades packages on the system. Thix fix makes it instead call "yum
makecache" instead.
|
|
servers and add in the writing of /etc/resolv.conf in rhel from that
translation.
|
|
|
|
|
|
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
|
|
servers and add in the writing of /etc/resolv.conf in rhel from that translation.
|
|
|
|
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.
|
|
leaving those unquoted
2. Add more comments as to why we are leaving single quoted
strings alone.
|
|
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.
|
|
may already exist in these files
|
|
|
|
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).
|
|
|
|
|
|
|
|
with non-real read/write paths is easier.
|
|
|
|
1. Translate (some of) the ubuntu network format to the rhel format (until we have python netcf active) and
then write the different ifcfg files to /etc/sysconfig/network-scripts as needed to bring the network online
2. Apply the hostname to the write /etc/sysconfig/network file (appending to it or adjusting that file if it exists)
3. Write to the /etc/sysconfig/clock file to adjust the timezone (or adjust that file instead of appending)
4. Runs yum commands (to match the packaging commands in the apt-get flavor)
5. Update the hostname in /etc/sysconfig/network (or a previous file) for the update hostname transform
|