Class: Chef::Knife::PodnixServerStop

Inherits:
Chef::Knife show all
Includes:
PodnixBase
Defined in:
lib/chef/knife/podnix_server_stop.rb

Instance Method Summary collapse

Methods included from PodnixBase

#locate_config_value, #msg_pair, #podnix_apikey, #validate!

Instance Method Details

#runObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/chef/knife/podnix_server_stop.rb', line 25

def run
@server_id = @name_args[0]
  if @server_id.nil?
    ui.error("You must specify a server_id")
    exit 1        
 else
 
  validate!
  @podnix = Podnix::API.new({:key => "#{config[:podnix_api_key]}"})
  po_server = @podnix.stop_server({:id => "#{@server_id}"})
end
end