~raharper/cloud-init:eni-bridge-multiline-keys

Last commit made on 2017-05-26
Get this branch:
git clone -b eni-bridge-multiline-keys https://git.launchpad.net/~raharper/cloud-init
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Branch information

Name:
eni-bridge-multiline-keys
Repository:
lp:~raharper/cloud-init

Recent commits

2b6f1a5... by Ryan Harper

Fix eni rendering for bridge parameters which require repeated key for values

There are a few bridge parameters which require repeating the key with each
value in the list when rendering eni. Extend the network unittests to cover
all of the known bridge parameters and check we render eni and netplan
correctly.

16a7302... by Dimitri John Ledkov

net: fix reading and rendering addresses in cidr format.

Input (specifically OpenStack) that had:
   "ip_address" : "104.130.20.155",
   "netmask" : "255.255.255.0"

Was being rendered to netplan as '104.130.20.155/255.255.255.0'.
That is now fixed to '104.130.20.155/24'

Also fixed is reading of a route that had a network prefix integer
in the 'netmask' rather than a netmask.

LP: #1689346
LP: #1684349

1815c6d... by Scott Moser

disk_setup: udev settle before attempting partitioning or fs creation.

This attempts to use udevadm settle to wait until devices have been
fully "realized". If a device exists, there may still be events in
the udev queue that would create its partition table entries.
We need to wait until those have been processed also.

LP: #1692093

d27c493... by Dan Watkins

GCE: Update the attribute used to find instance SSH keys.

Per the documentation at
https://cloud.google.com/compute/docs/storing-retrieving-metadata

The instance-level SSH key was named 'sshKeys' and now is 'ssh-keys'.
The project-level SSH key attribute has not changed so is intentionally
not changed here.

LP: #1693582

910ed46... by Dimitri John Ledkov

nplan: For bonds, allow dashed or underscore names of keys.

As some of the bond paramemters are passed in as dashed, or
underscored, depending on the input source.

Also correct transmit-hash-policy netplan target key.

LP: #1690480

e5b2c01... by Scott Moser

python2.6: fix unit tests usage of assertNone and format.

python2.6 unittest.TestCase does not have the assertIsNone or
assertIsNotNone. We just have to explicitly use the unittest2
version, which we get from helpers.

The desire to use assertIsNone comes from flake8 (through hacking,
I believe).

Also, fix "{}.format('foo')" which is not valid in python2.6.

9e01cca... by Scott Moser

test: update docstring on test_configured_list_with_none

Simply improve the docstring on a test added in last commit.

13673f8... by Scott Moser

fix tools/ds-identify to not write None twice.

If the user configured:
  datasource_list: ["Ec2", "None"]
then ds-identify would write
  datasource_list: ["Ec2", "None", "None"]
which would break the logic to avoid warning.

6b5369b... by Scott Moser

tox/build: do not package depend on style requirements.

When the style/checking dependencies were updated in
test-requirements.txt, the debian package build dependencies created
by ./packages/bddeb were also updated. Pycodestyle was added to the list
in order to pin its version. That broke the package build for 16.04. The
reason for this is simply that python3-pycodestyle is not available in
16.04.

The change here is to remove style dependencies from test-requirements,
and add them to the tox environments directly. We had previously changed
the package build process to not run pep8 or flake8 simply to avoid having
to code to N different versions of style checkers (3bcb72c593f).

The link between package build and test-requirements still exists, though.
So future breakage can occur if any package is added to
test-requirements.txt (or requirements.txt) if the target distro release
does not have a python3-<packagename> in its archive.

There is also a bit of a tox.ini cleanup here, in that we do not have to
explictly list '-rrequirements.txt' as the setup.py pulls those in. And
lastly, we drop the -rtest-requirements.txt from the base 'testenv', and
add these test requirements only to environments that need to run test.

Finally, a change to packages/debian/control.in to drop the build
dependencies that were listed for style checking and also a dependency
on iproute2 which was a bad unit test that has been previously fixed.

fd0c88c... by Chad Smith

cc_ntp: Restructure cc_ntp unit tests.

Any CiTestCase subclass can now set a class attribute with_logs = True and
tests can now make assertions on self.logs.getvalue(). This branch
restructures a bit of cc_ntp module to get better test coverage of the
module. It also restructures the handler_cc_ntp unit tests to avoid nested
mocks where possible. Deeply nested mocks cause a couple of issues:
  - greater risk: mocks are permanent within the scope, so multiple
    call-sites could be affected by package mocks
  - less legible tests: each mock doesn't advertise the actual call-site
  - tight coupling: the unit test logic to tightly bound to the actual
    implementation in remote (unrelated) modules which makes it more
    costly to maintain code
  - false success: we should be testing the expected behavior not specific
    remote method names as we want to know if that underlying behavior
    changes and breaks us.

LP: #1692794