Class: Dployr::Commands::Info

Inherits:
Base
  • Object
show all
Defined in:
lib/dployr/commands/info.rb

Instance Method Summary collapse

Methods inherited from Base

#create, #create_compute_client, #get_config, #get_region_config

Methods included from Utils

parse_attributes, parse_flags, parse_matrix

Constructor Details

#initialize(options) ⇒ Info

Returns a new instance of Info.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dployr/commands/info.rb', line 8

def initialize(options)
  super options

  @client = Dployr::Compute.const_get(@provider.to_sym).new(@options, @p_attrs)
  @info = @client.get_info
  if @info
    puts @info.attributes.to_yaml
  else
    raise "#{@p_attrs["name"]} not found"
  end
end