fog 1.12.1 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. data/.travis.yml +1 -1
  2. data/Gemfile +5 -0
  3. data/Rakefile +14 -4
  4. data/bin/fog +22 -0
  5. data/changelog.txt +262 -0
  6. data/fog.gemspec +8 -4
  7. data/lib/fog/aws.rb +11 -0
  8. data/lib/fog/aws/auto_scaling.rb +15 -18
  9. data/lib/fog/aws/beanstalk.rb +8 -10
  10. data/lib/fog/aws/cloud_formation.rb +9 -12
  11. data/lib/fog/aws/compute.rb +8 -10
  12. data/lib/fog/aws/credential_fetcher.rb +6 -6
  13. data/lib/fog/aws/elasticache.rb +13 -17
  14. data/lib/fog/aws/elb.rb +29 -31
  15. data/lib/fog/aws/iam.rb +10 -13
  16. data/lib/fog/aws/models/auto_scaling/group.rb +6 -3
  17. data/lib/fog/aws/models/compute/spot_request.rb +1 -11
  18. data/lib/fog/aws/models/rds/log_file.rb +26 -0
  19. data/lib/fog/aws/models/rds/log_files.rb +50 -0
  20. data/lib/fog/aws/models/rds/server.rb +3 -1
  21. data/lib/fog/aws/models/rds/snapshot.rb +1 -0
  22. data/lib/fog/aws/models/rds/snapshots.rb +20 -13
  23. data/lib/fog/aws/parsers/rds/db_parser.rb +1 -1
  24. data/lib/fog/aws/parsers/rds/describe_db_log_files.rb +44 -0
  25. data/lib/fog/aws/parsers/rds/download_db_logfile_portion.rb +26 -0
  26. data/lib/fog/aws/parsers/ses/verify_domain_identity.rb +26 -0
  27. data/lib/fog/aws/parsers/storage/complete_multipart_upload.rb +1 -1
  28. data/lib/fog/aws/parsers/sts/assume_role.rb +30 -0
  29. data/lib/fog/aws/rds.rb +27 -14
  30. data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +8 -0
  31. data/lib/fog/aws/requests/auto_scaling/update_auto_scaling_group.rb +8 -1
  32. data/lib/fog/aws/requests/compute/create_volume.rb +3 -3
  33. data/lib/fog/aws/requests/rds/create_db_instance.rb +3 -1
  34. data/lib/fog/aws/requests/rds/describe_db_log_files.rb +67 -0
  35. data/lib/fog/aws/requests/rds/download_db_logfile_portion.rb +63 -0
  36. data/lib/fog/aws/requests/ses/send_raw_email.rb +1 -1
  37. data/lib/fog/aws/requests/ses/verify_domain_identity.rb +30 -0
  38. data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +6 -2
  39. data/lib/fog/aws/requests/storage/get_object.rb +1 -1
  40. data/lib/fog/aws/requests/sts/assume_role.rb +46 -0
  41. data/lib/fog/aws/ses.rb +26 -9
  42. data/lib/fog/aws/storage.rb +2 -1
  43. data/lib/fog/aws/sts.rb +31 -21
  44. data/lib/fog/bin.rb +0 -1
  45. data/lib/fog/bin/openstack.rb +5 -0
  46. data/lib/fog/brightbox/compute.rb +20 -212
  47. data/lib/fog/brightbox/compute/shared.rb +232 -0
  48. data/lib/fog/brightbox/models/compute/collaboration.rb +43 -0
  49. data/lib/fog/brightbox/models/compute/collaborations.rb +23 -0
  50. data/lib/fog/brightbox/models/compute/user_collaboration.rb +29 -0
  51. data/lib/fog/brightbox/models/compute/user_collaborations.rb +23 -0
  52. data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +21 -0
  53. data/lib/fog/brightbox/requests/compute/create_collaboration.rb +23 -0
  54. data/lib/fog/brightbox/requests/compute/delete_collaboration.rb +28 -0
  55. data/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +28 -0
  56. data/lib/fog/brightbox/requests/compute/destroy_user_collaboration.rb +21 -0
  57. data/lib/fog/brightbox/requests/compute/get_collaboration.rb +21 -0
  58. data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +21 -0
  59. data/lib/fog/brightbox/requests/compute/list_collaborations.rb +19 -0
  60. data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +19 -0
  61. data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +21 -0
  62. data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +21 -0
  63. data/lib/fog/cloudsigma/docs/getting_started.md +59 -0
  64. data/lib/fog/core.rb +7 -2
  65. data/lib/fog/core/connection.rb +62 -29
  66. data/lib/fog/core/deprecated/connection.rb +24 -0
  67. data/lib/fog/core/parser.rb +1 -1
  68. data/lib/fog/digitalocean/examples/getting_started.md +1 -1
  69. data/lib/fog/digitalocean/models/compute/server.rb +2 -2
  70. data/lib/fog/google/compute.rb +31 -7
  71. data/lib/fog/google/models/compute/disk.rb +80 -0
  72. data/lib/fog/google/models/compute/disks.rb +28 -0
  73. data/lib/fog/google/models/compute/image.rb +36 -0
  74. data/lib/fog/google/models/compute/server.rb +46 -33
  75. data/lib/fog/google/models/compute/servers.rb +15 -8
  76. data/lib/fog/google/requests/compute/delete_server.rb +5 -2
  77. data/lib/fog/google/requests/compute/get_disk.rb +3 -0
  78. data/lib/fog/google/requests/compute/get_server.rb +7 -1
  79. data/lib/fog/google/requests/compute/insert_disk.rb +8 -2
  80. data/lib/fog/google/requests/compute/insert_server.rb +51 -22
  81. data/lib/fog/google/requests/compute/list_machine_types.rb +3 -2
  82. data/lib/fog/google/requests/storage/get_object.rb +1 -1
  83. data/lib/fog/hp/requests/storage/get_object.rb +1 -1
  84. data/lib/fog/hp/storage.rb +26 -9
  85. data/lib/fog/ibm/requests/compute/create_instance.rb +20 -15
  86. data/lib/fog/internet_archive/requests/storage/get_object.rb +1 -1
  87. data/lib/fog/{core/json.rb → json.rb} +13 -2
  88. data/lib/fog/metering.rb +25 -0
  89. data/lib/fog/openstack.rb +1 -0
  90. data/lib/fog/openstack/metering.rb +215 -0
  91. data/lib/fog/openstack/models/compute/flavors.rb +2 -2
  92. data/lib/fog/openstack/models/compute/metadata.rb +1 -1
  93. data/lib/fog/openstack/models/compute/server.rb +5 -2
  94. data/lib/fog/openstack/models/image/images.rb +1 -1
  95. data/lib/fog/openstack/models/metering/meter.rb +0 -0
  96. data/lib/fog/openstack/models/metering/meters.rb +0 -0
  97. data/lib/fog/openstack/models/metering/resource.rb +24 -0
  98. data/lib/fog/openstack/models/metering/resources.rb +25 -0
  99. data/lib/fog/openstack/models/volume/volume.rb +3 -1
  100. data/lib/fog/openstack/models/volume/volumes.rb +2 -1
  101. data/lib/fog/openstack/network.rb +1 -1
  102. data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
  103. data/lib/fog/openstack/requests/compute/create_server.rb +19 -1
  104. data/lib/fog/openstack/requests/compute/detach_volume.rb +2 -1
  105. data/lib/fog/openstack/requests/compute/list_flavors_detail.rb +4 -3
  106. data/lib/fog/openstack/requests/compute/list_security_groups.rb +1 -1
  107. data/lib/fog/openstack/requests/identity/create_tenant.rb +2 -2
  108. data/lib/fog/openstack/requests/metering/get_resource.rb +32 -0
  109. data/lib/fog/openstack/requests/metering/get_samples.rb +55 -0
  110. data/lib/fog/openstack/requests/metering/get_statistics.rb +56 -0
  111. data/lib/fog/openstack/requests/metering/list_meters.rb +50 -0
  112. data/lib/fog/openstack/requests/metering/list_resources.rb +32 -0
  113. data/lib/fog/openstack/requests/volume/create_volume.rb +4 -2
  114. data/lib/fog/rackspace.rb +16 -1
  115. data/lib/fog/rackspace/block_storage.rb +13 -28
  116. data/lib/fog/rackspace/cdn.rb +10 -24
  117. data/lib/fog/rackspace/compute.rb +17 -45
  118. data/lib/fog/rackspace/compute_v2.rb +13 -33
  119. data/lib/fog/rackspace/databases.rb +13 -29
  120. data/lib/fog/rackspace/dns.rb +27 -23
  121. data/lib/fog/rackspace/identity.rb +10 -26
  122. data/lib/fog/rackspace/load_balancers.rb +13 -29
  123. data/lib/fog/rackspace/mock_data.rb +3 -3
  124. data/lib/fog/rackspace/models/compute/server.rb +1 -1
  125. data/lib/fog/rackspace/models/dns/zones.rb +34 -21
  126. data/lib/fog/rackspace/models/identity/users.rb +2 -2
  127. data/lib/fog/rackspace/models/storage/file.rb +1 -0
  128. data/lib/fog/rackspace/requests/dns/list_domains.rb +2 -2
  129. data/lib/fog/rackspace/requests/storage/delete_multiple_objects.rb +75 -0
  130. data/lib/fog/rackspace/requests/storage/delete_static_large_object.rb +50 -0
  131. data/lib/fog/rackspace/requests/storage/get_object.rb +3 -1
  132. data/lib/fog/rackspace/requests/storage/put_dynamic_obj_manifest.rb +44 -0
  133. data/lib/fog/rackspace/requests/storage/put_object_manifest.rb +3 -30
  134. data/lib/fog/rackspace/requests/storage/put_static_obj_manifest.rb +60 -0
  135. data/lib/fog/rackspace/service.rb +43 -1
  136. data/lib/fog/rackspace/storage.rb +25 -43
  137. data/lib/fog/riakcs/provisioning.rb +2 -1
  138. data/lib/fog/riakcs/usage.rb +2 -1
  139. data/lib/fog/vcloud/requests/compute/configure_vm_cpus.rb +1 -1
  140. data/lib/fog/vcloud/requests/compute/configure_vm_memory.rb +1 -1
  141. data/lib/fog/version.rb +1 -1
  142. data/lib/fog/vsphere/requests/compute/get_folder.rb +1 -1
  143. data/lib/fog/xenserver/compute.rb +2 -0
  144. data/lib/fog/xenserver/models/compute/server.rb +9 -7
  145. data/lib/fog/xenserver/requests/compute/snapshot_revert.rb +22 -0
  146. data/lib/fog/xenserver/requests/compute/snapshot_server.rb +22 -0
  147. data/lib/fog/xml.rb +21 -0
  148. data/lib/fog/xml/sax_parser_connection.rb +43 -0
  149. data/lib/tasks/changelog_task.rb +1 -0
  150. data/tests/aws/models/auto_scaling/groups_test.rb +22 -0
  151. data/tests/aws/requests/compute/volume_tests.rb +3 -3
  152. data/tests/aws/requests/rds/helper.rb +14 -0
  153. data/tests/aws/requests/rds/log_file_tests.rb +19 -0
  154. data/tests/aws/requests/ses/verified_domain_identity_tests.rb +16 -0
  155. data/tests/aws/requests/sts/assume_role_tests.rb +19 -0
  156. data/tests/brightbox/requests/compute/collaboration_tests.rb +41 -0
  157. data/tests/brightbox/requests/compute/helper.rb +46 -2
  158. data/tests/brightbox/requests/compute/user_collaboration_tests.rb +67 -0
  159. data/tests/core/connection_tests.rb +26 -0
  160. data/tests/helper.rb +13 -0
  161. data/tests/openstack/requests/metering/meter_tests.rb +52 -0
  162. data/tests/openstack/requests/metering/resource_tests.rb +19 -0
  163. data/tests/openvz/helper.rb +14 -8
  164. data/tests/rackspace/block_storage_tests.rb +9 -0
  165. data/tests/rackspace/compute_tests.rb +9 -0
  166. data/tests/rackspace/compute_v2_tests.rb +9 -0
  167. data/tests/rackspace/databases_tests.rb +9 -0
  168. data/tests/rackspace/dns_tests.rb +20 -0
  169. data/tests/rackspace/helper.rb +12 -1
  170. data/tests/rackspace/identity_tests.rb +25 -0
  171. data/tests/rackspace/load_balancer_tests.rb +10 -0
  172. data/tests/rackspace/models/block_storage/volume_tests.rb +2 -2
  173. data/tests/rackspace/models/compute_v2/metadata_tests.rb +2 -2
  174. data/tests/rackspace/models/compute_v2/server_tests.rb +22 -21
  175. data/tests/rackspace/models/dns/zones_tests.rb +19 -5
  176. data/tests/rackspace/models/storage/file_tests.rb +22 -6
  177. data/tests/rackspace/rackspace_tests.rb +35 -0
  178. data/tests/rackspace/requests/block_storage/snapshot_tests.rb +2 -3
  179. data/tests/rackspace/requests/block_storage/volume_type_tests.rb +4 -11
  180. data/tests/rackspace/requests/compute_v2/address_tests.rb +1 -1
  181. data/tests/rackspace/requests/compute_v2/attachment_tests.rb +8 -9
  182. data/tests/rackspace/requests/compute_v2/flavor_tests.rb +1 -1
  183. data/tests/rackspace/requests/compute_v2/metadata_tests.rb +4 -4
  184. data/tests/rackspace/requests/databases/database_tests.rb +23 -20
  185. data/tests/rackspace/requests/databases/user_tests.rb +6 -6
  186. data/tests/rackspace/requests/identity/user_tests.rb +4 -1
  187. data/tests/rackspace/requests/load_balancers/usage_tests.rb +4 -2
  188. data/tests/rackspace/requests/storage/large_object_tests.rb +303 -59
  189. data/tests/rackspace/requests/storage/object_tests.rb +73 -18
  190. data/tests/rackspace/service_tests.rb +83 -0
  191. data/tests/rackspace/storage_tests.rb +9 -0
  192. data/tests/xenserver/models/compute/server_tests.rb +11 -1
  193. metadata +89 -19
  194. data/tests/core/user_agent_tests.rb +0 -6
@@ -6,7 +6,7 @@ rvm:
6
6
  - 1.9.3
7
7
  - 2.0.0
8
8
 
9
- script: FOG_MOCK=true bundle exec shindont
9
+ script: bundle exec rake travis
10
10
 
11
11
  notifications:
12
12
  email: false
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
1
  source "https://rubygems.org"
2
2
 
3
+ group :development, :test do
4
+ # This is here because gemspec doesn't support require: false
5
+ gem 'coveralls', :require => false
6
+ end
7
+
3
8
  gemspec
data/Rakefile CHANGED
@@ -47,20 +47,21 @@ end
47
47
 
48
48
  GEM_NAME = "#{name}"
49
49
  task :default => :test
50
+ task :travis => ['test:travis', 'coveralls_push_workaround']
50
51
 
51
52
  require "tasks/test_task"
52
53
  Fog::Rake::TestTask.new
53
54
 
54
55
  namespace :test do
56
+ mock = 'true' || ENV['FOG_MOCK']
57
+ task :travis do
58
+ sh("export FOG_MOCK=#{mock} && bundle exec shindont")
59
+ end
55
60
  task :vsphere do
56
- [true].each do |mock|
57
61
  sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/vsphere")
58
- end
59
62
  end
60
63
  task :openvz do
61
- [true].each do |mock|
62
64
  sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/openvz")
63
- end
64
65
  end
65
66
  end
66
67
 
@@ -186,3 +187,12 @@ end
186
187
 
187
188
  require "tasks/changelog_task"
188
189
  Fog::Rake::ChangelogTask.new
190
+
191
+ task :coveralls_push_workaround do
192
+ ENV['COVERAGE'] = 'false' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9')
193
+ unless ENV['COVERAGE'] == 'false'
194
+ require 'coveralls/rake/task'
195
+ Coveralls::RakeTask.new
196
+ Rake::Task["coveralls:push"].invoke
197
+ end
198
+ end
data/bin/fog CHANGED
@@ -1,7 +1,29 @@
1
1
  #!/usr/bin/env ruby
2
+
2
3
  require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'fog'))
4
+ require 'optparse'
3
5
  require 'irb'
4
6
  require 'yaml'
7
+
8
+ options = OptionParser.new do |opts|
9
+ opts.banner = 'usage: fog [options] CREDENTIAL'
10
+
11
+ opts.on('-C', '--credentials-path FILE', 'Path to the credentials file') do |file|
12
+ Fog.credentials_path = file
13
+ end
14
+
15
+ opts.on_tail('-v', '--version', 'Prints the version') do
16
+ puts Fog::VERSION
17
+ exit
18
+ end
19
+
20
+ opts.on_tail('-h', '--help', 'Prints this message') do
21
+ puts opts
22
+ exit
23
+ end
24
+ end
25
+ options.parse!
26
+
5
27
  Fog.credential = ARGV.first ? ARGV.first.to_sym : nil
6
28
  Fog.mock! if ENV['FOG_MOCK']
7
29
  if Fog.credentials.empty?
@@ -1,3 +1,265 @@
1
+ 1.13.0 07/19/2013 7f5b0b4931d8fe85596f67013ef285fd0b8335e0
2
+ ==========================================================
3
+
4
+ Stats! { 'collaborators' => 49, 'downloads' => 2712905, 'forks' => 860, 'open_issues' => 157, 'watchers' => 2634 }
5
+
6
+ MVP! James Bence
7
+
8
+ [AWS | AutoScaling]
9
+ Do not send Instances for update_auto_scaling_group (Avoids 413 Request Entity Too Large for ASGs with lots of instances). thanks Michael Hale
10
+
11
+ [AWS | Autoscaling]
12
+ whitelist the options for update_auto_scaling_group. thanks Michael Hale
13
+ whitelist the options for create_auto_scaling_group. thanks Michael Hale
14
+ dry up expected options. thanks Michael Hale
15
+ correct whitelist for create_auto_scaling_group. thanks Michael Hale
16
+ ensure tests work in 1.8.7. thanks Michael Hale
17
+
18
+ [Brightbox]
19
+ Updates to add collaborations. thanks Hemant Kumar
20
+ Extract Compute::Shared to own file. thanks Paul Thornthwaite
21
+
22
+ [Openstack|Volumes]
23
+ alias type to volume_type. thanks Grzesiek Kolodziejczyk
24
+
25
+ [Openstack|volume]
26
+ Add #get to volumes collection. thanks Grzesiek Kolodziejczyk
27
+ fix key name for volume_type. thanks Grzesiek Kolodziejczyk
28
+ create volumes from other vol. thanks Grzesiek Kolodziejczyk
29
+
30
+ [aws|storage]
31
+ parse #complete_multipart error. thanks Brian D. Burns
32
+
33
+ [aws|sts]
34
+ Add support for the AssumeRole STS method. Also enable the ability for the STS service to use IAM profiles to grab credentials off the EC2 instance, as is in place for the other AWS services. thanks Caleb Tennis
35
+
36
+ [cli]
37
+ Changes `fog --version` short option to `-v`. thanks Paul Thornthwaite
38
+
39
+ [core]
40
+ Removes unused getting of Constant. thanks Paul Thornthwaite
41
+ Comments why Nokogiri 1.6 is not being used. thanks Paul Thornthwaite
42
+ Move XML/JSON code up out of core. thanks Paul Thornthwaite
43
+ Fog::Connection documentation. thanks Paul Thornthwaite
44
+ Adds initial Fog::Connection tests. thanks Paul Thornthwaite
45
+ Test Core version not deprecated one. thanks Paul Thornthwaite
46
+
47
+ [core/xml]
48
+ Splits SAX parsing from Connection. thanks Paul Thornthwaite
49
+
50
+ [digitalocean]
51
+ Rename do to docean in examples. thanks Ørjan Blom
52
+
53
+ [fix]
54
+ Corrected the service mocks for testing to respond with a 304 to values of If-Modified-Since that match Last-Modified. thanks Bob Lail and Luke Booth
55
+
56
+ [google|compute]
57
+ Change default image to most recent version of wheezy. thanks Nat Welch
58
+ Fix some bugs with using create without bootstrap. thanks Nat Welch
59
+
60
+ [misc]
61
+ Add PubliclyAccessible option to RDS. thanks Adam Tucker
62
+ Extend capability to restore_db_instance_from_db_snapshot. thanks Adam Tucker
63
+ Signature method requires x-amz-security-token header. thanks Adam Tucker
64
+ Infer the 'image' URL correctly when inserting a server. thanks Akshay Moghe
65
+ increased iops limit to 4000. http://aws.typepad.com/aws/2013/05/provision-up-to-4k-iops-per-ebs-volume.html. thanks Angelo Marletta
66
+ Added support for [xenserver] snapshot. thanks Celso Fernandes
67
+ Fixes security group handling for spot requests launching into a VPC on AWS. thanks Dave Myron
68
+ Swapped to SecurityGroupId. thanks Dave Myron
69
+ fix create_tenant Mock response description and name. thanks Doug McInnes
70
+ Update excon dependency to version ~>0.24.0. thanks Erik Michaels-Ober
71
+ Update excon dependency to version ~>0.25.0. thanks Erik Michaels-Ober
72
+ Passing the connection_options parameter to underlying Fog::Storage object. thanks Hector Castro
73
+ Passing the connection_options parameter to underlying Fog::Storage object for Fog::RiakCS::Provisioning. thanks Hector Castro
74
+ Used publicURL as default endpoint type for OpenStack network. thanks Hongbin Lu
75
+ Rename 'each' method to 'each_page'. thanks James Bence
76
+ Loop over Marker header in 'all', remove 'each'. thanks James Bence
77
+ Inspect error.response.body, not error.message. thanks James Bence
78
+ Restore implementation of each/all. thanks James Bence
79
+ Refactor error handling. thanks James Bence
80
+ Remove code from other branch-in-progress. thanks James Bence
81
+ Remove mistaken version update. thanks James Bence
82
+ Construct hash with => (for 1.8.7). thanks James Bence
83
+ Use specific error classes, not generic Fog::Compute::AWS::Error. thanks James Bence
84
+ Add describe_db_log_files request for AWS, version 2013-05-15. thanks James Bence
85
+ Add 'each' that iterates over all log files. thanks James Bence
86
+ Add parser/request for DownloadDBLogFilePortion. thanks James Bence
87
+ Use correct filters on RDS model snapshots 'all' method. thanks James Bence
88
+ Use correct filters in RDS model logfiles 'all' method. thanks James Bence
89
+ More DRY, succinct implementation of tag parsing. thanks James Bence
90
+ Remove extraneous nil. thanks James Bence
91
+ Add db identifier to parser, use it for log_file model. thanks James Bence
92
+ Get partial log content via method call; add to log_file model attributes. thanks James Bence
93
+ adding proper fixed secondary_ip support. thanks John E. Vincent
94
+ remove a debug entry. thanks John E. Vincent
95
+ Allows to set the account meta key by setting hp_account_meta_key, needed to generate temp urls using the HP provider, explicitly, instead of using hp_secret_key. If hp_account_meta_key is not given hp_secret_key is used as hp_account_meta_key. thanks Julian Fischer
96
+ HP uses a different strategy to create the signature that is passed to swift than OpenStack. As the HP provider is broadly used by OpenStack users the OpenStack strategy is applied when the @hp_account_meta_key is given. thanks Julian Fischer
97
+ Adds Fog::Storage::HP::File#url method to enable compatibility with Fog::Storage::AWS::File. thanks Julian Fischer
98
+ Fixed bug undefined local variable or method account_meta_key. thanks Julian Fischer
99
+ Bugfix: @hp_secret_key instead of @hp_account_meta_key required in storage.rb:186. thanks Julian Fischer
100
+ Avoids Digest::HMAC.hexdigest to remain 1.8.7 compatibility. thanks Julian Fischer
101
+ Remove File#url. thanks Julian Fischer
102
+ Renames hp_account_meta_key to os_account_meta_temp_url_key. thanks Julian Fischer
103
+ merging with master. thanks Kyle Rames
104
+ Add nil check on metadata mock. thanks Mike Moore
105
+ Add attachment check to detach_volume mock. thanks Mike Moore
106
+ Add array coalesce. thanks Mike Moore
107
+ Uping version to v1beta15. thanks Nat Welch
108
+ trying to fix sshable? for gce. thanks Nat Welch
109
+ more attempts to get ssh in compute workings. thanks Nat Welch
110
+ temporary debug info. thanks Nat Welch
111
+ Better comments and a logging attempt. thanks Nat Welch
112
+ bug in network interfaces code. thanks Nat Welch
113
+ Trying to be more consistent in code. Removing logging. thanks Nat Welch
114
+ trying to get metadata do one request per access. thanks Nat Welch
115
+ Forgot to delete two lines. thanks Nat Welch
116
+ correct syntax for the metadata craziness. thanks Nat Welch
117
+ I'm an idiot. thanks Nat Welch
118
+ trying again to get metadata working... thanks Nat Welch
119
+ Hashes not Arrays. thanks Nat Welch
120
+ ahh machine api changed as well... gotta figure out what the api is returning now. thanks Nat Welch
121
+ can't be private. thanks Nat Welch
122
+ whoops. thanks Nat Welch
123
+ Nope. thanks Nat Welch
124
+ not that either. thanks Nat Welch
125
+ so many syntax errors. thanks Nat Welch
126
+ in v15, there are all kinds of places images can hide. thanks Nat Welch
127
+ make sure I'm getting valid data back. thanks Nat Welch
128
+ trying to actually handle response error data. thanks Nat Welch
129
+ just the message. thanks Nat Welch
130
+ aha! This could be the issue. thanks Nat Welch
131
+ why isn't image_url getting set?. thanks Nat Welch
132
+ nil, not empty. thanks Nat Welch
133
+ try this... thanks Nat Welch
134
+ never being written. thanks Nat Welch
135
+ trying to use correct code location. thanks Nat Welch
136
+ alright! Insertion!. thanks Nat Welch
137
+ Why is this request failing. thanks Nat Welch
138
+ Send the right zone. thanks Nat Welch
139
+ zone looks to be bad in get_server. thanks Nat Welch
140
+ why!. thanks Nat Welch
141
+ this is probably not stable. thanks Nat Welch
142
+ Different trypes of input. thanks Nat Welch
143
+ modify all of the things. thanks Nat Welch
144
+ passing around teh data. thanks Nat Welch
145
+ better zone name. thanks Nat Welch
146
+ sshable? shouldn't just die. thanks Nat Welch
147
+ inifite loop get. thanks Nat Welch
148
+ more bad status code checks. thanks Nat Welch
149
+ init response. thanks Nat Welch
150
+ trying to figure out what's wrong. thanks Nat Welch
151
+ Patch from a fellow googler. thanks Nat Welch
152
+ Switch running? back to ready?. thanks Nat Welch
153
+ network_interfaces can be nil. thanks Nat Welch
154
+ Default to running user for username. thanks Nat Welch
155
+ A patch from a fellow googler. thanks Nat Welch
156
+ metadata could be nil. thanks Nat Welch
157
+ Throw errors instead of printing them. thanks Nat Welch
158
+ refactor image lookup code. thanks Nat Welch
159
+ Let's wait till sshable. thanks Nat Welch
160
+ whoops. thanks Nat Welch
161
+ small style tweaks for #1946. thanks Nat Welch
162
+ Added option parsing to bin/fog. thanks Postmodern
163
+ Added the -f, --fogrc option for specifying an alternate fogrc file. thanks Postmodern
164
+ Renamed -f,--fogrc to -C,--credentials-path. thanks Postmodern
165
+ Added Fog::AWS::SES.verify_domain_identity. thanks Postmodern
166
+ Fixed description for the #verify_domain_identity tests. thanks Postmodern
167
+ Actually call verify_domain_identity. thanks Postmodern
168
+ Add basic error handling for Fog::AWS::SES. thanks Postmodern
169
+ Convert the raw_message for send_raw_email, just in case. thanks Postmodern
170
+ Raise Fog::AWS::SES::InvalidParameterError for InvalidParameterValue. thanks Postmodern
171
+ Fix autoincrement when creating a flavor if private flavors exist. thanks Thomas Kadauke
172
+ Add RDS API version parameter option. thanks Timur Alperovich
173
+ Initial documentation for using Fog with CloudSigma. thanks Viktor Petersson
174
+ Fixed typos. thanks Viktor Petersson
175
+ add license to gempsec. thanks geemus
176
+ Added Disk and Disks to Google compute. Created new insert server request method that is backward compatible with the old request method, but also allows all insert server options to be used rather than a subset. thanks jordangbull
177
+ cleaned out print statements. Refactored disk(s) to be created the same way as other models. Fixed wait_for on disks to properly work. thanks jordangbull
178
+ Fixed minor import issue. thanks jordangbull
179
+ Rebased and cleaned up google fog. Changed insert_server to allow all options (not backwards compatible, but throws an informative error. thanks jordangbull
180
+ Cleaned code and fixed issue with getting a resource too soon after request for creation. thanks jordangbull
181
+ Added access configs name so public ip can be retrieved. thanks jordangbull
182
+ Fixed bug with bootstrapped servers not being sshable. thanks jordangbull
183
+ small fix in metadata for servers. thanks jordangbull
184
+ Fixed server bootstrap to remove default image if a boot disk is specified. thanks jordangbull
185
+ Google Cloud Compute now raises Errors rather than throwing them. thanks jordangbull
186
+ Added destroy method to disk and zone method. thanks jordangbull
187
+ Add SimpleCov and Coveralls.io dependenices Add rake tasks for travis, which include publishing coverage reports. thanks mlincoln
188
+ Change travis to use a rake task instead of shindont directly. This is partly necessary for https://github.com/lemurheavy/coveralls-ruby/pull/20, though I'm a fan of running just "rake" or "rake travis" for simplicity anyways. thanks mlincoln
189
+ The actual simplecov/coveralls setup. The use of Process.pid is an attempt to avoid confusing SimpleCov when running tests in parallel. Other tests frameworks take a similar approach when they detect parallel_tests. thanks mlincoln
190
+ Some cleanup based on comments on the PR. thanks mlincoln
191
+
192
+ [openstack|compute]
193
+ support block_device_mapping. thanks Grzesiek Kolodziejczyk
194
+
195
+ [openstack|image]
196
+ Fix image reload. thanks Ferran Rodenas
197
+
198
+ [openstack|metering]
199
+ Allow multiple filtering queries. thanks Alvin Garcia
200
+ Fix get_statistics mock. thanks Alvin Garcia
201
+ Added metering service for Ceilometer. thanks Philip Mark M. Deazeta
202
+
203
+ [openstack|volume]
204
+ support imageRef option. thanks Grzesiek Kolodziejczyk
205
+
206
+ [openvz]
207
+ Fixes #1871 test helper callback. thanks Paul Thornthwaite
208
+
209
+ [rackspace]
210
+ fix JSON error parsing. thanks Brian D. Burns
211
+ updated services to re-authenticate when authentication token expires. thanks Kyle Rames
212
+ adding block and parse_json parameters to request parameter calls. thanks Kyle Rames
213
+ fixing broken user tests; adding wait_for_request method to add in testing. thanks Kyle Rames
214
+ setting default fog timeout to 2000 for testing; removing specific hard coded timeouts. thanks Kyle Rames
215
+
216
+ [rackspace|block_storage]
217
+ fixing broken volume type tests. thanks Kyle Rames
218
+
219
+ [rackspace|cdn]
220
+ updating cdn to throw exceptions from storage namespace rather than cdn. This was done for historical reasons. thanks Kyle Rames
221
+
222
+ [rackspace|compute]
223
+ updating mocks. thanks Kyle Rames
224
+ fixing broken address test. thanks Kyle Rames
225
+ fixed metadata tests. thanks Kyle Rames
226
+ fixing broken tests. thanks Kyle Rames
227
+ adding parameter to save method in order to make it more polymorphic. thanks Kyle Rames
228
+
229
+ [rackspace|dns]
230
+ fixing DNS pagination issue #1887. thanks Kyle Rames
231
+ added total_entries attribute to zones. thanks Kyle Rames
232
+ adding :limit => 100 to clarify that all returns a limit of 100 records per page at @rupakg suggestion. thanks Kyle Rames
233
+ fixing broken tests. thanks Kyle Rames
234
+
235
+ [rackspace|identity]
236
+ fixing broken identity tests. thanks Kyle Rames
237
+
238
+ [rackspace|load balancers]
239
+ making failing usage tests cases pending until I can get them fixed. thanks Kyle Rames
240
+
241
+ [rackspace|storage]
242
+ add methods for SLO support. thanks Brian D. Burns
243
+ add #put_dynamic_obj_manifest. thanks Brian D. Burns
244
+ patch #delete_static_large_object for Swift v1.8. thanks Brian D. Burns
245
+ fix tests under ruby-1.8.7. thanks Brian D. Burns
246
+ add #delete_multiple_objects. thanks Brian D. Burns
247
+ patch #delete_multiple_objects for Swift v1.8. thanks Brian D. Burns
248
+ update File model to submit etags if they are specified. thanks Kyle Rames
249
+
250
+ [rackspce|block_storage]
251
+ fixing tests. thanks Kyle Rames
252
+
253
+ [vcloud|compute]
254
+ better defaults for configuring vm content-type. thanks geemus
255
+
256
+ [vsphere]
257
+ fix regex typo. thanks Dominic Cleal
258
+
259
+ [xenserver|compute]
260
+ Small fix for snapshot tests added in #1914. thanks Sergio Rubio
261
+
262
+
1
263
  1.12.1 06/11/2013 8663e9079edb69f1a56ea887379f94e6d5efd0d8
2
264
  ==========================================================
3
265
 
@@ -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 = '1.12.1'
10
- s.date = '2013-06-10'
9
+ s.version = '1.13.0'
10
+ s.date = '2013-07-19'
11
11
  s.rubyforge_project = 'fog'
12
12
 
13
13
  ## Make sure your summary is short. The description may be as long
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.authors = ["geemus (Wesley Beary)"]
22
22
  s.email = 'geemus@gmail.com'
23
23
  s.homepage = 'http://github.com/fog/fog'
24
+ s.license = 'MIT'
24
25
 
25
26
  ## This sections is only necessary if you have C extensions.
26
27
  # s.require_paths << 'ext'
@@ -41,15 +42,18 @@ Gem::Specification.new do |s|
41
42
  ## List your runtime dependencies here. Runtime dependencies are those
42
43
  ## that are needed for an end user to actually USE your code.
43
44
  s.add_dependency('builder')
44
- s.add_dependency('excon', '~>0.23.0')
45
+ s.add_dependency('excon', '~>0.25.0')
45
46
  s.add_dependency('formatador', '~>0.2.0')
46
47
  s.add_dependency('multi_json', '~>1.0')
47
48
  s.add_dependency('mime-types')
48
49
  s.add_dependency('net-scp', '~>1.1')
49
50
  s.add_dependency('net-ssh', '>=2.1.3')
50
- s.add_dependency('nokogiri', '~>1.5.0')
51
51
  s.add_dependency('ruby-hmac')
52
52
 
53
+ # Nokogiri >= 1.6 drops support for Ruby 1.8.7 so should not be used
54
+ # See https://github.com/fog/fog/issues/1878 for more details
55
+ s.add_dependency('nokogiri', '~>1.5.0')
56
+
53
57
  ## List your development dependencies here. Development dependencies are
54
58
  ## those that are only needed during development
55
59
  s.add_development_dependency('jekyll')
@@ -301,5 +301,16 @@ module Fog
301
301
  end
302
302
  options
303
303
  end
304
+
305
+ module Errors
306
+ def self.match_error(error)
307
+ matcher = lambda {|s| s.match(/(?:.*<Code>(.*)<\/Code>)(?:.*<Message>(.*)<\/Message>)/m)}
308
+ [error.message, error.response.body].each(&Proc.new {|s|
309
+ match = matcher.call(s)
310
+ return {:code => match[1].split('.').last, :message => match[2]} if match
311
+ })
312
+ {} # we did not match the message or response body
313
+ end
314
+ end
304
315
  end
305
316
  end
@@ -60,6 +60,8 @@ module Fog
60
60
  model :policy
61
61
  collection :policies
62
62
 
63
+ ExpectedOptions = {}
64
+
63
65
  class Real
64
66
  include Fog::AWS::CredentialFetcher::ConnectionMethods
65
67
 
@@ -141,7 +143,7 @@ module Fog
141
143
 
142
144
  def _request(body, idempotent, parser)
143
145
  begin
144
- response = @connection.request({
146
+ @connection.request({
145
147
  :body => body,
146
148
  :expects => 200,
147
149
  :idempotent => idempotent,
@@ -151,24 +153,19 @@ module Fog
151
153
  :parser => parser
152
154
  })
153
155
  rescue Excon::Errors::HTTPStatusError => error
154
- if match = error.message.match(/(?:.*<Code>(.*)<\/Code>)(?:.*<Message>(.*)<\/Message>)/m)
155
- case match[1]
156
- when 'AlreadyExists'
157
- #raise Fog::AWS::AutoScaling::IdentifierTaken.new(match[2])
158
- raise Fog::AWS::AutoScaling::IdentifierTaken.slurp(error, match[2])
159
- when 'ResourceInUse'
160
- raise Fog::AWS::AutoScaling::ResourceInUse.slurp(error, match[2])
161
- when 'ValidationError'
162
- raise Fog::AWS::AutoScaling::ValidationError.slurp(error, match[2])
163
- else
164
- raise Fog::Compute::AWS::Error.slurp(error, "#{match[1]} => #{match[2]}")
165
- end
166
- else
167
- raise
168
- end
156
+ match = Fog::AWS::Errors.match_error(error)
157
+ raise if match.empty?
158
+ raise case match[:code]
159
+ when 'AlreadyExists'
160
+ Fog::AWS::AutoScaling::IdentifierTaken.slurp(error, match[:message])
161
+ when 'ResourceInUse'
162
+ Fog::AWS::AutoScaling::ResourceInUse.slurp(error, match[:message])
163
+ when 'ValidationError'
164
+ Fog::AWS::AutoScaling::ValidationError.slurp(error, match[:message])
165
+ else
166
+ Fog::AWS::AutoScaling::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
167
+ end
169
168
  end
170
-
171
- response
172
169
  end
173
170
 
174
171
  def setup_credentials(options)