Query system ID from machines power address

From https://bugs.launchpad.net/maas/+bug/1676330

MAAS 2.1.4


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