fog 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. data/.gitignore +1 -0
  2. data/Rakefile +3 -3
  3. data/changelog.txt +213 -0
  4. data/docs/compute/index.markdown +15 -1
  5. data/fog.gemspec +3 -3
  6. data/lib/fog.rb +1 -1
  7. data/lib/fog/aws.rb +9 -0
  8. data/lib/fog/aws/auto_scaling.rb +3 -1
  9. data/lib/fog/aws/cloud_formation.rb +2 -0
  10. data/lib/fog/aws/cloud_watch.rb +2 -0
  11. data/lib/fog/aws/compute.rb +9 -3
  12. data/lib/fog/aws/elasticache.rb +8 -1
  13. data/lib/fog/aws/elb.rb +2 -0
  14. data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +1 -2
  15. data/lib/fog/aws/models/compute/security_group.rb +1 -1
  16. data/lib/fog/aws/models/compute/server.rb +3 -1
  17. data/lib/fog/aws/models/dns/records.rb +3 -3
  18. data/lib/fog/aws/models/elb/load_balancer.rb +6 -0
  19. data/lib/fog/aws/models/storage/file.rb +2 -2
  20. data/lib/fog/aws/models/storage/files.rb +4 -4
  21. data/lib/fog/aws/parsers/compute/describe_instance_status.rb +64 -0
  22. data/lib/fog/aws/parsers/compute/describe_security_groups.rb +1 -1
  23. data/lib/fog/aws/parsers/sqs/receive_message.rb +1 -1
  24. data/lib/fog/aws/parsers/sts/get_session_token.rb +31 -0
  25. data/lib/fog/aws/rds.rb +36 -1
  26. data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
  27. data/lib/fog/aws/requests/compute/describe_instance_status.rb +36 -0
  28. data/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
  29. data/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb +27 -0
  30. data/lib/fog/aws/requests/rds/create_db_instance.rb +64 -1
  31. data/lib/fog/aws/requests/rds/delete_db_instance.rb +19 -3
  32. data/lib/fog/aws/requests/rds/describe_db_instances.rb +40 -1
  33. data/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +1 -1
  34. data/lib/fog/aws/requests/rds/modify_db_instance.rb +24 -1
  35. data/lib/fog/aws/requests/rds/reboot_db_instance.rb +17 -1
  36. data/lib/fog/aws/requests/storage/{hash_to_acl.rb → acl_utils.rb} +8 -0
  37. data/lib/fog/aws/requests/storage/copy_object.rb +8 -0
  38. data/lib/fog/aws/requests/storage/get_bucket_acl.rb +7 -1
  39. data/lib/fog/aws/requests/storage/get_object_acl.rb +7 -1
  40. data/lib/fog/aws/requests/storage/get_object_http_url.rb +4 -3
  41. data/lib/fog/aws/requests/storage/get_object_https_url.rb +4 -3
  42. data/lib/fog/aws/requests/storage/put_bucket_acl.rb +2 -2
  43. data/lib/fog/aws/requests/storage/put_object_acl.rb +1 -1
  44. data/lib/fog/aws/requests/sts/get_federation_token.rb +20 -0
  45. data/lib/fog/aws/requests/sts/get_session_token.rb +18 -0
  46. data/lib/fog/aws/simpledb.rb +5 -1
  47. data/lib/fog/aws/sns.rb +2 -0
  48. data/lib/fog/aws/sqs.rb +5 -1
  49. data/lib/fog/aws/storage.rb +6 -0
  50. data/lib/fog/aws/sts.rb +137 -0
  51. data/lib/fog/bin.rb +1 -0
  52. data/lib/fog/bin/aws.rb +2 -0
  53. data/lib/fog/bin/clodo.rb +31 -0
  54. data/lib/fog/brightbox/compute.rb +7 -0
  55. data/lib/fog/brightbox/models/compute/cloud_ip.rb +10 -2
  56. data/lib/fog/brightbox/models/compute/firewall_policies.rb +29 -0
  57. data/lib/fog/brightbox/models/compute/firewall_policy.rb +65 -0
  58. data/lib/fog/brightbox/models/compute/firewall_rule.rb +54 -0
  59. data/lib/fog/brightbox/models/compute/firewall_rules.rb +24 -0
  60. data/lib/fog/brightbox/models/compute/image.rb +2 -0
  61. data/lib/fog/brightbox/models/compute/server.rb +41 -6
  62. data/lib/fog/brightbox/models/compute/server_group.rb +56 -17
  63. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +14 -0
  64. data/lib/fog/clodo.rb +34 -0
  65. data/lib/fog/clodo/compute.rb +152 -0
  66. data/lib/fog/clodo/models/compute/image.rb +31 -0
  67. data/lib/fog/clodo/models/compute/images.rb +28 -0
  68. data/lib/fog/clodo/models/compute/server.rb +163 -0
  69. data/lib/fog/clodo/models/compute/servers.rb +36 -0
  70. data/lib/fog/clodo/requests/compute/add_ip_address.rb +49 -0
  71. data/lib/fog/clodo/requests/compute/create_server.rb +112 -0
  72. data/lib/fog/clodo/requests/compute/delete_ip_address.rb +47 -0
  73. data/lib/fog/clodo/requests/compute/delete_server.rb +44 -0
  74. data/lib/fog/clodo/requests/compute/get_image_details.rb +20 -0
  75. data/lib/fog/clodo/requests/compute/get_server_details.rb +49 -0
  76. data/lib/fog/clodo/requests/compute/list_images.rb +48 -0
  77. data/lib/fog/clodo/requests/compute/list_images_detail.rb +61 -0
  78. data/lib/fog/clodo/requests/compute/list_servers.rb +50 -0
  79. data/lib/fog/clodo/requests/compute/list_servers_detail.rb +51 -0
  80. data/lib/fog/clodo/requests/compute/move_ip_address.rb +34 -0
  81. data/lib/fog/clodo/requests/compute/reboot_server.rb +19 -0
  82. data/lib/fog/clodo/requests/compute/rebuild_server.rb +21 -0
  83. data/lib/fog/clodo/requests/compute/server_action.rb +25 -0
  84. data/lib/fog/clodo/requests/compute/start_server.rb +19 -0
  85. data/lib/fog/clodo/requests/compute/stop_server.rb +19 -0
  86. data/lib/fog/compute.rb +3 -0
  87. data/lib/fog/core/credentials.rb +3 -3
  88. data/lib/fog/core/errors.rb +2 -0
  89. data/lib/fog/core/wait_for.rb +1 -1
  90. data/lib/fog/dnsmadeeasy/dns.rb +1 -1
  91. data/lib/fog/libvirt/compute.rb +2 -0
  92. data/lib/fog/libvirt/models/compute/nodes.rb +1 -3
  93. data/lib/fog/libvirt/models/compute/server.rb +8 -1
  94. data/lib/fog/providers.rb +1 -0
  95. data/lib/fog/rackspace/dns.rb +10 -2
  96. data/lib/fog/rackspace/load_balancers.rb +3 -0
  97. data/lib/fog/rackspace/models/compute/server.rb +2 -2
  98. data/lib/fog/rackspace/models/dns/callback.rb +3 -1
  99. data/lib/fog/rackspace/models/dns/record.rb +4 -0
  100. data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +18 -8
  101. data/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb +1 -2
  102. data/lib/fog/rackspace/requests/load_balancers/get_error_page.rb +15 -0
  103. data/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb +8 -2
  104. data/lib/fog/rackspace/requests/load_balancers/remove_error_page.rb +15 -0
  105. data/lib/fog/rackspace/requests/load_balancers/set_error_page.rb +21 -0
  106. data/lib/fog/vcloud/compute.rb +7 -1
  107. data/lib/fog/vcloud/models/compute/catalogs.rb +4 -5
  108. data/lib/fog/vcloud/models/compute/helpers/status.rb +37 -0
  109. data/lib/fog/vcloud/models/compute/network.rb +13 -49
  110. data/lib/fog/vcloud/models/compute/networks.rb +12 -3
  111. data/lib/fog/vcloud/models/compute/organization.rb +44 -0
  112. data/lib/fog/vcloud/models/compute/organizations.rb +29 -0
  113. data/lib/fog/vcloud/models/compute/server.rb +35 -56
  114. data/lib/fog/vcloud/models/compute/servers.rb +11 -13
  115. data/lib/fog/vcloud/models/compute/vapp.rb +41 -0
  116. data/lib/fog/vcloud/models/compute/vapps.rb +32 -0
  117. data/lib/fog/vcloud/models/compute/vdc.rb +11 -26
  118. data/lib/fog/vcloud/models/compute/vdcs.rb +6 -8
  119. data/lib/fog/vcloud/requests/compute/get_server.rb +10 -0
  120. data/lib/fog/vsphere/compute.rb +1 -0
  121. data/lib/fog/vsphere/models/compute/server.rb +18 -0
  122. data/lib/fog/vsphere/models/compute/servers.rb +8 -2
  123. data/lib/fog/vsphere/requests/compute/datacenters.rb +34 -0
  124. data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -91
  125. data/lib/fog/vsphere/requests/compute/vm_clone.rb +76 -37
  126. data/spec/lib/fog/aws/parsers/sqs/receive_message_spec.rb +58 -0
  127. data/tests/aws/models/elb/model_tests.rb +5 -0
  128. data/tests/aws/requests/compute/instance_tests.rb +23 -0
  129. data/tests/aws/requests/compute/security_group_tests.rb +1 -0
  130. data/tests/aws/requests/elb/listener_tests.rb +4 -0
  131. data/tests/aws/requests/storage/{hash_to_acl_tests.rb → acl_utils_tests.rb} +38 -2
  132. data/tests/aws/requests/storage/bucket_tests.rb +0 -3
  133. data/tests/aws/requests/storage/object_tests.rb +2 -4
  134. data/tests/aws/requests/sts/get_federation_token_tests.rb +21 -0
  135. data/tests/aws/requests/sts/session_token_tests.rb +16 -0
  136. data/tests/brightbox/requests/compute/account_tests.rb +11 -6
  137. data/tests/brightbox/requests/compute/api_client_tests.rb +23 -12
  138. data/tests/brightbox/requests/compute/cloud_ip_tests.rb +32 -17
  139. data/tests/brightbox/requests/compute/helper.rb +29 -3
  140. data/tests/brightbox/requests/compute/image_tests.rb +17 -14
  141. data/tests/brightbox/requests/compute/interface_tests.rb +3 -2
  142. data/tests/brightbox/requests/compute/load_balancer_tests.rb +57 -11
  143. data/tests/brightbox/requests/compute/server_group_tests.rb +29 -22
  144. data/tests/brightbox/requests/compute/server_tests.rb +41 -22
  145. data/tests/brightbox/requests/compute/server_type_tests.rb +7 -6
  146. data/tests/brightbox/requests/compute/user_tests.rb +11 -16
  147. data/tests/brightbox/requests/compute/zone_tests.rb +7 -6
  148. data/tests/clodo/requests/compute/image_tests.rb +36 -0
  149. data/tests/clodo/requests/compute/server_tests.rb +152 -0
  150. data/tests/compute/helper.rb +1 -1
  151. data/tests/core/credential_tests.rb +2 -2
  152. data/tests/glesys/requests/compute/helper.rb +91 -66
  153. data/tests/glesys/requests/compute/ip_tests.rb +1 -1
  154. data/tests/glesys/requests/compute/server_tests.rb +5 -5
  155. data/tests/helpers/mock_helper.rb +2 -0
  156. data/tests/rackspace/models/dns/zone_tests.rb +14 -0
  157. data/tests/rackspace/models/{access_list_tests.rb → load_balancers/access_list_tests.rb} +0 -0
  158. data/tests/rackspace/models/{access_lists_tests.rb → load_balancers/access_lists_tests.rb} +0 -0
  159. data/tests/rackspace/models/{load_balancer_tests.rb → load_balancers/load_balancer_tests.rb} +25 -0
  160. data/tests/rackspace/models/{load_balancers_tests.rb → load_balancers/load_balancers_tests.rb} +0 -0
  161. data/tests/rackspace/models/{node_tests.rb → load_balancers/node_tests.rb} +0 -0
  162. data/tests/rackspace/models/{nodes_tests.rb → load_balancers/nodes_tests.rb} +0 -0
  163. data/tests/rackspace/models/{virtual_ip_tests.rb → load_balancers/virtual_ip_tests.rb} +0 -0
  164. data/tests/rackspace/models/{virtual_ips_tests.rb → load_balancers/virtual_ips_tests.rb} +0 -0
  165. data/tests/rackspace/requests/dns/dns_tests.rb +4 -2
  166. data/tests/rackspace/requests/load_balancers/error_page_tests.rb +31 -0
  167. data/tests/rackspace/requests/load_balancers/helper.rb +27 -11
  168. data/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +4 -1
  169. data/tests/rackspace/requests/load_balancers/node_tests.rb +24 -25
  170. data/tests/slicehost/requests/compute/slice_tests.rb +2 -2
  171. data/tests/storm_on_demand/requests/compute/server_tests.rb +3 -3
  172. data/tests/vcloud/data/api_+_v1.0_+_admin_+_network_+_2 +110 -0
  173. data/tests/vcloud/data/api_+_v1.0_+_login +5 -0
  174. data/tests/vcloud/data/api_+_v1.0_+_network_+_1 +44 -0
  175. data/tests/vcloud/data/api_+_v1.0_+_network_+_2 +31 -0
  176. data/tests/vcloud/data/api_+_v1.0_+_org_+_1 +17 -0
  177. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vapp-1 +369 -0
  178. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-1 +139 -0
  179. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-2 +155 -0
  180. data/tests/vcloud/data/api_+_v1.0_+_vdc_+_1 +61 -0
  181. data/tests/vcloud/models/compute/conn_helper.rb +20 -0
  182. data/tests/vcloud/models/compute/network_tests.rb +65 -0
  183. data/tests/vcloud/models/compute/networks_tests.rb +42 -0
  184. data/tests/vcloud/models/compute/organization_tests.rb +13 -0
  185. data/tests/vcloud/models/compute/organizations_tests.rb +14 -0
  186. data/tests/vcloud/models/compute/server_tests.rb +136 -0
  187. data/tests/vcloud/models/compute/servers_tests.rb +10 -89
  188. data/tests/vcloud/models/compute/vapp_tests.rb +27 -0
  189. data/tests/vcloud/models/compute/vapps_tests.rb +17 -0
  190. data/tests/vcloud/models/compute/vdc_tests.rb +42 -0
  191. data/tests/vcloud/models/compute/vdcs_tests.rb +17 -0
  192. data/tests/vsphere/requests/compute/vm_clone_tests.rb +2 -6
  193. metadata +151 -55
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  *.gem
3
3
  *.rbc
