Resource URI templates contains names that do not match up to rendered fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Undecided
|
Gavin Panella | ||
2.1 |
Fix Released
|
Undecided
|
Gavin Panella |
Bug Description
This follows on from bug 1643552 ("API renderings do not contain fields necessary to construct self-referential URI") and is a bug with the fix created for that bug.
Piston asks handler classes for resource_uri information but then consults Django's URL patterns to get the field names to use in each resource_uri template it generates, i.e. it discards the information that the handler gives it.
These resource_uri templates are given to clients in the API description document. For some handlers these templates (like "/foo/{bar}/alice") contain names that do not match up to the fields that the handler renders of their models, so a self-referential URI still cannot be calculated even though we are now providing all the information.
Related branches
- Gavin Panella (community): Approve
- Brendan Donegan (community): Approve
-
Diff: 1586 lines (+258/-194)23 files modifiedsrc/maasserver/api/bcache.py (+6/-6)
src/maasserver/api/bcache_cacheset.py (+6/-6)
src/maasserver/api/blockdevices.py (+20/-20)
src/maasserver/api/dhcpsnippets.py (+8/-12)
src/maasserver/api/dnsresourcerecords.py (+6/-6)
src/maasserver/api/dnsresources.py (+6/-6)
src/maasserver/api/domains.py (+6/-6)
src/maasserver/api/fabrics.py (+6/-6)
src/maasserver/api/fannetworks.py (+6/-6)
src/maasserver/api/interfaces.py (+16/-16)
src/maasserver/api/ipranges.py (+6/-6)
src/maasserver/api/nodes.py (+21/-5)
src/maasserver/api/packagerepositories.py (+6/-9)
src/maasserver/api/partitions.py (+12/-12)
src/maasserver/api/raid.py (+6/-6)
src/maasserver/api/spaces.py (+6/-6)
src/maasserver/api/ssh_keys.py (+4/-4)
src/maasserver/api/ssl_keys.py (+5/-5)
src/maasserver/api/staticroutes.py (+6/-6)
src/maasserver/api/subnets.py (+14/-14)
src/maasserver/api/tests/test_api.py (+56/-0)
src/maasserver/api/volume_groups.py (+10/-10)
src/maasserver/urls_api.py (+20/-21)
- Gavin Panella (community): Approve
-
Diff: 1582 lines (+258/-194)23 files modifiedsrc/maasserver/api/bcache.py (+6/-6)
src/maasserver/api/bcache_cacheset.py (+6/-6)
src/maasserver/api/blockdevices.py (+20/-20)
src/maasserver/api/dhcpsnippets.py (+8/-12)
src/maasserver/api/dnsresourcerecords.py (+6/-6)
src/maasserver/api/dnsresources.py (+6/-6)
src/maasserver/api/domains.py (+6/-6)
src/maasserver/api/fabrics.py (+6/-6)
src/maasserver/api/fannetworks.py (+6/-6)
src/maasserver/api/interfaces.py (+16/-16)
src/maasserver/api/ipranges.py (+6/-6)
src/maasserver/api/nodes.py (+21/-5)
src/maasserver/api/packagerepositories.py (+6/-9)
src/maasserver/api/partitions.py (+12/-12)
src/maasserver/api/raid.py (+6/-6)
src/maasserver/api/spaces.py (+6/-6)
src/maasserver/api/ssh_keys.py (+4/-4)
src/maasserver/api/ssl_keys.py (+5/-5)
src/maasserver/api/staticroutes.py (+6/-6)
src/maasserver/api/subnets.py (+14/-14)
src/maasserver/api/tests/test_api.py (+56/-0)
src/maasserver/api/volume_groups.py (+10/-10)
src/maasserver/urls_api.py (+20/-21)
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |