fog 0.3.17 → 0.3.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. data/Gemfile.lock +5 -5
  2. data/README.rdoc +16 -7
  3. data/fog.gemspec +102 -27
  4. data/lib/fog.rb +3 -2
  5. data/lib/fog/aws/cdn.rb +2 -1
  6. data/lib/fog/aws/compute.rb +3 -2
  7. data/lib/fog/aws/iam.rb +8 -0
  8. data/lib/fog/aws/models/compute/flavors.rb +2 -1
  9. data/lib/fog/aws/models/compute/server.rb +3 -0
  10. data/lib/fog/aws/models/compute/volume.rb +9 -8
  11. data/lib/fog/aws/models/storage/file.rb +24 -14
  12. data/lib/fog/aws/models/storage/files.rb +4 -14
  13. data/lib/fog/aws/parsers/cdn/distribution.rb +16 -1
  14. data/lib/fog/aws/parsers/cdn/get_distribution_list.rb +13 -0
  15. data/lib/fog/aws/parsers/compute/describe_volumes.rb +2 -0
  16. data/lib/fog/aws/parsers/iam/create_group.rb +2 -2
  17. data/lib/fog/aws/parsers/iam/create_user.rb +26 -0
  18. data/lib/fog/aws/parsers/iam/list_group_policies.rb +28 -0
  19. data/lib/fog/aws/parsers/iam/list_groups.rb +1 -1
  20. data/lib/fog/aws/parsers/storage/complete_multipart_upload.rb +24 -0
  21. data/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb +24 -0
  22. data/lib/fog/aws/parsers/storage/list_multipart_uploads.rb +56 -0
  23. data/lib/fog/aws/parsers/storage/list_parts.rb +40 -0
  24. data/lib/fog/aws/requests/cdn/get_distribution.rb +11 -1
  25. data/lib/fog/aws/requests/cdn/get_distribution_list.rb +9 -1
  26. data/lib/fog/aws/requests/cdn/post_distribution.rb +16 -5
  27. data/lib/fog/aws/requests/cdn/put_distribution_config.rb +102 -0
  28. data/lib/fog/aws/requests/compute/describe_volumes.rb +1 -0
  29. data/lib/fog/aws/requests/compute/run_instances.rb +1 -1
  30. data/lib/fog/aws/requests/iam/add_user_to_group.rb +42 -0
  31. data/lib/fog/aws/requests/iam/create_group.rb +7 -3
  32. data/lib/fog/aws/requests/iam/create_user.rb +47 -0
  33. data/lib/fog/aws/requests/iam/delete_group.rb +5 -1
  34. data/lib/fog/aws/requests/iam/delete_group_policy.rb +42 -0
  35. data/lib/fog/aws/requests/iam/delete_user.rb +40 -0
  36. data/lib/fog/aws/requests/iam/list_group_policies.rb +47 -0
  37. data/lib/fog/aws/requests/iam/list_groups.rb +9 -4
  38. data/lib/fog/aws/requests/iam/put_group_policy.rb +44 -0
  39. data/lib/fog/aws/requests/iam/remove_user_from_group.rb +42 -0
  40. data/lib/fog/aws/requests/simpledb/put_attributes.rb +2 -2
  41. data/lib/fog/aws/requests/storage/abort_multipart_upload.rb +38 -0
  42. data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +60 -0
  43. data/lib/fog/aws/requests/storage/get_service.rb +1 -1
  44. data/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +55 -0
  45. data/lib/fog/aws/requests/storage/list_multipart_uploads.rb +68 -0
  46. data/lib/fog/aws/requests/storage/list_parts.rb +67 -0
  47. data/lib/fog/aws/requests/storage/put_object.rb +12 -5
  48. data/lib/fog/aws/requests/storage/upload_part.rb +51 -0
  49. data/lib/fog/aws/storage.rb +12 -6
  50. data/lib/fog/brightbox.rb +7 -0
  51. data/lib/fog/brightbox/bin.rb +23 -0
  52. data/lib/fog/brightbox/compute.rb +134 -0
  53. data/lib/fog/brightbox/models/compute/account.rb +51 -0
  54. data/lib/fog/brightbox/models/compute/cloud_ip.rb +43 -0
  55. data/lib/fog/brightbox/models/compute/cloud_ips.rb +34 -0
  56. data/lib/fog/brightbox/models/compute/flavor.rb +33 -0
  57. data/lib/fog/brightbox/models/compute/flavors.rb +28 -0
  58. data/lib/fog/brightbox/models/compute/image.rb +52 -0
  59. data/lib/fog/brightbox/models/compute/images.rb +28 -0
  60. data/lib/fog/brightbox/models/compute/server.rb +94 -0
  61. data/lib/fog/brightbox/models/compute/servers.rb +29 -0
  62. data/lib/fog/brightbox/models/compute/user.rb +39 -0
  63. data/lib/fog/brightbox/models/compute/users.rb +29 -0
  64. data/lib/fog/brightbox/models/compute/zone.rb +21 -0
  65. data/lib/fog/brightbox/models/compute/zones.rb +29 -0
  66. data/lib/fog/brightbox/requests/compute/create_api_client.rb +27 -0
  67. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +27 -0
  68. data/lib/fog/brightbox/requests/compute/create_image.rb +27 -0
  69. data/lib/fog/brightbox/requests/compute/create_server.rb +27 -0
  70. data/lib/fog/brightbox/requests/compute/destroy_api_client.rb +28 -0
  71. data/lib/fog/brightbox/requests/compute/destroy_cloud_ip.rb +28 -0
  72. data/lib/fog/brightbox/requests/compute/destroy_image.rb +28 -0
  73. data/lib/fog/brightbox/requests/compute/destroy_server.rb +28 -0
  74. data/lib/fog/brightbox/requests/compute/get_account.rb +27 -0
  75. data/lib/fog/brightbox/requests/compute/get_api_client.rb +28 -0
  76. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +28 -0
  77. data/lib/fog/brightbox/requests/compute/get_image.rb +28 -0
  78. data/lib/fog/brightbox/requests/compute/get_interface.rb +28 -0
  79. data/lib/fog/brightbox/requests/compute/get_server.rb +28 -0
  80. data/lib/fog/brightbox/requests/compute/get_server_type.rb +28 -0
  81. data/lib/fog/brightbox/requests/compute/get_user.rb +28 -0
  82. data/lib/fog/brightbox/requests/compute/get_zone.rb +28 -0
  83. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +27 -0
  84. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +27 -0
  85. data/lib/fog/brightbox/requests/compute/list_images.rb +27 -0
  86. data/lib/fog/brightbox/requests/compute/list_server_types.rb +27 -0
  87. data/lib/fog/brightbox/requests/compute/list_servers.rb +27 -0
  88. data/lib/fog/brightbox/requests/compute/list_users.rb +27 -0
  89. data/lib/fog/brightbox/requests/compute/list_zones.rb +27 -0
  90. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +28 -0
  91. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +27 -0
  92. data/lib/fog/brightbox/requests/compute/resize_server.rb +27 -0
  93. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +28 -0
  94. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +28 -0
  95. data/lib/fog/brightbox/requests/compute/start_server.rb +28 -0
  96. data/lib/fog/brightbox/requests/compute/stop_server.rb +28 -0
  97. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +28 -0
  98. data/lib/fog/brightbox/requests/compute/update_account.rb +28 -0
  99. data/lib/fog/brightbox/requests/compute/update_api_client.rb +29 -0
  100. data/lib/fog/brightbox/requests/compute/update_image.rb +29 -0
  101. data/lib/fog/brightbox/requests/compute/update_server.rb +29 -0
  102. data/lib/fog/brightbox/requests/compute/update_user.rb +29 -0
  103. data/lib/fog/core/attributes.rb +3 -3
  104. data/lib/fog/core/bin.rb +2 -0
  105. data/lib/fog/core/compute.rb +5 -2
  106. data/lib/fog/core/credentials.rb +2 -0
  107. data/lib/fog/core/service.rb +24 -12
  108. data/lib/fog/google/models/storage/file.rb +23 -14
  109. data/lib/fog/google/models/storage/files.rb +4 -14
  110. data/lib/fog/google/requests/storage/get_bucket.rb +0 -1
  111. data/lib/fog/google/requests/storage/put_object.rb +9 -2
  112. data/lib/fog/rackspace/models/storage/file.rb +3 -3
  113. data/lib/fog/rackspace/models/storage/files.rb +5 -13
  114. data/spec/aws/models/compute/server_spec.rb +0 -3
  115. data/spec/aws/requests/simpledb/get_attributes_spec.rb +11 -0
  116. data/spec/core/attributes_spec.rb +52 -0
  117. data/spec/vcloud/bin_spec.rb +1 -1
  118. data/spec/vcloud/vcloud_spec.rb +1 -1
  119. data/tests/aws/models/compute/flavors_tests.rb +5 -0
  120. data/tests/aws/models/compute/server_tests.rb +6 -0
  121. data/tests/aws/models/compute/servers_tests.rb +6 -0
  122. data/tests/aws/requests/storage/bucket_tests.rb +1 -1
  123. data/tests/aws/requests/storage/multipart_upload_tests.rb +135 -0
  124. data/tests/bluebox/models/compute/flavors_tests.rb +5 -0
  125. data/tests/bluebox/models/compute/server_tests.rb +5 -0
  126. data/tests/bluebox/models/compute/servers_tests.rb +6 -0
  127. data/tests/brightbox/helper.rb +0 -0
  128. data/tests/brightbox/models/compute/flavors_tests.rb +5 -0
  129. data/tests/brightbox/models/compute/server_tests.rb +6 -0
  130. data/tests/brightbox/models/compute/servers_tests.rb +6 -0
  131. data/tests/google/requests/storage/bucket_tests.rb +78 -0
  132. data/tests/google/requests/storage/object_tests.rb +81 -0
  133. data/tests/helper.rb +19 -4
  134. data/tests/helpers/collection_tests.rb +51 -0
  135. data/tests/helpers/compute/flavors_tests.rb +34 -0
  136. data/tests/helpers/compute/server_tests.rb +19 -0
  137. data/tests/helpers/compute/servers_tests.rb +11 -0
  138. data/tests/helpers/model_tests.rb +28 -0
  139. data/tests/helpers/storage/directories_tests.rb +4 -36
  140. data/tests/helpers/storage/directory_tests.rb +8 -22
  141. data/tests/helpers/storage/file_tests.rb +8 -25
  142. data/tests/helpers/storage/files_tests.rb +5 -39
  143. data/tests/local/models/storage/directories_tests.rb +1 -1
  144. data/tests/local/models/storage/directory_tests.rb +1 -1
  145. data/tests/local/models/storage/file_tests.rb +1 -1
  146. data/tests/local/models/storage/files_tests.rb +1 -1
  147. data/tests/rackspace/models/compute/flavors_tests.rb +5 -0
  148. data/tests/rackspace/models/compute/server_tests.rb +6 -0
  149. data/tests/rackspace/models/compute/servers_tests.rb +6 -0
  150. data/tests/rackspace/models/storage/directories_tests.rb +1 -1
  151. data/tests/rackspace/models/storage/directory_tests.rb +1 -1
  152. data/tests/rackspace/models/storage/file_tests.rb +1 -1
  153. data/tests/rackspace/models/storage/files_tests.rb +1 -1
  154. data/tests/slicehost/models/compute/flavors_tests.rb +5 -0
  155. data/tests/slicehost/models/compute/server_tests.rb +6 -0
  156. data/tests/slicehost/models/compute/servers_tests.rb +6 -0
  157. metadata +108 -31
  158. data/spec/aws/models/compute/flavors_spec.rb +0 -14
  159. data/spec/aws/models/compute/servers_spec.rb +0 -21
  160. data/spec/bluebox/models/compute/flavors_spec.rb +0 -17
  161. data/spec/bluebox/models/compute/server_spec.rb +0 -29
  162. data/spec/bluebox/models/compute/servers_spec.rb +0 -31
  163. data/spec/google/requests/storage/copy_object_spec.rb +0 -61
  164. data/spec/google/requests/storage/delete_bucket_spec.rb +0 -35
  165. data/spec/google/requests/storage/delete_object_spec.rb +0 -38
  166. data/spec/google/requests/storage/get_bucket_spec.rb +0 -110
  167. data/spec/google/requests/storage/get_object_spec.rb +0 -58
  168. data/spec/google/requests/storage/get_service_spec.rb +0 -32
  169. data/spec/google/requests/storage/head_object_spec.rb +0 -26
  170. data/spec/google/requests/storage/put_bucket_spec.rb +0 -21
  171. data/spec/google/requests/storage/put_object_spec.rb +0 -43
  172. data/spec/rackspace/models/compute/flavors_spec.rb +0 -18
  173. data/spec/rackspace/models/compute/server_spec.rb +0 -55
  174. data/spec/rackspace/models/compute/servers_spec.rb +0 -22
  175. data/spec/shared_examples/flavors_examples.rb +0 -16
  176. data/spec/shared_examples/server_examples.rb +0 -43
  177. data/spec/shared_examples/servers_examples.rb +0 -37
  178. data/spec/slicehost/models/compute/flavors_spec.rb +0 -18
  179. data/spec/slicehost/models/compute/server_spec.rb +0 -55
  180. data/spec/slicehost/models/compute/servers_spec.rb +0 -26
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fog (0.3.17)
4
+ fog (0.3.18)
5
5
  builder
6
6
  excon (>= 0.2.4)
7
7
  formatador (>= 0.0.15)
@@ -24,9 +24,9 @@ GEM
24
24
  net-ssh (2.0.23)
25
25
  nokogiri (1.4.3.1)
26
26
  rake (0.8.7)
27
- rspec (1.3.0)
27
+ rspec (1.3.1)
28
28
  ruby-hmac (0.4.0)
29
- shindo (0.1.7)
29
+ shindo (0.1.9)
30
30
  formatador (>= 0.0.14)
31
31
  gestalt (>= 0.0.11)
32
32
 
@@ -43,6 +43,6 @@ DEPENDENCIES
43
43
  net-ssh (~> 2.0.23)
44
44
  nokogiri (~> 1.4.3.1)
45
45
  rake
46
- rspec
46
+ rspec (= 1.3.1)
47
47
  ruby-hmac
48
- shindo (= 0.1.7)
48
+ shindo (= 0.1.9)
@@ -18,8 +18,10 @@ Now just type 'fog' to trying stuff out, confident that fog should let you know
18
18
 
19
19
  >> server = AWS.servers.create
20
20
  ArgumentError: image_id is required for this operation
21
+
21
22
  >> server = AWS.servers.create(:image_id => 'ami-5ee70037')
22
23
  <Fog::AWS::EC2::Server [...]>
24
+
23
25
  >> server.destroy # cleanup after yourself or regret it, trust me
24
26
  true
25
27
 
@@ -34,10 +36,10 @@ You can see a list of available collections by calling #collections on the conne
34
36
  Some of these collections are available across multiple providers. For example, all compute providers have +flavors+, +images+ and +servers+, and storage providers have +directory+ and +file+.
35
37
 
36
38
  Collections share most of the basic CRUD type operations, such as:
37
- * +#all+ - fetch every object of that type from the provider.
38
- * +#create+ initialize a new record locally and then persists it with the provider.
39
- * +#get+ - fetch a single object by its identity from the provider.
40
- * +#new+ - initialize a new record locally, but do not persist it to the provider.
39
+ * +all+ - fetch every object of that type from the provider.
40
+ * +create+ - initialize a new record locally and then persists it with the provider.
41
+ * +get+ - fetch a single object by its identity from the provider.
42
+ * +new+ - initialize a new record locally, but do not persist it to the provider.
41
43
 
42
44
  As an example, we'll try initializing and persisting a Rackspace Cloud server:
43
45
 
@@ -63,9 +65,9 @@ As an example, we'll try initializing and persisting a Rackspace Cloud server:
63
65
  == Models
64
66
 
65
67
  Many of the collection methods return individual objects, which also provide some common methods:
66
- * +#destroy+ - will destroy the persisted object from the provider
67
- * +#save+ - persist the object to the provider
68
- * +#wait_for+ - takes a block and waits for either the block to return true for the object or for a timeout (defaults to 10 minutes)
68
+ * +destroy+ - will destroy the persisted object from the provider
69
+ * +save+ - persist the object to the provider
70
+ * +wait_for+ - takes a block and waits for either the block to return true for the object or for a timeout (defaults to 10 minutes)
69
71
 
70
72
  == Mocks
71
73
 
@@ -100,6 +102,7 @@ Play around and use the console to explore or check out the {getting started gui
100
102
  You should try out the (varying) support fog has for:
101
103
  * {AWS}[http://aws.amazon.com] [{Compute}[http://aws.amazon.com/ec2], {ELB}[http://aws.amazon.com/elasticloadbalancing], {Storage}[http://aws.amazon.com/s3], {SimpleDB}[http://aws.amazon.com/simpledb]]
102
104
  * {Blue Box Group}[http://www.blueboxgrp.com] [{Compute}[http://www.blueboxgrp.com/blocks]]
105
+ * {Brightbox}[http://www.brightbox.co.uk] [{Compute}[http://beta.brightbox.com/]]
103
106
  * {Google}[http://www.google.com] [{Storage}[http://code.google.com/apis/storage]]
104
107
  * {Rackspace}[http://www.rackspace.com] [{Compute}[http://www.rackspacecloud.com/cloud_hosting_products/servers], {Storage}[http://www.rackspacecloud.com/cloud_hosting_products/files]]
105
108
  * {Slicehost}[http://www.slicehost.com] [{Compute}[http://www.slicehost.com]]
@@ -120,6 +123,12 @@ Enjoy, and let me know what I can do to continue improving fog!
120
123
  * Learn about {contributing}[http://github.com/geemus/fog/wiki/contributor-guide] or find more info about the {Providers}[http://github.com/geemus/fog/wiki/Providers] (including some todo items)
121
124
  * See what already uses fog and add your own stuff to {the list}[http://wiki.github.com/geemus/fog/in-the-wild]
122
125
 
126
+ == Sponsorship
127
+
128
+ http://www.engineyard.com/images/logo.png
129
+
130
+ All new work on fog is sponsored by {Engine Yard}[http://engineyard.com]
131
+
123
132
  == Copyright
124
133
 
125
134
  (The MIT License)
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.3.17'
11
- s.date = '2010-11-05'
10
+ s.version = '0.3.18'
11
+ s.date = '2010-11-16'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
@@ -54,8 +54,8 @@ Gem::Specification.new do |s|
54
54
  ## List your development dependencies here. Development dependencies are
55
55
  ## those that are only needed during development
56
56
  s.add_development_dependency('rake')
57
- s.add_development_dependency('rspec')
58
- s.add_development_dependency('shindo', '0.1.7')
57
+ s.add_development_dependency('rspec', '1.3.1')
58
+ s.add_development_dependency('shindo', '0.1.9')
59
59
 
60
60
  ## Leave this section as-is. It will be automatically generated from the
61
61
  ## contents of your Git repository via the gemspec task. DO NOT REMOVE
@@ -141,6 +141,8 @@ Gem::Specification.new do |s|
141
141
  lib/fog/aws/parsers/elb/register_instances_with_load_balancer.rb
142
142
  lib/fog/aws/parsers/iam/basic.rb
143
143
  lib/fog/aws/parsers/iam/create_group.rb
144
+ lib/fog/aws/parsers/iam/create_user.rb
145
+ lib/fog/aws/parsers/iam/list_group_policies.rb
144
146
  lib/fog/aws/parsers/iam/list_groups.rb
145
147
  lib/fog/aws/parsers/simpledb/basic.rb
146
148
  lib/fog/aws/parsers/simpledb/domain_metadata.rb
@@ -148,6 +150,7 @@ Gem::Specification.new do |s|
148
150
  lib/fog/aws/parsers/simpledb/list_domains.rb
149
151
  lib/fog/aws/parsers/simpledb/select.rb
150
152
  lib/fog/aws/parsers/storage/access_control_list.rb
153
+ lib/fog/aws/parsers/storage/complete_multipart_upload.rb
151
154
  lib/fog/aws/parsers/storage/copy_object.rb
152
155
  lib/fog/aws/parsers/storage/get_bucket.rb
153
156
  lib/fog/aws/parsers/storage/get_bucket_location.rb
@@ -156,11 +159,15 @@ Gem::Specification.new do |s|
156
159
  lib/fog/aws/parsers/storage/get_bucket_versioning.rb
157
160
  lib/fog/aws/parsers/storage/get_request_payment.rb
158
161
  lib/fog/aws/parsers/storage/get_service.rb
162
+ lib/fog/aws/parsers/storage/initiate_multipart_upload.rb
163
+ lib/fog/aws/parsers/storage/list_multipart_uploads.rb
164
+ lib/fog/aws/parsers/storage/list_parts.rb
159
165
  lib/fog/aws/requests/cdn/delete_distribution.rb
160
166
  lib/fog/aws/requests/cdn/get_distribution.rb
161
167
  lib/fog/aws/requests/cdn/get_distribution_list.rb
162
168
  lib/fog/aws/requests/cdn/post_distribution.rb
163
169
  lib/fog/aws/requests/cdn/post_invalidation.rb
170
+ lib/fog/aws/requests/cdn/put_distribution_config.rb
164
171
  lib/fog/aws/requests/compute/allocate_address.rb
165
172
  lib/fog/aws/requests/compute/associate_address.rb
166
173
  lib/fog/aws/requests/compute/attach_volume.rb
@@ -210,9 +217,16 @@ Gem::Specification.new do |s|
210
217
  lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb
211
218
  lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb
212
219
  lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
220
+ lib/fog/aws/requests/iam/add_user_to_group.rb
213
221
  lib/fog/aws/requests/iam/create_group.rb
222
+ lib/fog/aws/requests/iam/create_user.rb
214
223
  lib/fog/aws/requests/iam/delete_group.rb
224
+ lib/fog/aws/requests/iam/delete_group_policy.rb
225
+ lib/fog/aws/requests/iam/delete_user.rb
226
+ lib/fog/aws/requests/iam/list_group_policies.rb
215
227
  lib/fog/aws/requests/iam/list_groups.rb
228
+ lib/fog/aws/requests/iam/put_group_policy.rb
229
+ lib/fog/aws/requests/iam/remove_user_from_group.rb
216
230
  lib/fog/aws/requests/simpledb/batch_put_attributes.rb
217
231
  lib/fog/aws/requests/simpledb/create_domain.rb
218
232
  lib/fog/aws/requests/simpledb/delete_attributes.rb
@@ -222,6 +236,8 @@ Gem::Specification.new do |s|
222
236
  lib/fog/aws/requests/simpledb/list_domains.rb
223
237
  lib/fog/aws/requests/simpledb/put_attributes.rb
224
238
  lib/fog/aws/requests/simpledb/select.rb
239
+ lib/fog/aws/requests/storage/abort_multipart_upload.rb
240
+ lib/fog/aws/requests/storage/complete_multipart_upload.rb
225
241
  lib/fog/aws/requests/storage/copy_object.rb
226
242
  lib/fog/aws/requests/storage/delete_bucket.rb
227
243
  lib/fog/aws/requests/storage/delete_object.rb
@@ -238,6 +254,9 @@ Gem::Specification.new do |s|
238
254
  lib/fog/aws/requests/storage/get_request_payment.rb
239
255
  lib/fog/aws/requests/storage/get_service.rb
240
256
  lib/fog/aws/requests/storage/head_object.rb
257
+ lib/fog/aws/requests/storage/initiate_multipart_upload.rb
258
+ lib/fog/aws/requests/storage/list_multipart_uploads.rb
259
+ lib/fog/aws/requests/storage/list_parts.rb
241
260
  lib/fog/aws/requests/storage/post_object_hidden_fields.rb
242
261
  lib/fog/aws/requests/storage/put_bucket.rb
243
262
  lib/fog/aws/requests/storage/put_bucket_acl.rb
@@ -246,6 +265,7 @@ Gem::Specification.new do |s|
246
265
  lib/fog/aws/requests/storage/put_object.rb
247
266
  lib/fog/aws/requests/storage/put_object_url.rb
248
267
  lib/fog/aws/requests/storage/put_request_payment.rb
268
+ lib/fog/aws/requests/storage/upload_part.rb
249
269
  lib/fog/aws/s3.rb
250
270
  lib/fog/aws/simpledb.rb
251
271
  lib/fog/aws/storage.rb
@@ -267,6 +287,59 @@ Gem::Specification.new do |s|
267
287
  lib/fog/bluebox/requests/compute/get_template.rb
268
288
  lib/fog/bluebox/requests/compute/get_templates.rb
269
289
  lib/fog/bluebox/requests/compute/reboot_block.rb
290
+ lib/fog/brightbox.rb
291
+ lib/fog/brightbox/bin.rb
292
+ lib/fog/brightbox/compute.rb
293
+ lib/fog/brightbox/models/compute/account.rb
294
+ lib/fog/brightbox/models/compute/cloud_ip.rb
295
+ lib/fog/brightbox/models/compute/cloud_ips.rb
296
+ lib/fog/brightbox/models/compute/flavor.rb
297
+ lib/fog/brightbox/models/compute/flavors.rb
298
+ lib/fog/brightbox/models/compute/image.rb
299
+ lib/fog/brightbox/models/compute/images.rb
300
+ lib/fog/brightbox/models/compute/server.rb
301
+ lib/fog/brightbox/models/compute/servers.rb
302
+ lib/fog/brightbox/models/compute/user.rb
303
+ lib/fog/brightbox/models/compute/users.rb
304
+ lib/fog/brightbox/models/compute/zone.rb
305
+ lib/fog/brightbox/models/compute/zones.rb
306
+ lib/fog/brightbox/requests/compute/create_api_client.rb
307
+ lib/fog/brightbox/requests/compute/create_cloud_ip.rb
308
+ lib/fog/brightbox/requests/compute/create_image.rb
309
+ lib/fog/brightbox/requests/compute/create_server.rb
310
+ lib/fog/brightbox/requests/compute/destroy_api_client.rb
311
+ lib/fog/brightbox/requests/compute/destroy_cloud_ip.rb
312
+ lib/fog/brightbox/requests/compute/destroy_image.rb
313
+ lib/fog/brightbox/requests/compute/destroy_server.rb
314
+ lib/fog/brightbox/requests/compute/get_account.rb
315
+ lib/fog/brightbox/requests/compute/get_api_client.rb
316
+ lib/fog/brightbox/requests/compute/get_cloud_ip.rb
317
+ lib/fog/brightbox/requests/compute/get_image.rb
318
+ lib/fog/brightbox/requests/compute/get_interface.rb
319
+ lib/fog/brightbox/requests/compute/get_server.rb
320
+ lib/fog/brightbox/requests/compute/get_server_type.rb
321
+ lib/fog/brightbox/requests/compute/get_user.rb
322
+ lib/fog/brightbox/requests/compute/get_zone.rb
323
+ lib/fog/brightbox/requests/compute/list_api_clients.rb
324
+ lib/fog/brightbox/requests/compute/list_cloud_ips.rb
325
+ lib/fog/brightbox/requests/compute/list_images.rb
326
+ lib/fog/brightbox/requests/compute/list_server_types.rb
327
+ lib/fog/brightbox/requests/compute/list_servers.rb
328
+ lib/fog/brightbox/requests/compute/list_users.rb
329
+ lib/fog/brightbox/requests/compute/list_zones.rb
330
+ lib/fog/brightbox/requests/compute/map_cloud_ip.rb
331
+ lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb
332
+ lib/fog/brightbox/requests/compute/resize_server.rb
333
+ lib/fog/brightbox/requests/compute/shutdown_server.rb
334
+ lib/fog/brightbox/requests/compute/snapshot_server.rb
335
+ lib/fog/brightbox/requests/compute/start_server.rb
336
+ lib/fog/brightbox/requests/compute/stop_server.rb
337
+ lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb
338
+ lib/fog/brightbox/requests/compute/update_account.rb
339
+ lib/fog/brightbox/requests/compute/update_api_client.rb
340
+ lib/fog/brightbox/requests/compute/update_image.rb
341
+ lib/fog/brightbox/requests/compute/update_server.rb
342
+ lib/fog/brightbox/requests/compute/update_user.rb
270
343
  lib/fog/core.rb
271
344
  lib/fog/core/attributes.rb
272
345
  lib/fog/core/bin.rb
@@ -569,13 +642,11 @@ Gem::Specification.new do |s|
569
642
  lib/fog/vcloud/terremark/vcloud/requests/get_vdc.rb
570
643
  spec/aws/models/compute/address_spec.rb
571
644
  spec/aws/models/compute/addresses_spec.rb
572
- spec/aws/models/compute/flavors_spec.rb
573
645
  spec/aws/models/compute/key_pair_spec.rb
574
646
  spec/aws/models/compute/key_pairs_spec.rb
575
647
  spec/aws/models/compute/security_group_spec.rb
576
648
  spec/aws/models/compute/security_groups_spec.rb
577
649
  spec/aws/models/compute/server_spec.rb
578
- spec/aws/models/compute/servers_spec.rb
579
650
  spec/aws/models/compute/snapshot_spec.rb
580
651
  spec/aws/models/compute/snapshots_spec.rb
581
652
  spec/aws/models/compute/volume_spec.rb
@@ -589,29 +660,9 @@ Gem::Specification.new do |s|
589
660
  spec/aws/requests/simpledb/list_domains_spec.rb
590
661
  spec/aws/requests/simpledb/put_attributes_spec.rb
591
662
  spec/aws/requests/simpledb/select_spec.rb
592
- spec/bluebox/models/compute/flavors_spec.rb
593
- spec/bluebox/models/compute/server_spec.rb
594
- spec/bluebox/models/compute/servers_spec.rb
595
663
  spec/compact_progress_bar_formatter.rb
596
- spec/google/requests/storage/copy_object_spec.rb
597
- spec/google/requests/storage/delete_bucket_spec.rb
598
- spec/google/requests/storage/delete_object_spec.rb
599
- spec/google/requests/storage/get_bucket_spec.rb
600
- spec/google/requests/storage/get_object_spec.rb
601
- spec/google/requests/storage/get_service_spec.rb
602
- spec/google/requests/storage/head_object_spec.rb
603
- spec/google/requests/storage/put_bucket_spec.rb
604
- spec/google/requests/storage/put_object_spec.rb
664
+ spec/core/attributes_spec.rb
605
665
  spec/lorem.txt
606
- spec/rackspace/models/compute/flavors_spec.rb
607
- spec/rackspace/models/compute/server_spec.rb
608
- spec/rackspace/models/compute/servers_spec.rb
609
- spec/shared_examples/flavors_examples.rb
610
- spec/shared_examples/server_examples.rb
611
- spec/shared_examples/servers_examples.rb
612
- spec/slicehost/models/compute/flavors_spec.rb
613
- spec/slicehost/models/compute/server_spec.rb
614
- spec/slicehost/models/compute/servers_spec.rb
615
666
  spec/spec_helper.rb
616
667
  spec/vcloud/bin_spec.rb
617
668
  spec/vcloud/models/vdc_spec.rb
@@ -662,6 +713,9 @@ Gem::Specification.new do |s|
662
713
  spec/vcloud/terremark/ecloud/requests/power_on_spec.rb
663
714
  spec/vcloud/vcloud_spec.rb
664
715
  tests/aws/helper.rb
716
+ tests/aws/models/compute/flavors_tests.rb
717
+ tests/aws/models/compute/server_tests.rb
718
+ tests/aws/models/compute/servers_tests.rb
665
719
  tests/aws/models/storage/directories_tests.rb
666
720
  tests/aws/models/storage/directory_tests.rb
667
721
  tests/aws/models/storage/file_tests.rb
@@ -677,19 +731,34 @@ Gem::Specification.new do |s|
677
731
  tests/aws/requests/compute/tag_tests.rb
678
732
  tests/aws/requests/compute/volume_tests.rb
679
733
  tests/aws/requests/storage/bucket_tests.rb
734
+ tests/aws/requests/storage/multipart_upload_tests.rb
680
735
  tests/aws/requests/storage/object_tests.rb
681
736
  tests/bluebox/helper.rb
737
+ tests/bluebox/models/compute/flavors_tests.rb
738
+ tests/bluebox/models/compute/server_tests.rb
739
+ tests/bluebox/models/compute/servers_tests.rb
682
740
  tests/bluebox/requests/compute/block_tests.rb
683
741
  tests/bluebox/requests/compute/product_tests.rb
684
742
  tests/bluebox/requests/compute/template_tests.rb
743
+ tests/brightbox/helper.rb
744
+ tests/brightbox/models/compute/flavors_tests.rb
745
+ tests/brightbox/models/compute/server_tests.rb
746
+ tests/brightbox/models/compute/servers_tests.rb
685
747
  tests/go_grid/helper.rb
686
748
  tests/go_grid/requests/compute/image_tests.rb
687
749
  tests/google/models/storage/directories_tests.rb
688
750
  tests/google/models/storage/directory_tests.rb
689
751
  tests/google/models/storage/file_tests.rb
690
752
  tests/google/models/storage/files_tests.rb
753
+ tests/google/requests/storage/bucket_tests.rb
754
+ tests/google/requests/storage/object_tests.rb
691
755
  tests/helper.rb
692
756
  tests/helper_tests.rb
757
+ tests/helpers/collection_tests.rb
758
+ tests/helpers/compute/flavors_tests.rb
759
+ tests/helpers/compute/server_tests.rb
760
+ tests/helpers/compute/servers_tests.rb
761
+ tests/helpers/model_tests.rb
693
762
  tests/helpers/storage/directories_tests.rb
694
763
  tests/helpers/storage/directory_tests.rb
695
764
  tests/helpers/storage/file_tests.rb
@@ -705,6 +774,9 @@ Gem::Specification.new do |s|
705
774
  tests/local/models/storage/files_tests.rb
706
775
  tests/lorem.txt
707
776
  tests/rackspace/helper.rb
777
+ tests/rackspace/models/compute/flavors_tests.rb
778
+ tests/rackspace/models/compute/server_tests.rb
779
+ tests/rackspace/models/compute/servers_tests.rb
708
780
  tests/rackspace/models/storage/directories_tests.rb
709
781
  tests/rackspace/models/storage/directory_tests.rb
710
782
  tests/rackspace/models/storage/file_tests.rb
@@ -716,6 +788,9 @@ Gem::Specification.new do |s|
716
788
  tests/rackspace/requests/storage/container_tests.rb
717
789
  tests/rackspace/requests/storage/object_tests.rb
718
790
  tests/slicehost/helper.rb
791
+ tests/slicehost/models/compute/flavors_tests.rb
792
+ tests/slicehost/models/compute/server_tests.rb
793
+ tests/slicehost/models/compute/servers_tests.rb
719
794
  tests/slicehost/requests/compute/backup_tests.rb
720
795
  tests/slicehost/requests/compute/flavor_tests.rb
721
796
  tests/slicehost/requests/compute/image_tests.rb
data/lib/fog.rb CHANGED
@@ -18,7 +18,7 @@ module Fog
18
18
  @mocking = false
19
19
 
20
20
  unless const_defined?(:VERSION)
21
- VERSION = '0.3.17'
21
+ VERSION = '0.3.18'
22
22
  end
23
23
 
24
24
  module Mock
@@ -67,11 +67,12 @@ module Fog
67
67
  { :duration => duration }
68
68
  end
69
69
  end
70
-
70
+
71
71
  end
72
72
 
73
73
  require 'fog/aws'
74
74
  require 'fog/bluebox'
75
+ require 'fog/brightbox'
75
76
  require 'fog/go_grid'
76
77
  require 'fog/linode'
77
78
  require 'fog/local'
@@ -12,6 +12,7 @@ module Fog
12
12
  request 'get_distribution_list'
13
13
  request 'post_distribution'
14
14
  request 'post_invalidation'
15
+ request 'put_distribution_config'
15
16
 
16
17
  class Mock
17
18
 
@@ -69,7 +70,7 @@ module Fog
69
70
  @path = options[:path] || '/'
70
71
  @port = options[:port] || 443
71
72
  @scheme = options[:scheme] || 'https'
72
- @version = options[:version] || '2010-08-01'
73
+ @version = options[:version] || '2010-11-01'
73
74
  @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", options[:persistent] || true)
74
75
  end
75
76
 
@@ -2,7 +2,8 @@ module Fog
2
2
  module AWS
3
3
  class Compute < Fog::Service
4
4
 
5
- requires :aws_access_key_id, :aws_secret_access_key
5
+ requires :aws_access_key_id, :aws_secret_access_key
6
+ recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
6
7
 
7
8
  model_path 'fog/aws/models/compute'
8
9
  model :address
@@ -192,7 +193,7 @@ module Fog
192
193
  end
193
194
 
194
195
  private
195
-
196
+
196
197
  def request(params)
197
198
  idempotent = params.delete(:idempotent)
198
199
  parser = params.delete(:parser)
@@ -5,9 +5,16 @@ module Fog
5
5
  requires :aws_access_key_id, :aws_secret_access_key
6
6
 
7
7
  request_path 'fog/aws/requests/iam'
8
+ request :add_user_to_group
8
9
  request :create_group
10
+ request :create_user
9
11
  request :delete_group
12
+ request :delete_group_policy
13
+ request :delete_user
10
14
  request :list_groups
15
+ request :list_group_policies
16
+ request :put_group_policy
17
+ request :remove_user_from_group
11
18
 
12
19
  class Mock
13
20
 
@@ -36,6 +43,7 @@ module Fog
36
43
  # ==== Returns
37
44
  # * IAM object with connection to AWS.
38
45
  def initialize(options={})
46
+ require 'json'
39
47
  @aws_access_key_id = options[:aws_access_key_id]
40
48
  @aws_secret_access_key = options[:aws_secret_access_key]
41
49
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
@@ -24,7 +24,8 @@ module Fog
24
24
  { :bits => 64, :cores => 13, :disk => 850, :id => 'm2.2xlarge', :name => 'High Memory Double Extra Large', :ram => 35020.8},
25
25
  { :bits => 64, :cores => 26, :disk => 1690, :id => 'm2.4xlarge', :name => 'High Memory Quadruple Extra Large', :ram => 70041.6},
26
26
 
27
- { :bits => 64, :cores => 33.5, :disk => 1690, :id => 'cc1.4xlarge', :name => 'Cluster Compute Quadruple Extra Large', :ram => 23552}
27
+ { :bits => 64, :cores => 33.5, :disk => 1690, :id => 'cc1.4xlarge', :name => 'Cluster Compute Quadruple Extra Large', :ram => 23552},
28
+ { :bits => 64, :cores => 33.5, :disk => 1690, :id => 'cg1.4xlarge', :name => 'Cluster GPU Quadruple Extra Large', :ram => 22528}
28
29
  ]
29
30
  load(data)
30
31
  self
@@ -17,6 +17,7 @@ module Fog
17
17
  attribute :groups
18
18
  attribute :flavor_id, :aliases => 'instanceType'
19
19
  attribute :image_id, :aliases => 'imageId'
20
+ attr_accessor :instance_initiated_shutdown_behavior
20
21
  attribute :ip_address, :aliases => 'ipAddress'
21
22
  attribute :kernel_id, :aliases => 'kernelId'
22
23
  attribute :key_name, :aliases => 'keyName'
@@ -138,6 +139,7 @@ module Fog
138
139
  options = {
139
140
  'BlockDeviceMapping' => block_device_mapping,
140
141
  'ClientToken' => client_token,
142
+ 'InstanceInitiatedShutdownBehavior' => instance_initiated_shutdown_behavior,
141
143
  'InstanceType' => flavor_id,
142
144
  'KernelId' => kernel_id,
143
145
  'KeyName' => key_name,
@@ -148,6 +150,7 @@ module Fog
148
150
  'SubnetId' => subnet_id,
149
151
  'UserData' => user_data
150
152
  }
153
+ options.delete_if {|key, value| value.nil?}
151
154
 
152
155
  # If subnet is defined we are working on a virtual private cloud.
153
156
  # subnet & security group cannot co-exist. I wish VPC just ignored