From 85d5eda24b4e9d00e5da160750605ac03f47724b Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 29 Oct 2014 13:16:09 -0700 Subject: [PATCH] Filter list command --- lib/vmfloaty/cli.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vmfloaty/cli.rb b/lib/vmfloaty/cli.rb index 5f879a4..bd98428 100644 --- a/lib/vmfloaty/cli.rb +++ b/lib/vmfloaty/cli.rb @@ -35,11 +35,12 @@ class CLI < Thor if pattern # Filtering VMs based on pattern + hosts = host_res.select { |i| i[/#{pattern}/] } else - # list all vms + hosts = host_res end - puts host_res + puts hosts end desc "release ", "Schedules a VM for deletion"