Module: Fog::AWS::EC2

Defined in:
lib/fog/aws/ec2.rb,
lib/fog/aws/models/ec2/image.rb,
lib/fog/aws/models/ec2/flavor.rb,
lib/fog/aws/models/ec2/images.rb,
lib/fog/aws/models/ec2/server.rb,
lib/fog/aws/models/ec2/volume.rb,
lib/fog/aws/models/ec2/address.rb,
lib/fog/aws/models/ec2/flavors.rb,
lib/fog/aws/models/ec2/servers.rb,
lib/fog/aws/models/ec2/volumes.rb,
lib/fog/aws/models/ec2/key_pair.rb,
lib/fog/aws/models/ec2/snapshot.rb,
lib/fog/aws/models/ec2/addresses.rb,
lib/fog/aws/models/ec2/key_pairs.rb,
lib/fog/aws/models/ec2/snapshots.rb,
lib/fog/aws/models/ec2/security_group.rb,
lib/fog/aws/models/ec2/security_groups.rb,
lib/fog/aws/requests/ec2/attach_volume.rb,
lib/fog/aws/requests/ec2/create_volume.rb,
lib/fog/aws/requests/ec2/delete_volume.rb,
lib/fog/aws/requests/ec2/detach_volume.rb,
lib/fog/aws/requests/ec2/run_instances.rb,
lib/fog/aws/requests/ec2/create_key_pair.rb,
lib/fog/aws/requests/ec2/create_snapshot.rb,
lib/fog/aws/requests/ec2/delete_key_pair.rb,
lib/fog/aws/requests/ec2/delete_snapshot.rb,
lib/fog/aws/requests/ec2/describe_images.rb,
lib/fog/aws/requests/ec2/release_address.rb,
lib/fog/aws/requests/ec2/allocate_address.rb,
lib/fog/aws/requests/ec2/describe_regions.rb,
lib/fog/aws/requests/ec2/describe_volumes.rb,
lib/fog/aws/requests/ec2/reboot_instances.rb,
lib/fog/aws/requests/ec2/associate_address.rb,
lib/fog/aws/requests/ec2/describe_addresses.rb,
lib/fog/aws/requests/ec2/describe_instances.rb,
lib/fog/aws/requests/ec2/describe_key_pairs.rb,
lib/fog/aws/requests/ec2/describe_snapshots.rb,
lib/fog/aws/requests/ec2/get_console_output.rb,
lib/fog/aws/requests/ec2/terminate_instances.rb,
lib/fog/aws/requests/ec2/disassociate_address.rb,
lib/fog/aws/requests/ec2/create_security_group.rb,
lib/fog/aws/requests/ec2/delete_security_group.rb,
lib/fog/aws/requests/ec2/describe_security_groups.rb,
lib/fog/aws/requests/ec2/describe_availability_zones.rb,
lib/fog/aws/requests/ec2/describe_reserved_instances.rb,
lib/fog/aws/requests/ec2/revoke_security_group_ingress.rb,
lib/fog/aws/requests/ec2/authorize_security_group_ingress.rb

Defined Under Namespace

Classes: Address, Addresses, Flavor, Flavors, Image, Images, KeyPair, KeyPairs, Mock, Real, SecurityGroup, SecurityGroups, Server, Servers, Snapshot, Snapshots, Volume, Volumes

Class Method Summary collapse

Class Method Details

.new(options = {}) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/fog/aws/ec2.rb', line 5

def self.new(options={})

  require 'fog/aws/models/ec2/address'
  require 'fog/aws/models/ec2/addresses'
  require 'fog/aws/models/ec2/flavor'
  require 'fog/aws/models/ec2/flavors'
  require 'fog/aws/models/ec2/image'
  require 'fog/aws/models/ec2/images'
  require 'fog/aws/models/ec2/key_pair'
  require 'fog/aws/models/ec2/key_pairs'
  require 'fog/aws/models/ec2/security_group'
  require 'fog/aws/models/ec2/security_groups'
  require 'fog/aws/models/ec2/server'
  require 'fog/aws/models/ec2/servers'
  require 'fog/aws/models/ec2/snapshot'
  require 'fog/aws/models/ec2/snapshots'
  require 'fog/aws/models/ec2/volume'
  require 'fog/aws/models/ec2/volumes'
  require 'fog/aws/requests/ec2/allocate_address'
  require 'fog/aws/requests/ec2/associate_address'
  require 'fog/aws/requests/ec2/attach_volume'
  require 'fog/aws/requests/ec2/authorize_security_group_ingress'
  require 'fog/aws/requests/ec2/create_key_pair'
  require 'fog/aws/requests/ec2/create_security_group'
  require 'fog/aws/requests/ec2/create_snapshot'
  require 'fog/aws/requests/ec2/create_volume'
  require 'fog/aws/requests/ec2/delete_key_pair'
  require 'fog/aws/requests/ec2/delete_security_group'
  require 'fog/aws/requests/ec2/delete_snapshot'
  require 'fog/aws/requests/ec2/delete_volume'
  require 'fog/aws/requests/ec2/describe_addresses'
  require 'fog/aws/requests/ec2/describe_availability_zones'
  require 'fog/aws/requests/ec2/describe_images'
  require 'fog/aws/requests/ec2/describe_instances'
  require 'fog/aws/requests/ec2/describe_reserved_instances'
  require 'fog/aws/requests/ec2/describe_key_pairs'
  require 'fog/aws/requests/ec2/describe_regions'
  require 'fog/aws/requests/ec2/describe_security_groups'
  require 'fog/aws/requests/ec2/describe_snapshots'
  require 'fog/aws/requests/ec2/describe_volumes'
  require 'fog/aws/requests/ec2/detach_volume'
  require 'fog/aws/requests/ec2/disassociate_address'
  require 'fog/aws/requests/ec2/get_console_output'
  require 'fog/aws/requests/ec2/reboot_instances'
  require 'fog/aws/requests/ec2/release_address'
  require 'fog/aws/requests/ec2/revoke_security_group_ingress'
  require 'fog/aws/requests/ec2/run_instances'
  require 'fog/aws/requests/ec2/terminate_instances'

  unless options[:aws_access_key_id]
    raise ArgumentError.new('aws_access_key_id is required to access ec2')
  end
  unless options[:aws_secret_access_key]
    raise ArgumentError.new('aws_secret_access_key is required to access ec2')
  end
  if Fog.mocking?
    Fog::AWS::EC2::Mock.new(options)
  else
    Fog::AWS::EC2::Real.new(options)
  end
end

.reset_data(keys = Mock.data.keys) ⇒ Object


67
68
69
# File 'lib/fog/aws/ec2.rb', line 67

def self.reset_data(keys=Mock.data.keys)
  Mock.reset_data(keys)
end