mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-25 21:28:40 -05:00
Filter list command
This commit is contained in:
parent
b9c43f9695
commit
85d5eda24b
1 changed files with 3 additions and 2 deletions
|
|
@ -35,11 +35,12 @@ class CLI < Thor
|
||||||
|
|
||||||
if pattern
|
if pattern
|
||||||
# Filtering VMs based on pattern
|
# Filtering VMs based on pattern
|
||||||
|
hosts = host_res.select { |i| i[/#{pattern}/] }
|
||||||
else
|
else
|
||||||
# list all vms
|
hosts = host_res
|
||||||
end
|
end
|
||||||
|
|
||||||
puts host_res
|
puts hosts
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "release <HOSTNAME>", "Schedules a VM for deletion"
|
desc "release <HOSTNAME>", "Schedules a VM for deletion"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue