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,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2007-03-01">
|
3
|
+
<securityGroupInfo>
|
4
|
+
<item>
|
5
|
+
<ownerId>1234567890</ownerId>
|
6
|
+
<groupName>poolparty-fake_cloud</groupName>
|
7
|
+
<groupDescription>poolparty-fake_cloud</groupDescription>
|
8
|
+
<ipPermissions>
|
9
|
+
<item>
|
10
|
+
<ipProtocol>tcp</ipProtocol>
|
11
|
+
<fromPort>80</fromPort>
|
12
|
+
<toPort>80</toPort>
|
13
|
+
<groups/>
|
14
|
+
<ipRanges>
|
15
|
+
<item>
|
16
|
+
<cidrIp>0.0.0.0/0</cidrIp>
|
17
|
+
</item>
|
18
|
+
</ipRanges>
|
19
|
+
</item>
|
20
|
+
</ipPermissions>
|
21
|
+
</item>
|
22
|
+
</securityGroupInfo>
|
23
|
+
</DescribeSecurityGroupsResponse>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<DescribeDBInstancesResponse xmlns="http://rds.amazonaws.com/admin/2009-10-16/">
|
3
|
+
<DescribeDBInstancesResult>
|
4
|
+
<DBInstances/>
|
5
|
+
</DescribeDBInstancesResult>
|
6
|
+
<ResponseMetadata>
|
7
|
+
<RequestId>5e547870-fa2d-11de-8e05-53428aa3290f</RequestId>
|
8
|
+
</ResponseMetadata>
|
9
|
+
</DescribeDBInstancesResponse>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/../../test_helper"
|
2
|
+
stub_ec2_calls
|
3
|
+
|
4
|
+
class RdsTest < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
stub_response(AWS::EC2::Base, :describe_security_groups, 'ec2-describe-security-groups')
|
7
|
+
stub_response(AWS::EC2::Base, :run_instances, 'ec2-run-instances')
|
8
|
+
stub_response(AWS::RDS::Base, :describe_db_instances, 'rds-describe-db-instances-empty')
|
9
|
+
reset!
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_basic
|
13
|
+
scenario "rds_cloud"
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_required_properties
|
17
|
+
assert_raises(RuntimeError) { scenario "rds_missing_params" }
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def scenario(filename)
|
23
|
+
clear!
|
24
|
+
|
25
|
+
@filepath = fixtures_dir/"clouds/#{filename}.rb"
|
26
|
+
require @filepath
|
27
|
+
@cloud = pool.clouds[pool.clouds.keys.first]
|
28
|
+
|
29
|
+
@cloud.run
|
30
|
+
end
|
31
|
+
|
32
|
+
def stub_response(klass, method, fixture_filename)
|
33
|
+
klass.any_instance.stubs(method).returns AWS::Response.parse(:xml => open(fixtures_dir/"ec2/#{fixture_filename}_response_body.xml").read)
|
34
|
+
end
|
35
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -10,7 +10,7 @@ end
|
|
10
10
|
require "test_methods"
|
11
11
|
|
12
12
|
modify_env_with_hash(
|
13
|
-
"EC2_ACCESS_KEY" => "fake_access_key",
|
13
|
+
"EC2_ACCESS_KEY" => "fake_access_key",
|
14
14
|
"EC2_SECRET_KEY" => "fake_secret_key",
|
15
15
|
"EC2_PRIVATE_KEY" => ::File.dirname(__FILE__) + "/fixtures/keys/test_key",
|
16
16
|
"EC2_CERT" => ::File.dirname(__FILE__) + "/fixtures/keys/test_key",
|
@@ -20,10 +20,10 @@ modify_env_with_hash(
|
|
20
20
|
require 'poolparty'
|
21
21
|
require "rubygems"
|
22
22
|
require "test/unit"
|
23
|
-
# TODO: Rip out shoulda
|
24
|
-
require "matchy"
|
23
|
+
# TODO: Rip out shoulda
|
25
24
|
require "shoulda"
|
26
|
-
|
25
|
+
require 'mocha' # ARG! don't want to introduce additional test dependencies, but FakeWeb can only handle one fake post per URL!!!
|
26
|
+
|
27
27
|
require 'git-style-binary/command'
|
28
28
|
|
29
29
|
GitStyleBinary.run = true
|
@@ -1,3 +1,18 @@
|
|
1
|
+
=== 0.7.4 2009-12-05
|
2
|
+
* Initial support for new EBS AMI's
|
3
|
+
* Updated EC2 API version
|
4
|
+
* Added US West 1 Data Center to list of valid endpoints. (us-west-1.ec2.amazonaws.com)
|
5
|
+
* Updated exceptions.rb to be in sync with latest documented exceptions.
|
6
|
+
* Updated #run_instances to support EBS AMI's and sync with latest options.
|
7
|
+
* Added new #stop_instances and #start_instances methods.
|
8
|
+
* Added new #create_image to allow bundling of a running instance to an EBS backed AMI.
|
9
|
+
* Added stub methods for all known missing EC2 methods. (Please help with patches + tests!)
|
10
|
+
* Added and updated tests for new/modified methods.
|
11
|
+
|
12
|
+
=== 0.6.1 2009-10-13
|
13
|
+
* Additional commits for AutoScaling. Thanks to Ari (auser)!
|
14
|
+
* Updated README.rdoc installation instructions. Reflects removal of deprecated GitHub gem building.
|
15
|
+
|
1
16
|
=== 0.6.0 2009-09-30
|
2
17
|
* Added support for AWS AutoScaling for EC2. Thanks to Ari Lerner (auser)!
|
3
18
|
|
@@ -6,11 +6,18 @@ Amazon Web Services offers a compute power on demand capability known as the Ela
|
|
6
6
|
|
7
7
|
This 'amazon-ec2' Ruby Gem is an interface library that can be used to interact with the Amazon EC2 system and control server resources on demand from your Ruby scripts, or from applications written in your Ruby framework of choice (Ruby on Rails, Merb, etc.).
|
8
8
|
|
9
|
+
More recently, support has been added for the following EC2 related AWS API's as well:
|
10
|
+
|
11
|
+
* Autoscaling
|
12
|
+
* Cloudwatch
|
13
|
+
* Elastic Load Balancing (ELB)
|
14
|
+
* Relational Database Service (RDS)
|
15
|
+
|
9
16
|
For the most complete and up-to date README information please visit the project homepage at:
|
10
17
|
|
11
18
|
http://github.com/grempe/amazon-ec2/tree/master
|
12
19
|
|
13
|
-
or the EC2 website at http://aws.amazon.com/ec2
|
20
|
+
or the official EC2 website at http://aws.amazon.com/ec2
|
14
21
|
|
15
22
|
|
16
23
|
== Installation
|
@@ -30,41 +37,39 @@ The following gems should be installed automatically as part of your install of
|
|
30
37
|
Rcov (optional for testing)
|
31
38
|
Test-Spec (optional for testing)
|
32
39
|
|
33
|
-
=== Install the amazon-ec2 gem
|
34
40
|
|
35
|
-
|
41
|
+
=== Install the amazon-ec2 gem (Canonical Release)
|
42
|
+
|
43
|
+
This is the standard install for stable releases from Gemcutter.
|
36
44
|
|
37
|
-
|
45
|
+
# Install the stable release gem from Gemcutter (one time only) ( learn more here : http://gemcutter.org/pages/faq )
|
46
|
+
sudo gem install gemcutter
|
38
47
|
|
39
|
-
# Set Gemcutter to be your canonical gems source
|
48
|
+
# Set Gemcutter to be your canonical gems source (one time only)
|
40
49
|
sudo gem tumble
|
41
50
|
|
42
51
|
# Install the gem
|
43
52
|
sudo gem install amazon-ec2
|
44
53
|
|
45
|
-
# OR skip the Gemcutter setup
|
46
|
-
|
54
|
+
# OR if you want to skip the Gemcutter setup
|
47
55
|
sudo gem install amazon-ec2 -s http://gemcutter.org
|
48
56
|
|
49
57
|
|
50
|
-
=== Install
|
51
|
-
|
52
|
-
For those who intend to do development on the gem, or want the bleeding edge.
|
58
|
+
=== Install from local Git clone (for amazon-ec2 developers)
|
53
59
|
|
54
|
-
|
55
|
-
|
56
|
-
# Do this only once or you'll end up with multiple entries in 'gem sources'
|
57
|
-
gem sources -a http://gems.github.com/
|
60
|
+
GitHub has unfortunately given up on the feature they had where they would build gems
|
61
|
+
when pushed to git. Too bad. So to install from git, you'll need to clone and build.
|
58
62
|
|
59
|
-
|
60
|
-
|
63
|
+
git clone git://github.com/grempe/amazon-ec2.git
|
64
|
+
cd amazon-ec2
|
65
|
+
rake gemspec
|
66
|
+
rake build
|
67
|
+
rake install
|
61
68
|
|
62
|
-
# OR
|
63
69
|
|
64
|
-
|
65
|
-
sudo gem install grempe-amazon-ec2 --development
|
70
|
+
=== EXPERIMENTAL : Install the amazon-ec2 gem using Rip (for more bleeding edge versions)
|
66
71
|
|
67
|
-
|
72
|
+
For those who intend to do development on the gem, or want the bleeding edge. Install Rip as described at hellorip.com.
|
68
73
|
|
69
74
|
# (Experimental) Install using Rip (hellorip.com) instead of RubyGems
|
70
75
|
rip install git://github.com/grempe/amazon-ec2.git
|
@@ -83,10 +88,9 @@ The 'ec2sh' and 'ec2-gem-example.rb' scripts which will be introduced to you sho
|
|
83
88
|
|
84
89
|
Edit the file ~/.bash_login and add the following to the existing contents:
|
85
90
|
|
91
|
+
# OPTIONAL : Why 'export RUBYOPT'? Because we leave loading libs up to you... See : http://gist.github.com/54177
|
86
92
|
export RUBYOPT="rubygems"
|
87
93
|
|
88
|
-
Why 'export RUBYOPT'? Because we leave loading libs up to you... See : http://gist.github.com/54177
|
89
|
-
|
90
94
|
# For amazon-ec2 and amazon s3 ruby gems
|
91
95
|
export AMAZON_ACCESS_KEY_ID="YOUR_ACCESS_KEY_ID"
|
92
96
|
export AMAZON_SECRET_ACCESS_KEY="YOUR_SECRET_ACCESS_KEY_ID"
|
@@ -196,8 +200,7 @@ Try out the following bit of code. This should walk through each image returned
|
|
196
200
|
|
197
201
|
Rails::Initializer.run do |config|
|
198
202
|
...
|
199
|
-
|
200
|
-
config.gem "amazon-ec2", :lib => "EC2"
|
203
|
+
config.gem "amazon-ec2", :lib => "AWS", :source => "http://gemcutter.org/"
|
201
204
|
...
|
202
205
|
end
|
203
206
|
|
@@ -6,22 +6,17 @@ require 'jeweler'
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "amazon-ec2"
|
8
8
|
gem.summary = %Q{Amazon EC2 Ruby Gem}
|
9
|
-
gem.description = %Q{A Ruby library for accessing the Amazon Web Services
|
9
|
+
gem.description = %Q{A Ruby library for accessing the Amazon Web Services EC2, ELB, RDS, Cloudwatch, and Autoscaling API's.}
|
10
10
|
gem.email = "glenn@rempe.us"
|
11
11
|
gem.homepage = "http://github.com/grempe/amazon-ec2"
|
12
12
|
gem.authors = ["Glenn Rempe"]
|
13
13
|
gem.rdoc_options = ["--title", "amazon-ec2 documentation", "--line-numbers", "--main", "README.rdoc"]
|
14
14
|
gem.rubyforge_project = 'amazon-ec2'
|
15
15
|
gem.add_dependency('xml-simple', '>= 1.0.12')
|
16
|
-
gem.add_development_dependency('mocha', '>= 0.9.
|
16
|
+
gem.add_development_dependency('mocha', '>= 0.9.8')
|
17
17
|
gem.add_development_dependency('test-spec', '>= 0.10.0')
|
18
|
-
gem.add_development_dependency('
|
19
|
-
gem.add_development_dependency('perftools.rb', '
|
20
|
-
end
|
21
|
-
|
22
|
-
# make the jeweler rubyforge tasks available.
|
23
|
-
Jeweler::RubyforgeTasks.new do |rubyforge|
|
24
|
-
rubyforge.doc_task = "rdoc"
|
18
|
+
gem.add_development_dependency('rcov', '>= 0.9.6')
|
19
|
+
gem.add_development_dependency('perftools.rb', '>= 0.3.9')
|
25
20
|
end
|
26
21
|
|
27
22
|
require 'rake/testtask'
|
@@ -41,11 +36,10 @@ begin
|
|
41
36
|
end
|
42
37
|
rescue LoadError
|
43
38
|
task :rcov do
|
44
|
-
abort "RCov is not available. In order to run rcov, you must: [sudo] gem install
|
39
|
+
abort "RCov is not available. In order to run rcov, you must: [sudo] gem install rcov"
|
45
40
|
end
|
46
41
|
end
|
47
42
|
|
48
|
-
|
49
43
|
task :default => :test
|
50
44
|
|
51
45
|
require 'rake/rdoctask'
|
@@ -67,35 +61,10 @@ YARD::Rake::YardocTask.new do |t|
|
|
67
61
|
#t.files = ['lib/**/*.rb']
|
68
62
|
end
|
69
63
|
|
70
|
-
begin
|
71
|
-
require 'rake/contrib/sshpublisher'
|
72
|
-
namespace :rubyforge do
|
73
|
-
|
74
|
-
desc "Release gem and YARD documentation to RubyForge"
|
75
|
-
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
76
|
-
|
77
|
-
namespace :release do
|
78
|
-
desc "Publish YARD docs to RubyForge."
|
79
|
-
task :docs => [:doc] do
|
80
|
-
config = YAML.load(
|
81
|
-
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
82
|
-
)
|
83
|
-
|
84
|
-
host = "#{config['username']}@rubyforge.org"
|
85
|
-
remote_dir = "/var/www/gforge-projects/amazon-ec2/"
|
86
|
-
local_dir = 'doc'
|
87
|
-
|
88
|
-
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
rescue LoadError
|
93
|
-
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
94
|
-
end
|
95
|
-
|
96
64
|
desc "Generate a perftools.rb profile"
|
97
65
|
task :profile do
|
98
|
-
system("CPUPROFILE=perftools/ec2prof RUBYOPT='-r/
|
66
|
+
system("CPUPROFILE=perftools/ec2prof RUBYOPT='-r/Library/Ruby/Gems/1.8/gems/perftools.rb-0.3.2/lib/perftools.bundle' ruby -r'rubygems' bin/ec2-gem-profile.rb")
|
99
67
|
system("pprof.rb --text --ignore=Gem perftools/ec2prof > perftools/ec2prof-results.txt")
|
100
68
|
system("pprof.rb --dot --ignore=Gem perftools/ec2prof > perftools/ec2prof-results.dot")
|
101
|
-
end
|
69
|
+
end
|
70
|
+
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.7.8
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{amazon-ec2}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.7.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Glenn Rempe"]
|
12
|
-
s.date = %q{2009-
|
13
|
-
s.description = %q{A Ruby library for accessing the Amazon Web Services
|
12
|
+
s.date = %q{2009-12-21}
|
13
|
+
s.description = %q{A Ruby library for accessing the Amazon Web Services EC2, ELB, RDS, Cloudwatch, and Autoscaling API's.}
|
14
14
|
s.email = %q{glenn@rempe.us}
|
15
15
|
s.executables = ["ec2-gem-example.rb", "ec2-gem-profile.rb", "ec2sh", "setup.rb"]
|
16
16
|
s.extra_rdoc_files = [
|
@@ -42,6 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
"lib/AWS/EC2.rb",
|
43
43
|
"lib/AWS/EC2/availability_zones.rb",
|
44
44
|
"lib/AWS/EC2/console.rb",
|
45
|
+
"lib/AWS/EC2/devpay.rb",
|
45
46
|
"lib/AWS/EC2/elastic_ips.rb",
|
46
47
|
"lib/AWS/EC2/image_attributes.rb",
|
47
48
|
"lib/AWS/EC2/images.rb",
|
@@ -53,6 +54,8 @@ Gem::Specification.new do |s|
|
|
53
54
|
"lib/AWS/EC2/volumes.rb",
|
54
55
|
"lib/AWS/ELB.rb",
|
55
56
|
"lib/AWS/ELB/load_balancers.rb",
|
57
|
+
"lib/AWS/RDS.rb",
|
58
|
+
"lib/AWS/RDS/rds.rb",
|
56
59
|
"lib/AWS/exceptions.rb",
|
57
60
|
"lib/AWS/responses.rb",
|
58
61
|
"perftools/ec2prof",
|
@@ -75,11 +78,14 @@ Gem::Specification.new do |s|
|
|
75
78
|
"test/test_EC2_snapshots.rb",
|
76
79
|
"test/test_EC2_volumes.rb",
|
77
80
|
"test/test_ELB_load_balancers.rb",
|
81
|
+
"test/test_RDS.rb",
|
78
82
|
"test/test_helper.rb",
|
79
83
|
"wsdl/2007-08-29.ec2.wsdl",
|
80
84
|
"wsdl/2008-02-01.ec2.wsdl",
|
81
85
|
"wsdl/2008-05-05.ec2.wsdl",
|
82
|
-
"wsdl/2008-12-01.ec2.wsdl"
|
86
|
+
"wsdl/2008-12-01.ec2.wsdl",
|
87
|
+
"wsdl/2009-10-31.ec2.wsdl",
|
88
|
+
"wsdl/2009-11-30.ec2.wsdl"
|
83
89
|
]
|
84
90
|
s.homepage = %q{http://github.com/grempe/amazon-ec2}
|
85
91
|
s.rdoc_options = ["--title", "amazon-ec2 documentation", "--line-numbers", "--main", "README.rdoc"]
|
@@ -104,7 +110,8 @@ Gem::Specification.new do |s|
|
|
104
110
|
"test/test_EC2_snapshots.rb",
|
105
111
|
"test/test_EC2_volumes.rb",
|
106
112
|
"test/test_ELB_load_balancers.rb",
|
107
|
-
"test/test_helper.rb"
|
113
|
+
"test/test_helper.rb",
|
114
|
+
"test/test_RDS.rb"
|
108
115
|
]
|
109
116
|
|
110
117
|
if s.respond_to? :specification_version then
|
@@ -113,22 +120,23 @@ Gem::Specification.new do |s|
|
|
113
120
|
|
114
121
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
115
122
|
s.add_runtime_dependency(%q<xml-simple>, [">= 1.0.12"])
|
116
|
-
s.add_development_dependency(%q<mocha>, [">= 0.9.
|
123
|
+
s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
|
117
124
|
s.add_development_dependency(%q<test-spec>, [">= 0.10.0"])
|
118
|
-
s.add_development_dependency(%q<
|
119
|
-
s.add_development_dependency(%q<perftools.rb>, ["
|
125
|
+
s.add_development_dependency(%q<rcov>, [">= 0.9.6"])
|
126
|
+
s.add_development_dependency(%q<perftools.rb>, [">= 0.3.9"])
|
120
127
|
else
|
121
128
|
s.add_dependency(%q<xml-simple>, [">= 1.0.12"])
|
122
|
-
s.add_dependency(%q<mocha>, [">= 0.9.
|
129
|
+
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
123
130
|
s.add_dependency(%q<test-spec>, [">= 0.10.0"])
|
124
|
-
s.add_dependency(%q<
|
125
|
-
s.add_dependency(%q<perftools.rb>, ["
|
131
|
+
s.add_dependency(%q<rcov>, [">= 0.9.6"])
|
132
|
+
s.add_dependency(%q<perftools.rb>, [">= 0.3.9"])
|
126
133
|
end
|
127
134
|
else
|
128
135
|
s.add_dependency(%q<xml-simple>, [">= 1.0.12"])
|
129
|
-
s.add_dependency(%q<mocha>, [">= 0.9.
|
136
|
+
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
130
137
|
s.add_dependency(%q<test-spec>, [">= 0.10.0"])
|
131
|
-
s.add_dependency(%q<
|
132
|
-
s.add_dependency(%q<perftools.rb>, ["
|
138
|
+
s.add_dependency(%q<rcov>, [">= 0.9.6"])
|
139
|
+
s.add_dependency(%q<perftools.rb>, [">= 0.3.9"])
|
133
140
|
end
|
134
141
|
end
|
142
|
+
|
@@ -42,8 +42,8 @@ module AWS
|
|
42
42
|
# @option options [String] :launch_configuration_name (nil) the name of the launch_configuration group
|
43
43
|
# @option options [String] :min_size (nil) minimum size of the group
|
44
44
|
# @option options [String] :max_size (nil) the maximum size of the group
|
45
|
-
# @option options [
|
46
|
-
# @option options [String] :cooldown (nil) the amount of time after a scaling activity complese before any further trigger-related scaling activities can start
|
45
|
+
# @option options [optional,Array] :load_balancer_names (nil) the names of the load balancers
|
46
|
+
# @option options [optional,String] :cooldown (nil) the amount of time after a scaling activity complese before any further trigger-related scaling activities can start
|
47
47
|
def create_autoscaling_group( options = {} )
|
48
48
|
raise ArgumentError, "No :autoscaling_group_name provided" if options[:autoscaling_group_name].nil? || options[:autoscaling_group_name].empty?
|
49
49
|
raise ArgumentError, "No :availability_zones provided" if options[:availability_zones].nil? || options[:availability_zones].empty?
|
@@ -58,9 +58,9 @@ module AWS
|
|
58
58
|
params['AutoScalingGroupName'] = options[:autoscaling_group_name]
|
59
59
|
params['MinSize'] = options[:min_size].to_s
|
60
60
|
params['MaxSize'] = options[:max_size].to_s
|
61
|
-
params.merge!(pathlist("LoadBalancerNames.member", options[:load_balancer_names])) if options
|
61
|
+
params.merge!(pathlist("LoadBalancerNames.member", [options[:load_balancer_names]].flatten)) if options.has_key?(:load_balancer_names)
|
62
62
|
params['CoolDown'] = options[:cooldown] if options[:cooldown]
|
63
|
-
|
63
|
+
|
64
64
|
return response_generator(:action => "CreateAutoScalingGroup", :params => params)
|
65
65
|
end
|
66
66
|
|
@@ -112,7 +112,7 @@ module AWS
|
|
112
112
|
params["Dimensions.member.1.Name"] = options[:dimensions][:name]
|
113
113
|
params["Dimensions.member.1.Value"] = options[:dimensions][:value]
|
114
114
|
else
|
115
|
-
raise ArgumentError, "
|
115
|
+
raise ArgumentError, "Dimensionss must be either an array or a hash"
|
116
116
|
end
|
117
117
|
params['MeasureName'] = options[:measure_name]
|
118
118
|
params['Statistic'] = options[:statistic]
|
@@ -262,19 +262,9 @@ module AWS
|
|
262
262
|
params['MinSize'] = options[:min_size] if options.has_key?(:min_size)
|
263
263
|
params['MaxSize'] = options[:max_size] if options.has_key?(:max_size)
|
264
264
|
params['CoolDown'] = options[:cooldown] if options.has_key?(:cooldown)
|
265
|
-
|
266
|
-
return response_generator(:action => "UpdateAutoScalingGroup", :params => params)
|
267
265
|
|
268
|
-
|
266
|
+
return response_generator(:action => "UpdateAutoScalingGroup", :params => params)
|
269
267
|
|
270
|
-
# Convenience methods
|
271
|
-
# Return an array of hashes describing the autoscaling groups
|
272
|
-
def list
|
273
|
-
describe_autoscaling_groups.DescribeAutoScalingGroupsResult.AutoScalingGroups.member
|
274
|
-
end
|
275
|
-
# Return an array of autoscaling group names
|
276
|
-
def names
|
277
|
-
list.collect{|a| a.AutoScalingGroupName}
|
278
268
|
end
|
279
269
|
|
280
270
|
end
|
@@ -15,6 +15,14 @@ module AWS
|
|
15
15
|
return response_generator(:action => "DescribeAvailabilityZones", :params => params)
|
16
16
|
end
|
17
17
|
|
18
|
+
# Not yet implemented
|
19
|
+
#
|
20
|
+
# @todo Implement this method
|
21
|
+
#
|
22
|
+
def describe_regions( options = {} )
|
23
|
+
raise "Not yet implemented"
|
24
|
+
end
|
25
|
+
|
18
26
|
end
|
19
27
|
end
|
20
28
|
end
|
@@ -2,6 +2,7 @@ module AWS
|
|
2
2
|
module EC2
|
3
3
|
class Base < AWS::Base
|
4
4
|
|
5
|
+
|
5
6
|
# The GetConsoleOutput operation retrieves console output that has been posted for the specified instance.
|
6
7
|
#
|
7
8
|
# Instance console output is buffered and posted shortly after instance boot, reboot and once the instance
|
@@ -17,6 +18,7 @@ module AWS
|
|
17
18
|
return response_generator(:action => "GetConsoleOutput", :params => params)
|
18
19
|
end
|
19
20
|
|
21
|
+
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
@@ -2,43 +2,13 @@ module AWS
|
|
2
2
|
module EC2
|
3
3
|
class Base < AWS::Base
|
4
4
|
|
5
|
+
|
5
6
|
# The AllocateAddress operation acquires an elastic IP address for use with your account.
|
6
7
|
#
|
7
8
|
def allocate_address
|
8
9
|
return response_generator(:action => "AllocateAddress")
|
9
10
|
end
|
10
11
|
|
11
|
-
# The DescribeAddresses operation lists elastic IP addresses assigned to your account.
|
12
|
-
#
|
13
|
-
# @option options [Array] :public_ip ([]) an IP address to be described
|
14
|
-
#
|
15
|
-
def describe_addresses( options = {} )
|
16
|
-
options = { :public_ip => [] }.merge(options)
|
17
|
-
params = pathlist("PublicIp", options[:public_ip])
|
18
|
-
return response_generator(:action => "DescribeAddresses", :params => params)
|
19
|
-
end
|
20
|
-
|
21
|
-
# The ReleaseAddress operation releases an elastic IP address associated with your account.
|
22
|
-
#
|
23
|
-
# If you run this operation on an elastic IP address that is already released, the address
|
24
|
-
# might be assigned to another account which will cause Amazon EC2 to return an error.
|
25
|
-
#
|
26
|
-
# Note : Releasing an IP address automatically disassociates it from any instance
|
27
|
-
# with which it is associated. For more information, see DisassociateAddress.
|
28
|
-
#
|
29
|
-
# Important! After releasing an elastic IP address, it is released to the IP
|
30
|
-
# address pool and might no longer be available to your account. Make sure
|
31
|
-
# to update your DNS records and any servers or devices that communicate
|
32
|
-
# with the address.
|
33
|
-
#
|
34
|
-
# @option options [String] :public_ip ('') an IP address to be released.
|
35
|
-
#
|
36
|
-
def release_address( options = {} )
|
37
|
-
options = { :public_ip => '' }.merge(options)
|
38
|
-
raise ArgumentError, "No ':public_ip' provided" if options[:public_ip].nil? || options[:public_ip].empty?
|
39
|
-
params = { "PublicIp" => options[:public_ip] }
|
40
|
-
return response_generator(:action => "ReleaseAddress", :params => params)
|
41
|
-
end
|
42
12
|
|
43
13
|
# The AssociateAddress operation associates an elastic IP address with an instance.
|
44
14
|
#
|
@@ -60,6 +30,18 @@ module AWS
|
|
60
30
|
return response_generator(:action => "AssociateAddress", :params => params)
|
61
31
|
end
|
62
32
|
|
33
|
+
|
34
|
+
# The DescribeAddresses operation lists elastic IP addresses assigned to your account.
|
35
|
+
#
|
36
|
+
# @option options [Array] :public_ip ([]) an IP address to be described
|
37
|
+
#
|
38
|
+
def describe_addresses( options = {} )
|
39
|
+
options = { :public_ip => [] }.merge(options)
|
40
|
+
params = pathlist("PublicIp", options[:public_ip])
|
41
|
+
return response_generator(:action => "DescribeAddresses", :params => params)
|
42
|
+
end
|
43
|
+
|
44
|
+
|
63
45
|
# The DisassociateAddress operation disassociates the specified elastic IP
|
64
46
|
# address from the instance to which it is assigned. This is an idempotent
|
65
47
|
# operation. If you enter it more than once, Amazon EC2 does not return
|
@@ -74,8 +56,31 @@ module AWS
|
|
74
56
|
return response_generator(:action => "DisassociateAddress", :params => params)
|
75
57
|
end
|
76
58
|
|
77
|
-
end
|
78
59
|
|
60
|
+
# The ReleaseAddress operation releases an elastic IP address associated with your account.
|
61
|
+
#
|
62
|
+
# If you run this operation on an elastic IP address that is already released, the address
|
63
|
+
# might be assigned to another account which will cause Amazon EC2 to return an error.
|
64
|
+
#
|
65
|
+
# Note : Releasing an IP address automatically disassociates it from any instance
|
66
|
+
# with which it is associated. For more information, see DisassociateAddress.
|
67
|
+
#
|
68
|
+
# Important! After releasing an elastic IP address, it is released to the IP
|
69
|
+
# address pool and might no longer be available to your account. Make sure
|
70
|
+
# to update your DNS records and any servers or devices that communicate
|
71
|
+
# with the address.
|
72
|
+
#
|
73
|
+
# @option options [String] :public_ip ('') an IP address to be released.
|
74
|
+
#
|
75
|
+
def release_address( options = {} )
|
76
|
+
options = { :public_ip => '' }.merge(options)
|
77
|
+
raise ArgumentError, "No ':public_ip' provided" if options[:public_ip].nil? || options[:public_ip].empty?
|
78
|
+
params = { "PublicIp" => options[:public_ip] }
|
79
|
+
return response_generator(:action => "ReleaseAddress", :params => params)
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
end
|
79
84
|
end
|
80
85
|
end
|
81
86
|
|