Class: Pec::CLI
- Inherits:
-
Thor
- Object
- Thor
- Pec::CLI
- Defined in:
- lib/pec/cli.rb
Instance Method Summary collapse
Instance Method Details
#destroy(name) ⇒ Object
17 18 19 |
# File 'lib/pec/cli.rb', line 17 def destroy(name) Pec::Compute::Server.new.destroy!(name) if yes?("#{name}: Are you sure you want to destroy the '#{name}' VM? [y/N]") end |
#up(host_name = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/pec/cli.rb', line 7 def up(host_name = nil) config = Pec::Configure.new config.load("Pec.yaml") director = Pec::VmDirector.new config.each do |host| next if !host_name.nil? && host.name != host_name puts "can't create server:#{host.name}" unless director.make(host) end if config end |