API doesn't correctly handle partition/blockdevice names in parameters
Bug #1964755 reported by
Alberto Donato
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Alberto Donato |
Bug Description
Forms that interact with partitions/block devices allow passing names in addition to IDs.
These are not correctly resolved to IDs, though (in convert_
Thus, if there are for instance two machines with an "sda" disk with partitions, "sda-part1" doesn't match a single object, causing the query to fail.
Related branches
~ack/maas:1964755-forms-partition-blockdevices-lookups
Merged
into
maas:master
- MAAS Lander: Needs Fixing
- Adam Collard (community): Approve
-
Diff: 561 lines (+182/-112)6 files modifiedsrc/maasserver/api/partitions.py (+13/-33)
src/maasserver/api/tests/test_partitions.py (+26/-0)
src/maasserver/forms/__init__.py (+29/-18)
src/maasserver/forms/tests/test_bcache.py (+35/-0)
src/maasserver/models/partition.py (+26/-29)
src/maasserver/models/tests/test_partition.py (+53/-32)
Changed in maas: | |
assignee: | nobody → Alberto Donato (ack) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | next → 3.2.0-beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.