maas api "device update <id>" requires setting parent= in addition to hostname=, but it's not documented as required
Bug #1440998 reported by
Dimiter Naydenov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Mike Pontillo |
Bug Description
Using the same scenario described in bug 1440994, I've tried running:
$ maas maas-user device update node-a13335fa-
But despite the documentation of the "update" method only mentioning "hostname=" as accepted argument it appears "parent=" is also required. Response I got:
{"parent": ["Select a valid choice. That choice is not one of the available choices."]}
Trying again with parent=foo reports the same error (as expected). Trying with "parent=
It will help to document "parent=" as accepted argument to "device update", but also make it optional.
Related branches
lp:~mpontillo/maas/bug-1440998-device-api-fixes
- Raphaël Badin (community): Approve
-
Diff: 248 lines (+128/-7)6 files modifiedsrc/maasserver/api/devices.py (+7/-5)
src/maasserver/forms.py (+10/-2)
src/maasserver/models/node.py (+5/-0)
src/maasserver/models/tests/test_node.py (+35/-0)
src/maasserver/testing/factory.py (+10/-0)
src/maasserver/tests/test_forms_device.py (+61/-0)
Changed in maas: | |
milestone: | none → 1.8.0 |
status: | New → Triaged |
Changed in maas: | |
assignee: | nobody → Mike Pontillo (mpontillo) |
Changed in maas: | |
importance: | Undecided → High |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Confirmed.
Devices that have no parent work as expected, but devices that previously had a parent exhibit this behavior.