[2.0b4] ipranges create raises incorrect error for missing type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I went to reserve an IP range and when I didn't specify the type it gave errors for start_ip and end_ip. It should have only said
"type": ["This field is required."]
ubuntu@region-1:~$ maas admin ipranges create start_ip=
{"start_ip": ["No range can be created at requested start IP."], "type": ["This field is required.", "No range can be created at requested start IP."]}
ubuntu@region-1:~$ maas admin ipranges create start_ip=
Success.
Machine-readable output follows:
{
"id": 2,
"resource_uri": "/MAAS/
"type": "reserved",
"start_ip": "192.168.122.1",
"end_ip": "192.168.122.39",
"comment": "",
"user": {
"username": "admin",
"email": "noreply@maas",
},
"subnet": {
"space": "space-0",
"cidr": "192.168.122.0/24",
"id": 1,
"name": "192.168.122.0/24",
"vlan": {
"mtu": 1500,
"id": 5001,
"name": "untagged",
"vid": 0
}
}
}
Related branches
- Blake Rouse (community): Approve
-
Diff: 47 lines (+20/-2)2 files modifiedsrc/maasserver/api/tests/test_ipranges.py (+13/-0)
src/maasserver/models/iprange.py (+7/-2)
summary: |
- [2.0b4] ipranges create type field should not be required + [2.0b4] ipranges create raises incorrect error for missing type |
description: | updated |
Changed in maas: | |
status: | Triaged → Invalid |
status: | Invalid → Confirmed |
Changed in maas: | |
status: | Confirmed → Triaged |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |