maas-cli argument handling inconsistencies

Bug #1099920 reported by Daniel Westervelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
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
Changed in maas:
status: New → Triaged
importance: Undecided → Low
tags: added: api
Raphaël Badin (rvb)
tags: added: cli
removed: api
Revision history for this message
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
Changed in maas:
milestone: 2.4.x → 2.6.0
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

The behavior is as expected. Moreover, maas-cli is no longer supported.

Changed in maas:
milestone: 2.6.0 → none
status: Triaged → Invalid
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.