fog 0.0.72 → 0.0.73

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/.gitignore +2 -1
  2. data/Gemfile +11 -0
  3. data/VERSION.yml +1 -1
  4. data/fog.gemspec +2 -1
  5. data/lib/fog.rb +9 -1
  6. data/lib/fog/aws/ec2.rb +20 -0
  7. data/lib/fog/aws/requests/ec2/allocate_address.rb +0 -2
  8. data/lib/fog/aws/requests/ec2/associate_address.rb +0 -2
  9. data/lib/fog/aws/requests/ec2/attach_volume.rb +0 -2
  10. data/lib/fog/aws/requests/ec2/authorize_security_group_ingress.rb +0 -2
  11. data/lib/fog/aws/requests/ec2/create_key_pair.rb +0 -2
  12. data/lib/fog/aws/requests/ec2/create_security_group.rb +0 -2
  13. data/lib/fog/aws/requests/ec2/create_snapshot.rb +0 -2
  14. data/lib/fog/aws/requests/ec2/create_volume.rb +0 -2
  15. data/lib/fog/aws/requests/ec2/delete_key_pair.rb +0 -2
  16. data/lib/fog/aws/requests/ec2/delete_security_group.rb +0 -2
  17. data/lib/fog/aws/requests/ec2/delete_snapshot.rb +0 -2
  18. data/lib/fog/aws/requests/ec2/delete_volume.rb +0 -2
  19. data/lib/fog/aws/requests/ec2/describe_addresses.rb +0 -2
  20. data/lib/fog/aws/requests/ec2/describe_availability_zones.rb +0 -2
  21. data/lib/fog/aws/requests/ec2/describe_images.rb +0 -2
  22. data/lib/fog/aws/requests/ec2/describe_instances.rb +34 -36
  23. data/lib/fog/aws/requests/ec2/describe_key_pairs.rb +0 -2
  24. data/lib/fog/aws/requests/ec2/describe_regions.rb +0 -2
  25. data/lib/fog/aws/requests/ec2/describe_reserved_instances.rb +0 -2
  26. data/lib/fog/aws/requests/ec2/describe_security_groups.rb +0 -2
  27. data/lib/fog/aws/requests/ec2/describe_snapshots.rb +11 -13
  28. data/lib/fog/aws/requests/ec2/describe_volumes.rb +17 -19
  29. data/lib/fog/aws/requests/ec2/detach_volume.rb +0 -2
  30. data/lib/fog/aws/requests/ec2/disassociate_address.rb +0 -2
  31. data/lib/fog/aws/requests/ec2/get_console_output.rb +0 -2
  32. data/lib/fog/aws/requests/ec2/reboot_instances.rb +0 -2
  33. data/lib/fog/aws/requests/ec2/release_address.rb +0 -2
  34. data/lib/fog/aws/requests/ec2/revoke_security_group_ingress.rb +0 -2
  35. data/lib/fog/aws/requests/ec2/run_instances.rb +8 -9
  36. data/lib/fog/aws/requests/ec2/terminate_instances.rb +0 -2
  37. data/lib/fog/aws/requests/s3/copy_object.rb +0 -2
  38. data/lib/fog/aws/requests/s3/get_bucket.rb +0 -2
  39. data/lib/fog/aws/requests/s3/get_bucket_location.rb +0 -2
  40. data/lib/fog/aws/requests/s3/get_request_payment.rb +0 -2
  41. data/lib/fog/aws/requests/s3/get_service.rb +0 -2
  42. data/lib/fog/aws/requests/simpledb/domain_metadata.rb +0 -2
  43. data/lib/fog/aws/requests/simpledb/get_attributes.rb +0 -2
  44. data/lib/fog/aws/requests/simpledb/list_domains.rb +0 -2
  45. data/lib/fog/aws/requests/simpledb/select.rb +0 -2
  46. data/lib/fog/aws/s3.rb +5 -0
  47. data/lib/fog/aws/simpledb.rb +4 -0
  48. data/lib/fog/terremark.rb +13 -0
  49. data/lib/fog/terremark/requests/add_internet_service.rb +0 -2
  50. data/lib/fog/terremark/requests/add_node_service.rb +0 -2
  51. data/lib/fog/terremark/requests/create_internet_service.rb +0 -2
  52. data/lib/fog/terremark/requests/deploy_vapp.rb +0 -2
  53. data/lib/fog/terremark/requests/get_catalog.rb +0 -2
  54. data/lib/fog/terremark/requests/get_catalog_item.rb +0 -2
  55. data/lib/fog/terremark/requests/get_organization.rb +0 -2
  56. data/lib/fog/terremark/requests/get_organizations.rb +0 -2
  57. data/lib/fog/terremark/requests/get_public_ips.rb +0 -2
  58. data/lib/fog/terremark/requests/get_task.rb +0 -2
  59. data/lib/fog/terremark/requests/get_tasks_list.rb +0 -2
  60. data/lib/fog/terremark/requests/get_vapp.rb +0 -2
  61. data/lib/fog/terremark/requests/get_vapp_template.rb +0 -2
  62. data/lib/fog/terremark/requests/get_vdc.rb +0 -2
  63. data/lib/fog/terremark/requests/instantiate_vapp_template.rb +0 -2
  64. data/lib/fog/terremark/requests/power_off.rb +0 -2
  65. data/lib/fog/terremark/requests/power_on.rb +0 -2
  66. data/lib/fog/terremark/requests/reset.rb +0 -2
  67. data/lib/fog/terremark/requests/shutdown.rb +0 -2
  68. data/spec/slicehost/models/flavors_spec.rb +3 -3
  69. metadata +3 -2
data/.gitignore CHANGED
@@ -3,4 +3,5 @@
3
3
  coverage
4
4
  rdoc
5
5
  pkg
6
- spec/credentials.yml
6
+ spec/credentials.yml
7
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'http://gemcutter.org'
2
+
3
+ gem 'rake'
4
+ gem 'excon', '>= 0.0.21'
5
+ gem 'formatador', ">= 0.0.10"
6
+ gem 'json', ">= 0"
7
+ gem 'mime-types', ">= 0"
8
+ gem 'nokogiri', ">= 0"
9
+ gem 'ruby-hmac', ">= 0"
10
+ gem 'rspec', '>= 0'
11
+ gem 'shindo', '>= 0'
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 72
4
+ :patch: 73
5
5
  :build:
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fog}
8
- s.version = "0.0.72"
8
+ s.version = "0.0.73"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["geemus (Wesley Beary)"]
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.files = [
21
21
  ".document",
22
22
  ".gitignore",
23
+ "Gemfile",
23
24
  "README.rdoc",
24
25
  "Rakefile",
25
26
  "VERSION.yml",
data/lib/fog.rb CHANGED
@@ -29,7 +29,15 @@ require 'fog/terremark'
29
29
  module Fog
30
30
 
31
31
  module Mock
32
- DELAY = 1
32
+ @delay = 1
33
+ def self.delay
34
+ @delay
35
+ end
36
+
37
+ def self.delay=(new_delay)
38
+ raise ArgumentError, "delay must be non-negative" unless new_delay >= 0
39
+ @delay = new_delay
40
+ end
33
41
  end
34
42
 
35
43
  class MockNotImplemented < StandardError; end
@@ -21,6 +21,26 @@ module Fog
21
21
  require 'fog/aws/models/ec2/snapshots'
22
22
  require 'fog/aws/models/ec2/volume'
23
23
  require 'fog/aws/models/ec2/volumes'
24
+ require 'fog/aws/parsers/ec2/allocate_address'
25
+ require 'fog/aws/parsers/ec2/attach_volume'
26
+ require 'fog/aws/parsers/ec2/basic'
27
+ require 'fog/aws/parsers/ec2/create_key_pair'
28
+ require 'fog/aws/parsers/ec2/create_snapshot'
29
+ require 'fog/aws/parsers/ec2/create_volume'
30
+ require 'fog/aws/parsers/ec2/describe_addresses'
31
+ require 'fog/aws/parsers/ec2/describe_availability_zones'
32
+ require 'fog/aws/parsers/ec2/describe_images'
33
+ require 'fog/aws/parsers/ec2/describe_instances'
34
+ require 'fog/aws/parsers/ec2/describe_key_pairs'
35
+ require 'fog/aws/parsers/ec2/describe_regions'
36
+ require 'fog/aws/parsers/ec2/describe_reserved_instances'
37
+ require 'fog/aws/parsers/ec2/describe_security_groups'
38
+ require 'fog/aws/parsers/ec2/describe_snapshots'
39
+ require 'fog/aws/parsers/ec2/describe_volumes'
40
+ require 'fog/aws/parsers/ec2/detach_volume'
41
+ require 'fog/aws/parsers/ec2/get_console_output'
42
+ require 'fog/aws/parsers/ec2/run_instances'
43
+ require 'fog/aws/parsers/ec2/terminate_instances'
24
44
  require 'fog/aws/requests/ec2/allocate_address'
25
45
  require 'fog/aws/requests/ec2/associate_address'
26
46
  require 'fog/aws/requests/ec2/attach_volume'
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/allocate_address'
7
-
8
6
  # Acquire an elastic IP address.
9
7
  #
10
8
  # ==== Returns
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Associate an elastic IP address with an instance
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/attach_volume'
7
-
8
6
  # Attach an Amazon EBS volume with a running instance, exposing as specified device
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Add permissions to a security group
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/create_key_pair'
7
-
8
6
  # Create a new key pair
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Create a new security group
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/create_snapshot'
7
-
8
6
  # Create a snapshot of an EBS volume and store it in S3
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/create_volume'
7
-
8
6
  # Create an EBS volume
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Delete a key pair that you own
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Delete a security group that you own
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Delete a snapshot of an EBS volume that you own
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Delete an EBS volume
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_addresses'
7
-
8
6
  # Describe all or specified IP addresses.
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_availability_zones'
7
-
8
6
  # Describe all or specified availability zones
9
7
  #
10
8
  # ==== Params
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_images'
7
-
8
6
  # Describe all or specified images.
9
7
  #
10
8
  # ==== Params
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_instances'
7
-
8
6
  # Describe all or specified instances
9
7
  #
10
8
  # ==== Parameters
@@ -71,44 +69,44 @@ module Fog
71
69
  instance_set = @data[:instances].values
72
70
  end
73
71
 
74
- instance_set.each do |instance|
75
- case instance['instanceState']['name']
76
- when 'pending'
77
- if Time.now - instance['launchTime'] > Fog::Mock::DELAY
78
- instance['dnsName'] = "ec2-#{Fog::AWS::Mock.ip_address.gsub('.','-')}.compute-1.amazonaws.com"
79
- instance['privateIpAddress'] = Fog::AWS::Mock.ip_address
80
- instance['privateDnsName'] = "ip-#{instance['privateIpAddress'].gsub('.','-')}.ec2.internal"
81
- instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
82
- end
83
- when 'rebooting'
84
- instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
85
- when 'shutting-down'
86
- if Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock::DELAY * 2
87
- @data[:deleted_at].delete(instance['instanceId'])
88
- @data[:instances].delete(instance['instanceId'])
89
- elsif Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock::DELAY
90
- instance['instanceState'] = { 'code' => 16, 'name' => 'terminating' }
91
- end
92
- when 'terminating'
93
- if Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock::DELAY
94
- @data[:deleted_at].delete(instance['instanceId'])
95
- @data[:instances].delete(instance['instanceId'])
96
- end
97
- end
98
- end
99
-
100
72
  if instance_id.length == 0 || instance_id.length == instance_set.length
101
- instance_set = instance_set.reject {|instance| !@data[:instances][instance['instanceId']]}
102
73
  response.status = 200
103
74
  reservation_set = {}
75
+
104
76
  instance_set.each do |instance|
105
- reservation_set[instance['reservationId']] ||= {
106
- 'groupSet' => instance['groupSet'],
107
- 'instancesSet' => [],
108
- 'ownerId' => instance['ownerId'],
109
- 'reservationId' => instance['reservationId']
110
- }
111
- reservation_set[instance['reservationId']]['instancesSet'] << instance.reject{|key,value| !['amiLaunchIndex', 'blockDeviceMapping', 'dnsName', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'placement', 'privateDnsName', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType'].include?(key)}
77
+ case instance['instanceState']['name']
78
+ when 'pending'
79
+ if Time.now - instance['launchTime'] > Fog::Mock.delay
80
+ instance['dnsName'] = "ec2-#{Fog::AWS::Mock.ip_address.gsub('.','-')}.compute-1.amazonaws.com"
81
+ instance['privateIpAddress'] = Fog::AWS::Mock.ip_address
82
+ instance['privateDnsName'] = "ip-#{instance['privateIpAddress'].gsub('.','-')}.ec2.internal"
83
+ instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
84
+ end
85
+ when 'rebooting'
86
+ instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
87
+ when 'shutting-down'
88
+ if Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock.delay * 2
89
+ @data[:deleted_at].delete(instance['instanceId'])
90
+ @data[:instances].delete(instance['instanceId'])
91
+ elsif Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock.delay
92
+ instance['instanceState'] = { 'code' => 16, 'name' => 'terminating' }
93
+ end
94
+ when 'terminating'
95
+ if Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock.delay
96
+ @data[:deleted_at].delete(instance['instanceId'])
97
+ @data[:instances].delete(instance['instanceId'])
98
+ end
99
+ end
100
+
101
+ if @data[:instances][instance['instanceId']]
102
+ reservation_set[instance['reservationId']] ||= {
103
+ 'groupSet' => instance['groupSet'],
104
+ 'instancesSet' => [],
105
+ 'ownerId' => instance['ownerId'],
106
+ 'reservationId' => instance['reservationId']
107
+ }
108
+ reservation_set[instance['reservationId']]['instancesSet'] << instance.reject{|key,value| !['amiLaunchIndex', 'blockDeviceMapping', 'dnsName', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'placement', 'privateDnsName', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType'].include?(key)}
109
+ end
112
110
  end
113
111
 
114
112
  response.body = {
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_key_pairs'
7
-
8
6
  # Describe all or specified key pairs
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_regions'
7
-
8
6
  # Describe all or specified regions
9
7
  #
10
8
  # ==== Params
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_reserved_instances'
7
-
8
6
  # Describe all or specified reserved instances
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_security_groups'
7
-
8
6
  # Describe all or specified security groups
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_snapshots'
7
-
8
6
  # Describe all or specified snapshots
9
7
  #
10
8
  # ==== Parameters
@@ -41,20 +39,20 @@ module Fog
41
39
  snapshot_set = @data[:snapshots].values
42
40
  end
43
41
 
44
- snapshot_set.each do |snapshot|
45
- case snapshot['status']
46
- when 'in progress', 'pending'
47
- if Time.now - snapshot['startTime'] > Fog::Mock::DELAY * 2
48
- snapshot['progress'] = '100%'
49
- snapshot['status'] = 'completed'
50
- elsif Time.now - snapshot['startTime'] > Fog::Mock::DELAY
51
- snapshot['progress'] = '50%'
52
- snapshot['status'] = 'in progress'
42
+ if snapshot_id.length == 0 || snapshot_id.length == snapshot_set.length
43
+ snapshot_set.each do |snapshot|
44
+ case snapshot['status']
45
+ when 'in progress', 'pending'
46
+ if Time.now - snapshot['startTime'] > Fog::Mock.delay * 2
47
+ snapshot['progress'] = '100%'
48
+ snapshot['status'] = 'completed'
49
+ elsif Time.now - snapshot['startTime'] > Fog::Mock.delay
50
+ snapshot['progress'] = '50%'
51
+ snapshot['status'] = 'in progress'
52
+ end
53
53
  end
54
54
  end
55
- end
56
55
 
57
- if snapshot_id.length == 0 || snapshot_id.length == snapshot_set.length
58
56
  response.status = 200
59
57
  response.body = {
60
58
  'requestId' => Fog::AWS::Mock.request_id,
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/describe_volumes'
7
-
8
6
  # Describe all or specified volumes.
9
7
  #
10
8
  # ==== Parameters
@@ -47,26 +45,26 @@ module Fog
47
45
  volume_set = @data[:volumes].values
48
46
  end
49
47
 
50
- volume_set.each do |volume|
51
- case volume['status']
52
- when 'attaching'
53
- if Time.now - volume['attachmentSet'].first['attachTime'] > Fog::Mock::DELAY
54
- volume['attachmentSet'].first['status'] = 'attached'
55
- volume['status'] = 'attached'
56
- end
57
- when 'creating'
58
- if Time.now - volume['createTime'] > Fog::Mock::DELAY
59
- volume['status'] = 'available'
60
- end
61
- when 'deleting'
62
- if Time.now - @data[:deleted_at][volume['volumeId']] > Fog::Mock::DELAY
63
- @data[:deleted_at].delete(volume['volumeId'])
64
- @data[:volumes].delete(volume['volumeId'])
48
+ if volume_id.length == 0 || volume_id.length == volume_set.length
49
+ volume_set.each do |volume|
50
+ case volume['status']
51
+ when 'attaching'
52
+ if Time.now - volume['attachmentSet'].first['attachTime'] > Fog::Mock.delay
53
+ volume['attachmentSet'].first['status'] = 'attached'
54
+ volume['status'] = 'attached'
55
+ end
56
+ when 'creating'
57
+ if Time.now - volume['createTime'] > Fog::Mock.delay
58
+ volume['status'] = 'available'
59
+ end
60
+ when 'deleting'
61
+ if Time.now - @data[:deleted_at][volume['volumeId']] > Fog::Mock.delay
62
+ @data[:deleted_at].delete(volume['volumeId'])
63
+ @data[:volumes].delete(volume['volumeId'])
64
+ end
65
65
  end
66
66
  end
67
- end
68
67
 
69
- if volume_id.length == 0 || volume_id.length == volume_set.length
70
68
  volume_set = volume_set.reject {|volume| !@data[:volumes][volume['volumeId']]}
71
69
  response.status = 200
72
70
  response.body = {
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/detach_volume'
7
-
8
6
  # Detach an Amazon EBS volume from a running instance
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Disassociate an elastic IP address from its instance (if any)
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/get_console_output'
7
-
8
6
  # Retrieve console output for specified instance
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Reboot specified instances
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Release an elastic IP address.
9
7
  #
10
8
  # ==== Returns
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/basic'
7
-
8
6
  # Remove permissions from a security group
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/run_instances'
7
-
8
6
  # Launch specified instances
9
7
  #
10
8
  # ==== Parameters
@@ -106,11 +104,10 @@ module Fog
106
104
 
107
105
  min_count.times do |i|
108
106
  instance_id = Fog::AWS::Mock.instance_id
109
- data = {
107
+ instance = {
110
108
  'amiLaunchIndex' => i,
111
109
  'blockDeviceMapping' => [],
112
110
  'dnsName' => '',
113
- 'groupSet' => group_set,
114
111
  'imageId' => image_id,
115
112
  'instanceId' => instance_id,
116
113
  'instanceState' => { 'code' => 0, 'name' => 'pending' },
@@ -119,18 +116,20 @@ module Fog
119
116
  'keyName' => options['KeyName'] || '',
120
117
  'launchTime' => Time.now,
121
118
  'monitoring' => { 'state' => options['Monitoring.Enabled'] || false },
122
- 'ownerId' => @owner_id,
123
119
  'placement' => { 'availabilityZone' => options['Placement.AvailabilityZone'] || Fog::AWS::Mock.availability_zone },
124
120
  'privateDnsName' => '',
125
- 'privateIpAddress' => '',
126
121
  'productCodes' => [],
127
122
  'ramdiskId' => options['RamdiskId'] || Fog::AWS::Mock.ramdisk_id,
128
123
  'reason' => '',
129
- 'reservationId' => reservation_id,
130
124
  'rootDeviceType' => 'instance-store'
131
125
  }
132
- @data[:instances][instance_id] = data
133
- instances_set << data.reject{|key,value| !['amiLaunchIndex', 'blockDeviceMapping', 'dnsName', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'placement', 'privateDnsName', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType'].include?(key)}
126
+ instances_set << instance
127
+ @data[:instances][instance_id] = instance.merge({
128
+ 'groupSet' => group_set,
129
+ 'ownerId' => @owner_id,
130
+ 'privateIpAddress' => '',
131
+ 'reservationId' => reservation_id,
132
+ })
134
133
  end
135
134
  response.body = {
136
135
  'groupSet' => group_set,
@@ -3,8 +3,6 @@ module Fog
3
3
  module EC2
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/ec2/terminate_instances'
7
-
8
6
  # Terminate specified instances
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module S3
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/s3/copy_object'
7
-
8
6
  # Copy an object from one S3 bucket to another
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module S3
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/s3/get_bucket'
7
-
8
6
  # List information about objects in an S3 bucket
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module S3
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/s3/get_bucket_location'
7
-
8
6
  # Get location constraint for an S3 bucket
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module S3
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/s3/get_request_payment'
7
-
8
6
  # Get configured payer for an S3 bucket
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module S3
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/s3/get_service'
7
-
8
6
  # List information about S3 buckets for authorized user
9
7
  #
10
8
  # ==== Returns
@@ -3,8 +3,6 @@ module Fog
3
3
  module SimpleDB
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/simpledb/domain_metadata'
7
-
8
6
  # List metadata for SimpleDB domain
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module SimpleDB
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/simpledb/get_attributes'
7
-
8
6
  # List metadata for SimpleDB domain
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module SimpleDB
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/simpledb/list_domains'
7
-
8
6
  # List SimpleDB domains
9
7
  #
10
8
  # ==== Parameters
@@ -3,8 +3,6 @@ module Fog
3
3
  module SimpleDB
4
4
  class Real
5
5
 
6
- require 'fog/aws/parsers/simpledb/select'
7
-
8
6
  # Select item data from SimpleDB
9
7
  #
10
8
  # ==== Parameters
@@ -9,6 +9,11 @@ module Fog
9
9
  require 'fog/aws/models/s3/directory'
10
10
  require 'fog/aws/models/s3/files'
11
11
  require 'fog/aws/models/s3/file'
12
+ require 'fog/aws/parsers/s3/copy_object'
13
+ require 'fog/aws/parsers/s3/get_bucket'
14
+ require 'fog/aws/parsers/s3/get_bucket_location'
15
+ require 'fog/aws/parsers/s3/get_request_payment'
16
+ require 'fog/aws/parsers/s3/get_service'
12
17
  require 'fog/aws/requests/s3/copy_object'
13
18
  require 'fog/aws/requests/s3/delete_bucket'
14
19
  require 'fog/aws/requests/s3/delete_object'
@@ -5,6 +5,10 @@ module Fog
5
5
  def self.new(options={})
6
6
 
7
7
  unless @required
8
+ require 'fog/aws/parsers/simpledb/domain_metadata'
9
+ require 'fog/aws/parsers/simpledb/get_attributes'
10
+ require 'fog/aws/parsers/simpledb/list_domains'
11
+ require 'fog/aws/parsers/simpledb/select'
8
12
  require 'fog/aws/requests/simpledb/batch_put_attributes'
9
13
  require 'fog/aws/requests/simpledb/create_domain'
10
14
  require 'fog/aws/requests/simpledb/delete_attributes'
@@ -4,6 +4,19 @@ module Fog
4
4
  def self.new(options={})
5
5
 
6
6
  unless @required
7
+ require 'fog/terremark/parsers/get_catalog'
8
+ require 'fog/terremark/parsers/get_catalog_item'
9
+ require 'fog/terremark/parsers/get_organization'
10
+ require 'fog/terremark/parsers/get_organizations'
11
+ require 'fog/terremark/parsers/get_public_ips'
12
+ require 'fog/terremark/parsers/get_tasks_list'
13
+ require 'fog/terremark/parsers/get_vapp_template'
14
+ require 'fog/terremark/parsers/get_vdc'
15
+ require 'fog/terremark/parsers/instantiate_vapp_template'
16
+ require 'fog/terremark/parsers/internet_service'
17
+ require 'fog/terremark/parsers/node_service'
18
+ require 'fog/terremark/parsers/task'
19
+ require 'fog/terremark/parsers/vapp'
7
20
  require 'fog/terremark/requests/add_internet_service'
8
21
  require 'fog/terremark/requests/add_node_service'
9
22
  require 'fog/terremark/requests/create_internet_service'
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/internet_service'
6
-
7
5
  # Reserve requested resources and deploy vApp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/node_service'
6
-
7
5
  # Reserve requested resources and deploy vApp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/internet_service'
6
-
7
5
  # Reserve requested resources and deploy vApp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/task'
6
-
7
5
  # Reserve requested resources and deploy vApp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_catalog'
6
-
7
5
  # Get details of a catalog
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_catalog_item'
6
-
7
5
  # Get details of a catalog item
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_organization'
6
-
7
5
  # Get details of an organization
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_organizations'
6
-
7
5
  # Get list of organizations
8
6
  #
9
7
  # ==== Returns
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_public_ips'
6
-
7
5
  # Get list of public ips
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/task'
6
-
7
5
  # Get details of a task
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_tasks_list'
6
-
7
5
  # Get list of tasks
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/vapp'
6
-
7
5
  # Get details of a vapp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_vapp_template'
6
-
7
5
  # Get details of a vapp template
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/get_vdc'
6
-
7
5
  # Get details of a vdc
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/instantiate_vapp_template'
6
-
7
5
  # Instatiate a vapp template
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/task'
6
-
7
5
  # Power off a vapp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/task'
6
-
7
5
  # Power on a vapp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/task'
6
-
7
5
  # Reset a vapp
8
6
  #
9
7
  # ==== Parameters
@@ -2,8 +2,6 @@ module Fog
2
2
  module Terremark
3
3
  class Real
4
4
 
5
- require 'fog/terremark/parsers/task'
6
-
7
5
  # Shutdown a vapp
8
6
  #
9
7
  # ==== Parameters
@@ -1,5 +1,5 @@
1
- require File.dirname(__FILE__) + '/../../../spec_helper'
2
- require File.dirname(__FILE__) + '/../../../shared_examples/flavors_examples'
1
+ require File.dirname(__FILE__) + '/../../spec_helper'
2
+ require File.dirname(__FILE__) + '/../../shared_examples/flavors_examples'
3
3
 
4
4
  describe 'Fog::AWS::Slicehost::Flavors' do
5
5
 
@@ -11,4 +11,4 @@ describe 'Fog::AWS::Slicehost::Flavors' do
11
11
  @flavors = Slicehost[:slices].flavors
12
12
  end
13
13
 
14
- end
14
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 72
9
- version: 0.0.72
8
+ - 73
9
+ version: 0.0.73
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -104,6 +104,7 @@ extra_rdoc_files:
104
104
  files:
105
105
  - .document
106
106
  - .gitignore
107
+ - Gemfile
107
108
  - README.rdoc
108
109
  - Rakefile
109
110
  - VERSION.yml