Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Requesting multiple machine states #20

Open
nickwales opened this issue Mar 5, 2014 · 1 comment
Open

Requesting multiple machine states #20

nickwales opened this issue Mar 5, 2014 · 1 comment

Comments

@nickwales
Copy link

I'm looking to find all states that are not equal to destroyed or expunging, so it possible for list_virtual_machines to ask for multiple machine states e.g. state = 'Running, Stopped'.

@alepore
Copy link
Contributor

alepore commented Feb 25, 2015

You can just parse the response like

client.list_virtual_machines["virtualmachine"].find_all { |vm| %w[Running Stopped].include? vm["state"] }

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants