[2.2, trunk] Spaces API has broken backwards compatability
Bug #1656208 reported by
Blake Rouse
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Unassigned |
Bug Description
The spaces API has broken backwards compatability preventing Juju from being able to bootstrap. Our CI and also our unit tests should have caught this issue.
Previous API result:
http://
Trunk API result:
http://
The difference is with:
Subnets -> vlan -> should be object trunk is now an integer
Related branches
lp:~mpontillo/maas/spaces-api-backward-compat--bug-1656208
- Gavin Panella (community): Approve
- Brendan Donegan: Pending requested
-
Diff: 94 lines (+39/-24)2 files modifiedsrc/maasserver/api/spaces.py (+3/-24)
src/maasserver/api/tests/test_spaces.py (+36/-0)
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is the fix:
=== modified file 'src/maasserver /api/spaces. py' api/spaces. py 2017-01-04 19:37:16 +0000 api/spaces. py 2017-01-13 07:45:52 +0000 objects. filter( vlan__space= space) objects. filter( vlan__space= space)
--- src/maasserver/
+++ src/maasserver/
@@ -79,16 +79,7 @@
@classmethod
def subnets(cls, space):
"""Return an abbreviated view of each subnet in the space."""
- subnets = Subnet.
- return [
- {
- "id": subnet.id,
- "name": subnet.name,
- "cidr": str(subnet.cidr),
- "vlan": subnet.vlan_id
- }
- for subnet in subnets
- ]
+ return Subnet.
@classmethod
def vlans(cls, space):