fog-maestrodev 1.14.0.20130806165225 → 1.15.0.20130829165835

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/changelog.txt +296 -0
  2. data/fog.gemspec +2 -2
  3. data/lib/fog/atmos/storage.rb +0 -3
  4. data/lib/fog/aws/cdn.rb +1 -2
  5. data/lib/fog/aws/compute.rb +52 -2
  6. data/lib/fog/aws/dns.rb +0 -1
  7. data/lib/fog/aws/models/auto_scaling/groups.rb +6 -3
  8. data/lib/fog/aws/models/compute/address.rb +1 -0
  9. data/lib/fog/aws/models/compute/flavors.rb +19 -0
  10. data/lib/fog/aws/models/compute/route_table.rb +69 -0
  11. data/lib/fog/aws/models/compute/route_tables.rb +92 -0
  12. data/lib/fog/aws/models/rds/instance_option.rb +21 -0
  13. data/lib/fog/aws/models/rds/instance_options.rb +30 -0
  14. data/lib/fog/aws/parsers/compute/associate_route_table.rb +20 -0
  15. data/lib/fog/aws/parsers/compute/create_route_table.rb +75 -0
  16. data/lib/fog/aws/parsers/compute/describe_account_attributes.rb +42 -0
  17. data/lib/fog/aws/parsers/compute/describe_route_tables.rb +85 -0
  18. data/lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb +47 -0
  19. data/lib/fog/aws/rds.rb +5 -0
  20. data/lib/fog/aws/requests/auto_scaling/describe_auto_scaling_groups.rb +9 -1
  21. data/lib/fog/aws/requests/auto_scaling/describe_policies.rb +15 -1
  22. data/lib/fog/aws/requests/compute/associate_dhcp_options.rb +2 -2
  23. data/lib/fog/aws/requests/compute/associate_route_table.rb +75 -0
  24. data/lib/fog/aws/requests/compute/attach_internet_gateway.rb +2 -2
  25. data/lib/fog/aws/requests/compute/create_route.rb +89 -0
  26. data/lib/fog/aws/requests/compute/create_route_table.rb +70 -0
  27. data/lib/fog/aws/requests/compute/create_vpc.rb +16 -1
  28. data/lib/fog/aws/requests/compute/delete_dhcp_options.rb +2 -2
  29. data/lib/fog/aws/requests/compute/delete_internet_gateway.rb +2 -2
  30. data/lib/fog/aws/requests/compute/delete_network_interface.rb +2 -2
  31. data/lib/fog/aws/requests/compute/delete_route.rb +60 -0
  32. data/lib/fog/aws/requests/compute/delete_route_table.rb +51 -0
  33. data/lib/fog/aws/requests/compute/delete_subnet.rb +2 -2
  34. data/lib/fog/aws/requests/compute/delete_vpc.rb +2 -2
  35. data/lib/fog/aws/requests/compute/describe_account_attributes.rb +49 -0
  36. data/lib/fog/aws/requests/compute/describe_route_tables.rb +87 -0
  37. data/lib/fog/aws/requests/compute/detach_internet_gateway.rb +2 -2
  38. data/lib/fog/aws/requests/compute/detach_network_interface.rb +2 -2
  39. data/lib/fog/aws/requests/compute/disassociate_route_table.rb +57 -0
  40. data/lib/fog/aws/requests/compute/reset_network_interface_attribute.rb +2 -1
  41. data/lib/fog/aws/requests/elb/create_load_balancer.rb +23 -9
  42. data/lib/fog/aws/requests/iam/upload_server_certificate.rb +1 -1
  43. data/lib/fog/aws/requests/rds/describe_orderable_db_instance_options.rb +76 -0
  44. data/lib/fog/aws/storage.rb +0 -2
  45. data/lib/fog/brightbox/models/compute/collaboration.rb +10 -2
  46. data/lib/fog/brightbox/models/compute/collaborations.rb +26 -2
  47. data/lib/fog/brightbox/models/compute/user_collaboration.rb +16 -1
  48. data/lib/fog/brightbox/models/compute/user_collaborations.rb +10 -2
  49. data/lib/fog/cloudstack/models/compute/server.rb +4 -0
  50. data/lib/fog/core/collection.rb +18 -0
  51. data/lib/fog/core/credentials.rb +6 -1
  52. data/lib/fog/google/compute.rb +17 -0
  53. data/lib/fog/google/examples/get_list_images.rb +27 -0
  54. data/lib/fog/google/examples/get_list_snapshots.rb +20 -0
  55. data/lib/fog/google/examples/image_create.rb +18 -0
  56. data/lib/fog/google/examples/launch_micro_instance.rb +10 -5
  57. data/lib/fog/google/examples/network.rb +21 -0
  58. data/lib/fog/google/models/compute/disk.rb +16 -5
  59. data/lib/fog/google/models/compute/image.rb +36 -18
  60. data/lib/fog/google/models/compute/images.rb +36 -10
  61. data/lib/fog/google/models/compute/server.rb +41 -11
  62. data/lib/fog/google/models/compute/servers.rb +1 -1
  63. data/lib/fog/google/models/compute/snapshot.rb +36 -0
  64. data/lib/fog/google/models/compute/snapshots.rb +28 -0
  65. data/lib/fog/google/requests/compute/delete_disk.rb +5 -1
  66. data/lib/fog/google/requests/compute/get_disk.rb +2 -1
  67. data/lib/fog/google/requests/compute/get_snapshot.rb +34 -0
  68. data/lib/fog/google/requests/compute/insert_disk.rb +23 -7
  69. data/lib/fog/google/requests/compute/insert_image.rb +16 -9
  70. data/lib/fog/google/requests/compute/insert_server.rb +22 -10
  71. data/lib/fog/google/requests/compute/list_disks.rb +1 -1
  72. data/lib/fog/google/requests/compute/list_snapshots.rb +30 -0
  73. data/lib/fog/google/storage.rb +1 -3
  74. data/lib/fog/hp/storage.rb +0 -2
  75. data/lib/fog/internet_archive/storage.rb +0 -2
  76. data/lib/fog/local/storage.rb +0 -2
  77. data/lib/fog/ninefold/storage.rb +0 -1
  78. data/lib/fog/openstack/models/storage/file.rb +2 -0
  79. data/lib/fog/openstack/requests/compute/add_flavor_access.rb +1 -1
  80. data/lib/fog/openstack/requests/compute/create_volume.rb +8 -7
  81. data/lib/fog/openstack/requests/compute/list_tenants_with_flavor_access.rb +1 -1
  82. data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +1 -1
  83. data/lib/fog/openstack/requests/image/create_image.rb +23 -23
  84. data/lib/fog/openstack/requests/image/update_image.rb +31 -33
  85. data/lib/fog/openstack/requests/storage/get_object_https_url.rb +3 -3
  86. data/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +1 -1
  87. data/lib/fog/openstack/storage.rb +10 -11
  88. data/lib/fog/openstack.rb +10 -1
  89. data/lib/fog/rackspace/cdn.rb +13 -0
  90. data/lib/fog/rackspace/compute.rb +8 -4
  91. data/lib/fog/rackspace/compute_v2.rb +2 -0
  92. data/lib/fog/rackspace/databases.rb +4 -4
  93. data/lib/fog/rackspace/dns.rb +6 -6
  94. data/lib/fog/rackspace/examples/compute_v2/bootstrap_server.rb +98 -0
  95. data/lib/fog/rackspace/load_balancers.rb +5 -4
  96. data/lib/fog/rackspace/models/compute_v2/flavors.rb +1 -2
  97. data/lib/fog/rackspace/models/compute_v2/images.rb +35 -3
  98. data/lib/fog/rackspace/models/compute_v2/metadatum.rb +2 -2
  99. data/lib/fog/rackspace/models/identity/service_catalog.rb +34 -16
  100. data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +8 -3
  101. data/lib/fog/rackspace/models/monitoring/alarm.rb +16 -8
  102. data/lib/fog/rackspace/models/monitoring/base.rb +2 -8
  103. data/lib/fog/rackspace/monitoring.rb +14 -6
  104. data/lib/fog/rackspace/requests/compute_v2/list_flavors_detail.rb +39 -0
  105. data/lib/fog/rackspace/requests/compute_v2/list_images.rb +15 -5
  106. data/lib/fog/rackspace/requests/compute_v2/list_images_detail.rb +53 -0
  107. data/lib/fog/rackspace/requests/identity/create_token.rb +1 -1
  108. data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +12 -0
  109. data/lib/fog/rackspace/requests/load_balancers/get_stats.rb +31 -0
  110. data/lib/fog/rackspace/requests/monitoring/get_entity.rb +33 -0
  111. data/lib/fog/rackspace/service.rb +7 -0
  112. data/lib/fog/rackspace/storage.rb +6 -3
  113. data/lib/fog/rackspace.rb +8 -5
  114. data/lib/fog/riakcs/provisioning.rb +0 -1
  115. data/lib/fog/riakcs/usage.rb +2 -3
  116. data/lib/fog/storage.rb +2 -0
  117. data/lib/fog/vcloud/examples/README.md +54 -0
  118. data/lib/fog/vcloud/examples/creating_a_connection.md +20 -0
  119. data/lib/fog/vcloud/examples/creating_a_vapp.md +17 -0
  120. data/lib/fog/vcloud/examples/get_network_information.md +10 -0
  121. data/lib/fog/vcloud/examples/get_vapp_information.md +10 -0
  122. data/lib/fog/vcloud/examples/more_on_vapps.md +23 -0
  123. data/lib/fog/version.rb +1 -1
  124. data/lib/tasks/changelog_task.rb +1 -0
  125. data/tests/aws/models/elb/model_tests.rb +5 -0
  126. data/tests/aws/models/rds/instance_option_tests.rb +14 -0
  127. data/tests/aws/requests/compute/client_tests.rb +25 -0
  128. data/tests/aws/requests/compute/route_tests.rb +277 -0
  129. data/tests/aws/requests/rds/helper.rb +22 -0
  130. data/tests/aws/requests/rds/instance_option_tests.rb +21 -0
  131. data/tests/core/credential_tests.rb +21 -0
  132. data/tests/core/service_tests.rb +26 -0
  133. data/tests/openstack/authenticate_tests.rb +22 -0
  134. data/tests/openstack/models/storage/file_tests.rb +20 -1
  135. data/tests/openstack/requests/compute/flavor_tests.rb +27 -12
  136. data/tests/openstack/requests/compute/volume_tests.rb +10 -12
  137. data/tests/openstack/requests/image/image_tests.rb +30 -15
  138. data/tests/rackspace/block_storage_tests.rb +9 -4
  139. data/tests/rackspace/cdn_tests.rb +14 -0
  140. data/tests/rackspace/compute_tests.rb +10 -4
  141. data/tests/rackspace/compute_v2_tests.rb +9 -4
  142. data/tests/rackspace/databases_tests.rb +9 -4
  143. data/tests/rackspace/dns_tests.rb +9 -4
  144. data/tests/rackspace/helper.rb +21 -2
  145. data/tests/rackspace/identity_tests.rb +9 -4
  146. data/tests/rackspace/load_balancer_tests.rb +8 -4
  147. data/tests/rackspace/models/compute_v2/server_tests.rb +18 -21
  148. data/tests/rackspace/models/identity/service_catalog_tests.rb +54 -29
  149. data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +5 -0
  150. data/tests/rackspace/models/monitoring/alarm_examples_tests.rb +1 -1
  151. data/tests/rackspace/models/monitoring/alarm_tests.rb +2 -2
  152. data/tests/rackspace/monitoring_tests.rb +9 -4
  153. data/tests/rackspace/requests/compute_v2/flavor_tests.rb +6 -0
  154. data/tests/rackspace/requests/compute_v2/image_tests.rb +4 -0
  155. data/tests/rackspace/requests/compute_v2/server_tests.rb +2 -2
  156. data/tests/rackspace/requests/load_balancers/get_stats_tests.rb +13 -0
  157. data/tests/rackspace/requests/load_balancers/helper.rb +9 -0
  158. data/tests/rackspace/requests/monitoring/alarm_tests.rb +4 -5
  159. data/tests/rackspace/requests/monitoring/entity_tests.rb +9 -1
  160. data/tests/rackspace/requests/storage/large_object_tests.rb +12 -4
  161. data/tests/rackspace/storage_tests.rb +23 -4
  162. data/tests/rackspace/url_encoding_tests.rb +3 -1
  163. metadata +117 -133
  164. checksums.yaml +0 -15
  165. data/lib/fog/aws/parsers/compute/associate_dhcp_options.rb +0 -24
  166. data/lib/fog/aws/parsers/compute/attach_internet_gateway.rb +0 -24
  167. data/lib/fog/aws/parsers/compute/delete_dhcp_options.rb +0 -24
  168. data/lib/fog/aws/parsers/compute/delete_internet_gateway.rb +0 -24
  169. data/lib/fog/aws/parsers/compute/delete_network_interface.rb +0 -24
  170. data/lib/fog/aws/parsers/compute/delete_subnet.rb +0 -24
  171. data/lib/fog/aws/parsers/compute/delete_vpc.rb +0 -24
  172. data/lib/fog/aws/parsers/compute/detach_internet_gateway.rb +0 -24
  173. data/lib/fog/aws/parsers/compute/detach_network_interface.rb +0 -24
@@ -32,6 +32,15 @@ LOAD_BALANCER_USAGE_FORMAT = {
32
32
  ]
33
33
  }
34
34
 
35
+ LOAD_BALANCER_STATS_FORMAT = {
36
+ 'connectTimeOut' => Integer,
37
+ 'connectError' => Integer,
38
+ 'connectFailure' => Integer,
39
+ 'dataTimedOut' => Integer,
40
+ 'keepAliveTimedOut' => Integer,
41
+ 'maxConn' => Integer
42
+ }
43
+
35
44
  SSL_TERMINATION_FORMAT = {
36
45
  'sslTermination' => {
37
46
  'certificate' => String,
@@ -36,11 +36,10 @@ Shindo.tests('Fog::Rackspace::Monitoring | alarm_tests', ['rackspace','rackspace
36
36
  tests('#fail to create new alarm(-1)').raises(Fog::Rackspace::Monitoring::BadRequest) do
37
37
  account.create_alarm(entity_id, {:type => ""})
38
38
  end
39
- # Commenting out update because incorrect update throws a 502
40
- #tests('#fail to update invalid alarm(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
41
- #options = { :testing => "Bar" }
42
- #response = account.update_alarm(-1,-1,options)
43
- #end
39
+ tests('#fail to update invalid alarm(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
40
+ options = { :testing => "Bar" }
41
+ response = account.update_alarm(-1,-1,options)
42
+ end
44
43
  tests('#fail to list alarms').raises(Fog::Rackspace::Monitoring::NotFound) do
45
44
  account.list_alarms(-1)
46
45
  end
@@ -1,9 +1,9 @@
1
1
  Shindo.tests('Fog::Rackspace::Monitoring | entity_tests', ['rackspace','rackspace_monitoring']) do
2
- pending if Fog.mocking?
3
2
  account = Fog::Rackspace::Monitoring.new
4
3
  entity_id = nil
5
4
  tests('success') do
6
5
  tests('#create new entity').formats(DATA_FORMAT) do
6
+ pending if Fog.mocking?
7
7
  response = account.create_entity(:label => "Foo").data
8
8
  entity_id = response[:headers]["X-Object-ID"]
9
9
  response
@@ -12,25 +12,33 @@ Shindo.tests('Fog::Rackspace::Monitoring | entity_tests', ['rackspace','rackspac
12
12
  account.get_entity(entity_id).data[:headers]
13
13
  end
14
14
  tests('#update entity').formats(DATA_FORMAT) do
15
+ pending if Fog.mocking?
16
+
15
17
  options = { :testing => "Bar"}
16
18
  account.update_entity(entity_id,options).data
17
19
  end
18
20
  tests('#delete entity').formats(DELETE_DATA_FORMAT) do
21
+ pending if Fog.mocking?
19
22
  account.delete_entity(entity_id).data
20
23
  end
21
24
  end
22
25
  tests('failure') do
23
26
  tests('#create new entity(-1)').raises(Fog::Rackspace::Monitoring::BadRequest) do
27
+ pending if Fog.mocking?
24
28
  account.create_entity(:label => "")
25
29
  end
26
30
  tests('#get entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
31
+ pending if Fog.mocking?
32
+
27
33
  account.get_entity(-1)
28
34
  end
29
35
  tests('#update invalid entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
36
+ pending if Fog.mocking?
30
37
  options = { :testing => "Bar" }
31
38
  response = account.update_entity(-1,options)
32
39
  end
33
40
  tests('#delete entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
41
+ pending if Fog.mocking?
34
42
  account.delete_entity(-1)
35
43
  end
36
44
  end
@@ -304,12 +304,20 @@ Shindo.tests('Fog::Storage[:rackspace] | large object requests', ['rackspace'])
304
304
  end
305
305
  end
306
306
 
307
- tests('#delete_static_large_object with missing container').raises(Fog::Storage::Rackspace::NotFound) do
308
- Fog::Storage[:rackspace].delete_static_large_object('fognoncontainer', 'fog_large_object')
307
+ tests('#delete_static_large_object with missing container') do
308
+ response = Fog::Storage[:rackspace].delete_static_large_object('fognoncontainer', 'fog_large_object')
309
+ returns(200) { response.status }
310
+ returns(0) { response.body["Number Not Found"] }
311
+ returns("400 Bad Request") { response.body["Response Status"]}
312
+ returns("Invalid bulk delete.") { response.body["Response Body"]}
309
313
  end
310
314
 
311
- tests('#delete_static_large_object with missing manifest').raises(Fog::Storage::Rackspace::NotFound) do
312
- Fog::Storage[:rackspace].delete_static_large_object(@directory.identity, 'fog_non_object')
315
+ tests('#delete_static_large_object with missing manifest') do
316
+ response = Fog::Storage[:rackspace].delete_static_large_object(@directory.identity, 'fog_non_object')
317
+ returns(200) { response.status }
318
+ returns(0) { response.body["Number Not Found"] }
319
+ returns("400 Bad Request") { response.body["Response Status"]}
320
+ returns("Invalid bulk delete.") { response.body["Response Body"]}
313
321
  end
314
322
 
315
323
  tests('#delete_static_large_object with missing segment') do
@@ -102,15 +102,34 @@ Shindo.tests('Rackspace | Storage', ['rackspace']) do
102
102
  tests('reauthentication') do
103
103
  pending if Fog.mocking?
104
104
 
105
- @service = Fog::Storage::Rackspace.new
106
- returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
107
- @service.instance_variable_set("@auth_token", "bad-token")
108
- returns(204) { @service.head_containers.status }
105
+ tests('should reauth with valid credentials') do
106
+ @service = Fog::Storage::Rackspace.new
107
+ returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
108
+ @service.instance_variable_set("@auth_token", "bad-token")
109
+ returns(204) { @service.head_containers.status }
110
+ end
111
+ tests('should terminate with incorrect credentials') do
112
+ raises(Excon::Errors::Unauthorized) { Fog::Storage::Rackspace.new :rackspace_api_key => 'bad_key' }
113
+ end
109
114
  end
110
115
 
111
116
  tests('account').succeeds do
112
117
  pending if Fog.mocking?
113
118
  Fog::Storage[:rackspace].account
114
119
  end
120
+
121
+ tests('ssl') do
122
+ tests('ssl enabled') do
123
+ @service = Fog::Storage::Rackspace.new(:rackspace_cdn_ssl => true)
124
+ returns(true) { @service.ssl? }
125
+ end
126
+ tests('ssl disabled') do
127
+ @service = Fog::Storage::Rackspace.new(:rackspace_cdn_ssl => false)
128
+ returns(false) { @service.ssl? }
129
+
130
+ @service = Fog::Storage::Rackspace.new(:rackspace_cdn_ssl => nil)
131
+ returns(false) { @service.ssl? }
132
+ end
133
+ end
115
134
  end
116
135
 
@@ -1,3 +1,5 @@
1
1
  Shindo.tests('Rackspace | url_encoding', ['rackspace']) do
2
- returns( Fog::Rackspace.escape( "is this my file?.jpg" ) ) { "is%20this%20my%20file%3F.jpg" }
2
+ returns("is%20this%20my%20file%3F.jpg") { Fog::Rackspace.escape("is this my file?.jpg") }
3
+ returns("foo/bar") { Fog::Rackspace.escape("foo/bar", "/") }
4
+ returns("foo%2Fbar") { Fog::Rackspace.escape("foo/bar", "0") }
3
5
  end