Module: Fog::Terremark::Vcloud

Extended by:
Shared
Defined in:
lib/fog/terremark/vcloud.rb

Defined Under Namespace

Modules: Bin, Defaults Classes: Mock, Real

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods included from Shared

check_shared_options, shared_requires

Class Method Details

+ (Object) new(options = {})



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/fog/terremark/vcloud.rb', line 17

def self.new(options={})
  Fog::Logger.deprecation("Fog::Terremark::Vcloud is deprecated, to be replaced with Vcloud 1.0 someday/maybe [light_black](#{caller.first})[/]")

  unless @required
    shared_requires
    @required = true
  end

  check_shared_options(options)

  if Fog.mocking?
     Fog::Terremark::Vcloud::Mock.new(options)
  else
     Fog::Terremark::Vcloud::Real.new(options)
  end
end

Instance Method Details

- (Object) default_ssh_key



98
99
100
101
102
103
104
105
# File 'lib/fog/terremark/vcloud.rb', line 98

def default_ssh_key
    if default_ssh_key
        @default_ssh_key ||= begin
           keys = get_keys_list(default_organization_id).body["Keys"]
           keys.find { |item| item["IsDefault"] == "true" }
       end
    end
end