Age | Commit message (Collapse) | Author |
|
|
|
resize_devices now contains what action occurred for each entry.
|
|
growrun --dry-run will exit 1 if it wouldn't do anything.
so call it, check for '1' and if no change, then just return.
|
|
|
|
|
|
|
|
Now, parser.parse specifies options that override any options found,
rather than just being default options.
There could still potentially be a user for default_options, but since we're
not using them anywhere, I've dropped it. The difference is that in setting up
the root user, we're now insisting that all keys that go in there have the
key_prefix, even if the key content had other options.
I think this is actually the commit that fixes LP: #1136343.
|
|
* drop the parsing of options into csv, as we were only exploding them
back. That can only result in error. Just do minimal parsing.
* change the parsing of key lines to:
if entry is valid:
* use it
else try taking off options:
if good, use it
else fail
|
|
|
|
|
|
|
|
When the old user: style entry is found, don't forget that
we need to use the distro settings that are provided but
override the name with the new name, this is now accomplished
by merging them together in the correct order (using the standard
cloud-init merging algo).
|
|
Previously if a legacy user: XYZ entry was found, XYZ would not automatically
be promoted to the default user but would instead just be added on as a new
entry to the normalized user list. It appears the behavior that is wanted is
for the XYZ entry to be added on as the default user (thus overriding a distro
provided default user), which better matches how the code previous worked.
LP: #1100920
|
|
previously, there was an attempt in the config drive source to limit
the source device to a "full block device" rather than a partition.
This was done by a simplistic approach of checking that the last
character of the name was not a number. That was filtering out
CD-rom devices (sr0).
Now, we have a bit more sophisticated approach to that same problem.
We filter out block devices that have a 'partition' entry in
/sys/class/block/DEVICE_NAME/partition .
LP: #1100545
|
|
This function can be used to ensure that mocker objects
are restored and verified during usage if exceptions are
thrown while the mock object is being used.
Ensure it is used in the config drive test when multiple
mock objects are being created and restored.
LP: #1098430
|
|
Invoking 'initctl reload-configuration' is only required if inotify
does not work. overlayroot does not support inotify. So, we just
call initctl always, which wont hurt anything.
LP: #1080841
|
|
when /etc/ca-certificates.conf is read by update-ca-certificates
lines after a blank line get ignored. Here, ensure that
there are no blank lines, and no duplicate entries for cloud-init are
added.
LP: #1077020
|
|
|
|
|
|
|
|
|
|
- Add a helper testcase class that can add additional features into the
unit test class as we need for features that are useful to have which
starts with features that are missing including assertIn and assertNotIn
LP: #1078473
|
|
|
|
I'm guessing that
with self.assertRaises(Exception):
something here
is an acceptable form in a newer or older python. But my
python (2.7.3-0ubuntu7) doesn't like it.
Interestingly, python unittest doc says:
| Changed in version 2.7: Added the ability to use assertRaises() as
| a context manager.
|
|
|
|
|
|
|
|
This does a couple things:
* separates out the 'normalize_public_keys' from the DataSource's get_public_ssh_keys
* uses that from config-drive datasource
* supports config drive v1 or v2 public-keys
* adds a test.
LP: #1077700
|
|
These changes were pulled out of the previous merge (cc_yum_add_repo)
as they were unrelated there. Re-applying them here.
|
|
Add in a configuration module that can write out the yum.repo format for
those that want to hook into different repos for installing.
|
|
|
|
|
|
|
|
|
|
|
|
when that group configuration is a dict => members.
LP: #1077245
|
|
|
|
where rhel uses the fqdn for its config while
ubuntu uses the short hostname.
|
|
|
|
of the init class are reset so that when they are
regenerated that they will use the updated data
instead of using previous data (since they weren't reset).
LP: #1076811
|
|
and fix the cases where the cc yaml
is not correct.
|
|
2. Added example cloud-config
3. Added functioning test for yum config
|
|
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.
|
|
|
|
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.
|