Filter machines by power address, serial number (BMC, iLO, DRAC, etc.)

As per title, extend filters to allow filtering by power parameters and serial number

Original report: https://bugs.launchpad.net/maas/+bug/1938927

2 Likes

I was hoping that maas 3.1 would of addressed this issue but after upgrading today its still a problem. I will continue to run our custom script to make our machines searchable. If anyone else if having problems this is what we are using from the maas-cli. After running this it will add the system serial number and console IP into the notes section of every machine that is not locked making it searchable in the UI.

Set the variable to whatever the maas profile the cli is using to connect to the controller

export maas_profile=""

for machineb64 in maas $maas_profile machines read | jq -rc '.[] | @base64' ; do
machine_json=echo $machineb64 | base64 --decode
system_id=echo $machine_json | jq -r '.system_id'
orig_hostname=echo $machine_json | jq -r '.hostname'
machine_serial=echo $machine_json | jq -r '.hardware_info.system_serial'
console_ip=maas dell machine power-parameters $system_id | jq -r '.power_address'
echo “Adding system notes for $system_id ($orig_hostname) with $machine_serial $console_ip”
maas $maas_profile machine update $system_id description="$machine_serial $console_ip"
done