maas-cli argument handling inconsistencies

Bug #1099920 reported by Daniel Westervelt on 2013-01-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Low
Unassigned

Bug Description

with some maas-cli cmdlines it seems key:value (name=value) pairs are required to be stated explicitly while others just require value. For instance consider the following two cmdlines:

FAILS: (with value only)
maas-cli admin nodes accept node-5bf10db6-5f24-11e2-90e2-8c705ac92df0
'node-5bf10db6-5f24-11e2-90e2-8c705ac92df0' is not a name=value pair

WORKS: (with name=value)
maas-cli admin nodes accept system_id=node-5bf10db6-5f24-11e2-90e2-8c705ac92df0

While node actions only require (value) to work - see below:

maas-cli admin node release node-5bf10db6-5f24-11e2-90e2-8c705ac92df0
maas-cli admin node stop node-5bf10db6-5f24-11e2-90e2-8c705ac92df0
etc...

Tags: cli Edit Tag help
Changed in maas:
status: New → Triaged
importance: Undecided → Low
tags: added: api
Raphaël Badin (rvb) on 2013-01-16
tags: added: cli
removed: api
Gavin Panella (allenap) wrote :

It's not so much inconsistent:

> maas-cli admin nodes accept system_id=node-5bf10db6-5f24-11e2-90e2-8c705ac92df0

Here the `accept` call is being sent to the `nodes` handler, passing the
`system_id` argument.

> maas-cli admin node release node-5bf10db6-5f24-11e2-90e2-8c705ac92df0

Here the `release` call is being sent to the node identified as
`node-5bf10db6-5f24-11e2-90e2-8c705ac92df0`.

What it is, is unintuitive, especially the second one; I'd expect
`release` to be last:

  maas-cli admin node node-5bf10db6-5f24-11e2-90e2-8c705ac92df0 release

Changed in maas:
milestone: none → 2.4.x
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers