Age | Commit message (Collapse) | Author |
|
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.
|
|
Add a new example test that will patch utils and os
functions so that they can be 'retargeted' to a temporary
directory, which allows us the ability to run a full set
of cloud-init stages.
Neat things:
1. All cloud-init code is unchanged (as long as it goes
through the utils functions for most functionality)
2. Allows for a natural way to setup a temporary directory
then patch the new directory as the new 'root' and then
run cloud-init stages and then check the contents of
what was placed as desired.
Note:
This is now exposing what I think was just an issue in
./tools/run-pylint.
./tools/run-pylint ./tests/unittests/test_filters/test_launch_index.py
and
./tools/run-pylint ./tests/unittests/test_simple_run
was always failing, but now I'm seeing errors.
need to fix that. any tests that 'import helper' have issues.
|
|
|
|
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.
|
|
|
|
Also fix the extraction of the metadata key name
since it actually uses 'dashes' instead of being
a single word.
|
|
|
|
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.
|
|
In 0.7.0 we started using yaml.safe_load to load data rather than
yaml.load. Some producers (namely, ubuntu MAAS created) have produced
cloud-config data in the past that included python unicode types.
This creates a specialized safe_loader that is basically safe_load +
support for python unicode.
|
|
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.
|
|
|
|
|
|
functions so that they can be 'retargeted' to a temporary
directory, which allows us the ability to run a full set
of cloud-init stages.
Neat things:
1. All cloud-init code is unchanged (as long as it goes
through the utils functions for most functionality)
2. Allows for a natural way to setup a temporary directory
then patch the new directory as the new 'root' and then
run cloud-init stages and then check the contents of
what was placed as desired.
|
|
|
|
|
|
|
|
|
|
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.
|
|
since it has little dependence on the distros
class itself. Readjust the using code to use
this new module level function instead.
|
|
|
|
separated list so that its types match more of
what the group list can be.
|
|
normalization instead of forgetting about it.
|
|
1. Docs for launch-index + examples
2. Tests for launch-index + data files
3. Fixing a bug with cloud-archive yaml types allowed (likes a tuple not a list
for some reason) (LP: #1044594)
4. Setting the 'part' content-type if what we actually use is different.
LP: #1044594
|
|
|
|
2. Add a set of tests+data that ensure the launch index filtering
works as expected in the various modes including raw yaml
and via mime/email message formats.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
|
|
|
|
These changes add a new data source to cloud-init to support passing user
data to RHEVm and vSphere. The user data is passed to RHEVm v3.0 (current
version) using a floppy injection hook and to vSphere via cdrom device.
RHEVm v3.1 will use a method similar to vSphere. Once available support
for that is also expected.
|
|
|
|
https://code.launchpad.net/~joev-n/cloud-init/altcloud-changes/+merge/116542/comments/255564
https://code.launchpad.net/~joev-n/cloud-init/altcloud-changes/+merge/116542/comments/255565
|
|
|
|
The methods here have to match the real Selinux signiture, so
even though we dont use these variables.
|
|
https://code.launchpad.net/~joev-n/cloud-init/altcloud-changes/+merge/116542
|
|
|
|
|
|
|
|
1. Adjust the test_util after this mocking to be cleaner
|
|
non-per-instance mode.
|
|
comments into the files)
2. Rename consume() to consume_userdata() as it helps in figuring out what this does.
3. Fixup the tests due to #2
|
|
|
|
useful to restore, fix test to work with selinux enabled sysystems
|
|
|