poolparty 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +2 -3
- data/lib/poolparty/chef_solo.rb +0 -1
- metadata +12 -69
- data/vendor/gems/amazon-ec2/ChangeLog +0 -304
- data/vendor/gems/amazon-ec2/LICENSE +0 -66
- data/vendor/gems/amazon-ec2/README.rdoc +0 -359
- data/vendor/gems/amazon-ec2/README_dev.rdoc +0 -10
- data/vendor/gems/amazon-ec2/Rakefile +0 -70
- data/vendor/gems/amazon-ec2/VERSION +0 -1
- data/vendor/gems/amazon-ec2/amazon-ec2.gemspec +0 -142
- data/vendor/gems/amazon-ec2/bin/ec2-gem-example.rb +0 -137
- data/vendor/gems/amazon-ec2/bin/ec2-gem-profile.rb +0 -10
- data/vendor/gems/amazon-ec2/bin/ec2sh +0 -62
- data/vendor/gems/amazon-ec2/bin/setup.rb +0 -29
- data/vendor/gems/amazon-ec2/deps.rip +0 -1
- data/vendor/gems/amazon-ec2/lib/AWS/Autoscaling/autoscaling.rb +0 -273
- data/vendor/gems/amazon-ec2/lib/AWS/Autoscaling.rb +0 -70
- data/vendor/gems/amazon-ec2/lib/AWS/Cloudwatch/monitoring.rb +0 -80
- data/vendor/gems/amazon-ec2/lib/AWS/Cloudwatch.rb +0 -32
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/availability_zones.rb +0 -29
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/console.rb +0 -25
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/devpay.rb +0 -18
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/elastic_ips.rb +0 -86
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/image_attributes.rb +0 -133
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/images.rb +0 -117
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/instances.rb +0 -249
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/keypairs.rb +0 -47
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/products.rb +0 -21
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/security_groups.rb +0 -164
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/snapshots.rb +0 -80
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/volumes.rb +0 -100
- data/vendor/gems/amazon-ec2/lib/AWS/EC2.rb +0 -33
- data/vendor/gems/amazon-ec2/lib/AWS/ELB/load_balancers.rb +0 -178
- data/vendor/gems/amazon-ec2/lib/AWS/ELB.rb +0 -71
- data/vendor/gems/amazon-ec2/lib/AWS/RDS/rds.rb +0 -522
- data/vendor/gems/amazon-ec2/lib/AWS/RDS.rb +0 -73
- data/vendor/gems/amazon-ec2/lib/AWS/exceptions.rb +0 -200
- data/vendor/gems/amazon-ec2/lib/AWS/responses.rb +0 -21
- data/vendor/gems/amazon-ec2/lib/AWS.rb +0 -304
- data/vendor/gems/amazon-ec2/perftools/ec2prof +0 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.dot +0 -132
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.txt +0 -100
- data/vendor/gems/amazon-ec2/perftools/ec2prof.symbols +0 -102
- data/vendor/gems/amazon-ec2/test/test_Autoscaling_groups.rb +0 -337
- data/vendor/gems/amazon-ec2/test/test_EC2.rb +0 -68
- data/vendor/gems/amazon-ec2/test/test_EC2_availability_zones.rb +0 -49
- data/vendor/gems/amazon-ec2/test/test_EC2_console.rb +0 -54
- data/vendor/gems/amazon-ec2/test/test_EC2_elastic_ips.rb +0 -144
- data/vendor/gems/amazon-ec2/test/test_EC2_image_attributes.rb +0 -238
- data/vendor/gems/amazon-ec2/test/test_EC2_images.rb +0 -229
- data/vendor/gems/amazon-ec2/test/test_EC2_instances.rb +0 -611
- data/vendor/gems/amazon-ec2/test/test_EC2_keypairs.rb +0 -123
- data/vendor/gems/amazon-ec2/test/test_EC2_products.rb +0 -48
- data/vendor/gems/amazon-ec2/test/test_EC2_responses.rb +0 -53
- data/vendor/gems/amazon-ec2/test/test_EC2_s3_xmlsimple.rb +0 -80
- data/vendor/gems/amazon-ec2/test/test_EC2_security_groups.rb +0 -205
- data/vendor/gems/amazon-ec2/test/test_EC2_snapshots.rb +0 -83
- data/vendor/gems/amazon-ec2/test/test_EC2_volumes.rb +0 -142
- data/vendor/gems/amazon-ec2/test/test_ELB_load_balancers.rb +0 -239
- data/vendor/gems/amazon-ec2/test/test_RDS.rb +0 -354
- data/vendor/gems/amazon-ec2/test/test_helper.rb +0 -23
- data/vendor/gems/amazon-ec2/wsdl/2007-08-29.ec2.wsdl +0 -1269
- data/vendor/gems/amazon-ec2/wsdl/2008-02-01.ec2.wsdl +0 -1614
- data/vendor/gems/amazon-ec2/wsdl/2008-05-05.ec2.wsdl +0 -2052
- data/vendor/gems/amazon-ec2/wsdl/2008-12-01.ec2.wsdl +0 -2354
- data/vendor/gems/amazon-ec2/wsdl/2009-10-31.ec2.wsdl +0 -4261
- data/vendor/gems/amazon-ec2/wsdl/2009-11-30.ec2.wsdl +0 -4668
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
module AWS
|
|
2
|
-
module EC2
|
|
3
|
-
|
|
4
|
-
# Which host FQDN will we connect to for all API calls to AWS?
|
|
5
|
-
# If EC2_URL is defined in the users ENV we can override the default with that.
|
|
6
|
-
#
|
|
7
|
-
# @example
|
|
8
|
-
# export EC2_URL='https://ec2.amazonaws.com'
|
|
9
|
-
if ENV['EC2_URL']
|
|
10
|
-
EC2_URL = ENV['EC2_URL']
|
|
11
|
-
VALID_HOSTS = ['https://ec2.amazonaws.com', 'https://us-east-1.ec2.amazonaws.com', 'https://us-west-1.ec2.amazonaws.com', 'https://eu-west-1.ec2.amazonaws.com']
|
|
12
|
-
raise ArgumentError, "Invalid EC2_URL environment variable : #{EC2_URL}" unless VALID_HOSTS.include?(EC2_URL)
|
|
13
|
-
DEFAULT_HOST = URI.parse(EC2_URL).host
|
|
14
|
-
else
|
|
15
|
-
# Default US API endpoint
|
|
16
|
-
DEFAULT_HOST = 'ec2.amazonaws.com'
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
API_VERSION = '2009-11-30'
|
|
20
|
-
|
|
21
|
-
class Base < AWS::Base
|
|
22
|
-
def api_version
|
|
23
|
-
API_VERSION
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def default_host
|
|
27
|
-
DEFAULT_HOST
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
module AWS
|
|
2
|
-
module ELB
|
|
3
|
-
class Base < AWS::Base
|
|
4
|
-
|
|
5
|
-
# This API creates a new LoadBalancer. Once the call has completed
|
|
6
|
-
# successfully, a new LoadBalancer will be created, but it will not be
|
|
7
|
-
# usable until at least one instance has been registered. When the
|
|
8
|
-
# LoadBalancer creation is completed, you can check whether it is usable
|
|
9
|
-
# by using the DescribeInstanceHealth API. The LoadBalancer is usable as
|
|
10
|
-
# soon as any registered instance is InService.
|
|
11
|
-
#
|
|
12
|
-
# @option options [String] :load_balancer_name (nil) the name of the load balancer
|
|
13
|
-
# @option options [Array] :availability_zones (nil)
|
|
14
|
-
# @option options [Array] :listeners (nil) An Array of Hashes (:protocol, :load_balancer_port, :instance_port)
|
|
15
|
-
# @option options [Array] :availability_zones (nil) An Array of Strings
|
|
16
|
-
#
|
|
17
|
-
def create_load_balancer( options = {} )
|
|
18
|
-
raise ArgumentError, "No :availability_zones provided" if options[:availability_zones].nil? || options[:availability_zones].empty?
|
|
19
|
-
raise ArgumentError, "No :listeners provided" if options[:listeners].nil? || options[:listeners].empty?
|
|
20
|
-
raise ArgumentError, "No :load_balancer_name provided" if options[:load_balancer_name].nil? || options[:load_balancer_name].empty?
|
|
21
|
-
|
|
22
|
-
params = {}
|
|
23
|
-
|
|
24
|
-
params.merge!(pathlist('AvailabilityZones.member', [options[:availability_zones]].flatten))
|
|
25
|
-
params.merge!(pathhashlist('Listeners.member', [options[:listeners]].flatten, {
|
|
26
|
-
:protocol => 'Protocol',
|
|
27
|
-
:load_balancer_port => 'LoadBalancerPort',
|
|
28
|
-
:instance_port => 'InstancePort'
|
|
29
|
-
}))
|
|
30
|
-
params['LoadBalancerName'] = options[:load_balancer_name]
|
|
31
|
-
|
|
32
|
-
return response_generator(:action => "CreateLoadBalancer", :params => params)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# This API deletes the specified LoadBalancer. On deletion, all of the
|
|
36
|
-
# configured properties of the LoadBalancer will be deleted. If you
|
|
37
|
-
# attempt to recreate the LoadBalancer, you need to reconfigure all the
|
|
38
|
-
# settings. The DNS name associated with a deleted LoadBalancer is no
|
|
39
|
-
# longer be usable. Once deleted, the name and associated DNS record of
|
|
40
|
-
# the LoadBalancer no longer exist and traffic sent to any of its IP
|
|
41
|
-
# addresses will no longer be delivered to your instances. You will not
|
|
42
|
-
# get the same DNS name even if you create a new LoadBalancer with same
|
|
43
|
-
# LoadBalancerName.
|
|
44
|
-
#
|
|
45
|
-
# @option options [String] :load_balancer_name the name of the load balancer
|
|
46
|
-
#
|
|
47
|
-
def delete_load_balancer( options = {} )
|
|
48
|
-
raise ArgumentError, "No :load_balancer_name provided" if options[:load_balancer_name].nil? || options[:load_balancer_name].empty?
|
|
49
|
-
params = { 'LoadBalancerName' => options[:load_balancer_name] }
|
|
50
|
-
return response_generator(:action => "DeleteLoadBalancer", :params => params)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# This API returns detailed configuration information for the specified
|
|
54
|
-
# LoadBalancers, or if no LoadBalancers are specified, then the API
|
|
55
|
-
# returns configuration information for all LoadBalancers created by the
|
|
56
|
-
# caller. For more information, please see LoadBalancer.
|
|
57
|
-
#
|
|
58
|
-
# You must have created the specified input LoadBalancers in order to
|
|
59
|
-
# retrieve this information. In other words, in order to successfully call
|
|
60
|
-
# this API, you must provide the same account credentials as those that
|
|
61
|
-
# were used to create the LoadBalancer.
|
|
62
|
-
#
|
|
63
|
-
# @option options [Array<String>] :load_balancer_names ([]) An Array of names of load balancers to describe.
|
|
64
|
-
#
|
|
65
|
-
def describe_load_balancers( options = {} )
|
|
66
|
-
options = { :load_balancer_names => [] }.merge(options)
|
|
67
|
-
params = pathlist("LoadBalancerName.member", options[:load_balancer_names])
|
|
68
|
-
return response_generator(:action => "DescribeLoadBalancers", :params => params)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# This API adds new instances to the LoadBalancer.
|
|
72
|
-
#
|
|
73
|
-
# Once the instance is registered, it starts receiving traffic and
|
|
74
|
-
# requests from the LoadBalancer. Any instance that is not in any of the
|
|
75
|
-
# Availability Zones registered for the LoadBalancer will be moved to
|
|
76
|
-
# the OutOfService state. It will move to the InService state when the
|
|
77
|
-
# Availability Zone is added to the LoadBalancer.
|
|
78
|
-
#
|
|
79
|
-
# You must have been the one who created the LoadBalancer. In other
|
|
80
|
-
# words, in order to successfully call this API, you must provide the
|
|
81
|
-
# same account credentials as those that were used to create the
|
|
82
|
-
# LoadBalancer.
|
|
83
|
-
#
|
|
84
|
-
# NOTE: Completion of this API does not guarantee that operation has
|
|
85
|
-
# completed. Rather, it means that the request has been registered and
|
|
86
|
-
# the changes will happen shortly.
|
|
87
|
-
#
|
|
88
|
-
# @option options [Array<String>] :instances An Array of instance names to add to the load balancer.
|
|
89
|
-
# @option options [String] :load_balancer_name The name of the load balancer.
|
|
90
|
-
#
|
|
91
|
-
def register_instances_with_load_balancer( options = {} )
|
|
92
|
-
raise ArgumentError, "No :instances provided" if options[:instances].nil? || options[:instances].empty?
|
|
93
|
-
raise ArgumentError, "No :load_balancer_name provided" if options[:load_balancer_name].nil? || options[:load_balancer_name].empty?
|
|
94
|
-
params = {}
|
|
95
|
-
params.merge!(pathhashlist('Instances.member', options[:instances].flatten.collect{|e| {:instance_id => e}}, {:instance_id => 'InstanceId'}))
|
|
96
|
-
params['LoadBalancerName'] = options[:load_balancer_name]
|
|
97
|
-
return response_generator(:action => "RegisterInstancesWithLoadBalancer", :params => params)
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# This API deregisters instances from the LoadBalancer. Trying to
|
|
101
|
-
# deregister an instance that is not registered with the LoadBalancer
|
|
102
|
-
# does nothing.
|
|
103
|
-
#
|
|
104
|
-
# In order to successfully call this API, you must provide the same
|
|
105
|
-
# account credentials as those that were used to create the
|
|
106
|
-
# LoadBalancer.
|
|
107
|
-
#
|
|
108
|
-
# Once the instance is deregistered, it will stop receiving traffic from
|
|
109
|
-
# the LoadBalancer.
|
|
110
|
-
#
|
|
111
|
-
# @option options [Array<String>] :instances An Array of instance names to remove from the load balancer.
|
|
112
|
-
# @option options [String] :load_balancer_name The name of the load balancer.
|
|
113
|
-
#
|
|
114
|
-
def deregister_instances_from_load_balancer( options = {} )
|
|
115
|
-
raise ArgumentError, "No :instances provided" if options[:instances].nil? || options[:instances].empty?
|
|
116
|
-
raise ArgumentError, "No :load_balancer_name provided" if options[:load_balancer_name].nil? || options[:load_balancer_name].empty?
|
|
117
|
-
params = {}
|
|
118
|
-
params.merge!(pathlist('Instances.member', [options[:instances]].flatten))
|
|
119
|
-
params['LoadBalancerName'] = options[:load_balancer_name]
|
|
120
|
-
return response_generator(:action => "DeregisterInstancesFromLoadBalancer", :params => params)
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
# This API enables you to define an application healthcheck for the
|
|
124
|
-
# instances.
|
|
125
|
-
#
|
|
126
|
-
# Note: Completion of this API does not guarantee that operation has completed. Rather, it means that the request has been registered and the changes will happen shortly.
|
|
127
|
-
#
|
|
128
|
-
# @option options [Hash] :health_check A Hash with the keys (:timeout, :interval, :unhealthy_threshold, :healthy_threshold)
|
|
129
|
-
# @option options [String] :load_balancer_name The name of the load balancer.
|
|
130
|
-
#
|
|
131
|
-
def configure_health_check( options = {} )
|
|
132
|
-
raise ArgumentError, "No :health_check provided" if options[:health_check].nil? || options[:health_check].empty?
|
|
133
|
-
raise ArgumentError, "No :health_check => :target provided" if options[:health_check][:target].nil? || options[:health_check][:target].empty?
|
|
134
|
-
raise ArgumentError, "No :health_check => :timeout provided" if options[:health_check][:timeout].nil? || options[:health_check][:timeout].empty?
|
|
135
|
-
raise ArgumentError, "No :health_check => :interval provided" if options[:health_check][:interval].nil? || options[:health_check][:interval].empty?
|
|
136
|
-
raise ArgumentError, "No :health_check => :unhealthy_threshold provided" if options[:health_check][:unhealthy_threshold].nil? || options[:health_check][:unhealthy_threshold].empty?
|
|
137
|
-
raise ArgumentError, "No :health_check => :healthy_threshold provided" if options[:health_check][:healthy_threshold].nil? || options[:health_check][:healthy_threshold].empty?
|
|
138
|
-
raise ArgumentError, "No :load_balancer_name provided" if options[:load_balancer_name].nil? || options[:load_balancer_name].empty?
|
|
139
|
-
|
|
140
|
-
params = {}
|
|
141
|
-
|
|
142
|
-
params['LoadBalancerName'] = options[:load_balancer_name]
|
|
143
|
-
params['HealthCheck.Target'] = options[:health_check][:target]
|
|
144
|
-
params['HealthCheck.Timeout'] = options[:health_check][:timeout]
|
|
145
|
-
params['HealthCheck.Interval'] = options[:health_check][:interval]
|
|
146
|
-
params['HealthCheck.UnhealthyThreshold'] = options[:health_check][:unhealthy_threshold]
|
|
147
|
-
params['HealthCheck.HealthyThreshold'] = options[:health_check][:healthy_threshold]
|
|
148
|
-
|
|
149
|
-
return response_generator(:action => "ConfigureHealthCheck", :params => params)
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
# Not yet implemented
|
|
153
|
-
#
|
|
154
|
-
# @todo Implement this method
|
|
155
|
-
#
|
|
156
|
-
def describe_instance_health( options = {} )
|
|
157
|
-
raise "Not yet implemented"
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
# Not yet implemented
|
|
161
|
-
#
|
|
162
|
-
# @todo Implement this method
|
|
163
|
-
#
|
|
164
|
-
def disable_availability_zones_for_load_balancer( options = {} )
|
|
165
|
-
raise "Not yet implemented"
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# Not yet implemented
|
|
169
|
-
#
|
|
170
|
-
# @todo Implement this method
|
|
171
|
-
#
|
|
172
|
-
def enable_availability_zones_for_load_balancer( options = {} )
|
|
173
|
-
raise "Not yet implemented"
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
end
|
|
177
|
-
end
|
|
178
|
-
end
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
module AWS
|
|
2
|
-
module ELB
|
|
3
|
-
|
|
4
|
-
# Which host FQDN will we connect to for all API calls to AWS?
|
|
5
|
-
# If ELB_URL is defined in the users ENV we can override the default with that.
|
|
6
|
-
#
|
|
7
|
-
# @example
|
|
8
|
-
# export ELB_URL='https://elasticloadbalancing.amazonaws.com'
|
|
9
|
-
if ENV['ELB_URL']
|
|
10
|
-
ELB_URL = ENV['ELB_URL']
|
|
11
|
-
VALID_HOSTS = ['elasticloadbalancing.amazonaws.com']
|
|
12
|
-
raise ArgumentError, "Invalid ELB_URL environment variable : #{ELB_URL}" unless VALID_HOSTS.include?(ELB_URL)
|
|
13
|
-
DEFAULT_HOST = URI.parse(ELB_URL).host
|
|
14
|
-
else
|
|
15
|
-
# Default US API endpoint
|
|
16
|
-
DEFAULT_HOST = 'elasticloadbalancing.amazonaws.com'
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
API_VERSION = '2009-05-15'
|
|
20
|
-
|
|
21
|
-
class Base < AWS::Base
|
|
22
|
-
def api_version
|
|
23
|
-
API_VERSION
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def default_host
|
|
27
|
-
DEFAULT_HOST
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Raises the appropriate error if the specified Net::HTTPResponse object
|
|
31
|
-
# contains an Amazon EC2 error; returns +false+ otherwise.
|
|
32
|
-
def aws_error?(response)
|
|
33
|
-
|
|
34
|
-
# return false if we got a HTTP 200 code,
|
|
35
|
-
# otherwise there is some type of error (40x,50x) and
|
|
36
|
-
# we should try to raise an appropriate exception
|
|
37
|
-
# from one of our exception classes defined in
|
|
38
|
-
# exceptions.rb
|
|
39
|
-
return false if response.is_a?(Net::HTTPSuccess)
|
|
40
|
-
|
|
41
|
-
# parse the XML document so we can walk through it
|
|
42
|
-
doc = REXML::Document.new(response.body)
|
|
43
|
-
|
|
44
|
-
# Check that the Error element is in the place we would expect.
|
|
45
|
-
# and if not raise a generic error exception
|
|
46
|
-
unless doc.root.elements[1].name == "Error"
|
|
47
|
-
raise Error, "Unexpected error format. response.body is: #{response.body}"
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# An valid error response looks like this:
|
|
51
|
-
# <?xml version="1.0"?><Response><Errors><Error><Code>InvalidParameterCombination</Code><Message>Unknown parameter: foo</Message></Error></Errors><RequestID>291cef62-3e86-414b-900e-17246eccfae8</RequestID></Response>
|
|
52
|
-
# AWS EC2 throws some exception codes that look like Error.SubError. Since we can't name classes this way
|
|
53
|
-
# we need to strip out the '.' in the error 'Code' and we name the error exceptions with this
|
|
54
|
-
# non '.' name as well.
|
|
55
|
-
error_code = doc.root.elements['//ErrorResponse/Error/Code'].text.gsub('.', '')
|
|
56
|
-
error_message = doc.root.elements['//ErrorResponse/Error/Message'].text
|
|
57
|
-
|
|
58
|
-
# Raise one of our specific error classes if it exists.
|
|
59
|
-
# otherwise, throw a generic EC2 Error with a few details.
|
|
60
|
-
if AWS.const_defined?(error_code)
|
|
61
|
-
raise AWS.const_get(error_code), error_message
|
|
62
|
-
else
|
|
63
|
-
raise AWS::Error, error_message
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
end
|
|
71
|
-
end
|