poolparty 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -2
- data/bin/cloud-contract +6 -1
- data/bin/cloud-list +5 -6
- data/bin/cloud-vnc +39 -0
- data/examples/rds_cloud.rb +44 -0
- data/lib/cloud_providers/connections.rb +0 -1
- data/lib/cloud_providers/ec2/ec2.rb +86 -25
- data/lib/cloud_providers/ec2/ec2_instance.rb +6 -2
- data/lib/cloud_providers/ec2/helpers/ec2_helper.rb +19 -6
- data/lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb +3 -3
- data/lib/cloud_providers/ec2/helpers/rds_instance.rb +110 -0
- data/lib/cloud_providers/remote_instance.rb +5 -3
- data/lib/poolparty/cloud.rb +8 -3
- data/lib/poolparty/pool.rb +12 -0
- data/test/fixtures/clouds/rds_cloud.rb +14 -0
- data/test/fixtures/clouds/rds_missing_params.rb +11 -0
- data/test/fixtures/ec2/ec2-describe-security-groups_response_body.xml +23 -0
- data/test/fixtures/ec2/rds-describe-db-instances-empty_response_body.xml +9 -0
- data/test/lib/poolparty/rds_test.rb +35 -0
- data/test/test_helper.rb +4 -4
- data/vendor/gems/amazon-ec2/ChangeLog +15 -0
- data/vendor/gems/amazon-ec2/README.rdoc +27 -24
- data/vendor/gems/amazon-ec2/README_dev.rdoc +0 -2
- data/vendor/gems/amazon-ec2/Rakefile +8 -39
- data/vendor/gems/amazon-ec2/VERSION +1 -1
- data/vendor/gems/amazon-ec2/amazon-ec2.gemspec +24 -16
- data/vendor/gems/amazon-ec2/bin/setup.rb +1 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Autoscaling/autoscaling.rb +6 -16
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/availability_zones.rb +8 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/console.rb +2 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/devpay.rb +18 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/elastic_ips.rb +37 -32
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/images.rb +43 -27
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/instances.rb +136 -99
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/keypairs.rb +3 -17
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/security_groups.rb +4 -23
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/snapshots.rb +38 -17
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/volumes.rb +6 -21
- data/vendor/gems/amazon-ec2/lib/AWS/EC2.rb +2 -2
- data/vendor/gems/amazon-ec2/lib/AWS/ELB/load_balancers.rb +11 -38
- data/vendor/gems/amazon-ec2/lib/AWS/RDS/rds.rb +522 -0
- data/vendor/gems/amazon-ec2/lib/AWS/RDS.rb +73 -0
- data/vendor/gems/amazon-ec2/lib/AWS/exceptions.rb +103 -25
- data/vendor/gems/amazon-ec2/lib/AWS.rb +19 -9
- data/vendor/gems/amazon-ec2/perftools/ec2prof +0 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.dot +130 -191
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.txt +100 -126
- data/vendor/gems/amazon-ec2/perftools/ec2prof.symbols +102 -129
- data/vendor/gems/amazon-ec2/test/test_Autoscaling_groups.rb +3 -2
- data/vendor/gems/amazon-ec2/test/test_EC2_images.rb +32 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_instances.rb +204 -22
- data/vendor/gems/amazon-ec2/test/test_EC2_snapshots.rb +1 -1
- data/vendor/gems/amazon-ec2/test/test_ELB_load_balancers.rb +2 -2
- data/vendor/gems/amazon-ec2/test/test_RDS.rb +354 -0
- data/vendor/gems/amazon-ec2/wsdl/2009-10-31.ec2.wsdl +4261 -0
- data/vendor/gems/amazon-ec2/wsdl/2009-11-30.ec2.wsdl +4668 -0
- metadata +17 -2
@@ -0,0 +1,354 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
context "rds databases " do
|
4
|
+
before do
|
5
|
+
@rds = AWS::RDS::Base.new( :access_key_id => "not a key", :secret_access_key => "not a secret" )
|
6
|
+
|
7
|
+
@create_db_instance_body = <<-RESPONSE
|
8
|
+
<CreateDBInstanceResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
9
|
+
<CreateDBInstanceResult>
|
10
|
+
<DBInstance>
|
11
|
+
<Engine>MySQL5.1</Engine>
|
12
|
+
<BackupRetentionPeriod>1</BackupRetentionPeriod>
|
13
|
+
<DBInstanceStatus>creating</DBInstanceStatus>
|
14
|
+
<DBInstanceIdentifier>mydbinstance</DBInstanceIdentifier>
|
15
|
+
<PreferredBackupWindow>03:00-05:00</PreferredBackupWindow>
|
16
|
+
<DBSecurityGroups>
|
17
|
+
<DBSecurityGroup>
|
18
|
+
<Status>active</Status>
|
19
|
+
<DBSecurityGroupName>default</DBSecurityGroupName>
|
20
|
+
</DBSecurityGroup>
|
21
|
+
</DBSecurityGroups>
|
22
|
+
<PreferredMaintenanceWindow>sun:05:00-sun:09:00</PreferredMaintenanceWindow>
|
23
|
+
<AllocatedStorage>10</AllocatedStorage>
|
24
|
+
<DBInstanceClass>db.m1.large</DBInstanceClass>
|
25
|
+
<MasterUsername>master</MasterUsername>
|
26
|
+
</DBInstance>
|
27
|
+
</CreateDBInstanceResult>
|
28
|
+
<ResponseMetadata>
|
29
|
+
<RequestId>e6fb58c5-bf34-11de-b88d-993294bf1c81</RequestId>
|
30
|
+
</ResponseMetadata>
|
31
|
+
</CreateDBInstanceResponse>
|
32
|
+
RESPONSE
|
33
|
+
@create_db_security_group = <<-RESPONSE
|
34
|
+
<CreateDBSecurityGroupResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
35
|
+
<CreateDBSecurityGroupResult>
|
36
|
+
<DBSecurityGroup>
|
37
|
+
<EC2SecurityGroups/>
|
38
|
+
<DBSecurityGroupDescription>My new DBSecurityGroup</DBSecurityGroupDescription>
|
39
|
+
<IPRanges/>
|
40
|
+
<OwnerId>621567473609</OwnerId>
|
41
|
+
<DBSecurityGroupName>mydbsecuritygroup4</DBSecurityGroupName>
|
42
|
+
</DBSecurityGroup>
|
43
|
+
</CreateDBSecurityGroupResult>
|
44
|
+
<ResponseMetadata>
|
45
|
+
<RequestId>c9cf9ff2-bf36-11de-b88d-993294bf1c81</RequestId>
|
46
|
+
</ResponseMetadata>
|
47
|
+
</CreateDBSecurityGroupResponse>
|
48
|
+
RESPONSE
|
49
|
+
end
|
50
|
+
|
51
|
+
specify "should be able to be create a db_instance" do
|
52
|
+
@rds.stubs(:make_request).with('CreateDBInstance', {'Engine' => 'MySQL5.1',
|
53
|
+
'MasterUsername' => 'master',
|
54
|
+
'DBInstanceClass' => 'db.m1.large',
|
55
|
+
'DBInstanceIdentifier' => 'testdb',
|
56
|
+
'AllocatedStorage' => '10',
|
57
|
+
'MasterUserPassword' => 'SecretPassword01'}).
|
58
|
+
returns stub(:body => @create_db_instance_body, :is_a? => true)
|
59
|
+
response = @rds.create_db_instance(
|
60
|
+
:db_instance_class => "db.m1.large",
|
61
|
+
:db_instance_identifier=>"testdb",
|
62
|
+
:allocated_storage => 10,
|
63
|
+
:engine => "MySQL5.1",
|
64
|
+
:master_user_password => "SecretPassword01",
|
65
|
+
:master_username => "master"
|
66
|
+
)
|
67
|
+
response.should.be.an.instance_of Hash
|
68
|
+
|
69
|
+
assert_equal response.CreateDBInstanceResult.DBInstance.AllocatedStorage, "10"
|
70
|
+
end
|
71
|
+
|
72
|
+
specify "should be able to create_db_security_group" do
|
73
|
+
@rds.stubs(:make_request).with('CreateDBSecurityGroup', {
|
74
|
+
'DBSecurityGroupName' => 'mydbsecuritygroup',
|
75
|
+
'DBSecurityGroupDescription' => 'My new DBSecurityGroup'}).
|
76
|
+
returns stub(:body => @create_db_security_group, :is_a? => true)
|
77
|
+
response = @rds.create_db_security_group(
|
78
|
+
:db_security_group_name => "mydbsecuritygroup",
|
79
|
+
:db_security_group_description => "My new DBSecurityGroup"
|
80
|
+
)
|
81
|
+
response.should.be.an.instance_of Hash
|
82
|
+
|
83
|
+
assert_equal response.CreateDBSecurityGroupResult.DBSecurityGroup.DBSecurityGroupName, "mydbsecuritygroup4"
|
84
|
+
end
|
85
|
+
|
86
|
+
specify "should be able to create_db_parameter_group" do
|
87
|
+
body =<<-EOE
|
88
|
+
<CreateDBParameterGroupResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
89
|
+
<CreateDBParameterGroupResult>
|
90
|
+
<DBParameterGroup>
|
91
|
+
<Engine>mysql5.1</Engine>
|
92
|
+
<Description>My new DBParameterGroup</Description>
|
93
|
+
<DBParameterGroupName>mydbparametergroup3</DBParameterGroupName>
|
94
|
+
</DBParameterGroup>
|
95
|
+
</CreateDBParameterGroupResult>
|
96
|
+
<ResponseMetadata>
|
97
|
+
<RequestId>0b447b66-bf36-11de-a88b-7b5b3d23b3a7</RequestId>
|
98
|
+
</ResponseMetadata>
|
99
|
+
</CreateDBParameterGroupResponse>
|
100
|
+
EOE
|
101
|
+
@rds.stubs(:make_request).with('CreateDBParameterGroup', {'Engine' => 'MySQL5.1',
|
102
|
+
'DBParameterGroupName' => 'mydbsecuritygroup',
|
103
|
+
'Description' => 'My test DBSecurity group'}).
|
104
|
+
returns stub(:body => body, :is_a? => true)
|
105
|
+
response = @rds.create_db_parameter_group(
|
106
|
+
:db_parameter_group_name => "mydbsecuritygroup",
|
107
|
+
:description => "My test DBSecurity group",
|
108
|
+
:engine => "MySQL5.1"
|
109
|
+
)
|
110
|
+
response.should.be.an.instance_of Hash
|
111
|
+
|
112
|
+
assert_equal response.CreateDBParameterGroupResult.DBParameterGroup.DBParameterGroupName, "mydbparametergroup3"
|
113
|
+
end
|
114
|
+
|
115
|
+
specify "should be able to create_db_snapshot" do
|
116
|
+
body =<<-EOE
|
117
|
+
<CreateDBSnapshotResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
118
|
+
<CreateDBSnapshotResult>
|
119
|
+
<DBSnapshot>
|
120
|
+
<Port>3306</Port>
|
121
|
+
<Status>creating</Status>
|
122
|
+
<Engine>mysql5.1</Engine>
|
123
|
+
<AvailabilityZone>us-east-1d</AvailabilityZone>
|
124
|
+
<InstanceCreateTime>2009-10-21T04:05:43.609Z</InstanceCreateTime>
|
125
|
+
<AllocatedStorage>50</AllocatedStorage>
|
126
|
+
<DBInstanceIdentifier>mynewdbinstance</DBInstanceIdentifier>
|
127
|
+
<MasterUsername>sa</MasterUsername>
|
128
|
+
<DBSnapshotIdentifier>mynewdbsnapshot3</DBSnapshotIdentifier>
|
129
|
+
</DBSnapshot>
|
130
|
+
</CreateDBSnapshotResult>
|
131
|
+
<ResponseMetadata>
|
132
|
+
<RequestId>48e870fd-bf38-11de-a88b-7b5b3d23b3a7</RequestId>
|
133
|
+
</ResponseMetadata>
|
134
|
+
</CreateDBSnapshotResponse>
|
135
|
+
EOE
|
136
|
+
@rds.stubs(:make_request).with('CreateDBSnapshot', {'DBSnapshotIdentifier' => 'mynewdbsnapshot3', 'DBInstanceIdentifier' => 'mynewdbinstance'}).
|
137
|
+
returns stub(:body => body, :is_a? => true)
|
138
|
+
response = @rds.create_db_snapshot(
|
139
|
+
:db_snapshot_identifier => "mynewdbsnapshot3",
|
140
|
+
:db_instance_identifier => "mynewdbinstance"
|
141
|
+
)
|
142
|
+
response.should.be.an.instance_of Hash
|
143
|
+
|
144
|
+
assert_equal response.CreateDBSnapshotResult.DBSnapshot.DBSnapshotIdentifier, "mynewdbsnapshot3"
|
145
|
+
end
|
146
|
+
|
147
|
+
specify "should be able to authorize_db_security_group" do
|
148
|
+
body =<<-EOE
|
149
|
+
<AuthorizeDBSecurityGroupIngressResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
150
|
+
<AuthorizeDBSecurityGroupIngressResult>
|
151
|
+
<DBSecurityGroup>
|
152
|
+
<EC2SecurityGroups/>
|
153
|
+
<DBSecurityGroupDescription>My new DBSecurityGroup</DBSecurityGroupDescription>
|
154
|
+
<IPRanges>
|
155
|
+
<IPRange>
|
156
|
+
<CIDRIP>192.168.1.1/24</CIDRIP>
|
157
|
+
<Status>authorizing</Status>
|
158
|
+
</IPRange>
|
159
|
+
</IPRanges>
|
160
|
+
<OwnerId>621567473609</OwnerId>
|
161
|
+
<DBSecurityGroupName>mydbsecuritygroup</DBSecurityGroupName>
|
162
|
+
</DBSecurityGroup>
|
163
|
+
</AuthorizeDBSecurityGroupIngressResult>
|
164
|
+
<ResponseMetadata>
|
165
|
+
<RequestId>d9799197-bf2d-11de-b88d-993294bf1c81</RequestId>
|
166
|
+
</ResponseMetadata>
|
167
|
+
</AuthorizeDBSecurityGroupIngressResponse>
|
168
|
+
EOE
|
169
|
+
@rds.stubs(:make_request).with('AuthorizeDBSecurityGroupIngress', {'CIDRIP' => '192.168.1.1/24', 'DBSecurityGroupName' => 'mydbsecuritygroup'}).
|
170
|
+
returns stub(:body => body, :is_a? => true)
|
171
|
+
response = @rds.authorize_db_security_group(
|
172
|
+
:db_security_group_name => "mydbsecuritygroup",
|
173
|
+
:cidrip => "192.168.1.1/24"
|
174
|
+
)
|
175
|
+
response.should.be.an.instance_of Hash
|
176
|
+
|
177
|
+
assert_equal response.AuthorizeDBSecurityGroupIngressResult.DBSecurityGroup.IPRanges.IPRange.CIDRIP, "192.168.1.1/24"
|
178
|
+
end
|
179
|
+
|
180
|
+
specify "should be able to delete_db_parameter_group" do
|
181
|
+
body =<<-EOE
|
182
|
+
<DeleteDBParameterGroupResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
183
|
+
<ResponseMetadata>
|
184
|
+
<RequestId>4dc38be9-bf3b-11de-a88b-7b5b3d23b3a7</RequestId>
|
185
|
+
</ResponseMetadata>
|
186
|
+
</DeleteDBParameterGroupResponse>
|
187
|
+
EOE
|
188
|
+
@rds.stubs(:make_request).with('DeleteDBParameterGroup', {'DBParameterGroupName' => 'mydbsecuritygroup'}).
|
189
|
+
returns stub(:body => body, :is_a? => true)
|
190
|
+
response = @rds.delete_db_parameter_group(
|
191
|
+
:db_parameter_group_name => "mydbsecuritygroup"
|
192
|
+
)
|
193
|
+
response.should.be.an.instance_of Hash
|
194
|
+
end
|
195
|
+
|
196
|
+
specify "should be able to delete_db_security_group" do
|
197
|
+
body =<<-EOE
|
198
|
+
<DeleteDBParameterGroupResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
199
|
+
<ResponseMetadata>
|
200
|
+
<RequestId>4dc38be9-bf3b-11de-a88b-7b5b3d23b3a7</RequestId>
|
201
|
+
</ResponseMetadata>
|
202
|
+
</DeleteDBParameterGroupResponse>
|
203
|
+
EOE
|
204
|
+
@rds.stubs(:make_request).with('DeleteDBSecurityGroup', {'DBSecurityGroupName' => 'mydbsecuritygroup'}).
|
205
|
+
returns stub(:body => body, :is_a? => true)
|
206
|
+
response = @rds.delete_db_security_group(
|
207
|
+
:db_security_group_name => "mydbsecuritygroup"
|
208
|
+
)
|
209
|
+
response.should.be.an.instance_of Hash
|
210
|
+
end
|
211
|
+
|
212
|
+
specify "should be able to delete_db_snapshot" do
|
213
|
+
body =<<-EOE
|
214
|
+
<DeleteDBParameterGroupResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
215
|
+
<ResponseMetadata>
|
216
|
+
<RequestId>4dc38be9-bf3b-11de-a88b-7b5b3d23b3a7</RequestId>
|
217
|
+
</ResponseMetadata>
|
218
|
+
</DeleteDBParameterGroupResponse>
|
219
|
+
EOE
|
220
|
+
@rds.stubs(:make_request).with('DeleteDBSnapshot', {'DBSnapshotIdentifier' => 'snapshotname'}).
|
221
|
+
returns stub(:body => body, :is_a? => true)
|
222
|
+
response = @rds.delete_db_snapshot(
|
223
|
+
:db_snapshot_identifier => "snapshotname"
|
224
|
+
)
|
225
|
+
response.should.be.an.instance_of Hash
|
226
|
+
end
|
227
|
+
|
228
|
+
specify "should be able to describe_db_instances" do
|
229
|
+
body =<<-EOE
|
230
|
+
<DescribeDBInstancesResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
231
|
+
<DescribeDBInstancesResult>
|
232
|
+
<DBInstances>
|
233
|
+
<DBInstance>
|
234
|
+
<LatestRestorableTime>2009-10-22T18:59:59Z</LatestRestorableTime>
|
235
|
+
<Engine>mysql5.1</Engine>
|
236
|
+
<BackupRetentionPeriod>3</BackupRetentionPeriod>
|
237
|
+
<DBInstanceStatus>available</DBInstanceStatus>
|
238
|
+
<DBParameterGroups>
|
239
|
+
<DBParameterGroup>
|
240
|
+
<ParameterApplyStatus>pending-reboot</ParameterApplyStatus>
|
241
|
+
<DBParameterGroupName>default.mysql5.1</DBParameterGroupName>
|
242
|
+
</DBParameterGroup>
|
243
|
+
</DBParameterGroups>
|
244
|
+
<Endpoint>
|
245
|
+
<Port>8443</Port>
|
246
|
+
<Address>dbinstancename.clouwupjnvmq.us-east-1-devo.rds.amazonaws.com</Address>
|
247
|
+
</Endpoint>
|
248
|
+
<DBInstanceIdentifier>dbinstancename</DBInstanceIdentifier>
|
249
|
+
<PreferredBackupWindow>03:00-05:00</PreferredBackupWindow>
|
250
|
+
<DBSecurityGroups>
|
251
|
+
<DBSecurityGroup>
|
252
|
+
<Status>active</Status>
|
253
|
+
<DBSecurityGroupName>default</DBSecurityGroupName>
|
254
|
+
</DBSecurityGroup>
|
255
|
+
</DBSecurityGroups>
|
256
|
+
<DBName>testdb</DBName>
|
257
|
+
<PreferredMaintenanceWindow>sun:05:00-sun:09:00</PreferredMaintenanceWindow>
|
258
|
+
<AvailabilityZone>us-east-1a</AvailabilityZone>
|
259
|
+
<InstanceCreateTime>2009-09-11T00:50:45.523Z</InstanceCreateTime>
|
260
|
+
<AllocatedStorage>20</AllocatedStorage>
|
261
|
+
<DBInstanceClass>db.m1.xlarge</DBInstanceClass>
|
262
|
+
<MasterUsername>sa</MasterUsername>
|
263
|
+
</DBInstance>
|
264
|
+
</DBInstances>
|
265
|
+
</DescribeDBInstancesResult>
|
266
|
+
<ResponseMetadata>
|
267
|
+
<RequestId>4f1fae46-bf3d-11de-a88b-7b5b3d23b3a7</RequestId>
|
268
|
+
</ResponseMetadata>
|
269
|
+
</DescribeDBInstancesResponse>
|
270
|
+
EOE
|
271
|
+
@rds.stubs(:make_request).with('DescribeDBInstances', {'MaxRecords' => '100'}).
|
272
|
+
returns stub(:body => body, :is_a? => true)
|
273
|
+
response = @rds.describe_db_instances(
|
274
|
+
:max_records => "100"
|
275
|
+
)
|
276
|
+
response.should.be.an.instance_of Hash
|
277
|
+
end
|
278
|
+
|
279
|
+
specify "should be able to describe_db_instances" do
|
280
|
+
body =<<-EOE
|
281
|
+
<DescribeEngineDefaultParametersResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
282
|
+
<DescribeEngineDefaultParametersResult>
|
283
|
+
<EngineDefaults>
|
284
|
+
<Engine>mysql5.1</Engine>
|
285
|
+
<Marker>bWF4X3VzZXJfY29ubmVjdGlvbnM=</Marker>
|
286
|
+
<Parameters>
|
287
|
+
<Parameter>
|
288
|
+
<DataType>boolean</DataType>
|
289
|
+
<Source>engine-default</Source>
|
290
|
+
<IsModifiable>true</IsModifiable>
|
291
|
+
<Description>Controls whether user-defined functions that have only an xxx symbol for the main function can be loaded</Description>
|
292
|
+
<ApplyType>static</ApplyType>
|
293
|
+
<AllowedValues>ON,OFF</AllowedValues>
|
294
|
+
<ParameterName>allow-suspicious-udfs</ParameterName>
|
295
|
+
</Parameter>
|
296
|
+
<Parameter>
|
297
|
+
<DataType>integer</DataType>
|
298
|
+
<Source>engine-default</Source>
|
299
|
+
<IsModifiable>true</IsModifiable>
|
300
|
+
<Description>Intended for use with master-to-master replication, and can be used to control the operation of AUTO_INCREMENT columns</Description>
|
301
|
+
<ApplyType>dynamic</ApplyType>
|
302
|
+
<AllowedValues>1-65535</AllowedValues>
|
303
|
+
<ParameterName>auto_increment_increment</ParameterName>
|
304
|
+
</Parameter>
|
305
|
+
</Parameters>
|
306
|
+
</EngineDefaults>
|
307
|
+
</DescribeEngineDefaultParametersResult>
|
308
|
+
<ResponseMetadata>
|
309
|
+
<RequestId>811f4032-bf3e-11de-b88d-993294bf1c81</RequestId>
|
310
|
+
</ResponseMetadata>
|
311
|
+
</DescribeEngineDefaultParametersResponse>
|
312
|
+
EOE
|
313
|
+
@rds.stubs(:make_request).with('DescribeEngineDefaultParameters', {'Engine' => 'MySQL5.1'}).
|
314
|
+
returns stub(:body => body, :is_a? => true)
|
315
|
+
response = @rds.describe_engine_default_parameters(
|
316
|
+
:engine => "MySQL5.1"
|
317
|
+
)
|
318
|
+
response.should.be.an.instance_of Hash
|
319
|
+
end
|
320
|
+
|
321
|
+
specify "should be able to describe_db_instances" do
|
322
|
+
body =<<-EOE
|
323
|
+
<ModifyDBParameterGroupResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
324
|
+
<ModifyDBParameterGroupResult>
|
325
|
+
<DBParameterGroupName>mydbparametergroup</DBParameterGroupName>
|
326
|
+
</ModifyDBParameterGroupResult>
|
327
|
+
<ResponseMetadata>
|
328
|
+
<RequestId>5ba91f97-bf51-11de-bf60-ef2e377db6f3</RequestId>
|
329
|
+
</ResponseMetadata>
|
330
|
+
</ModifyDBParameterGroupResponse>
|
331
|
+
EOE
|
332
|
+
|
333
|
+
@rds.stubs(:make_request).with('ModifyDBParameterGroup', {
|
334
|
+
'DBParameterGroupName' => 'mytestdb',
|
335
|
+
'Parameters.member.1.ParameterName' => 'max_user_connections',
|
336
|
+
'Parameters.member.1.ParameterValue' => '24',
|
337
|
+
'Parameters.member.1.ApplyMethod' => 'pending-reboot',
|
338
|
+
'Parameters.member.2.ParameterName' => 'max_allowed_packet',
|
339
|
+
'Parameters.member.2.ParameterValue' => '1024',
|
340
|
+
'Parameters.member.2.ApplyMethod' => 'immediate',
|
341
|
+
}).
|
342
|
+
returns stub(:body => body, :is_a? => true)
|
343
|
+
response = @rds.modify_db_parameter_group(
|
344
|
+
:db_parameter_group_name => "mytestdb",
|
345
|
+
:parameters => [
|
346
|
+
{:name => "max_user_connections", :value => "24", :apply_method => "pending-reboot"},
|
347
|
+
{:name => "max_allowed_packet", :value => "1024", :apply_method => "immediate"}
|
348
|
+
]
|
349
|
+
)
|
350
|
+
response.should.be.an.instance_of Hash
|
351
|
+
end
|
352
|
+
|
353
|
+
end
|
354
|
+
|