Merge ~raharper/cloud-init:bug-lp-1709180-v2-params into cloud-init:master
| Status: | Merged |
|---|---|
| Merged at revision: | dc2bd79949492bccdc1d7df0132f98c354d51943 |
| Proposed branch: | ~raharper/cloud-init:bug-lp-1709180-v2-params |
| Merge into: | cloud-init:master |
| Diff against target: |
401 lines (+195/-44) 4 files modified
cloudinit/net/netplan.py (+9/-26) cloudinit/net/network_state.py (+69/-16) tests/unittests/test_distros/test_netconfig.py (+2/-2) tests/unittests/test_net.py (+115/-0) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve on 2017-08-15 | |
| Chad Smith | 2017-08-09 | Approve on 2017-08-10 | |
|
Review via email:
|
|||
Description of the Change
network: add v2 passthrough and fix parsing v2 config with parameters
If the network-config sent to cloud-init is in version: 2 format then
when rendering netplan, we can pass the content through and avoid
consuming network_state elements. This removes the need for trying to
map many v2 features onto network state where other renderers won't be
able to use anyhow (for example match parameters for multi-interface
configuration and wifi configuration support).
Additionally ensure we retain bond/bridge v2 configuration in network
state so when rendering to eni or sysconfig we don't lose the configuration
- Drop the NotImplemented wifi exception, log a warning that it works for
netplan only
- Adjust unittests to new code path and output
- Fix issue with v2 macaddress values getting dropped
- Add unittests for consuming/
LP: #1709180
| Chad Smith (chad.smith) wrote : | # |
Approved with minor nits questions inline. +1!
Validated and inspected netplan output with the following:
PYTHONPATH=. ./tools/
Prior to this branch netplan output was empty/broken:
cat out2.d/
network:
version: 2
ethernets:
ens4: {}
eth0: {}
| Ryan Harper (raharper) wrote : | # |
Thanks for the review, will fix the bikeshed name. Not sure how to do a py2/py3 iterator cleanly; list isn't huge though. I'm going to push another update to this branch to address more v2 -> v1 -> v2 issues found and instead allow the netplan renderer to write out the original v2 config.
PASSED: Continuous integration, rev:fb634903af3
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:c3c19526bee
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:dc2bd799494
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/


PASSED: Continuous integration, rev:09863394a21 19a9e91d34abdfa b7e2f14205d053 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 131/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 131/rebuild
https:/