fog 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. data/.gitignore +2 -1
  2. data/Rakefile +90 -1
  3. data/bin/fog +5 -1
  4. data/changelog.txt +156 -0
  5. data/docs/_layouts/default.html +1 -0
  6. data/docs/about/press.markdown +4 -0
  7. data/docs/compute/index.markdown +4 -0
  8. data/docs/storage/index.markdown +4 -0
  9. data/fog.gemspec +3 -3
  10. data/lib/fog.rb +1 -1
  11. data/lib/fog/aws/iam.rb +7 -6
  12. data/lib/fog/aws/models/rds/server.rb +27 -23
  13. data/lib/fog/aws/parsers/iam/get_group.rb +2 -2
  14. data/lib/fog/aws/requests/iam/update_server_certificate.rb +37 -0
  15. data/lib/fog/bin.rb +2 -1
  16. data/lib/fog/bin/dynect.rb +30 -0
  17. data/lib/fog/bin/rackspace.rb +4 -0
  18. data/lib/fog/cdn.rb +4 -0
  19. data/lib/fog/cdn/aws.rb +6 -0
  20. data/lib/fog/cdn/parsers/aws/get_invalidation_list.rb +43 -0
  21. data/lib/fog/cdn/parsers/aws/get_streaming_distribution_list.rb +59 -0
  22. data/lib/fog/cdn/parsers/aws/streaming_distribution.rb +59 -0
  23. data/lib/fog/cdn/requests/aws/delete_streaming_distribution.rb +28 -0
  24. data/lib/fog/cdn/requests/aws/get_invalidation_list.rb +42 -0
  25. data/lib/fog/cdn/requests/aws/get_streaming_distribution.rb +50 -0
  26. data/lib/fog/cdn/requests/aws/get_streaming_distribution_list.rb +59 -0
  27. data/lib/fog/cdn/requests/aws/post_streaming_distribution.rb +78 -0
  28. data/lib/fog/cdn/requests/aws/put_streaming_distribution_config.rb +83 -0
  29. data/lib/fog/compute.rb +6 -2
  30. data/lib/fog/compute/aws.rb +12 -1
  31. data/lib/fog/compute/brightbox.rb +22 -12
  32. data/lib/fog/compute/models/aws/image.rb +5 -0
  33. data/lib/fog/compute/models/aws/server.rb +19 -22
  34. data/lib/fog/compute/models/aws/tag.rb +1 -1
  35. data/lib/fog/compute/models/bluebox/server.rb +2 -18
  36. data/lib/fog/compute/models/brightbox/account.rb +1 -1
  37. data/lib/fog/compute/models/brightbox/server.rb +2 -2
  38. data/lib/fog/compute/models/go_grid/server.rb +2 -18
  39. data/lib/fog/compute/models/linode/server.rb +5 -5
  40. data/lib/fog/compute/models/ninefold/server.rb +2 -2
  41. data/lib/fog/compute/models/rackspace/server.rb +2 -18
  42. data/lib/fog/compute/models/server.rb +27 -0
  43. data/lib/fog/compute/models/slicehost/server.rb +2 -18
  44. data/lib/fog/compute/models/storm_on_demand/server.rb +3 -3
  45. data/lib/fog/compute/models/voxel/server.rb +2 -2
  46. data/lib/fog/compute/parsers/aws/describe_images.rb +15 -3
  47. data/lib/fog/compute/parsers/aws/describe_instances.rb +1 -1
  48. data/lib/fog/compute/parsers/aws/describe_security_groups.rb +31 -7
  49. data/lib/fog/compute/requests/aws/describe_images.rb +33 -14
  50. data/lib/fog/compute/requests/aws/describe_volumes.rb +1 -0
  51. data/lib/fog/compute/requests/aws/modify_image_attribute.rb +39 -0
  52. data/lib/fog/compute/requests/aws/modify_instance_attribute.rb +37 -0
  53. data/lib/fog/compute/requests/aws/modify_snapshot_attribute.rb +10 -10
  54. data/lib/fog/compute/requests/aws/register_image.rb +54 -13
  55. data/lib/fog/compute/requests/aws/run_instances.rb +5 -0
  56. data/lib/fog/compute/requests/aws/stop_instances.rb +2 -1
  57. data/lib/fog/compute/requests/brightbox/activate_console_server.rb +2 -8
  58. data/lib/fog/compute/requests/brightbox/add_listeners_load_balancer.rb +2 -8
  59. data/lib/fog/compute/requests/brightbox/add_nodes_load_balancer.rb +2 -8
  60. data/lib/fog/compute/requests/brightbox/create_api_client.rb +2 -8
  61. data/lib/fog/compute/requests/brightbox/create_cloud_ip.rb +2 -8
  62. data/lib/fog/compute/requests/brightbox/create_image.rb +2 -8
  63. data/lib/fog/compute/requests/brightbox/create_load_balancer.rb +2 -8
  64. data/lib/fog/compute/requests/brightbox/create_server.rb +2 -8
  65. data/lib/fog/compute/requests/brightbox/destroy_api_client.rb +2 -8
  66. data/lib/fog/compute/requests/brightbox/destroy_cloud_ip.rb +2 -8
  67. data/lib/fog/compute/requests/brightbox/destroy_image.rb +2 -8
  68. data/lib/fog/compute/requests/brightbox/destroy_load_balancer.rb +2 -8
  69. data/lib/fog/compute/requests/brightbox/destroy_server.rb +2 -8
  70. data/lib/fog/compute/requests/brightbox/get_account.rb +2 -8
  71. data/lib/fog/compute/requests/brightbox/get_api_client.rb +2 -8
  72. data/lib/fog/compute/requests/brightbox/get_cloud_ip.rb +2 -8
  73. data/lib/fog/compute/requests/brightbox/get_image.rb +2 -8
  74. data/lib/fog/compute/requests/brightbox/get_interface.rb +2 -8
  75. data/lib/fog/compute/requests/brightbox/get_load_balancer.rb +2 -8
  76. data/lib/fog/compute/requests/brightbox/get_server.rb +2 -8
  77. data/lib/fog/compute/requests/brightbox/get_server_type.rb +2 -8
  78. data/lib/fog/compute/requests/brightbox/get_user.rb +2 -8
  79. data/lib/fog/compute/requests/brightbox/get_zone.rb +2 -8
  80. data/lib/fog/compute/requests/brightbox/list_api_clients.rb +2 -8
  81. data/lib/fog/compute/requests/brightbox/list_cloud_ips.rb +2 -8
  82. data/lib/fog/compute/requests/brightbox/list_images.rb +2 -8
  83. data/lib/fog/compute/requests/brightbox/list_load_balancers.rb +2 -8
  84. data/lib/fog/compute/requests/brightbox/list_server_types.rb +2 -8
  85. data/lib/fog/compute/requests/brightbox/list_servers.rb +2 -8
  86. data/lib/fog/compute/requests/brightbox/list_users.rb +2 -8
  87. data/lib/fog/compute/requests/brightbox/list_zones.rb +2 -8
  88. data/lib/fog/compute/requests/brightbox/map_cloud_ip.rb +2 -8
  89. data/lib/fog/compute/requests/brightbox/remove_listeners_load_balancer.rb +2 -8
  90. data/lib/fog/compute/requests/brightbox/remove_nodes_load_balancer.rb +2 -8
  91. data/lib/fog/compute/requests/brightbox/reset_ftp_password_account.rb +2 -8
  92. data/lib/fog/compute/requests/brightbox/shutdown_server.rb +2 -8
  93. data/lib/fog/compute/requests/brightbox/snapshot_server.rb +2 -8
  94. data/lib/fog/compute/requests/brightbox/start_server.rb +2 -8
  95. data/lib/fog/compute/requests/brightbox/stop_server.rb +2 -8
  96. data/lib/fog/compute/requests/brightbox/unmap_cloud_ip.rb +2 -8
  97. data/lib/fog/compute/requests/brightbox/update_account.rb +2 -8
  98. data/lib/fog/compute/requests/brightbox/update_api_client.rb +2 -8
  99. data/lib/fog/compute/requests/brightbox/update_image.rb +2 -8
  100. data/lib/fog/compute/requests/brightbox/update_load_balancer.rb +2 -8
  101. data/lib/fog/compute/requests/brightbox/update_server.rb +2 -8
  102. data/lib/fog/compute/requests/brightbox/update_user.rb +2 -8
  103. data/lib/fog/core.rb +1 -0
  104. data/lib/fog/core/credentials.rb +1 -1
  105. data/lib/fog/core/errors.rb +3 -1
  106. data/lib/fog/core/json.rb +20 -0
  107. data/lib/fog/core/provider.rb +3 -1
  108. data/lib/fog/core/service.rb +5 -0
  109. data/lib/fog/dns.rb +8 -1
  110. data/lib/fog/dns/dynect.rb +80 -0
  111. data/lib/fog/dns/models/dynect/record.rb +67 -0
  112. data/lib/fog/dns/models/dynect/records.rb +53 -0
  113. data/lib/fog/dns/models/dynect/zone.rb +60 -0
  114. data/lib/fog/dns/models/dynect/zones.rb +29 -0
  115. data/lib/fog/dns/requests/dynect/delete_record.rb +24 -0
  116. data/lib/fog/dns/requests/dynect/delete_zone.rb +21 -0
  117. data/lib/fog/dns/requests/dynect/get_node_list.rb +23 -0
  118. data/lib/fog/dns/requests/dynect/get_record.rb +25 -0
  119. data/lib/fog/dns/requests/dynect/get_zone.rb +22 -0
  120. data/lib/fog/dns/requests/dynect/post_record.rb +27 -0
  121. data/lib/fog/dns/requests/dynect/post_session.rb +36 -0
  122. data/lib/fog/dns/requests/dynect/post_zone.rb +32 -0
  123. data/lib/fog/dns/requests/dynect/put_zone.rb +26 -0
  124. data/lib/fog/dns/zerigo.rb +1 -1
  125. data/lib/fog/providers.rb +1 -0
  126. data/lib/fog/providers/dynect.rb +14 -0
  127. data/lib/fog/providers/rackspace.rb +1 -0
  128. data/lib/fog/rackspace/load_balancers.rb +179 -0
  129. data/lib/fog/rackspace/models/load_balancers/access_rule.rb +39 -0
  130. data/lib/fog/rackspace/models/load_balancers/access_rules.rb +29 -0
  131. data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +216 -0
  132. data/lib/fog/rackspace/models/load_balancers/load_balancers.rb +27 -0
  133. data/lib/fog/rackspace/models/load_balancers/node.rb +58 -0
  134. data/lib/fog/rackspace/models/load_balancers/nodes.rb +29 -0
  135. data/lib/fog/rackspace/models/load_balancers/virtual_ip.rb +35 -0
  136. data/lib/fog/rackspace/models/load_balancers/virtual_ips.rb +32 -0
  137. data/lib/fog/rackspace/requests/load_balancers/create_access_rule.rb +24 -0
  138. data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +26 -0
  139. data/lib/fog/rackspace/requests/load_balancers/create_node.rb +27 -0
  140. data/lib/fog/rackspace/requests/load_balancers/create_virtual_ip.rb +20 -0
  141. data/lib/fog/rackspace/requests/load_balancers/delete_access_rule.rb +15 -0
  142. data/lib/fog/rackspace/requests/load_balancers/delete_all_access_rules.rb +15 -0
  143. data/lib/fog/rackspace/requests/load_balancers/delete_load_balancer.rb +15 -0
  144. data/lib/fog/rackspace/requests/load_balancers/delete_node.rb +15 -0
  145. data/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb +17 -0
  146. data/lib/fog/rackspace/requests/load_balancers/delete_virtual_ip.rb +15 -0
  147. data/lib/fog/rackspace/requests/load_balancers/get_connection_logging.rb +15 -0
  148. data/lib/fog/rackspace/requests/load_balancers/get_connection_throttling.rb +15 -0
  149. data/lib/fog/rackspace/requests/load_balancers/get_load_balancer.rb +15 -0
  150. data/lib/fog/rackspace/requests/load_balancers/get_load_balancer_usage.rb +21 -0
  151. data/lib/fog/rackspace/requests/load_balancers/get_monitor.rb +15 -0
  152. data/lib/fog/rackspace/requests/load_balancers/get_node.rb +15 -0
  153. data/lib/fog/rackspace/requests/load_balancers/get_session_persistence.rb +15 -0
  154. data/lib/fog/rackspace/requests/load_balancers/get_usage.rb +20 -0
  155. data/lib/fog/rackspace/requests/load_balancers/list_access_rules.rb +15 -0
  156. data/lib/fog/rackspace/requests/load_balancers/list_algorithms.rb +15 -0
  157. data/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb +15 -0
  158. data/lib/fog/rackspace/requests/load_balancers/list_nodes.rb +15 -0
  159. data/lib/fog/rackspace/requests/load_balancers/list_protocols.rb +15 -0
  160. data/lib/fog/rackspace/requests/load_balancers/list_virtual_ips.rb +15 -0
  161. data/lib/fog/rackspace/requests/load_balancers/remove_connection_throttling.rb +15 -0
  162. data/lib/fog/rackspace/requests/load_balancers/remove_monitor.rb +15 -0
  163. data/lib/fog/rackspace/requests/load_balancers/remove_session_persistence.rb +15 -0
  164. data/lib/fog/rackspace/requests/load_balancers/set_connection_logging.rb +21 -0
  165. data/lib/fog/rackspace/requests/load_balancers/set_connection_throttling.rb +22 -0
  166. data/lib/fog/rackspace/requests/load_balancers/set_monitor.rb +31 -0
  167. data/lib/fog/rackspace/requests/load_balancers/set_session_persistence.rb +21 -0
  168. data/lib/fog/rackspace/requests/load_balancers/update_load_balancer.rb +24 -0
  169. data/lib/fog/rackspace/requests/load_balancers/update_node.rb +26 -0
  170. data/lib/fog/storage.rb +5 -1
  171. data/lib/fog/storage/aws.rb +3 -0
  172. data/lib/fog/storage/models/aws/directory.rb +1 -3
  173. data/lib/fog/storage/models/aws/file.rb +1 -1
  174. data/lib/fog/storage/models/google/file.rb +1 -1
  175. data/lib/fog/storage/models/local/file.rb +8 -6
  176. data/lib/fog/storage/models/ninefold/file.rb +0 -1
  177. data/lib/fog/storage/requests/aws/copy_object.rb +1 -1
  178. data/lib/fog/storage/requests/aws/get_bucket.rb +14 -11
  179. data/lib/fog/storage/requests/aws/post_object_hidden_fields.rb +2 -4
  180. data/tests/aws/models/rds/server_tests.rb +4 -4
  181. data/tests/compute/models/aws/server_tests.rb +15 -1
  182. data/tests/compute/requests/aws/helper.rb +0 -4
  183. data/tests/compute/requests/aws/image_tests.rb +40 -9
  184. data/tests/compute/requests/brightbox/account_tests.rb +1 -1
  185. data/tests/compute/requests/brightbox/helper.rb +3 -0
  186. data/tests/compute/requests/brightbox/load_balancer_tests.rb +1 -1
  187. data/tests/compute/requests/voxel/server_tests.rb +2 -2
  188. data/tests/dns/helper.rb +18 -0
  189. data/tests/dns/models/record_tests.rb +3 -2
  190. data/tests/dns/models/records_tests.rb +2 -2
  191. data/tests/dns/models/zone_tests.rb +2 -2
  192. data/tests/dns/models/zones_tests.rb +1 -1
  193. data/tests/dns/requests/bluebox/dns_tests.rb +0 -12
  194. data/tests/dns/requests/dnsimple/dns_tests.rb +0 -12
  195. data/tests/dns/requests/dnsmadeeasy/dns_tests.rb +0 -12
  196. data/tests/dns/requests/dynect/dns_tests.rb +132 -0
  197. data/tests/dns/requests/linode/dns_tests.rb +1 -13
  198. data/tests/dns/requests/slicehost/dns_tests.rb +1 -13
  199. data/tests/helper.rb +1 -1
  200. data/tests/helpers/collection_helper.rb +2 -2
  201. data/tests/helpers/formats_helper.rb +2 -0
  202. data/tests/helpers/mock_helper.rb +4 -1
  203. data/tests/rackspace/helper.rb +24 -0
  204. data/tests/rackspace/load_balancer_tests.rb +21 -0
  205. data/tests/rackspace/models/access_list_tests.rb +12 -0
  206. data/tests/rackspace/models/access_lists_tests.rb +12 -0
  207. data/tests/rackspace/models/load_balancer_tests.rb +116 -0
  208. data/tests/rackspace/models/load_balancers_tests.rb +19 -0
  209. data/tests/rackspace/models/node_tests.rb +19 -0
  210. data/tests/rackspace/models/nodes_tests.rb +12 -0
  211. data/tests/rackspace/models/virtual_ip_tests.rb +16 -0
  212. data/tests/rackspace/models/virtual_ips_tests.rb +12 -0
  213. data/tests/rackspace/requests/access_list_tests.rb +56 -0
  214. data/tests/rackspace/requests/algorithm_tests.rb +19 -0
  215. data/tests/rackspace/requests/connection_logging_tests.rb +25 -0
  216. data/tests/rackspace/requests/connection_throttling_tests.rb +37 -0
  217. data/tests/rackspace/requests/helper.rb +112 -0
  218. data/tests/rackspace/requests/load_balancer_tests.rb +63 -0
  219. data/tests/rackspace/requests/load_balancer_usage_tests.rb +19 -0
  220. data/tests/rackspace/requests/monitor_tests.rb +46 -0
  221. data/tests/rackspace/requests/node_tests.rb +87 -0
  222. data/tests/rackspace/requests/protocol_tests.rb +21 -0
  223. data/tests/rackspace/requests/session_persistence_tests.rb +33 -0
  224. data/tests/rackspace/requests/usage_tests.rb +17 -0
  225. data/tests/rackspace/requests/virtual_ip_tests.rb +40 -0
  226. data/tests/storage/requests/aws/bucket_tests.rb +53 -0
  227. metadata +127 -8
  228. data/lib/fog/compute/requests/aws/modify_image_attributes.rb +0 -37
data/.gitignore CHANGED
@@ -4,9 +4,10 @@
4
4
  *.sw?
5
5
  .bundle
6
6
  .DS_Store
7
- docs/_site/*
8
7
  coverage
9
8
  doc/*
9
+ docs/_site/*
10
+ docs/about/supported_services.markdown
10
11
  Gemfile.lock
11
12
  rdoc
12
13
  pkg
data/Rakefile CHANGED
@@ -46,6 +46,15 @@ end
46
46
 
47
47
  task :default => :test
48
48
 
49
+ namespace :test do
50
+ task :dynect do
51
+ [false].each do |mock|
52
+ sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/dns/requests/dynect")
53
+ #sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/dns/models/")
54
+ end
55
+ end
56
+ end
57
+
49
58
  task :examples do
50
59
  sh("export FOG_MOCK=false && bundle exec shindont examples")
51
60
  # some don't provide mocks so we'll leave this out for now
@@ -137,7 +146,6 @@ task :release => :build do
137
146
  sh "git tag v#{version}"
138
147
  sh "git push origin master"
139
148
  sh "git push origin v#{version}"
140
- Rake::Task[:build].invoke # rebuild with updated changelog
141
149
  sh "gem push pkg/#{name}-#{version}.gem"
142
150
  Rake::Task[:docs].invoke
143
151
  end
@@ -182,6 +190,18 @@ task :changelog do
182
190
  changelog << ('=' * changelog[0].length)
183
191
  changelog << ''
184
192
 
193
+ require 'multi_json'
194
+ github_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/geemus/fog').body)
195
+ data = github_data['repository'].reject {|key, value| !['forks', 'open_issues', 'watchers'].include?(key)}
196
+ rubygems_data = MultiJson.decode(Excon.get('https://rubygems.org/api/v1/gems/fog.json').body)
197
+ data['downloads'] = rubygems_data['downloads']
198
+ stats = []
199
+ for key in data.keys.sort
200
+ stats << "'#{key}' => #{data[key]}"
201
+ end
202
+ changelog << "Stats! { #{stats.join(', ')} }"
203
+ changelog << ''
204
+
185
205
  last_sha = `cat changelog.txt | head -1`.split(' ').last
186
206
  shortlog = `git shortlog #{last_sha}..HEAD`
187
207
  changes = {}
@@ -208,7 +228,10 @@ task :changelog do
208
228
  for committer, commits in committers.to_a.sort {|x,y| y[1] <=> x[1]}
209
229
  if [
210
230
  'Aaron Suggs',
231
+ 'Christopher Oliver',
232
+ 'Dylan Egan',
211
233
  'geemus',
234
+ 'Henry Addison',
212
235
  'Lincoln Stoll',
213
236
  'Luqman Amjad',
214
237
  'nightshade427',
@@ -238,6 +261,7 @@ task :changelog do
238
261
  end
239
262
 
240
263
  task :docs do
264
+ Rake::Task[:supported_services_docs].invoke
241
265
  Rake::Task[:upload_fog_io].invoke
242
266
  Rake::Task[:upload_rdoc].invoke
243
267
 
@@ -256,6 +280,71 @@ task :docs do
256
280
  Formatador.display_line
257
281
  end
258
282
 
283
+ task :supported_services_docs do
284
+ support, shared = {}, []
285
+ for key, values in Fog.services
286
+ unless values.length == 1
287
+ shared |= [key]
288
+ values.each do |value|
289
+ support[value] ||= {}
290
+ support[value][key] = '+'
291
+ end
292
+ else
293
+ value = values.first
294
+ support[value] ||= {}
295
+ support[value][:other] ||= []
296
+ support[value][:other] << key
297
+ end
298
+ end
299
+ shared.sort! {|x,y| x.to_s <=> y.to_s}
300
+ columns = [:provider] + shared + [:other]
301
+ data = []
302
+ for key in support.keys.sort {|x,y| x.to_s <=> y.to_s}
303
+ data << { :provider => key }.merge!(support[key])
304
+ end
305
+
306
+ table = ''
307
+ table << "<table border='1'>\n"
308
+
309
+ table << " <tr>"
310
+ for column in columns
311
+ table << "<th>#{column}</th>"
312
+ end
313
+ table << "</tr>\n"
314
+
315
+ for datum in data
316
+ table << " <tr>"
317
+ for column in columns
318
+ if value = datum[column]
319
+ case value
320
+ when Array
321
+ table << "<td>#{value.join(', ')}</td>"
322
+ when '+'
323
+ table << "<td style='text-align: center;'>#{value}</td>"
324
+ else
325
+ table << "<th>#{value}</th>"
326
+ end
327
+ else
328
+ table << "<td></td>"
329
+ end
330
+ end
331
+ table << "</tr>\n"
332
+ end
333
+
334
+ table << "</table>\n"
335
+
336
+ File.open('docs/about/supported_services.markdown', 'w') do |file|
337
+ file.puts <<-METADATA
338
+ ---
339
+ layout: default
340
+ title: Supported Services
341
+ ---
342
+
343
+ METADATA
344
+ file.puts(table)
345
+ end
346
+ end
347
+
259
348
  task :upload_fog_io do
260
349
  # connect to storage provider
261
350
  Fog.credential = :geemus
data/bin/fog CHANGED
@@ -5,7 +5,11 @@ require 'yaml'
5
5
  Fog.credential = ARGV.first ? ARGV.first.to_sym : nil
6
6
  Fog.mock! if ENV['FOG_MOCK']
7
7
  if Fog.credentials.empty?
8
- Fog::Errors.missing_credentials
8
+ begin
9
+ Fog::Errors.missing_credentials
10
+ rescue Fog::Errors::LoadError => error
11
+ abort error.message
12
+ end
9
13
  end
10
14
 
11
15
  require 'fog/bin'
data/changelog.txt CHANGED
@@ -1,3 +1,159 @@
1
+ 0.11.0 08/18/2011 73bcee507a4732e071c58d85793b7f307eb377dc
2
+ ==========================================================
3
+
4
+ Stats! { 'downloads' => 202791, 'forks' => 237, 'open_issues' => 20, 'watchers' => 1427 }
5
+
6
+ MVP! Brian Hartsock
7
+
8
+ [aws|cdn]
9
+ Added commands for streaming distribution lists. thanks Christopher Oliver
10
+
11
+ [aws|compute]
12
+ describe security groups parser was not taking into account ipPermissionsEgress and therefore returning unexpected results when the account had VPC groups. thanks Christopher Oliver
13
+ Added missing 'platform' attribute to server model and describe instances request. thanks Christopher Oliver
14
+
15
+ [aws|iam]
16
+ fix 'Path' handling for get_group response. thanks Nick Osborn
17
+ add missing update_server_certificate request. thanks Nick Osborn
18
+
19
+ [aws|rds]
20
+ Allow string or symbol hash keys. thanks Aaron Suggs
21
+
22
+ [aws|s3]
23
+ Added basic tests for get_bucket, fixed a bug in get_bucket with delimiter option, tests succeed for both mocked and real situation. thanks Erik Terpstra
24
+ policy should be base64 encoded and not contain new lines. thanks Fujimura Daisuke
25
+ Require 'multi_json' was lucked. thanks Fujimura Daisuke
26
+
27
+ [compute]
28
+ add server base class to contain shared stuff (scp/ssh). thanks geemus
29
+
30
+ [compute|aws]
31
+ Whitespace removal. thanks Dylan Egan
32
+ Allow image mocks to support state (except failed). thanks Dylan Egan
33
+ fix pluralization of modify_image_attribute. thanks geemus
34
+ update modify image/snapshot attribute to match latest API. thanks geemus
35
+ add modify_image_attribute. thanks geemus
36
+ add support for saving assigned tags at server creation time. thanks geemus
37
+ add docs for new options on run_instances. thanks geemus
38
+ guard tag creation against empty tag set. thanks geemus
39
+ fixes for bootstrap and placing attributes json. thanks geemus
40
+ identity not needed for setup. thanks geemus
41
+ fix for running nice with mocked test run. thanks geemus
42
+
43
+ [compute|brightbox]
44
+ Updated test for new expected response from server. thanks Paul Thornthwaite
45
+ Updated Account format test to allow valid_credit_card flag. thanks Paul Thornthwaite
46
+ Added IPv6 address to format now it is exposed to API. thanks Paul Thornthwaite
47
+ DRY up request method. thanks Paul Thornthwaite
48
+ Corrected attribute name. thanks Paul Thornthwaite
49
+
50
+ [compute|voxel]
51
+ position in format is string, not integer. thanks geemus
52
+
53
+ [dns]
54
+ dry generate_unique_domain to tests helper. thanks geemus
55
+
56
+ [dns|dynect]
57
+ cleanup of initial implementation. thanks geemus
58
+ fixes to play nice with mocked test runs. thanks geemus
59
+
60
+ [dns|zerigo]
61
+ add host/port/scheme to recognizes. thanks geemus
62
+
63
+ [docs]
64
+ add task to build/publish supported services matrix. thanks geemus
65
+ alphasort doc tasks. thanks geemus
66
+
67
+ [misc]
68
+ if creating an s3 directory (bucket), one needs to pass in :location as well as have the aws connection set to the correct region... thanks Adam Greene
69
+ - Write files as binary (otherwise UTF8 - ASCII errors can occur) - Check if File exists before trying to delete it (paperclip sometimes deletes files twice) - Check if Directory exists before trying to "cd" into it. thanks Andre Meij
70
+ Fix issue 464, add howto for European Rackspace cloud. thanks Andre Meij
71
+ Initial support for adding/deleting a load balancer (requests only). thanks Brian Hartsock
72
+ Complete lifecycle for a load balancer. thanks Brian Hartsock
73
+ Improved error handling. thanks Brian Hartsock
74
+ Model and collection for load balancers. thanks Brian Hartsock
75
+ Fixed issues with loading all LB params. thanks Brian Hartsock
76
+ Requests for nodes. thanks Brian Hartsock
77
+ Rackspace Load Balancers: model classes for nodes. thanks Brian Hartsock
78
+ Rackspace Load Balancers: requests for virtual ips. thanks Brian Hartsock
79
+ Added virtual IP models. thanks Brian Hartsock
80
+ Rackspace LB: Made some updates from the pull request. thanks Brian Hartsock
81
+ Rackspace LB: protocols, algorithms, and connection logging. thanks Brian Hartsock
82
+ Added access list requests. thanks Brian Hartsock
83
+ Rackspace LB: Added session persistence requests. thanks Brian Hartsock
84
+ Rackspace LB: Connection throttling requests. thanks Brian Hartsock
85
+ Rackspace LB: Fixed issues with connection logging model. thanks Brian Hartsock
86
+ Rackspace LB: Health Monitor requests. thanks Brian Hartsock
87
+ Rackspace LB: account usage request. thanks Brian Hartsock
88
+ Rackspace LB: Load Balancer Usage requests. thanks Brian Hartsock
89
+ Rackspace LB: Added model capabilities for a lot of additional actions. thanks Brian Hartsock
90
+ Rackspace LB: models for access lists. thanks Brian Hartsock
91
+ Rackspace LB: account usage call. thanks Brian Hartsock
92
+ Rackspace LB: Refactoring and cleanup. thanks Brian Hartsock
93
+ register_image mocking support. thanks Dylan Egan
94
+ Remove GENTOO_AMI. thanks Dylan Egan
95
+ Store it under the ID, not the name. thanks Dylan Egan
96
+ Allow tag filtering for images. thanks Dylan Egan
97
+ Set imageOwnerAlias to self. Not 100% on this, but it will allow you to search for images with 'owner-alias' => 'self'. thanks Dylan Egan
98
+ Back to using Owner. A couple of tests for it too. thanks Dylan Egan
99
+ Added support for delimiter option in Fog::Storage::AWS::Mock object. thanks Erik Terpstra
100
+ Link to EBS snapshots blog post. thanks Gavin Sandie
101
+ Add force stop functionality to AWS Instance. thanks John Ferlito
102
+ * Changed LoadError to Fog::Error::LoadError when missing configuration * When running from command line, rescue the exception, and print the help message. thanks Mark A. Miller
103
+ * Fix VirtualBox in compute case statement. thanks Mark A. Miller
104
+ Update to the latest VirtualBox gem while we're at it for good measure. thanks Mark A. Miller
105
+ add dynect DNS provider with session request implemented. thanks Michael Hale
106
+ add dynect provider and cleanup extra requires. thanks Michael Hale
107
+ enable mocking for dynect. thanks Michael Hale
108
+ parse session request and fix mock for tests. thanks Michael Hale
109
+ whoops forgot to add these files. thanks Michael Hale
110
+ temporary rake task for convenient testing. thanks Michael Hale
111
+ include /REST in all requests. thanks Michael Hale
112
+ change API-Token to Auth-Token. thanks Michael Hale
113
+ add zone request. thanks Michael Hale
114
+ fix API-Token in mock session request. thanks Michael Hale
115
+ always run both mock and non-mock tests. thanks Michael Hale
116
+ parse the list of zones returned. thanks Michael Hale
117
+ require builder in dynect. thanks Michael Hale
118
+ WIP: add stub model classes. thanks Michael Hale
119
+ tests passing. thanks Michael Hale
120
+ rename zone request to zones. thanks Michael Hale
121
+ add zone request to show information for a single zone. thanks Michael Hale
122
+ hook up zones model. thanks Michael Hale
123
+ hook up zones.get. thanks Michael Hale
124
+ dynect: add a bunch of stuff: node_list, list_any_records, handle 307 job redirect,. thanks Michael Hale
125
+ dynect: nicer filter api for records. thanks Michael Hale
126
+ Escape source object name when copying. thanks Pratik Naik
127
+ provide #providers for shared services. thanks geemus
128
+
129
+ [rackspace|load balancers]
130
+ fixed broken tests. thanks Brian Hartsock
131
+
132
+ [rackspace|load_balancers]
133
+ fixes to play nice with mock test runs. thanks geemus
134
+ fix typo in tests. thanks geemus
135
+
136
+ [rackspace|loadbalancers]
137
+ cleanup. thanks geemus
138
+
139
+ [release]
140
+ add newest MVP to changelog task MVP omit list. thanks geemus
141
+ add stats to changelog. thanks geemus
142
+ remove un-needed rebuild of gem. thanks geemus
143
+
144
+ [storage]
145
+ fix deprecated get_url usage. thanks geemus
146
+
147
+ [storage|aws]
148
+ simplify region accessor. thanks geemus
149
+
150
+ [storage|ninefold]
151
+ remove debug output. thanks geemus
152
+
153
+ [tests]
154
+ non-destructively generate id for get('fake') == nil tests. thanks geemus
155
+
156
+
1
157
  0.10.0 07/25/2011 9ca8cffc000c417a792235438c12855a277fe1ce
2
158
  ==========================================================
3
159
 
@@ -61,6 +61,7 @@
61
61
  <li><a href="/about/getting_started.html">Getting Started</a></li>
62
62
  <li><a href="/about/press.html">Press</a></li>
63
63
  <li><a href="/about/structure.html">Structure</a></li>
64
+ <li><a href="/about/supported_services.html">Supported Services</a></li>
64
65
  <li><a href="/about/users.html">Users</a></li>
65
66
  </ul>
66
67
 
@@ -5,6 +5,10 @@ title: Press
5
5
 
6
6
  Mentions and blog posts from elsewhere in reverse chronological order by day (and alphasorted for same days).
7
7
 
8
+ **August 1st, 2011**
9
+
10
+ * [Using EBS Snapshots with Fog](http://www.mediamolecule.com/lab/article/using_ebs_snapshots_with_fog/)
11
+
8
12
  **June 21st, 2011**
9
13
 
10
14
  * [Mocking fog When Using It With Carrierwave](http://www.engineyard.com/blog/2011/mocking-fog-when-using-it-with-carrierwave/)
@@ -81,6 +81,10 @@ Rackspace has <a href="http://www.rackspacecloud.com/cloud_hosting_products/serv
81
81
  :rackspace_api_key => RACKSPACE_API_KEY
82
82
  })
83
83
 
84
+ If you work with the European cloud from Rackspace you have to add the following:
85
+
86
+ :rackspace_auth_url => "lon.auth.api.rackspacecloud.com"
87
+
84
88
  We will skip over learning how to do this the 'Rackspace Way' and instead jump right to using bootstrap to get their smallest Ubuntu 10.04 LTS server.
85
89
 
86
90
  server = connection.servers.bootstrap
@@ -145,6 +145,10 @@ Rackspace has <a href="http://www.rackspacecloud.com/cloud_hosting_products/file
145
145
  :rackspace_api_key => RACKSPACE_API_KEY
146
146
  })
147
147
 
148
+ If you work with the European cloud from Rackspace you have to add the following:
149
+
150
+ :rackspace_auth_url => "lon.auth.api.rackspacecloud.com"
151
+
148
152
  Then create, save, destroy as per fog-for-AWS. The `:public => true` option when creating directories (see above) is important for Rackspace; your folder and files won't be shared to Rackspace's CDN and hence your users without it. Similarly the `:public =&gt; true` on files is important for AWS and Google or they will be private.
149
153
 
150
154
  ## Local Storage
data/fog.gemspec CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  ## If your rubyforge_project name is different, then edit it and comment out
7
7
  ## the sub! line in the Rakefile
8
8
  s.name = 'fog'
9
- s.version = '0.10.0'
10
- s.date = '2011-07-25'
9
+ s.version = '0.11.0'
10
+ s.date = '2011-08-18'
11
11
  s.rubyforge_project = 'fog'
12
12
 
13
13
  ## Make sure your summary is short. The description may be as long
@@ -53,7 +53,7 @@ Gem::Specification.new do |s|
53
53
  s.add_development_dependency('rdoc')
54
54
  s.add_development_dependency('rspec', '~>1.3.1')
55
55
  s.add_development_dependency('shindo', '~>0.3.4')
56
- s.add_development_dependency('virtualbox', '~>0.8.3')
56
+ s.add_development_dependency('virtualbox', '~>0.9.1')
57
57
 
58
58
  s.files = `git ls-files`.split("\n")
59
59
  s.test_files = `git ls-files -- {spec,tests}/*`.split("\n")
data/lib/fog.rb CHANGED
@@ -3,7 +3,7 @@ require File.join(File.dirname(__FILE__), 'fog', 'core')
3
3
  module Fog
4
4
 
5
5
  unless const_defined?(:VERSION)
6
- VERSION = '0.10.0'
6
+ VERSION = '0.11.0'
7
7
  end
8
8
 
9
9
  end
data/lib/fog/aws/iam.rb CHANGED
@@ -16,8 +16,8 @@ module Fog
16
16
  request :create_access_key
17
17
  request :create_account_alias
18
18
  request :create_group
19
- request :create_user
20
19
  request :create_login_profile
20
+ request :create_user
21
21
  request :delete_access_key
22
22
  request :delete_account_alias
23
23
  request :delete_group
@@ -27,17 +27,17 @@ module Fog
27
27
  request :delete_signing_certificate
28
28
  request :delete_user
29
29
  request :delete_user_policy
30
- request :get_login_profile
31
- request :get_user
32
- request :get_user_policy
33
30
  request :get_group
34
31
  request :get_group_policy
32
+ request :get_login_profile
35
33
  request :get_server_certificate
34
+ request :get_user
35
+ request :get_user_policy
36
36
  request :list_access_keys
37
37
  request :list_account_aliases
38
+ request :list_group_policies
38
39
  request :list_groups
39
40
  request :list_groups_for_user
40
- request :list_group_policies
41
41
  request :list_server_certificates
42
42
  request :list_signing_certificates
43
43
  request :list_user_policies
@@ -48,8 +48,9 @@ module Fog
48
48
  request :update_access_key
49
49
  request :update_group
50
50
  request :update_login_profile
51
- request :update_user
51
+ request :update_server_certificate
52
52
  request :update_signing_certificate
53
+ request :update_user
53
54
  request :upload_server_certificate
54
55
  request :upload_signing_certificate
55
56
 
@@ -25,27 +25,24 @@ module Fog
25
25
  attribute :preferred_backup_window, :aliases => 'PreferredBackupWindow'
26
26
  attribute :preferred_maintenance_window, :aliases => 'PreferredMaintenanceWindow'
27
27
  attribute :db_name, :aliases => 'DBName'
28
- attribute :db_security_groups, :aliases => 'DBSecurityGroups'
28
+ attribute :db_security_groups, :aliases => 'DBSecurityGroups', :type => :array
29
29
  attribute :db_parameter_groups, :aliases => 'DBParameterGroups'
30
30
  attribute :backup_retention_period, :aliases => 'BackupRetentionPeriod', :type => :integer
31
31
  attribute :license_model, :aliases => 'LicenseModel'
32
32
 
33
33
  attr_accessor :password, :parameter_group_name, :security_group_names, :port
34
-
35
- def initialize(attributes={})
36
- self.flavor_id ||= 'db.m1.small'
37
- super
38
- end
39
34
 
40
35
  def create_read_replica(replica_id, options={})
41
- connection.create_db_instance_read_replica(replica_id, id, options)
36
+ options[:security_group_names] ||= options['DBSecurityGroups']
37
+ params = self.class.new(options).attributes_to_params
38
+ connection.create_db_instance_read_replica(replica_id, id, params)
42
39
  connection.servers.get(replica_id)
43
40
  end
44
-
41
+
45
42
  def ready?
46
43
  state == 'available'
47
44
  end
48
-
45
+
49
46
  def destroy(snapshot_identifier=nil)
50
47
  requires :id
51
48
  connection.delete_db_instance(id, snapshot_identifier, snapshot_identifier.nil?)
@@ -56,51 +53,58 @@ module Fog
56
53
  connection.reboot_db_instance(id)
57
54
  true
58
55
  end
59
-
56
+
60
57
  def snapshots
61
58
  requires :id
62
59
  connection.snapshots(:server => self)
63
60
  end
64
-
61
+
65
62
  def modify(immediately, options)
66
- data = connection.modify_db_instance(id, immediately, options)
63
+ options[:security_group_names] ||= options['DBSecurityGroups']
64
+ params = self.class.new(options).attributes_to_params
65
+ data = connection.modify_db_instance(id, immediately, params)
67
66
  merge_attributes(data.body['ModifyDBInstanceResult']['DBInstance'])
68
- true
67
+ true
69
68
  end
70
-
69
+
71
70
  def save
72
71
  requires :engine
73
72
  requires :allocated_storage
74
73
  requires :master_username
75
74
  requires :password
75
+
76
+ self.flavor_id ||= 'db.m1.small'
77
+
78
+ data = connection.create_db_instance(id, attributes_to_params)
79
+ merge_attributes(data.body['CreateDBInstanceResult']['DBInstance'])
80
+ true
81
+ end
82
+
83
+ # Converts attributes to a parameter hash suitable for requests
84
+ def attributes_to_params
76
85
  options = {
77
86
  'AllocatedStorage' => allocated_storage,
78
87
  'AutoMinorVersionUpgrade' => auto_minor_version_upgrade,
79
88
  'BackupRetentionPeriod' => backup_retention_period,
80
89
  'DBName' => db_name,
81
- 'DBParameterGroupName' => parameter_group_name,
90
+ 'DBParameterGroupName' => parameter_group_name || attributes['DBParameterGroupName'],
82
91
  'DBSecurityGroups' => security_group_names,
83
92
  'DBInstanceIdentifier' => id,
84
93
  'AvailabilityZone' => availability_zone,
85
94
  'DBInstanceClass' => flavor_id,
86
- 'Port' => port,
95
+ 'Port' => port || attributes['Port'],
87
96
  'Engine' => engine,
88
97
  'EngineVersion' => engine_version,
89
98
  'MasterUsername' => master_username,
90
- 'MasterUserPassword' => password,
99
+ 'MasterUserPassword' => password || attributes['MasterUserPassword'],
91
100
  'PreferredMaintenanceWindow' => preferred_maintenance_window,
92
101
  'PreferredBackupWindow' => preferred_backup_window,
93
102
  'MultiAZ' => multi_az,
94
103
  'LicenseModel' => license_model
95
104
  }
96
- options.delete_if {|key, value| value.nil?}
97
-
98
105
 
99
- data = connection.create_db_instance(id, options)
100
- merge_attributes(data.body['CreateDBInstanceResult']['DBInstance'])
101
- true
106
+ options.delete_if {|key, value| value.nil?}
102
107
  end
103
-
104
108
  end
105
109
  end
106
110
  end