Merge ~smoser/cloud-init:cleanup/mask2cidr into cloud-init:master
| Status: | Merged |
|---|---|
| Merged at revision: | d00da2d5b0d45db5670622a66d833d2abb907388 |
| Proposed branch: | ~smoser/cloud-init:cleanup/mask2cidr |
| Merge into: | cloud-init:master |
| Diff against target: |
459 lines (+215/-81) 6 files modified
cloudinit/net/eni.py (+4/-0) cloudinit/net/netplan.py (+6/-8) cloudinit/net/network_state.py (+194/-50) cloudinit/net/sysconfig.py (+7/-16) tests/unittests/test_distros/test_netconfig.py (+2/-3) tests/unittests/test_net.py (+2/-4) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ryan Harper | 2017-05-26 | Approve on 2017-06-08 | |
| Server Team CI bot | continuous-integration | Approve on 2017-06-08 | |
| Chad Smith | 2017-05-26 | Pending | |
|
Review via email:
|
|||
Commit Message
net: normalize data in network_state object
the network_state object's network and route keys would have different
information depending upon how the network_state object was populated.
This change cleans that up. Now,
* address will always contain an IP address.
* prefix will always include an integer value that is the network_prefix
for the address.
* netmask will be present only if the address is ipv4, and its
value will always correlate to the 'prefix'.
TODO: maybe this will be present also for ipv6
PASSED: Continuous integration, rev:a82f9c9f424
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:bd25fa44966
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Chad Smith (chad.smith) wrote : | # |
looks much better thanks for this. minor inlines below
| Scott Moser (smoser) wrote : | # |
responded to rharper's comments. i think he reviewed an older version though.
| Scott Moser (smoser) wrote : | # |
thanks for the reviews.
| Scott Moser (smoser) wrote : | # |
bunch of fixes in tree now. i thikn i addressed all feedback.
PASSED: Continuous integration, rev:4e2c9e4a2c4
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
i've just rebased on master.
PASSED: Continuous integration, rev:c2fc5a9d796
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
fixed all that round of comments.
PASSED: Continuous integration, rev:686a9196865
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
we decided that we should add the 'netmask' field to ipv6 addresses also.
the 'ipaddress' module can help with generating this in python3, but it is not present in python2.7.
Mostly mentioning that for use in developing to make sure you're right.
PASSED: Continuous integration, rev:f81661fa217
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Ryan Harper (raharper) wrote : | # |
I'm ok with adding ipv6 'netmask' bits later. I'm happy with this clean-up as is.


PASSED: Continuous integration, rev:18d678aecba cd3eb2554a8520e e917ea709fb72e /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 413/ /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- amd64/413 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- arm64/413 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- ppc64el/ 413 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- s390x/413 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=vm- i386/413
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 413/rebuild
https:/