[2.2] Error message when giving an invalid type as an argument to boot-resources GET is not clear

Bug #1639839 reported by Brendan Donegan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Andres Rodriguez

Bug Description

boot-resources read can take a type parameter, but the response from the API is unhelpful if we happen to not choose one of the valid options:

$ maas nec boot-resources read type=some
Bad type 'some'

MAAS knows what the valid types are (they are defined in src/maasserver/api/boot_resources.py.TYPE_MAPPING), so it really ought to be able to provide a more helpful message.

Also the documentation doesn't say what the types are, so we might want to do something about that

Related branches

description: updated
Changed in maas:
milestone: none → 2.1.2
importance: Undecided → High
status: New → Triaged
tags: added: maas-cli
Changed in maas:
milestone: 2.1.2 → 2.1.3
Ryan Beisner (1chb1n)
tags: added: uosci
Changed in maas:
milestone: 2.1.3 → none
tags: added: papercut
tags: removed: error-surfacing
tags: removed: papercut
tags: added: trivial
summary: - Error message when giving an invalid type as an argument to boot-
+ [2.2] Error message when giving an invalid type as an argument to boot-
resources GET is not clear
no longer affects: maas/2.1
Changed in maas:
milestone: none → 2.2.0rc1
no longer affects: maas/2.2
Changed in maas:
assignee: nobody → Andres Rodriguez (andreserl)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.