Skip to content
New issue

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

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

Already on GitHub? Sign in 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"] }

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

No branches or pull requests

2 participants