Method: Fog::AWS::Compute::Mock#initialize

Defined in:
lib/fog/compute/aws.rb

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/fog/compute/aws.rb', line 131

def initialize(options={})
  unless options.delete(:provider)
    location = caller.first
    warning = "[yellow][WARN] Fog::AWS::Compute.new is deprecated, use Fog::Compute.new(:provider => 'AWS') instead[/]"
    warning << " [light_black](" << location << ")[/] "
    Formatador.display_line(warning)
  end

  require 'fog/compute/parsers/aws/basic'

  @aws_access_key_id = options[:aws_access_key_id]
  @region = options[:region] || 'us-east-1'
  @data = self.class.data[@region][@aws_access_key_id]
  @owner_id = @data[:owner_id]
end