~chcheng/cloud-init:master

Last commit made on 2020-04-29
Get this branch:
git clone -b master https://git.launchpad.net/~chcheng/cloud-init
Only cheng cheng can upload to this branch. If you are cheng cheng please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:~chcheng/cloud-init

Recent commits

03aed95... by Chad Smith

Release 20.2 (#337)

Bump the version in cloudinit/version.py to 20.2 and
update ChangeLog.

LP: #1875951

32338f5... by Dan Watkins

doc/format: reference make-mime.py instead of an inline script (#334)

`make-mime.py` is a more recent version of the inline script that this
link is replacing.

b70f110... by Adrian Wilkins <email address hidden>

Add docs about creating parent folders (#330)

Clarify in documentation that write_files will create parent folders
for paths that do not already exist.

This obfuscates what the problem is when people erroneously create
files in /tmp despite the warnings in the documentation not to do so.
People naturally assume that their file is absent because the parent folder
did not exist for it to be created in, causing them to add a runcmd block
to create the folder, even though execution order means that this will not
occur until after write_files have all finished.

f5e1d67... by Dan Watkins

DataSourceNoCloud/OVF: drop claim to support FTP (#333)

I don't believe this has ever been supported, looking at the git
history, but it certainly isn't at the moment.

LP: #1875470

429c1ab... by Dan Watkins

schema: ignore spurious pylint error (#332)

The line in question is in the code path handling older versions of
jsonschema. In that context it _is_ correct, but when pylint analyses
it against the latest jsonschema it (incorrectly) detects an error.

61a1924... by Chad Smith

schema: add json schema for write_files module (#152)

Add schema definition to cc_write_files.py

Cloud-config containing write_files config directives will now
emit warnings for invalid config keys or values for the write_files
module.

Add an extension to JSON schema's draft4validator to permit either
binary or text values for 'string' objects.

This allows for JSON schema validating the YAML declaration of binary
valiues in cloud-config using YAML's '!!binary' syntax.

Add the ability to pass a specific module name to
`cloud-init devel schema --docs <module_name>|all` to optionally
limit doc output during development to a single schema doc.

72f6eb0... by Gonéri Le Bouder

BSD: find_devs_with_ refactoring (#298)

Refactoring of the `find_devs_with_*bsd()` methods:

- centralize everything in `util.py`
- add test coverage

e449996... by Gonéri Le Bouder

nocloud: drop work around for Linux 2.6 (#324)

These two lines were a requirement for RHEL6, and they have been added 7
years ago:

- https://github.com/canonical/cloud-init/commit/984c72e522c585c6d3f6b3d3aec39fb21dd84028
- https://github.com/canonical/cloud-init/commit/48a3b4ca0ba55699825d6eabe75d843286c23545

RHEL6 comes with Python 2.6, since Python3 is now a strong requirement, I
think it's safe to remove.

38a7e6e... by Dan Watkins

cloudinit: drop dependencies on unittest2 and contextlib2 (#322)

These libraries provide backports of Python 3's stdlib components to Python 2. As we only support Python 3, we can simply use the stdlib now. This pull request does the following:

* removes some unneeded compatibility code for the old spelling of `assertRaisesRegex`
* replaces invocations of the Python 2-only `assertItemsEqual` with its new name, `assertCountEqual`
* replaces all usage of `unittest2` with `unittest`
* replaces all usage of `contextlib2` with `contextlib`
* drops `unittest2` and `contextlib2` from requirements files and tox.ini

It also rewrites some `test_azure` helpers to use bare asserts. We were seeing a strange error in xenial builds of this branch which appear to be stemming from the AssertionError that pytest produces being _different_ from the standard AssertionError. This means that the modified helpers weren't behaving correctly, because they weren't catching AssertionErrors as one would expect. (I believe this is related, in some way, to https://github.com/pytest-dev/pytest/issues/645, but the only version of pytest where we're affected is so far in the past that it's not worth pursuing it any further as we have a workaround.)

7276aa5... by Dan Watkins

distros: handle a potential mirror filtering error case (#328)

As written, it's possible that the first transformation for a mirror
hostname could be passed None if the parsed mirror URL didn't have a
hostname component, when the defined interface is that the
transformations will be passed strings.

This isn't an error currently, because the first transformation happens
to gracefully handle being passed None. It returns None, so the
pipeline processing ends there.

This was caught when testing out mypy on the cloud-init codebase.