4
4
  *.sw?
5
+ .rvmrc
5
6
  .bundle
6
7
  .DS_Store
7
8
  coverage
data/Rakefile CHANGED
@@ -72,11 +72,11 @@ def tests(mocked)
72
72
  start = Time.now.to_i
73
73
  threads = []
74
74
  Thread.main[:results] = []
75
- Fog.providers.each do |provider|
75
+ Fog.providers.each do |key, value|
76
76
  threads << Thread.new do
77
77
  Thread.main[:results] << {
78
- :provider => provider,
79
- :success => sh("export FOG_MOCK=#{mocked} && bundle exec shindont +#{provider.downcase}")
78
+ :provider => value,
79
+ :success => sh("export FOG_MOCK=#{mocked} && bundle exec shindont +#{key}")
80
80
  }
81
81
  end
82
82
  end
data/changelog.txt CHANGED
@@ -1,3 +1,216 @@
1
+ 1.1.2 12/18/2011 c1873e37e76af83e9de3f3308f3baa0664dd8dc2
2
+ =========================================================
3
+
4
+ Stats! { 'collaborators' => 20, 'downloads' => 351821, 'forks' => 332, 'open_issues' => 21, 'watchers' => 1731 }
5
+
6
+ MVP! Stepan G. Fedorov
7
+
8
+ [Brightbox]
9
+ Fix zone_id/flavour_id getter/setter for Server. thanks Hemant Kumar
10
+ Add zone/server_type attribute for Server. thanks Hemant Kumar
11
+ Add username to Image. thanks Hemant Kumar
12
+ Add request for remove_firewall_policy. thanks Hemant Kumar
13
+ Add model method for remove. thanks Hemant Kumar
14
+ Change logic of fetching zone and flavour_id. thanks Hemant Kumar
15
+ Remove name as mandatory parameter for creating server group. thanks Hemant Kumar
16
+ Add created_at attribute for server_group,policy and firewall rule. thanks Hemant Kumar
17
+ Updated Image format tests for username. thanks Paul Thornthwaite
18
+ Updated ServerGroup format for created_at time. thanks Paul Thornthwaite
19
+
20
+ [aws|autoscaling]
21
+ allow sa-east-1 region in mocks. thanks Nick Osborn
22
+
23
+ [aws|compute]
24
+ fix security_group format for mock tests. thanks geemus
25
+
26
+ [aws|dns]
27
+ fix capitilization for records#all options. thanks geemus
28
+
29
+ [aws|elb]
30
+ update SSL certificates on listeners. :christmas_tree:. thanks Dylan Egan
31
+
32
+ [aws|storage]
33
+ Support ACL on copy_object. :v:. thanks Dylan Egan
34
+
35
+ [brightbox]
36
+ Adding *_server actions to ServerGroup model. thanks Caius Durling
37
+ Pass along server_groups when creating a server. thanks Caius Durling
38
+ Make update_cloud_ip request work. thanks Caius Durling
39
+ Firewall models. thanks Paul Thornthwaite
40
+ Added missing requirement and request arg. thanks Paul Thornthwaite
41
+ Corrected deprecated argument. thanks Paul Thornthwaite
42
+ Dynamically select testing image. thanks Paul Thornthwaite
43
+ Helper to get a test server ready. thanks Paul Thornthwaite
44
+ Revised tests structure. thanks Paul Thornthwaite
45
+ Test and fix for API client secret reset. thanks Paul Thornthwaite
46
+ Test update of reverse DNS for CIP. thanks Paul Thornthwaite
47
+ Updated default Ubuntu image. thanks Paul Thornthwaite
48
+ Make Cloud IP model's map nicer to use. thanks Paul Thornthwaite
49
+ Correctly get Server's IP addresses as strings. thanks Paul Thornthwaite
50
+ ServerGroup association to Servers. thanks Paul Thornthwaite
51
+ Replace duplicate remove with move test. thanks Paul Thornthwaite
52
+ Load balancer request tests expanded. thanks Paul Thornthwaite
53
+ Request test for snapshotting a server. thanks Paul Thornthwaite
54
+ fix mock tests. thanks geemus
55
+
56
+ [clodo]
57
+ : Added missing field. thanks NomadRain
58
+ Some cleanup before pool request. thanks NomadRain
59
+ add fake credentials for mock tests. thanks geemus
60
+
61
+ [clodo|compute]
62
+ Bug fixes. thanks NomadRain
63
+ I don't know what is ignore_awful_caching, so i removed it. thanks Stepan G Fedorov
64
+ server.ssh with password. Not only with key. thanks Stepan G Fedorov
65
+ Fix Mocks. thanks Stepan G Fedorov
66
+ Enable get_image_details. thanks Stepan G Fedorov
67
+ Actualize Mocks. thanks Stepan G. Fedorov
68
+ Enable :get_image_details. thanks Stepan G. Fedorov
69
+ Add tests. thanks Stepan G. Fedorov
70
+ Remove ddosprotect field from Mock. thanks Stepan G. Fedorov
71
+ Add ip-address management. thanks Stepan G. Fedorov
72
+ Rename moveip to move_ip_address. thanks Stepan G. Fedorov
73
+ Enable ip-management. thanks Stepan G. Fedorov
74
+ Fix delete_server mock. thanks Stepan G. Fedorov
75
+ Fix move_ip_address behaviour. thanks Stepan G. Fedorov
76
+ Add ip-address management. thanks Stepan G. Fedorov
77
+ Rename moveip to move_ip_address. thanks Stepan G. Fedorov
78
+ Enable ip-management. thanks Stepan G. Fedorov
79
+ Fix delete_server mock. thanks Stepan G. Fedorov
80
+ Fix move_ip_address behaviour. thanks Stepan G. Fedorov
81
+ Added missing field (server.type). thanks Обоев Рулон ибн Хаттаб
82
+
83
+ [core]
84
+ Cast Fog.wait_for interval to float. thanks Aaron Suggs
85
+ fix exceptions from nil credential value. thanks Blake Gentry
86
+ `@credential` should always be a symbol. thanks Hunter Haugen
87
+
88
+ [docs]
89
+ note in title that multiple keys is an EC2 thing. thanks geemus
90
+
91
+ [glesys|compute]
92
+ fixed tests due to changes in the api. thanks Anton Lindström
93
+ fix test formats and whitespaces. thanks Anton Lindström
94
+
95
+ [misc]
96
+ parse SQS timestamps as milliseconds. thanks Andrew Bruce
97
+ Allow use of sa-east-1 in the ec2 mock as well. thanks Andy Delcambre
98
+ Enabled tests for setting S3 ACL by id and uri on buckets and objects when mocking. thanks Arvid Andersson
99
+ Added acl_to_hash helper method to Fog::Storage::AWS. thanks Arvid Andersson
100
+ Ensuring that get_object_acl and get_bucket_acl mock methods returns a hash representation of the ACL. thanks Arvid Andersson
101
+ Created Rackspace LB models folder. thanks Brian Hartsock
102
+ This patch adds the ability to specify security groups by security group id, rather than group name. This is a required feature to use security groups within a VPC. thanks Eric Stonfer
103
+ indentation change. thanks Eric Stonfer
104
+ Add the ability to return the security group ID when requesting a SecurityGroupData object. thanks Eric Stonfer
105
+ fix tests to accomodate the new SecurityGroupId. thanks Eric Stonfer
106
+ Revert "fix tests to accomodate the new SecurityGroupId". thanks Eric Stonfer
107
+ fix tests to accomodate the addition of security_group_id. thanks Eric Stonfer
108
+ indentation fix. thanks Eric Stonfer
109
+ indentation fix. thanks Eric Stonfer
110
+ [Brightbox]Add remove_firewall_policy to computer.rb. thanks Hemant Kumar
111
+ [Brightbox]Protocol is no longer required parameter for firewall. thanks Hemant Kumar
112
+ Add implementation of DescribeInstanceStatus. thanks JD Huntington & Jason Hansen
113
+ fixed type-o in rdoc on Fog::DNS:DNSMadeEasy. thanks John Dyer
114
+ add query options to Fog::Storage::AWS#get_object_https_url. thanks Mateusz Juraszek
115
+ add options hash to Fog::Storage::AWS::File#url and Fog::Storage::AWS::Files#get_https_url which use get_object_https_url method. thanks Mateusz Juraszek
116
+ add query param to get_object_http_url for consistency. thanks Mateusz Juraszek
117
+ Fix regression in Rakefile introduced in 70e7ea13. thanks Michael Brodhead
118
+ add são paulo/brasil region. thanks Raphael Costa
119
+ mock create_db_instance. thanks Rodrigo Estebanez
120
+ mocking describe_db_instance. Fix hash structure in create_db_instance. thanks Rodrigo Estebanez
121
+ mocking delete_db_instance. thanks Rodrigo Estebanez
122
+ mocking wait_for through describe_db_instances. thanks Rodrigo Estebanez
123
+ mocking modify_db_instance and reboot_db_instance. thanks Rodrigo Estebanez
124
+ raise exception instead of excon response. thanks Rodrigo Estebanez
125
+ Fixing bug: It always showed the first instance when using get. thanks Rodrigo Estebanez
126
+ Fixes for issues 616 and 617. thanks Sergio Rubio
127
+ * remove unnecessary debugging. thanks Sergio Rubio
128
+ * Add missing recognized :libvirt_ip_command. thanks Sergio Rubio
129
+ * Add server_name environment variable to ip_command. thanks Sergio Rubio
130
+ * implement :destroy_volumes in Server.destroy (libvirt provider). thanks Sergio Rubio
131
+ Add documentation for using multiple ssh keys on AWS. thanks Sven Pfleiderer
132
+ Update bootstrap description. thanks Sven Pfleiderer
133
+ Escape underscore charakters. thanks Sven Pfleiderer
134
+ implement STS support. thanks Thom May
135
+ Allow use of session tokens in AWS Compute. thanks Thom May
136
+ handle session tokens for SQS and SimpleDB. thanks Thom May
137
+ Split [AWS|STS] tests into separate files per #609. thanks Thom May
138
+ Bug fix, metric_statistic#save would always fail. thanks bmiller
139
+ bump excon dep. thanks geemus
140
+ bump excon dep. thanks geemus
141
+ Fixing Rackspace's lack of integer-as-string support as per https://github.com/fog/fog/pull/657#issuecomment-3145337. thanks jimworm
142
+ add current set of elasticache endpoints. thanks lostboy
143
+ added sa-east-1 region. thanks thattommyhall
144
+ Add clodo support. thanks Обоев Рулон ибн Хаттаб
145
+ Enable clodo support. thanks Обоев Рулон ибн Хаттаб
146
+
147
+ [rackspace|dns]
148
+ error state callbacks now return an error. thanks Brian Hartsock
149
+ fixed broken test. thanks Brian Hartsock
150
+ should recognize rackspace_dns_endpoint argument. thanks geemus
151
+ record should pass priority. thanks geemus
152
+ mark tests for models pending in mocked mode. thanks geemus
153
+
154
+ [rackspace|lb]
155
+ Fixed bug #644 with HTTP health monitors. thanks Brian Hartsock
156
+ fix for #650 - Connection logging now loads appropriately. thanks Brian Hartsock
157
+ added error page requests. thanks Brian Hartsock
158
+ Added error pages to the model. thanks Brian Hartsock
159
+ Added list parameter for nodeddress. thanks Brian Hartsock
160
+ fixed broken test; cleaned up some tests. thanks Brian Hartsock
161
+
162
+ [rackspace|load balancers]
163
+ fixed broken tests. thanks Brian Hartsock
164
+
165
+ [rackspace|loadbalancers]
166
+ Fixed bug in deleting multiple nodes. thanks Brian Hartsock
167
+
168
+ [slicehost|compute]
169
+ update image id in tests. thanks geemus
170
+
171
+ [storm_on_demand]
172
+ fixes for formats in tests. thanks geemus
173
+
174
+ [tests | clodo]
175
+ Added ip-management tests. thanks Stepan G. Fedorov
176
+ Added ip-management tests. thanks Stepan G. Fedorov
177
+
178
+ [tests | clodo ]
179
+ ddosprotect field must not exist. thanks Stepan G. Fedorov
180
+
181
+ [tests | clodo | compute]
182
+ Add most tests. thanks Stepan G Fedorov
183
+ Add image tests. thanks Stepan G Fedorov
184
+
185
+ [tests | clodo | compute ]
186
+ create_server - First try. thanks Stepan G Fedorov
187
+
188
+ [vcloud]
189
+ mark tests pending in mocked mode. thanks geemus
190
+
191
+ [vcloud|compute]
192
+ introduce organizations. thanks Peter Meier
193
+ make networks working also in organizations. thanks Peter Meier
194
+ remove server from organizations as they are within vApps of vDC. thanks Peter Meier
195
+ add catalogs to an organization. thanks Peter Meier
196
+ a vdc does not have a tasklist. thanks Peter Meier
197
+ introduce vapps. thanks Peter Meier
198
+ More work on getting server in a useable shape. thanks Peter Meier
199
+ fix network to the minimum. thanks Peter Meier
200
+ a vapp might not have any childrens attached. thanks Peter Meier
201
+ improve models add tests. thanks Peter Meier
202
+ improve disk info access. thanks Peter Meier
203
+ improve network. thanks Peter Meier
204
+ introduce link on a network to parent network. thanks Peter Meier
205
+ fix an issue if this is not parsed as an array. thanks Peter Meier
206
+ stopgap fix for test data files. thanks geemus
207
+ properly namespace vcloud test to prevent breaking others. thanks geemus
208
+
209
+ [vsphere]
210
+ (#10644) Add servers filter to improve clone performance. thanks Jeff McCune
211
+ fix whitespace issue in yaml for mocks. thanks geemus
212
+
213
+
1
214
  1.1.1 11/11/2011 a468aa9a3445aae4f496b1a51e26572b8379c3da
2
215
  =========================================================
3
216
 
@@ -61,7 +61,7 @@ Cycling servers is great, but in order to actually ssh in we need to setup ssh k
61
61
 
62
62
  server = connection.servers.bootstrap(:private_key_path => '~/.ssh/id_rsa', :public_key_path => '~/.ssh/id_rsa.pub', :username => 'ubuntu')
63
63
 
64
- Bootstrap will create the server, but it will also make sure that port 22 is open for traffic and has ssh keys setup. In order to hook everything up it will need the server to be running, so by the time it finishes it will be ready. You can then make commands to it directly:
64
+ Bootstrap will create the server, but it will also make sure that port 22 is open for traffic and has ssh keys setup. The ssh key pair you specified will be registered under the name "fog\_default" unless you've set `Fog.credential` to a custom string value. In order to hook everything up `bootstrap` will need the server to be running, so by the time it finishes it will be ready. You can then make commands to it directly:
65
65
 
66
66
  server.ssh('pwd')
67
67
  server.ssh(['pwd', 'whoami'])
@@ -70,6 +70,20 @@ These return an array of results, where each has stdout, stderr and status value
70
70
 
71
71
  server.destroy
72
72
 
73
+
74
+ ### Managing multiple ssh key pairs on EC2
75
+
76
+ The key pair you've specified, will be registered as "fog\_default" after running `bootstrap` for the first time. If you want to use multiple key pairs with the same AWS credentials, you need to set `Fog.credential` to register your other key pairs under different names. Your additional key pair will then be registered as "fog\_#{Fog.credential}":
77
+
78
+ Fog.credential = 'my_custom_key'
79
+ connection.servers.bootstrap(:private_key_path => '~/.ssh/my_custom_key', :public_key_path => '~/.ssh/my_custom_key.pub')
80
+
81
+ If you've already registered a custom key pair e.g. using `connection.create_key_pair` or `connection.import_key_pair`, you can set your key paths using `Fog.credentials` and pass in the name of this key so `bootstrap` will use it instead of "fog\_default":
82
+
83
+ Fog.credentials = Fog.credentials.merge({ :private_key_path => "~/.ssh/my_custom_key", :public_key_path => "~/.ssh/my_custom_key.pub" })
84
+ connection.import_key_pair('my_custom_key', IO.read('~/.ssh/my_custom_key.pub')) if connection.key_pairs.get('my_custom_key').nil?
85
+ server = connection.servers.bootstrap(:key_name => 'my_custom_key')
86
+
73
87
  ## Rackspace Cloud Servers
74
88
 
75
89
  Rackspace has <a href="http://www.rackspacecloud.com/cloud_hosting_products/servers">Cloud Servers</a> and you can sign up <a href="https://www.rackspacecloud.com/signup">here</a> and get your credentials <a href="https://manage.rackspacecloud.com/APIAccess.do">here</a>.
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 = '1.1.1'
10
- s.date = '2011-11-11'
9
+ s.version = '1.1.2'
10
+ s.date = '2011-12-18'
11
11
  s.rubyforge_project = 'fog'
12
12
 
13
13
  ## Make sure your summary is short. The description may be as long
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
37
37
  ## List your runtime dependencies here. Runtime dependencies are those
38
38
  ## that are needed for an end user to actually USE your code.
39
39
  s.add_dependency('builder')
40
- s.add_dependency('excon', '~>0.7.4')
40
+ s.add_dependency('excon', '~>0.9.0')
41
41
  s.add_dependency('formatador', '~>0.2.0')
42
42
  s.add_dependency('multi_json', '~>1.0.3')
43
43
  s.add_dependency('mime-types')
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 = '1.1.1'
6
+ VERSION = '1.1.2'
7
7
  end
8
8
 
9
9
  end
data/lib/fog/aws.rb CHANGED
@@ -20,6 +20,7 @@ module Fog
20
20
  service(:simpledb, 'aws/simpledb', 'SimpleDB')
21
21
  service(:sns, 'aws/sns', 'SNS')
22
22
  service(:sqs, 'aws/sqs', 'SQS')
23
+ service(:sts, 'aws/sts', 'STS')
23
24
  service(:storage, 'aws/storage', 'Storage')
24
25
 
25
26
  def self.indexed_param(key, values)
@@ -85,6 +86,10 @@ module Fog
85
86
  'Version' => options[:version]
86
87
  })
87
88
 
89
+ params.merge!({
90
+ 'SecurityToken' => options[:aws_session_token]
91
+ }) if options[:aws_session_token]
92
+
88
93
  body = ''
89
94
  for key in params.keys.sort
90
95
  unless (value = params[key]).nil?
@@ -218,6 +223,10 @@ module Fog
218
223
  def self.volume_id
219
224
  "vol-#{Fog::Mock.random_hex(8)}"
220
225
  end
226
+
227
+ def self.rds_address(db_name,region)
228
+ "#{db_name}.#{Fog::Mock.random_letters(rand(12) + 4)}.#{region}.rds.amazonaws.com"
229
+ end
221
230
  end
222
231
  end
223
232
  end
@@ -90,6 +90,8 @@ module Fog
90
90
  'autoscaling.us-west-1.amazonaws.com'
91
91
  when 'us-west-2'
92
92
  'autoscaling.us-west-2.amazonaws.com'
93
+ when 'sa-east-1'
94
+ 'autoscaling.sa-east-1.amazonaws.com'
93
95
  else
94
96
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
95
97
  end
@@ -206,7 +208,7 @@ module Fog
206
208
 
207
209
  @region = options[:region] || 'us-east-1'
208
210
 
209
- unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
211
+ unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'sa-east-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
210
212
  raise ArgumentError, "Unknown region: #{@region.inspect}"
211
213
  end
212
214
 
@@ -67,6 +67,8 @@ module Fog
67
67
  'cloudformation.us-west-1.amazonaws.com'
68
68
  when 'us-west-2'
69
69
  'cloudformation.us-west-2.amazonaws.com'
70
+ when 'sa-east-1'
71
+ 'cloudformation.sa-east-1.amazonaws.com'
70
72
  else
71
73
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
72
74
  end
@@ -81,6 +81,8 @@ module Fog
81
81
  'monitoring.us-west-1.amazonaws.com'
82
82
  when 'us-west-2'
83
83
  'monitoring.us-west-2.amazonaws.com'
84
+ when 'sa-east-1'
85
+ 'monitoring.sa-east-1.amazonaws.com'
84
86
  else
85
87
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
86
88
  end
@@ -6,7 +6,7 @@ module Fog
6
6
  class AWS < Fog::Service
7
7
 
8
8
  requires :aws_access_key_id, :aws_secret_access_key
9
- recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
9
+ recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent, :aws_session_token
10
10
 
11
11
  model_path 'fog/aws/models/compute'
12
12
  model :address
@@ -57,6 +57,7 @@ module Fog
57
57
  request :describe_images
58
58
  request :describe_instances
59
59
  request :describe_reserved_instances
60
+ request :describe_instance_status
60
61
  request :describe_key_pairs
61
62
  request :describe_placement_groups
62
63
  request :describe_regions
@@ -170,7 +171,7 @@ module Fog
170
171
 
171
172
  @region = options[:region] || 'us-east-1'
172
173
 
173
- unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
174
+ unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1'].include?(@region)
174
175
  raise ArgumentError, "Unknown region: #{@region.inspect}"
175
176
  end
176
177
  end
@@ -249,6 +250,7 @@ module Fog
249
250
  # * options<~Hash> - config arguments for connection. Defaults to {}.
250
251
  # * region<~String> - optional region to use, in
251
252
  # ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'ap-northeast-1', 'ap-southeast-1']
253
+ # * aws_session_token<~String> - when using Session Tokens or Federated Users, a session_token must be presented
252
254
  #
253
255
  # ==== Returns
254
256
  # * EC2 object with connection to aws.
@@ -257,6 +259,7 @@ module Fog
257
259
 
258
260
  @aws_access_key_id = options[:aws_access_key_id]
259
261
  @aws_secret_access_key = options[:aws_secret_access_key]
262
+ @aws_session_token = options[:aws_session_token]
260
263
  @connection_options = options[:connection_options] || {}
261
264
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
262
265
  @region = options[:region] ||= 'us-east-1'
@@ -281,6 +284,8 @@ module Fog
281
284
  'ec2.us-west-1.amazonaws.com'
282
285
  when 'us-west-2'
283
286
  'ec2.us-west-2.amazonaws.com'
287
+ when 'sa-east-1'
288
+ 'ec2.sa-east-1.amazonaws.com'
284
289
  else
285
290
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
286
291
  end
@@ -306,11 +311,12 @@ module Fog
306
311
  params,
307
312
  {
308
313
  :aws_access_key_id => @aws_access_key_id,
314
+ :aws_session_token => @aws_session_token,
309
315
  :hmac => @hmac,
310
316
  :host => @host,
311
317
  :path => @path,
312
318
  :port => @port,
313
- :version => '2011-05-15'
319
+ :version => '2011-11-01'
314
320
  }
315
321
  )
316
322
 
@@ -57,7 +57,14 @@ module Fog
57
57
  @host = options[:host] || case options[:region]
58
58
  when 'us-east-1'
59
59
  'elasticache.us-east-1.amazonaws.com'
60
- #TODO: Support other regions
60
+ when 'us-west-1'
61
+ 'elasticache.us-west-1.amazonaws.com'
62
+ when 'eu-west-1'
63
+ 'elasticache.eu-west-1.amazonaws.com'
64
+ when 'ap-southeast-1'
65
+ 'elasticache.ap-southeast-1.amazonaws.com'
66
+ when 'ap-northeast-1'
67
+ 'elasticache.ap-northeast-1.amazonaws.com'
61
68
  else
62
69
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
63
70
  end