Select only the Jades

Some custom jq for RegEx selection of OpenStack Ironic baremetal nodes. Our Server types show up in their names. I want to be able to build lists of only the Mt. Jade Servers, which have names that look like this:

jade09-r097

openstack baremetal node list  --sort provision_state:asc   -c UUID -c Name -f json | jq '.[] | select(.Name | test("jade."))'

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.