How to search for a list of random names?

Recently we has CMOS battery problems on a random selection of about 20 of our ~500 nodes. I needed to do the same MAAS operations on all of them, so I tried a couple of different ways to get them all to show up in a web UI search.

Spaces didn’t work:

rnd002 rnd065 rnd113

Commas didn’t work:

rnd002,rnd065,rnd113

Commas and parentheses didn’t work:

(rnd002,rnd065,rnd113)

I found this explanation of how searches work, but I wasn’t able to figure out from it any working way to get “OR” on machine names:

How to locate machines - Docs - Canonical MAAS | Discourse

Is there a way to do it?

you might be looking for

hostname:(=rnd002,=rnd065,=rnd113)

Thanks, that works!

Do you know if that’s documented anywhere? So far I haven’t been able to find it.

The docs about the filtering DSL is the one you already linked. So it’s just about learning how to make the queries and look at the available properties that can be used for filtering.

Still, it misses some properties that can be used for filtering such as hostname so we have to update it accordingly

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.