Merge lp://staging/~mpontillo/maas/ip-allocation-fixes-trunk into lp://staging/~maas-committers/maas/trunk

Proposed by Mike Pontillo
Status: Merged
Approved by: Mike Pontillo
Approved revision: no longer in the source branch.
Merged at revision: 4547
Proposed branch: lp://staging/~mpontillo/maas/ip-allocation-fixes-trunk
Merge into: lp://staging/~maas-committers/maas/trunk
Diff against target: 982 lines (+548/-54)
15 files modified
.idea/encodings.xml (+3/-1)
.idea/maas.iml (+1/-1)
.idea/misc.xml (+1/-1)
.idea/vcs.xml (+0/-6)
src/maasserver/api/devices.py (+17/-7)
src/maasserver/api/tests/test_devices.py (+133/-0)
src/maasserver/models/interface.py (+98/-20)
src/maasserver/models/node.py (+5/-1)
src/maasserver/models/nodegroupinterface.py (+37/-3)
src/maasserver/models/staticipaddress.py (+9/-4)
src/maasserver/models/subnet.py (+8/-1)
src/maasserver/models/tests/test_interface.py (+115/-5)
src/maasserver/models/tests/test_nodegroupinterface.py (+35/-0)
src/maasserver/testing/factory.py (+14/-4)
utilities/remote-reinstall (+72/-0)
To merge this branch: bzr merge lp://staging/~mpontillo/maas/ip-allocation-fixes-trunk
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+279652@code.staging.launchpad.net

Commit message

Merge revision 4520 from MAAS 1.9 (IP allocation fixes, bug #1519090, bug #1519077)

To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

So for trunk/xenial... I assume remote-reinstall should use /usr/lib/python3.5/dist-packages. Is that correct? Is there a way to determine this at runtime, so I don't have to guess? I looked in the packaging branch but it wasn't obvious. We have lines like this in the *.install files:

debian/tmp/usr/lib/python*/dist-packages/maasserver

But I don't know how it determines how to get the appropriate python version.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

It should be /usr/lib/python3/dist-packages the "3.5" is not used for python 3 its just "3".

This will not pass in the new python3 landed you cannot use json.loads directly in the tests. A helper has been created for this:

from maasserver.utils.converters import json_load_bytes

json_load_bytes(response.content)

This is because response.content is a bytes object not a unicode string and json.loads only accepts unicode strings. That helper decodes the response.content from a bytes string in to a unicode string using the settings.DEFAULT_CHARSET.

review: Needs Fixing
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Blake, I think this is ready for another look. Thanks in advance.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Thanks for the fixes.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.