[CLI] Missing functionality to lookup system ID from machines power-parameters query

Bug #1676330 reported by Sandor Zeestraten
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Wishlist
Unassigned

Bug Description

# MAAS 2.1.4

# Issue
I'm trying to identify the system ID of a new machine in MAAS by its power address so we can setup it up further from the CLI (such as hostname, zone, network and etc).

Right now, we have to lookup the power parameters of all machines and grep or use jq to identify which system ID is linked to which power address.

# Feature request
It would really be helpful to be able to query for machines by its power address and easily get back the system ID.

# Current command
maas $PROFILE machines power-parameters | do some further processing with grep or jq

# Desired command
maas $PROFILE machines power-parameters power_address="$IP_POWER_ADRESS"
which should return only machines matching with the power address

Changed in maas:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Mike Pontillo (mpontillo) wrote :

This is a good idea. As a workaround, you can do this today by querying the database directly, such as the following:

https://gist.github.com/mpontillo/4be4217274c12a5e33543aff745390f8

(But this can't be supported long-term, since we don't guarantee a stable schema across different versions of MAAS.)

Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
Revision history for this message
Sandor Zeestraten (szeestraten) wrote :

@adam-collard, this is a feature request, not an issue that is should expire after 6 months. If you do not want to implement this feature than that is fine, but please say so.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Being a feature request, please could you start a thread over on our Discourse (https://discourse.maas.io/c/features) to discuss the feature?

Revision history for this message
Sandor Zeestraten (szeestraten) wrote :
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.