API renderings do not contain fields necessary to construct self-referential URI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Gavin Panella | ||
2.1 |
Fix Released
|
Undecided
|
Gavin Panella |
Bug Description
The following API handlers do not render one or more fields for their
respective object classes that are required in order to render URIs for
instances of their object classes:
BootSourceSe
BootSourceSel
DNSResourc
PackageRep
For example, DomainHandler's resource URI template is:
/api/
but DomainHandler.
the problem is that the template URI should be:
/api/
because a Domain's `id` field _is_ in DomainHandler.
For another example, BootSourceSelec
/api/
but BootSourceSelec
`boot_source_id`. The latter is an important part of a
BootSourceSelec
so should be rendered as part of its API representation.
This is proving important to implementation of the new client library
(and would likely be important to any client library).
Related branches
- Mike Pontillo (community): Approve
-
Diff: 899 lines (+203/-60)38 files modifiedsrc/maasserver/api/bcache.py (+7/-1)
src/maasserver/api/bcache_cacheset.py (+7/-1)
src/maasserver/api/blockdevices.py (+6/-1)
src/maasserver/api/boot_source_selections.py (+1/-0)
src/maasserver/api/dhcpsnippets.py (+1/-1)
src/maasserver/api/dnsresourcerecords.py (+1/-1)
src/maasserver/api/dnsresources.py (+1/-1)
src/maasserver/api/domains.py (+1/-1)
src/maasserver/api/fabrics.py (+1/-1)
src/maasserver/api/fannetworks.py (+1/-1)
src/maasserver/api/interfaces.py (+7/-1)
src/maasserver/api/ipranges.py (+1/-1)
src/maasserver/api/machines.py (+3/-2)
src/maasserver/api/nodes.py (+2/-0)
src/maasserver/api/packagerepositories.py (+1/-1)
src/maasserver/api/partitions.py (+12/-1)
src/maasserver/api/raid.py (+7/-1)
src/maasserver/api/spaces.py (+1/-1)
src/maasserver/api/ssh_keys.py (+1/-1)
src/maasserver/api/ssl_keys.py (+1/-1)
src/maasserver/api/staticroutes.py (+1/-1)
src/maasserver/api/subnets.py (+1/-1)
src/maasserver/api/support.py (+37/-0)
src/maasserver/api/tests/test_bcache.py (+1/-0)
src/maasserver/api/tests/test_bcache_cacheset.py (+1/-0)
src/maasserver/api/tests/test_blockdevice.py (+12/-0)
src/maasserver/api/tests/test_dhcpsnippets.py (+35/-16)
src/maasserver/api/tests/test_interfaces.py (+1/-0)
src/maasserver/api/tests/test_partitions.py (+7/-3)
src/maasserver/api/tests/test_raid.py (+1/-0)
src/maasserver/api/tests/test_user.py (+7/-1)
src/maasserver/api/tests/test_vlans.py (+1/-0)
src/maasserver/api/tests/test_volume_groups.py (+1/-0)
src/maasserver/api/users.py (+5/-0)
src/maasserver/api/vlans.py (+1/-0)
src/maasserver/api/volume_groups.py (+10/-1)
src/metadataserver/api.py (+17/-17)
src/metadataserver/tests/test_api.py (+1/-1)
- Gavin Panella (community): Approve
-
Diff: 899 lines (+203/-60)38 files modifiedsrc/maasserver/api/bcache.py (+7/-1)
src/maasserver/api/bcache_cacheset.py (+7/-1)
src/maasserver/api/blockdevices.py (+6/-1)
src/maasserver/api/boot_source_selections.py (+1/-0)
src/maasserver/api/dhcpsnippets.py (+1/-1)
src/maasserver/api/dnsresourcerecords.py (+1/-1)
src/maasserver/api/dnsresources.py (+1/-1)
src/maasserver/api/domains.py (+1/-1)
src/maasserver/api/fabrics.py (+1/-1)
src/maasserver/api/fannetworks.py (+1/-1)
src/maasserver/api/interfaces.py (+7/-1)
src/maasserver/api/ipranges.py (+1/-1)
src/maasserver/api/machines.py (+3/-2)
src/maasserver/api/nodes.py (+2/-0)
src/maasserver/api/packagerepositories.py (+1/-1)
src/maasserver/api/partitions.py (+12/-1)
src/maasserver/api/raid.py (+7/-1)
src/maasserver/api/spaces.py (+1/-1)
src/maasserver/api/ssh_keys.py (+1/-1)
src/maasserver/api/ssl_keys.py (+1/-1)
src/maasserver/api/staticroutes.py (+1/-1)
src/maasserver/api/subnets.py (+1/-1)
src/maasserver/api/support.py (+37/-0)
src/maasserver/api/tests/test_bcache.py (+1/-0)
src/maasserver/api/tests/test_bcache_cacheset.py (+1/-0)
src/maasserver/api/tests/test_blockdevice.py (+12/-0)
src/maasserver/api/tests/test_dhcpsnippets.py (+35/-16)
src/maasserver/api/tests/test_interfaces.py (+1/-0)
src/maasserver/api/tests/test_partitions.py (+7/-3)
src/maasserver/api/tests/test_raid.py (+1/-0)
src/maasserver/api/tests/test_user.py (+7/-1)
src/maasserver/api/tests/test_vlans.py (+1/-0)
src/maasserver/api/tests/test_volume_groups.py (+1/-0)
src/maasserver/api/users.py (+5/-0)
src/maasserver/api/vlans.py (+1/-0)
src/maasserver/api/volume_groups.py (+10/-1)
src/metadataserver/api.py (+17/-17)
src/metadataserver/tests/test_api.py (+1/-1)
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Gavin Panella (allenap) |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |