fog 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. data/Gemfile.lock +6 -6
  2. data/README.rdoc +7 -1
  3. data/bin/fog +4 -3
  4. data/fog.gemspec +39 -24
  5. data/lib/fog.rb +4 -12
  6. data/lib/fog/aws.rb +14 -5
  7. data/lib/fog/aws/compute.rb +26 -9
  8. data/lib/fog/aws/elb.rb +3 -2
  9. data/lib/fog/aws/models/compute/address.rb +2 -1
  10. data/lib/fog/aws/models/compute/addresses.rb +11 -9
  11. data/lib/fog/aws/models/compute/flavor.rb +1 -1
  12. data/lib/fog/aws/models/compute/flavors.rb +13 -11
  13. data/lib/fog/aws/models/compute/image.rb +2 -1
  14. data/lib/fog/aws/models/compute/images.rb +7 -9
  15. data/lib/fog/aws/models/compute/key_pair.rb +1 -1
  16. data/lib/fog/aws/models/compute/key_pairs.rb +10 -8
  17. data/lib/fog/aws/models/compute/security_group.rb +1 -1
  18. data/lib/fog/aws/models/compute/security_groups.rb +11 -9
  19. data/lib/fog/aws/models/compute/server.rb +10 -3
  20. data/lib/fog/aws/models/compute/servers.rb +14 -8
  21. data/lib/fog/aws/models/compute/snapshot.rb +3 -2
  22. data/lib/fog/aws/models/compute/snapshots.rb +11 -16
  23. data/lib/fog/aws/models/compute/tag.rb +36 -0
  24. data/lib/fog/aws/models/compute/tags.rb +34 -0
  25. data/lib/fog/aws/models/compute/volume.rb +11 -10
  26. data/lib/fog/aws/models/compute/volumes.rb +11 -9
  27. data/lib/fog/aws/models/storage/directories.rb +1 -1
  28. data/lib/fog/aws/models/storage/directory.rb +1 -1
  29. data/lib/fog/aws/models/storage/file.rb +3 -2
  30. data/lib/fog/aws/models/storage/files.rb +1 -7
  31. data/lib/fog/aws/parsers/compute/describe_availability_zones.rb +4 -2
  32. data/lib/fog/aws/parsers/compute/describe_images.rb +23 -13
  33. data/lib/fog/aws/parsers/compute/describe_instances.rb +34 -8
  34. data/lib/fog/aws/parsers/compute/describe_security_groups.rb +4 -3
  35. data/lib/fog/aws/parsers/compute/describe_snapshots.rb +33 -13
  36. data/lib/fog/aws/parsers/compute/describe_tags.rb +30 -0
  37. data/lib/fog/aws/parsers/compute/describe_volumes.rb +17 -3
  38. data/lib/fog/aws/parsers/compute/run_instances.rb +4 -4
  39. data/lib/fog/aws/parsers/storage/get_bucket.rb +1 -1
  40. data/lib/fog/aws/parsers/storage/get_bucket_logging.rb +1 -1
  41. data/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb +3 -3
  42. data/lib/fog/aws/requests/compute/create_snapshot.rb +1 -0
  43. data/lib/fog/aws/requests/compute/create_tags.rb +78 -0
  44. data/lib/fog/aws/requests/compute/delete_tags.rb +45 -0
  45. data/lib/fog/aws/requests/compute/describe_addresses.rb +27 -19
  46. data/lib/fog/aws/requests/compute/describe_availability_zones.rb +31 -25
  47. data/lib/fog/aws/requests/compute/describe_images.rb +11 -18
  48. data/lib/fog/aws/requests/compute/describe_instances.rb +125 -53
  49. data/lib/fog/aws/requests/compute/describe_key_pairs.rb +29 -21
  50. data/lib/fog/aws/requests/compute/describe_regions.rb +28 -23
  51. data/lib/fog/aws/requests/compute/describe_reserved_instances.rb +8 -4
  52. data/lib/fog/aws/requests/compute/describe_security_groups.rb +48 -19
  53. data/lib/fog/aws/requests/compute/describe_snapshots.rb +72 -35
  54. data/lib/fog/aws/requests/compute/describe_tags.rb +42 -0
  55. data/lib/fog/aws/requests/compute/describe_volumes.rb +67 -36
  56. data/lib/fog/aws/requests/compute/run_instances.rb +10 -3
  57. data/lib/fog/aws/simpledb.rb +3 -1
  58. data/lib/fog/aws/storage.rb +17 -8
  59. data/lib/fog/bluebox/models/compute/flavor.rb +1 -1
  60. data/lib/fog/bluebox/models/compute/flavors.rb +1 -1
  61. data/lib/fog/bluebox/models/compute/image.rb +1 -1
  62. data/lib/fog/bluebox/models/compute/images.rb +1 -1
  63. data/lib/fog/bluebox/models/compute/server.rb +8 -6
  64. data/lib/fog/bluebox/models/compute/servers.rb +1 -1
  65. data/lib/fog/bluebox/requests/compute/get_blocks.rb +1 -1
  66. data/lib/fog/core.rb +11 -0
  67. data/lib/fog/{attributes.rb → core/attributes.rb} +0 -0
  68. data/lib/fog/{bin.rb → core/bin.rb} +1 -1
  69. data/lib/fog/{collection.rb → core/collection.rb} +4 -0
  70. data/lib/fog/{connection.rb → core/connection.rb} +0 -0
  71. data/lib/fog/{credentials.rb → core/credentials.rb} +2 -0
  72. data/lib/fog/{deprecation.rb → core/deprecation.rb} +0 -0
  73. data/lib/fog/{errors.rb → core/errors.rb} +0 -0
  74. data/lib/fog/{hmac.rb → core/hmac.rb} +0 -0
  75. data/lib/fog/{model.rb → core/model.rb} +0 -0
  76. data/lib/fog/{parser.rb → core/parser.rb} +0 -0
  77. data/lib/fog/{provider.rb → core/provider.rb} +0 -0
  78. data/lib/fog/{service.rb → core/service.rb} +1 -0
  79. data/lib/fog/{ssh.rb → core/ssh.rb} +7 -7
  80. data/lib/fog/go_grid.rb +1 -1
  81. data/lib/fog/go_grid/compute.rb +6 -1
  82. data/lib/fog/go_grid/models/compute/image.rb +60 -0
  83. data/lib/fog/go_grid/models/compute/images.rb +33 -0
  84. data/lib/fog/go_grid/models/compute/server.rb +56 -0
  85. data/lib/fog/go_grid/models/compute/servers.rb +35 -0
  86. data/lib/fog/go_grid/requests/compute/grid_image_get.rb +41 -0
  87. data/lib/fog/go_grid/requests/compute/grid_image_list.rb +6 -1
  88. data/lib/fog/go_grid/requests/compute/grid_server_power.rb +2 -2
  89. data/lib/fog/google/models/storage/directories.rb +1 -1
  90. data/lib/fog/google/models/storage/directory.rb +1 -1
  91. data/lib/fog/google/models/storage/file.rb +3 -2
  92. data/lib/fog/google/models/storage/files.rb +1 -7
  93. data/lib/fog/google/parsers/storage/get_bucket.rb +1 -1
  94. data/lib/fog/linode/requests/compute/avail_linodeplans.rb +2 -2
  95. data/lib/fog/local/models/storage/directories.rb +1 -1
  96. data/lib/fog/local/models/storage/directory.rb +1 -1
  97. data/lib/fog/local/models/storage/file.rb +2 -2
  98. data/lib/fog/local/models/storage/files.rb +2 -5
  99. data/lib/fog/local/storage.rb +1 -1
  100. data/lib/fog/new_servers/compute.rb +1 -1
  101. data/lib/fog/rackspace/models/compute/flavor.rb +1 -3
  102. data/lib/fog/rackspace/models/compute/flavors.rb +1 -1
  103. data/lib/fog/rackspace/models/compute/image.rb +2 -1
  104. data/lib/fog/rackspace/models/compute/images.rb +1 -1
  105. data/lib/fog/rackspace/models/compute/server.rb +12 -11
  106. data/lib/fog/rackspace/models/compute/servers.rb +1 -1
  107. data/lib/fog/rackspace/models/storage/directories.rb +1 -1
  108. data/lib/fog/rackspace/models/storage/directory.rb +1 -1
  109. data/lib/fog/rackspace/models/storage/file.rb +4 -4
  110. data/lib/fog/rackspace/models/storage/files.rb +1 -1
  111. data/lib/fog/rackspace/requests/compute/create_image.rb +2 -2
  112. data/lib/fog/rackspace/requests/compute/delete_image.rb +1 -1
  113. data/lib/fog/rackspace/requests/compute/delete_server.rb +1 -1
  114. data/lib/fog/rackspace/requests/compute/get_server_details.rb +1 -1
  115. data/lib/fog/rackspace/requests/compute/list_addresses.rb +1 -1
  116. data/lib/fog/rackspace/requests/compute/list_images_detail.rb +2 -2
  117. data/lib/fog/rackspace/requests/compute/list_private_addresses.rb +1 -1
  118. data/lib/fog/rackspace/requests/compute/list_public_addresses.rb +1 -1
  119. data/lib/fog/rackspace/requests/compute/update_server.rb +1 -1
  120. data/lib/fog/rackspace/requests/storage/put_object.rb +4 -3
  121. data/lib/fog/slicehost/models/compute/flavor.rb +1 -1
  122. data/lib/fog/slicehost/models/compute/flavors.rb +1 -1
  123. data/lib/fog/slicehost/models/compute/image.rb +1 -1
  124. data/lib/fog/slicehost/models/compute/images.rb +1 -1
  125. data/lib/fog/slicehost/models/compute/server.rb +3 -1
  126. data/lib/fog/slicehost/models/compute/servers.rb +1 -1
  127. data/lib/fog/terremark/ecloud.rb +34 -33
  128. data/lib/fog/terremark/models/shared/address.rb +1 -1
  129. data/lib/fog/terremark/models/shared/network.rb +1 -1
  130. data/lib/fog/terremark/models/shared/server.rb +1 -1
  131. data/lib/fog/terremark/models/shared/servers.rb +1 -1
  132. data/lib/fog/terremark/models/shared/task.rb +1 -1
  133. data/lib/fog/terremark/models/shared/tasks.rb +1 -1
  134. data/lib/fog/terremark/models/shared/vdc.rb +1 -1
  135. data/lib/fog/terremark/parser.rb +1 -0
  136. data/lib/fog/terremark/vcloud.rb +4 -4
  137. data/lib/fog/vcloud.rb +15 -7
  138. data/lib/fog/vcloud/terremark/ecloud.rb +15 -3
  139. data/lib/fog/vcloud/terremark/ecloud/models/firewall_acls.rb +1 -1
  140. data/lib/fog/vcloud/terremark/ecloud/models/internet_services.rb +1 -1
  141. data/lib/fog/vcloud/terremark/ecloud/models/ips.rb +1 -1
  142. data/lib/fog/vcloud/terremark/ecloud/models/networks.rb +1 -1
  143. data/lib/fog/vcloud/terremark/ecloud/models/nodes.rb +1 -1
  144. data/lib/fog/vcloud/terremark/ecloud/models/public_ips.rb +1 -1
  145. data/lib/fog/vcloud/terremark/ecloud/models/servers.rb +1 -1
  146. data/lib/fog/vcloud/terremark/ecloud/models/tasks.rb +1 -1
  147. data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +1 -1
  148. data/lib/fog/vcloud/terremark/ecloud/requests/add_internet_service.rb +55 -49
  149. data/lib/fog/vcloud/terremark/ecloud/requests/add_node.rb +19 -15
  150. data/lib/fog/vcloud/terremark/ecloud/requests/configure_internet_service.rb +8 -1
  151. data/lib/fog/vcloud/terremark/ecloud/requests/configure_node.rb +17 -12
  152. data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog.rb +29 -1
  153. data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog_item.rb +38 -2
  154. data/lib/fog/vcloud/terremark/ecloud/requests/get_customization_options.rb +8 -2
  155. data/lib/fog/vcloud/terremark/ecloud/requests/instantiate_vapp_template.rb +46 -4
  156. data/spec/aws/models/compute/server_spec.rb +2 -0
  157. data/spec/aws/requests/simpledb/select_spec.rb +1 -0
  158. data/spec/spec_helper.rb +1 -1
  159. data/spec/vcloud/spec_helper.rb +1 -1
  160. data/spec/vcloud/terremark/ecloud/requests/get_catalog_item_spec.rb +62 -0
  161. data/spec/vcloud/terremark/ecloud/requests/get_catalog_spec.rb +44 -0
  162. data/spec/vcloud/terremark/ecloud/requests/get_customization_options_spec.rb +39 -0
  163. data/spec/vcloud/terremark/ecloud/requests/instantiate_vapp_template_spec.rb +73 -0
  164. data/tests/aws/requests/compute/address_tests.rb +2 -6
  165. data/tests/aws/requests/compute/availability_zone_tests.rb +3 -10
  166. data/tests/aws/requests/compute/image_tests.rb +4 -9
  167. data/tests/aws/requests/compute/instance_tests.rb +7 -8
  168. data/tests/aws/requests/compute/key_pair_tests.rb +2 -6
  169. data/tests/aws/requests/compute/region_tests.rb +2 -9
  170. data/tests/aws/requests/compute/security_group_tests.rb +3 -7
  171. data/tests/aws/requests/compute/snapshot_tests.rb +4 -7
  172. data/tests/aws/requests/compute/tag_tests.rb +49 -0
  173. data/tests/aws/requests/compute/volume_tests.rb +2 -6
  174. data/tests/aws/requests/storage/bucket_tests.rb +48 -0
  175. data/tests/aws/requests/storage/object_tests.rb +63 -0
  176. data/tests/bluebox/requests/compute/block_tests.rb +24 -11
  177. data/tests/bluebox/requests/compute/product_tests.rb +3 -0
  178. data/tests/bluebox/requests/compute/template_tests.rb +3 -0
  179. data/tests/go_grid/helper.rb +0 -0
  180. data/tests/go_grid/requests/compute/image_tests.rb +0 -0
  181. data/tests/helper.rb +5 -1
  182. data/tests/linode/requests/compute/datacenter_tests.rb +1 -0
  183. data/tests/linode/requests/compute/distribution_tests.rb +2 -0
  184. data/tests/linode/requests/compute/linode_tests.rb +6 -0
  185. data/tests/linode/requests/compute/linodeplans_tests.rb +2 -0
  186. data/tests/lorem.txt +1 -0
  187. data/tests/rackspace/requests/compute/flavor_tests.rb +4 -0
  188. data/tests/rackspace/requests/compute/image_tests.rb +12 -4
  189. data/tests/rackspace/requests/compute/server_tests.rb +9 -0
  190. data/tests/slicehost/requests/compute/backup_tests.rb +1 -0
  191. data/tests/slicehost/requests/compute/flavor_tests.rb +3 -0
  192. data/tests/slicehost/requests/compute/image_tests.rb +3 -0
  193. data/tests/slicehost/requests/compute/slice_tests.rb +14 -2
  194. metadata +42 -27
  195. data/spec/aws/requests/storage/delete_bucket_spec.rb +0 -35
  196. data/spec/aws/requests/storage/delete_object_spec.rb +0 -36
  197. data/spec/aws/requests/storage/get_object_spec.rb +0 -58
  198. data/spec/aws/requests/storage/get_service_spec.rb +0 -32
  199. data/spec/aws/requests/storage/head_object_spec.rb +0 -26
  200. data/spec/aws/requests/storage/put_bucket_spec.rb +0 -19
  201. data/spec/aws/requests/storage/put_object_spec.rb +0 -43
@@ -1,19 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../spec_helper'
2
-
3
- describe 'Storage.put_bucket' do
4
- describe 'success' do
5
-
6
- before(:each) do
7
- @response = AWS[:storage].put_bucket('fogputbucket')
8
- end
9
-
10
- after(:each) do
11
- AWS[:storage].delete_bucket('fogputbucket')
12
- end
13
-
14
- it 'should not raise an error if the bucket already exists' do
15
- AWS[:storage].put_bucket('fogputbucket')
16
- end
17
-
18
- end
19
- end
@@ -1,43 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../spec_helper'
2
-
3
- describe 'Storage.put_object' do
4
- describe 'success' do
5
-
6
- before(:each) do
7
- AWS[:storage].put_bucket('fogputobject')
8
- @response = AWS[:storage].put_object('fogputobject', 'fog_put_object', lorem_file)
9
- end
10
-
11
- after(:each) do
12
- AWS[:storage].delete_object('fogputobject', 'fog_put_object')
13
- AWS[:storage].delete_bucket('fogputobject')
14
- end
15
-
16
- it 'should return proper attributes' do
17
- @response.status.should == 200
18
- end
19
-
20
- it 'should not raise an error if the object already exists' do
21
- actual = AWS[:storage].put_object('fogputobject', 'fog_put_object', lorem_file)
22
- actual.status.should == 200
23
- end
24
-
25
- end
26
- describe 'failure' do
27
-
28
- it 'should raise a NotFound error if the bucket does not exist' do
29
- lambda {
30
- AWS[:storage].put_object('fognotabucket', 'fog_put_object', lorem_file)
31
- }.should raise_error(Excon::Errors::NotFound)
32
- end
33
-
34
- it 'should not raise an error if the object already exists' do
35
- AWS[:storage].put_bucket('fogputobject')
36
- AWS[:storage].put_object('fogputobject', 'fog_put_object', lorem_file)
37
- AWS[:storage].put_object('fogputobject', 'fog_put_object', lorem_file)
38
- AWS[:storage].delete_object('fogputobject', 'fog_put_object')
39
- AWS[:storage].delete_bucket('fogputobject')
40
- end
41
-
42
- end
43
- end