[2.x, API] Unable to update iprange user by name via API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Alberto Donato | ||
2.3 |
Fix Released
|
Medium
|
Alberto Donato |
Bug Description
The IP range form erroneously expects a user ID, which is not easily available.
$ maas admin iprange update 7 user=user
{"user": ["Select a valid choice. That choice is not one of the available choices."]}
$ sudo -u postgres psql maasdb -c "select id from auth_user where username='user'"
id
----
4
(1 row)
$ maas admin iprange update 7 user=4
Success.
Machine-readable output follows:
{
"resource_uri": "/MAAS/
"id": 7,
"user": {
"username": "user",
"email": "<email address hidden>"
},
"start_ip": "192.168.0.201",
"end_ip": "192.168.0.249",
"subnet": {
"id": 8,
"vlan": {
"id": 5001,
"mtu": 1500,
"name": "untagged",
"vid": 0,
},
"name": "192.168.0.0/24",
"cidr": "192.168.0.0/24",
"space": "undefined",
"managed": true
},
"comment": "",
"type": "reserved"
}
Related branches
- Alberto Donato: Approve
-
Diff: 110 lines (+23/-13)6 files modifiedsrc/maasserver/forms/iprange.py (+8/-1)
src/maasserver/forms/tests/test_iprange.py (+10/-0)
src/maasserver/static/partials/ipranges.html (+1/-1)
src/maasserver/websockets/handlers/iprange.py (+2/-8)
src/maasserver/websockets/handlers/tests/test_iprange.py (+1/-2)
src/maasserver/websockets/handlers/vlan.py (+1/-1)
- Mike Pontillo (community): Approve
- MAAS Lander: Approve
-
Diff: 110 lines (+23/-13)6 files modifiedsrc/maasserver/forms/iprange.py (+8/-1)
src/maasserver/forms/tests/test_iprange.py (+10/-0)
src/maasserver/static/partials/ipranges.html (+1/-1)
src/maasserver/websockets/handlers/iprange.py (+2/-8)
src/maasserver/websockets/handlers/tests/test_iprange.py (+1/-2)
src/maasserver/websockets/handlers/vlan.py (+1/-1)
summary: |
- Unable to update iprange user by name via API + [2.x] Unable to update iprange user by name via API |
Changed in maas: | |
milestone: | none → 2.2.0 |
importance: | Undecided → High |
status: | New → Triaged |
Changed in maas: | |
importance: | High → Medium |
Changed in maas: | |
milestone: | 2.2.0 → 2.2.x |
tags: | added: api |
summary: |
- [2.x] Unable to update iprange user by name via API + [2.x, API] Unable to update iprange user by name via API |
Changed in maas: | |
milestone: | 2.2.x → 2.3.x |
status: | Triaged → Confirmed |
Changed in maas: | |
assignee: | nobody → Alberto Donato (ack) |
milestone: | 2.3.x → 2.3.0 |
status: | Confirmed → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |