Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
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
|
|
These changes were pulled out of the previous merge (cc_yum_add_repo)
as they were unrelated there. Re-applying them here.
|
|
|
|
when that group configuration is a dict => members.
LP: #1077245
|
|
|
|
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
|
|
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.
|
|
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.
|
|
users groups function when
its provided by the get user
function.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
variables adjusted in sysconfig files are
properly quoted for there common use case,
that being sourced into shell scripts.
|
|
|
|
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.
|
|
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).
|
|
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.
|
|
and is not a part of a comment or other
part of the line.
|
|
a little more relevant.
|
|
|
|
file is being added actually exists before it
is written into and ensure that the directory
is included in the main sudoers file.
|
|
|
|
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.
|
|
|
|
before we start iterating over it (it could
be sent is as none).
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
device name, throw an error since rhel can not currently
handle this case.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
since it has little dependence on the distros
class itself. Readjust the using code to use
this new module level function instead.
|