poolparty 1.6.6 → 1.6.7
Sign up to get free protection for your applications and to get access to all the features.
- 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,100 +0,0 @@
|
|
1
|
-
Total: 2043 samples
|
2
|
-
1298 63.5% 63.5% 1298 63.5% garbage_collector
|
3
|
-
142 7.0% 70.5% 371 18.2% Class#new
|
4
|
-
65 3.2% 73.7% 355 17.4% REXML::Parsers::TreeParser#parse
|
5
|
-
50 2.4% 76.1% 54 2.6% REXML::Child#find
|
6
|
-
45 2.2% 78.3% 338 16.5% XmlSimple#collapse
|
7
|
-
44 2.2% 80.5% 44 2.2% REXML::Source#match
|
8
|
-
37 1.8% 82.3% 40 2.0% REXML::Child#find_all
|
9
|
-
20 1.0% 83.3% 97 4.7% XmlSimple#collapse_text_node
|
10
|
-
19 0.9% 84.2% 74 3.6% REXML::Text#value
|
11
|
-
18 0.9% 85.1% 81 4.0% REXML::Element#initialize
|
12
|
-
18 0.9% 86.0% 18 0.9% REXML::Element#root
|
13
|
-
17 0.8% 86.8% 22 1.1% REXML::Parent#initialize
|
14
|
-
17 0.8% 87.6% 19 0.9% REXML::Text#initialize
|
15
|
-
16 0.8% 88.4% 18 0.9% REXML::Text.unnormalize
|
16
|
-
14 0.7% 89.1% 370 18.1% REXML::Document#build
|
17
|
-
14 0.7% 89.8% 107 5.2% REXML::Parsers::BaseParser#pull
|
18
|
-
13 0.6% 90.4% 14 0.7% Net::BufferedIO#rbuf_fill
|
19
|
-
13 0.6% 91.0% 21 1.0% XmlSimple#merge
|
20
|
-
11 0.5% 91.6% 29 1.4% REXML::Element#document
|
21
|
-
11 0.5% 92.1% 338 16.5% REXML::Elements#each
|
22
|
-
9 0.4% 92.6% 9 0.4% REXML::Parent#name=
|
23
|
-
8 0.4% 93.0% 8 0.4% REXML::Parent#add
|
24
|
-
8 0.4% 93.3% 8 0.4% XmlSimple#force_array?
|
25
|
-
7 0.3% 93.7% 33 1.6% Array#each
|
26
|
-
6 0.3% 94.0% 9 0.4% Kernel#gem_original_require
|
27
|
-
6 0.3% 94.3% 10 0.5% Object#find
|
28
|
-
6 0.3% 94.6% 76 3.7% XmlSimple#node_to_text
|
29
|
-
5 0.2% 94.8% 19 0.9% Net::BufferedIO#read
|
30
|
-
5 0.2% 95.1% 338 16.5% REXML::Element#each_element
|
31
|
-
5 0.2% 95.3% 52 2.5% REXML::Element#text
|
32
|
-
5 0.2% 95.5% 45 2.2% REXML::Element#texts
|
33
|
-
5 0.2% 95.8% 6 0.3% REXML::Parsers::BaseParser#empty?
|
34
|
-
4 0.2% 96.0% 4 0.2% Hash#[]
|
35
|
-
4 0.2% 96.2% 4 0.2% Object#clone
|
36
|
-
4 0.2% 96.4% 15 0.7% REXML::Parsers::XPathParser#parse
|
37
|
-
4 0.2% 96.6% 338 16.5% REXML::XPath.each
|
38
|
-
4 0.2% 96.8% 6 0.3% XmlSimple#get_attributes
|
39
|
-
3 0.1% 96.9% 6 0.3% Array#delete_if
|
40
|
-
3 0.1% 97.1% 3 0.1% Hash#each
|
41
|
-
3 0.1% 97.2% 55 2.7% REXML::Element#has_text?
|
42
|
-
3 0.1% 97.4% 7 0.3% REXML::XPathParser#expr
|
43
|
-
3 0.1% 97.5% 29 1.4% XmlSimple#has_mixed_content?
|
44
|
-
2 0.1% 97.6% 36 1.8% Array#map
|
45
|
-
2 0.1% 97.7% 9 0.4% Object#require
|
46
|
-
2 0.1% 97.8% 5 0.2% REXML::Child#initialize
|
47
|
-
2 0.1% 97.9% 8 0.4% REXML::Document#doctype
|
48
|
-
2 0.1% 98.0% 94 4.6% REXML::Element#add_element
|
49
|
-
2 0.1% 98.1% 3 0.1% REXML::Element#get_text
|
50
|
-
2 0.1% 98.2% 3 0.1% REXML::Element#whitespace
|
51
|
-
2 0.1% 98.3% 92 4.5% REXML::Elements#add
|
52
|
-
2 0.1% 98.4% 55 2.7% REXML::Elements#empty?
|
53
|
-
2 0.1% 98.5% 2 0.1% REXML::Parent#<<
|
54
|
-
2 0.1% 98.6% 16 0.8% REXML::Parent#each
|
55
|
-
2 0.1% 98.7% 9 0.4% REXML::Parsers::XPathParser#AdditiveExpr
|
56
|
-
2 0.1% 98.8% 2 0.1% REXML::Parsers::XPathParser#FilterExpr
|
57
|
-
2 0.1% 98.9% 7 0.3% REXML::Parsers::XPathParser#MultiplicativeExpr
|
58
|
-
2 0.1% 99.0% 11 0.5% REXML::Parsers::XPathParser#OrExpr
|
59
|
-
2 0.1% 99.1% 5 0.2% REXML::Parsers::XPathParser#UnionExpr
|
60
|
-
2 0.1% 99.2% 22 1.1% Set#initialize
|
61
|
-
1 0.0% 99.2% 1 0.0% Array#join
|
62
|
-
1 0.0% 99.3% 1 0.0% Net::BufferedIO#readline
|
63
|
-
1 0.0% 99.3% 1 0.0% REXML::Attributes#each_attribute
|
64
|
-
1 0.0% 99.4% 1 0.0% REXML::Parsers::XPathParser#RelativeLocationPath
|
65
|
-
1 0.0% 99.4% 1 0.0% REXML::Source#empty?
|
66
|
-
1 0.0% 99.5% 1 0.0% REXML::Source#initialize
|
67
|
-
1 0.0% 99.5% 8 0.4% REXML::XPathParser#match
|
68
|
-
1 0.0% 99.6% 1 0.0% REXML::XPathParser#variables=
|
69
|
-
1 0.0% 99.6% 14 0.7% Timeout.timeout
|
70
|
-
0 0.0% 99.6% 20 1.0% AWS::Base#make_request
|
71
|
-
0 0.0% 99.6% 431 21.1% AWS::Base#response_generator
|
72
|
-
0 0.0% 99.6% 422 20.7% AWS::EC2::Base#describe_images
|
73
|
-
0 0.0% 99.6% 442 21.6% AWS::Response.parse
|
74
|
-
0 0.0% 99.6% 20 1.0% Net::HTTP#request
|
75
|
-
0 0.0% 99.6% 20 1.0% Net::HTTP#start
|
76
|
-
0 0.0% 99.6% 20 1.0% Net::HTTPResponse#body
|
77
|
-
0 0.0% 99.6% 20 1.0% Net::HTTPResponse#read_body
|
78
|
-
0 0.0% 99.6% 20 1.0% Net::HTTPResponse#read_body_0
|
79
|
-
0 0.0% 99.6% 20 1.0% Net::HTTPResponse#read_chunked
|
80
|
-
0 0.0% 99.6% 20 1.0% Net::HTTPResponse#reading_body
|
81
|
-
0 0.0% 99.6% 14 0.7% Object#timeout
|
82
|
-
0 0.0% 99.6% 1 0.0% REXML::Attributes#each
|
83
|
-
0 0.0% 99.6% 370 18.1% REXML::Document#initialize
|
84
|
-
0 0.0% 99.6% 55 2.7% REXML::Element#has_elements?
|
85
|
-
0 0.0% 99.6% 1 0.0% REXML::Element#ignore_whitespace_nodes
|
86
|
-
0 0.0% 99.6% 1 0.0% REXML::Parsers::BaseParser#initialize
|
87
|
-
0 0.0% 99.6% 1 0.0% REXML::Parsers::BaseParser#stream=
|
88
|
-
0 0.0% 99.6% 1 0.0% REXML::Parsers::TreeParser#initialize
|
89
|
-
0 0.0% 99.6% 9 0.4% REXML::Parsers::XPathParser#AndExpr
|
90
|
-
0 0.0% 99.6% 9 0.4% REXML::Parsers::XPathParser#EqualityExpr
|
91
|
-
0 0.0% 99.6% 1 0.0% REXML::Parsers::XPathParser#LocationPath
|
92
|
-
0 0.0% 99.6% 3 0.1% REXML::Parsers::XPathParser#PathExpr
|
93
|
-
0 0.0% 99.6% 9 0.4% REXML::Parsers::XPathParser#RelationalExpr
|
94
|
-
0 0.0% 99.6% 5 0.2% REXML::Parsers::XPathParser#UnaryExpr
|
95
|
-
0 0.0% 99.6% 1 0.0% REXML::SourceFactory.create_from
|
96
|
-
0 0.0% 99.6% 23 1.1% REXML::XPathParser#parse
|
97
|
-
0 0.0% 99.6% 3 0.1% XmlSimple#fold_arrays
|
98
|
-
0 0.0% 99.6% 370 18.1% XmlSimple#parse
|
99
|
-
0 0.0% 99.6% 507 24.8% XmlSimple#xml_in
|
100
|
-
0 0.0% 99.6% 469 23.0% XmlSimple.xml_in
|
@@ -1,102 +0,0 @@
|
|
1
|
-
0000000100037f3a: garbage_collector
|
2
|
-
000000010016bbe9: Array#map
|
3
|
-
0000000102818079: XmlSimple#node_to_text
|
4
|
-
0000000102818051: XmlSimple#collapse_text_node
|
5
|
-
0000000102817f99: XmlSimple#collapse
|
6
|
-
00000001028f9eb1: REXML::Elements#each
|
7
|
-
000000020521dbb1: REXML::XPath.each
|
8
|
-
0000000102902299: REXML::Element#each_element
|
9
|
-
000000010017a719: Class#new
|
10
|
-
00000001028a2949: REXML::Parsers::TreeParser#parse
|
11
|
-
00000001028a3f11: REXML::Document#build
|
12
|
-
00000001028a0d39: REXML::Document#initialize
|
13
|
-
0000000102810de1: XmlSimple#parse
|
14
|
-
0000000102817f71: XmlSimple#xml_in
|
15
|
-
0000000205025409: XmlSimple.xml_in
|
16
|
-
0000000204f566d9: AWS::Response.parse
|
17
|
-
00000001028123e1: AWS::Base#response_generator
|
18
|
-
00000001027f30e1: AWS::EC2::Base#describe_images
|
19
|
-
00000001029b0211: REXML::Child#find
|
20
|
-
000000010016bcb9: Array#each
|
21
|
-
00000001029c5ec1: REXML::Parent#each
|
22
|
-
00000001028fa09f: REXML::Elements#empty?
|
23
|
-
0000000102902277: REXML::Element#has_elements?
|
24
|
-
00000001028a6b49: REXML::Document#doctype
|
25
|
-
000000010016bb61: Object#find
|
26
|
-
00000001029655e9: REXML::Text#value
|
27
|
-
000000010017e629: Kernel#gem_original_require
|
28
|
-
000000010017bf71: Object#require
|
29
|
-
00000001029b0229: REXML::Child#find_all
|
30
|
-
0000000102902361: REXML::Element#texts
|
31
|
-
000000010281804f: XmlSimple#has_mixed_content?
|
32
|
-
00000001029011e9: REXML::Attributes#each_attribute
|
33
|
-
00000001028f8f39: REXML::Attributes#each
|
34
|
-
0000000102818031: XmlSimple#get_attributes
|
35
|
-
00000001028fa4c9: REXML::Elements#add
|
36
|
-
0000000102902111: REXML::Element#add_element
|
37
|
-
000000010290476d: REXML::Parsers::XPathParser#AdditiveExpr
|
38
|
-
0000000102904765: REXML::Parsers::XPathParser#RelationalExpr
|
39
|
-
000000010290475d: REXML::Parsers::XPathParser#EqualityExpr
|
40
|
-
0000000102904755: REXML::Parsers::XPathParser#AndExpr
|
41
|
-
00000001029046ed: REXML::Parsers::XPathParser#OrExpr
|
42
|
-
00000001028fdc59: REXML::Parsers::XPathParser#parse
|
43
|
-
00000001028fd169: REXML::XPathParser#parse
|
44
|
-
00000001028aca99: Set#initialize
|
45
|
-
00000001028b46c9: REXML::Parsers::BaseParser#pull
|
46
|
-
00000001029be149: REXML::Child#initialize
|
47
|
-
00000001029c5ab1: REXML::Parent#initialize
|
48
|
-
00000001028f9b19: REXML::Element#initialize
|
49
|
-
000000010016c759: Array#delete_if
|
50
|
-
00000001029039c1: REXML::XPathParser#expr
|
51
|
-
00000001028faf79: REXML::XPathParser#match
|
52
|
-
00000002052d17d9: REXML::Text.unnormalize
|
53
|
-
00000001028fc2e1: REXML::Element#text
|
54
|
-
0000000102902297: REXML::Element#has_text?
|
55
|
-
00000001029c506e: REXML::Parent#<<
|
56
|
-
0000000102964c39: REXML::Text#initialize
|
57
|
-
00000001029c64d9: REXML::Parent#add
|
58
|
-
0000000102a143b9: Net::BufferedIO#read
|
59
|
-
0000000102a15919: Net::HTTPResponse#read_chunked
|
60
|
-
0000000102a15909: Net::HTTPResponse#read_body_0
|
61
|
-
0000000102a15271: Net::HTTPResponse#read_body
|
62
|
-
0000000102a12ad9: Net::HTTPResponse#body
|
63
|
-
0000000102a15521: Net::HTTPResponse#reading_body
|
64
|
-
0000000102a16b19: Net::HTTP#request
|
65
|
-
0000000102811831: AWS::Base#make_request
|
66
|
-
0000000102a125d9: Net::HTTP#start
|
67
|
-
0000000102a14401: Net::BufferedIO#readline
|
68
|
-
0000000102a1b031: Net::BufferedIO#rbuf_fill
|
69
|
-
0000000203164251: Timeout.timeout
|
70
|
-
000000010017ec59: Object#timeout
|
71
|
-
00000001028abec7: REXML::Parsers::BaseParser#empty?
|
72
|
-
0000000102904785: REXML::Parsers::XPathParser#UnionExpr
|
73
|
-
000000010290477d: REXML::Parsers::XPathParser#UnaryExpr
|
74
|
-
0000000102904775: REXML::Parsers::XPathParser#MultiplicativeExpr
|
75
|
-
000000010037eed9: Gem::GemPathSearcher#matching_files
|
76
|
-
000000010037f5cf: Gem::GemPathSearcher#matching_file?
|
77
|
-
000000010037d021: Gem::GemPathSearcher#find
|
78
|
-
000000010017a531: Object#clone
|
79
|
-
00000001029022d1: REXML::Element#get_text
|
80
|
-
00000001028180d7: XmlSimple#force_array?
|
81
|
-
000000010280f5b1: XmlSimple#merge
|
82
|
-
00000001001692bc: Hash#[]
|
83
|
-
0000000102902219: REXML::Element#ignore_whitespace_nodes
|
84
|
-
00000001029021f9: REXML::Element#whitespace
|
85
|
-
000000010297920f: REXML::Source#empty?
|
86
|
-
000000010290383c: REXML::XPathParser#variables=
|
87
|
-
00000001028ff359: REXML::Element#document
|
88
|
-
00000001028fde41: REXML::Element#root
|
89
|
-
00000001028f9c34: REXML::Parent#name=
|
90
|
-
0000000102979211: REXML::Source#match
|
91
|
-
0000000102904795: REXML::Parsers::XPathParser#FilterExpr
|
92
|
-
000000010290478d: REXML::Parsers::XPathParser#PathExpr
|
93
|
-
000000010016a111: Hash#each
|
94
|
-
0000000102818059: XmlSimple#fold_arrays
|
95
|
-
000000010016c261: Array#join
|
96
|
-
0000000102978c11: REXML::Source#initialize
|
97
|
-
00000002052fa051: REXML::SourceFactory.create_from
|
98
|
-
00000001028b4524: REXML::Parsers::BaseParser#stream=
|
99
|
-
00000001028ab8c9: REXML::Parsers::BaseParser#initialize
|
100
|
-
00000001028a0159: REXML::Parsers::TreeParser#initialize
|
101
|
-
0000000102904715: REXML::Parsers::XPathParser#RelativeLocationPath
|
102
|
-
000000010290470d: REXML::Parsers::XPathParser#LocationPath
|
@@ -1,337 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
-
|
3
|
-
context "autoscaling " do
|
4
|
-
before do
|
5
|
-
@as = AWS::Autoscaling::Base.new( :access_key_id => "not a key", :secret_access_key => "not a secret" )
|
6
|
-
|
7
|
-
@valid_create_launch_configuration_params = {
|
8
|
-
:image_id => "ami-ed46a784",
|
9
|
-
:launch_configuration_name => "TestAutoscalingGroupName",
|
10
|
-
:instance_type => "m1.small"
|
11
|
-
}
|
12
|
-
|
13
|
-
@error_response_for_creation = <<-RESPONSE
|
14
|
-
<ErrorResponse xmlns="http://autoscaling.amazonaws.com/doc/2009-05-15/">
|
15
|
-
<Error>
|
16
|
-
<Type>Sender</Type>
|
17
|
-
<Code>AlreadyExists</Code>
|
18
|
-
<Message>Launch Configuration by this name already exists - A launch configuration already exists with the name TestAutoscalingGroupName</Message>
|
19
|
-
</Error>
|
20
|
-
<RequestId>31d00b03-ad6a-11de-a47f-a5c562feca13</RequestId>
|
21
|
-
</ErrorResponse>
|
22
|
-
RESPONSE
|
23
|
-
|
24
|
-
@delete_launch_configuration_response = <<-RESPONSE
|
25
|
-
<DeleteLaunchConfigurationResponse xmlns="http://autoscaling.amazonaws.com/doc/2009-05-15/">
|
26
|
-
<ResponseMetadata>
|
27
|
-
<RequestId>5f5717d3-ad6c-11de-b1c0-1b00aadc5f72</RequestId>
|
28
|
-
</ResponseMetadata>
|
29
|
-
</DeleteLaunchConfigurationResponse>
|
30
|
-
RESPONSE
|
31
|
-
|
32
|
-
@create_launch_configuration_response = "<CreateLaunchConfigurationResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">\n <ResponseMetadata>\n <RequestId>6062466f-ad6c-11de-b82f-996c936914c5</RequestId>\n </ResponseMetadata>\n</CreateLaunchConfigurationResponse>\n"
|
33
|
-
|
34
|
-
@create_autoscaling_group_response = "<CreateAutoScalingGroupResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">\n <ResponseMetadata>\n <RequestId>cc4f9960-ad6e-11de-b82f-996c936914c5</RequestId>\n </ResponseMetadata>\n</CreateAutoScalingGroupResponse>\n"
|
35
|
-
|
36
|
-
@delete_autoscaling_group = "<DeleteAutoScalingGroupResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
37
|
-
<ResponseMetadata><RequestId>e64fc4c3-e10b-11dd-a73e-2d774d6aee71</RequestId></ResponseMetadata></DeleteAutoScalingGroupResponse>"
|
38
|
-
@create_or_update_trigger_response = "<CreateOrUpdateScalingTriggerResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
39
|
-
<ResponseMetadata>
|
40
|
-
<RequestId>503d309d-e10b-11dd-a73e-2d774d6aee71</RequestId>
|
41
|
-
</ResponseMetadata>
|
42
|
-
</CreateOrUpdateScalingTriggerResponse>"
|
43
|
-
end
|
44
|
-
|
45
|
-
specify "AWS::Autoscaling::Base should give back a nice response if there is an error" do
|
46
|
-
@as.stubs(:make_request).with('CreateLaunchConfiguration', {
|
47
|
-
'ImageId' => 'ami-ed46a784',
|
48
|
-
'LaunchConfigurationName' => 'TestAutoscalingGroupName',
|
49
|
-
'InstanceType' => "m1.small"
|
50
|
-
}).returns stub(:body => @error_response_for_creation, :is_a? => true)
|
51
|
-
|
52
|
-
response = @as.create_launch_configuration( :image_id => "ami-ed46a784", :launch_configuration_name => "TestAutoscalingGroupName", :instance_type => "m1.small")
|
53
|
-
response.should.be.an.instance_of Hash
|
54
|
-
response["Error"]["Message"].should.equal "Launch Configuration by this name already exists - A launch configuration already exists with the name TestAutoscalingGroupName"
|
55
|
-
end
|
56
|
-
|
57
|
-
specify "AWS::Autoscaling::Base should destroy a launch configuration just fine" do
|
58
|
-
@as.stubs(:make_request).with('DeleteLaunchConfiguration', {
|
59
|
-
'LaunchConfigurationName' => 'TestAutoscalingGroupName1'
|
60
|
-
}).returns stub(:body => @delete_launch_configuration_response, :is_a? => true)
|
61
|
-
|
62
|
-
response = @as.delete_launch_configuration( :launch_configuration_name => "TestAutoscalingGroupName1" )
|
63
|
-
response.should.be.an.instance_of Hash
|
64
|
-
end
|
65
|
-
|
66
|
-
specify "AWS::Autoscaling::Base should create a launch configuration" do
|
67
|
-
@as.stubs(:make_request).with('CreateLaunchConfiguration', {
|
68
|
-
'ImageId' => 'ami-ed46a784',
|
69
|
-
'LaunchConfigurationName' => 'CustomTestAutoscalingGroupName',
|
70
|
-
'InstanceType' => "m1.small"
|
71
|
-
}).returns stub(:body => @create_launch_configuration_response, :is_a? => true)
|
72
|
-
|
73
|
-
response = @as.create_launch_configuration( :image_id => "ami-ed46a784", :launch_configuration_name => "CustomTestAutoscalingGroupName", :instance_type => "m1.small")
|
74
|
-
response.should.be.an.instance_of Hash
|
75
|
-
end
|
76
|
-
|
77
|
-
specify "AWS::Autoscaling::Base should be able to create a new autoscaling group" do
|
78
|
-
@as.stubs(:make_request).with("CreateAutoScalingGroup", {
|
79
|
-
'AutoScalingGroupName' => 'CloudteamTestAutoscalingGroup1',
|
80
|
-
'AvailabilityZones.member.1' => 'us-east-1a',
|
81
|
-
'LoadBalancerNames.member.1' => 'TestLoadBalancerName',
|
82
|
-
'LoadBalancerNames.member.2' => 'TestLoadBalancerName2',
|
83
|
-
'LaunchConfigurationName' => 'CloudteamTestAutoscaling',
|
84
|
-
'MinSize' => "1", 'MaxSize' => "3"
|
85
|
-
}).returns stub(:body => @create_autoscaling_group_response, :is_a? => true)
|
86
|
-
response = @as.create_autoscaling_group(:autoscaling_group_name => "CloudteamTestAutoscalingGroup1", :availability_zones => "us-east-1a", :load_balancer_names => ["TestLoadBalancerName", "TestLoadBalancerName2"], :launch_configuration_name => "CloudteamTestAutoscaling", :min_size => 1, :max_size => 3)
|
87
|
-
response.should.be.an.instance_of Hash
|
88
|
-
end
|
89
|
-
|
90
|
-
specify "AWS::Autoscaling::Base should destroy an autoscaling group" do
|
91
|
-
@as.stubs(:make_request).with('DeleteAutoScalingGroup', {
|
92
|
-
'AutoScalingGroupName' => 'TestAutoscalingGroupName1'
|
93
|
-
}).returns stub(:body => @delete_autoscaling_group, :is_a? => true)
|
94
|
-
|
95
|
-
response = @as.delete_autoscaling_group( :autoscaling_group_name => "TestAutoscalingGroupName1" )
|
96
|
-
response.should.be.an.instance_of Hash
|
97
|
-
end
|
98
|
-
|
99
|
-
specify "AWS::Autoscaling::Base should be able to create a new scaling trigger" do
|
100
|
-
@as.stubs(:make_request).with("CreateOrUpdateScalingTrigger", {
|
101
|
-
'AutoScalingGroupName' => 'AutoScalingGroupName',
|
102
|
-
'Unit' => "Seconds",
|
103
|
-
'Dimensions.member.1.Name' => "AutoScalingGroupName",
|
104
|
-
'Dimensions.member.1.Value' => "Bob",
|
105
|
-
'MeasureName' => "CPUUtilization",
|
106
|
-
'Statistic' => 'Average',
|
107
|
-
'Period' => '120',
|
108
|
-
'TriggerName' => "AFunNameForATrigger",
|
109
|
-
'LowerThreshold' => "0.2",
|
110
|
-
'LowerBreachScaleIncrement' => "-1",
|
111
|
-
'UpperThreshold' => "1.5",
|
112
|
-
'UpperBreachScaleIncrement' => "1",
|
113
|
-
'BreachDuration' => "120"
|
114
|
-
}).returns stub(:body => @create_or_update_trigger_response, :is_a? => true)
|
115
|
-
|
116
|
-
valid_create_or_update_scaling_trigger_params = {:autoscaling_group_name => "AutoScalingGroupName", :dimensions => {:name => "AutoScalingGroupName", :value => "Bob"}, :unit => "Seconds", :measure_name => "CPUUtilization", :statistic => "Average", :period => 120, :trigger_name => "AFunNameForATrigger", :lower_threshold => 0.2, :lower_breach_scale_increment => "-1", :upper_threshold => 1.5, :upper_breach_scale_increment => 1, :breach_duration => 120}
|
117
|
-
|
118
|
-
%w(dimensions autoscaling_group_name measure_name statistic period trigger_name lower_threshold lower_breach_scale_increment upper_threshold upper_breach_scale_increment breach_duration).each do |meth_str|
|
119
|
-
lambda { @as.create_or_updated_scaling_trigger(valid_create_or_update_scaling_trigger_params.merge(meth_str.to_sym=>nil)) }.should.raise(AWS::ArgumentError)
|
120
|
-
end
|
121
|
-
|
122
|
-
response = @as.create_or_updated_scaling_trigger(valid_create_or_update_scaling_trigger_params)
|
123
|
-
response.should.be.an.instance_of Hash
|
124
|
-
end
|
125
|
-
|
126
|
-
specify "AWS::Autoscaling::Base should destroy a launch configuration group" do
|
127
|
-
@as.stubs(:make_request).with('DeleteLaunchConfiguration', {
|
128
|
-
'LaunchConfigurationName' => 'LaunchConfiguration'
|
129
|
-
}).returns stub(:body => " <DeleteLaunchConfigurationResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
130
|
-
<ResponseMetadata><RequestId>e64fc4c3-e10b-11dd-a73e-2d774d6aee71</RequestId></ResponseMetadata>
|
131
|
-
</DeleteLaunchConfigurationResponse>", :is_a? => true)
|
132
|
-
|
133
|
-
response = @as.delete_launch_configuration( :launch_configuration_name => "LaunchConfiguration" )
|
134
|
-
response.should.be.an.instance_of Hash
|
135
|
-
end
|
136
|
-
|
137
|
-
specify "AWS::Autoscaling::Base should destroy a scaling trigger" do
|
138
|
-
@as.stubs(:make_request).with('DeleteTrigger', {
|
139
|
-
'TriggerName' => 'DeletingTrigger', 'AutoScalingGroupName' => "Name"
|
140
|
-
}).returns stub(:body => " <DeleteTriggerResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
141
|
-
<ResponseMetadata>
|
142
|
-
<RequestId>cca38097-e10b-11dd-a73e-2d774d6aee71</RequestId>
|
143
|
-
</ResponseMetadata>
|
144
|
-
</DeleteTriggerResponse>", :is_a? => true)
|
145
|
-
|
146
|
-
response = @as.delete_trigger( :trigger_name => "DeletingTrigger", :autoscaling_group_name => "Name" )
|
147
|
-
response.should.be.an.instance_of Hash
|
148
|
-
end
|
149
|
-
|
150
|
-
specify "AWS::Autoscaling::Base should describe the autoscaling groups" do
|
151
|
-
@as.stubs(:make_request).with('DescribeAutoScalingGroups', {
|
152
|
-
'AutoScalingGroupNames.member.1' => "webtier"
|
153
|
-
}).returns stub(:body => "<DescribeAutoScalingGroupsResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
154
|
-
<DescribeAutoScalingGroupsResult>
|
155
|
-
<AutoScalingGroups>
|
156
|
-
<member>
|
157
|
-
<MinSize>0</MinSize>
|
158
|
-
<CreatedTime>2009-01-13T00:38:54Z</CreatedTime>
|
159
|
-
<AvailabilityZones>
|
160
|
-
<member>us-east-1c</member>
|
161
|
-
</AvailabilityZones>
|
162
|
-
<Cooldown>0</Cooldown>
|
163
|
-
<LaunchConfigurationName>wt20080929</LaunchConfigurationName>
|
164
|
-
<AutoScalingGroupName>webtier</AutoScalingGroupName>
|
165
|
-
<DesiredCapacity>1</DesiredCapacity>
|
166
|
-
<Instances>
|
167
|
-
<member>
|
168
|
-
<InstanceId>i-8fa224e6</InstanceId>
|
169
|
-
<LifecycleState>InService</LifecycleState>
|
170
|
-
<AvailabilityZone>us-east-1c</AvailabilityZone>
|
171
|
-
</member>
|
172
|
-
</Instances>
|
173
|
-
<MaxSize>1</MaxSize>
|
174
|
-
</member>
|
175
|
-
</AutoScalingGroups>
|
176
|
-
</DescribeAutoScalingGroupsResult>
|
177
|
-
<ResponseMetadata>
|
178
|
-
<RequestId>70f2e8af-e10b-11dd-a73e-2d774d6aee71</RequestId>
|
179
|
-
</ResponseMetadata>
|
180
|
-
</DescribeAutoScalingGroupsResponse>", :is_a? => true)
|
181
|
-
|
182
|
-
response = @as.describe_autoscaling_groups( :autoscaling_group_names => ["webtier"] )
|
183
|
-
response.should.be.an.instance_of Hash
|
184
|
-
end
|
185
|
-
|
186
|
-
specify "AWS::Autoscaling::Base should describe the launch configurations" do
|
187
|
-
@as.stubs(:make_request).with('DescribeLaunchConfigurations', {
|
188
|
-
'AutoScalingGroupNames.member.1' => "webtier"
|
189
|
-
}).returns stub(:body => "<DescribeLaunchConfigurationsResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
190
|
-
<DescribeLaunchConfigurationsResult>
|
191
|
-
<LaunchConfigurations>
|
192
|
-
<member>
|
193
|
-
<InstanceType>m1.small</InstanceType>
|
194
|
-
<BlockDeviceMappings/>
|
195
|
-
<KeyName/>
|
196
|
-
<SecurityGroups/>
|
197
|
-
<ImageId>ami-f7c5219e</ImageId>
|
198
|
-
<RamdiskId/>
|
199
|
-
<CreatedTime>2009-01-13T00:35:31Z</CreatedTime>
|
200
|
-
<KernelId/>
|
201
|
-
<LaunchConfigurationName>wt20080929</LaunchConfigurationName>
|
202
|
-
<UserData/>
|
203
|
-
</member>
|
204
|
-
</LaunchConfigurations>
|
205
|
-
</DescribeLaunchConfigurationsResult>
|
206
|
-
<ResponseMetadata>
|
207
|
-
<RequestId>2e14cb6c-e10a-11dd-a73e-2d774d6aee71</RequestId>
|
208
|
-
</ResponseMetadata>
|
209
|
-
</DescribeLaunchConfigurationsResponse>", :is_a? => true)
|
210
|
-
|
211
|
-
response = @as.describe_launch_configurations( :launch_configuration_names => ["webtier"] )
|
212
|
-
response.should.be.an.instance_of Hash
|
213
|
-
end
|
214
|
-
|
215
|
-
|
216
|
-
specify "AWS::Autoscaling::Base should describe the launch configurations" do
|
217
|
-
@as.stubs(:make_request).with('DescribeScalingActivities', {
|
218
|
-
'AutoScalingGroupName' => "webtier"
|
219
|
-
}).returns stub(:body => "<DescribeScalingActivitiesResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
220
|
-
<DescribeScalingActivitiesResult>
|
221
|
-
<Activities>
|
222
|
-
<member>
|
223
|
-
<ActivityId>885b2900-0f2e-497a-8ec6-b1b90a9ddee0</ActivityId>
|
224
|
-
<StartTime>2009-03-29T04:07:07Z</StartTime>
|
225
|
-
<Progress>0</Progress>
|
226
|
-
<StatusCode>InProgress</StatusCode>
|
227
|
-
<Cause>Automated Capacity Adjustment</Cause>
|
228
|
-
<Description>Launching a new EC2 instance</Description>
|
229
|
-
</member>
|
230
|
-
</Activities>
|
231
|
-
</DescribeScalingActivitiesResult>
|
232
|
-
<ResponseMetadata>
|
233
|
-
<RequestId>f0321780-e10a-11dd-a73e-2d774d6aee71</RequestId>
|
234
|
-
</ResponseMetadata>
|
235
|
-
</DescribeScalingActivitiesResponse>", :is_a? => true)
|
236
|
-
|
237
|
-
response = @as.describe_scaling_activities( :autoscaling_group_name => "webtier" )
|
238
|
-
response.should.be.an.instance_of Hash
|
239
|
-
end
|
240
|
-
|
241
|
-
specify "AWS::Autoscaling::Base should describe triggers" do
|
242
|
-
@as.stubs(:make_request).with('DescribeTriggers', {
|
243
|
-
'AutoScalingGroupName' => "webtier"
|
244
|
-
}).returns stub(:body => " <DescribeTriggersResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
245
|
-
<DescribeTriggersResult>
|
246
|
-
<Triggers>
|
247
|
-
<member>
|
248
|
-
<BreachDuration>300</BreachDuration>
|
249
|
-
<UpperBreachScaleIncrement>1</UpperBreachScaleIncrement>
|
250
|
-
<CreatedTime>2009-01-13T00:44:19Z</CreatedTime>
|
251
|
-
<UpperThreshold>60.0</UpperThreshold>
|
252
|
-
<Status>NoData</Status>
|
253
|
-
<LowerThreshold>0.0</LowerThreshold>
|
254
|
-
<Period>60</Period>
|
255
|
-
<LowerBreachScaleIncrement>-1</LowerBreachScaleIncrement>
|
256
|
-
<TriggerName>tenpct</TriggerName>
|
257
|
-
<Statistic>Average</Statistic>
|
258
|
-
<Unit>None</Unit>
|
259
|
-
<Namespace>AWS/EC2</Namespace>
|
260
|
-
<Dimensions>
|
261
|
-
|
262
|
-
<member>
|
263
|
-
<Name>AutoScalingGroupName</Name>
|
264
|
-
<Value>webtier</Value>
|
265
|
-
</member>
|
266
|
-
</Dimensions>
|
267
|
-
<AutoScalingGroupName>webtier</AutoScalingGroupName>
|
268
|
-
<MeasureName>CPUUtilization</MeasureName>
|
269
|
-
</member>
|
270
|
-
</Triggers>
|
271
|
-
</DescribeTriggersResult>
|
272
|
-
<ResponseMetadata>
|
273
|
-
<RequestId>5c33c82a-e10b-11dd-a73e-2d774d6aee71</RequestId>
|
274
|
-
</ResponseMetadata>
|
275
|
-
</DescribeTriggersResponse>", :is_a? => true)
|
276
|
-
|
277
|
-
response = @as.describe_triggers( :autoscaling_group_name => "webtier" )
|
278
|
-
response.should.be.an.instance_of Hash
|
279
|
-
end
|
280
|
-
|
281
|
-
specify "AWS::Autoscaling::Base should describe triggers" do
|
282
|
-
@as.stubs(:make_request).with('SetDesiredCapacity', {
|
283
|
-
'AutoScalingGroupName' => "name", 'DesiredCapacity' => '10'
|
284
|
-
}).returns stub(:body => " <SetDesiredCapacityResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
285
|
-
<ResponseMetadata>
|
286
|
-
<RequestId>d3f2091c-e10a-11dd-a73e- 2d774d6aee71</RequestId>
|
287
|
-
</ResponseMetadata>
|
288
|
-
</SetDesiredCapacityResponse>
|
289
|
-
", :is_a? => true)
|
290
|
-
|
291
|
-
response = @as.set_desired_capacity( :autoscaling_group_name => "name", :desired_capacity => "10" )
|
292
|
-
response.should.be.an.instance_of Hash
|
293
|
-
end
|
294
|
-
|
295
|
-
|
296
|
-
specify "AWS::Autoscaling::Base should terminate an instance in an autoscaling group" do
|
297
|
-
@as.stubs(:make_request).with('TerminateInstanceInAutoScalingGroup', {
|
298
|
-
'InstanceId' => "i-instance1"
|
299
|
-
}).returns stub(:body => " <DescribeTriggersResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2009-05-15/\">
|
300
|
-
<DescribeTriggersResult>
|
301
|
-
<Triggers>
|
302
|
-
<member>
|
303
|
-
<BreachDuration>300</BreachDuration>
|
304
|
-
<UpperBreachScaleIncrement>1</UpperBreachScaleIncrement>
|
305
|
-
<CreatedTime>2009-01-13T00:44:19Z</CreatedTime>
|
306
|
-
<UpperThreshold>60.0</UpperThreshold>
|
307
|
-
<Status>NoData</Status>
|
308
|
-
<LowerThreshold>0.0</LowerThreshold>
|
309
|
-
<Period>60</Period>
|
310
|
-
<LowerBreachScaleIncrement>-1</LowerBreachScaleIncrement>
|
311
|
-
<TriggerName>tenpct</TriggerName>
|
312
|
-
<Statistic>Average</Statistic>
|
313
|
-
<Unit>None</Unit>
|
314
|
-
<Namespace>AWS/EC2</Namespace>
|
315
|
-
<Dimensions>
|
316
|
-
|
317
|
-
<member>
|
318
|
-
<Name>AutoScalingGroupName</Name>
|
319
|
-
<Value>webtier</Value>
|
320
|
-
</member>
|
321
|
-
</Dimensions>
|
322
|
-
<AutoScalingGroupName>webtier</AutoScalingGroupName>
|
323
|
-
<MeasureName>CPUUtilization</MeasureName>
|
324
|
-
</member>
|
325
|
-
</Triggers>
|
326
|
-
</DescribeTriggersResult>
|
327
|
-
<ResponseMetadata>
|
328
|
-
<RequestId>5c33c82a-e10b-11dd-a73e-2d774d6aee71</RequestId>
|
329
|
-
</ResponseMetadata>
|
330
|
-
</DescribeTriggersResponse>", :is_a? => true)
|
331
|
-
|
332
|
-
response = @as.terminate_instance_in_autoscaling_group( :instance_id => "i-instance1" )
|
333
|
-
response.should.be.an.instance_of Hash
|
334
|
-
end
|
335
|
-
|
336
|
-
|
337
|
-
end
|
@@ -1,68 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
|
-
require File.dirname(__FILE__) + '/test_helper.rb'
|
12
|
-
|
13
|
-
context "The EC2 method " do
|
14
|
-
|
15
|
-
before do
|
16
|
-
end
|
17
|
-
|
18
|
-
specify "AWS::EC2::Base attribute readers should be available" do
|
19
|
-
@ec2 = AWS::EC2::Base.new( :access_key_id => "not a key",
|
20
|
-
:secret_access_key => "not a secret",
|
21
|
-
:use_ssl => true,
|
22
|
-
:server => "foo.example.com" )
|
23
|
-
|
24
|
-
@ec2.use_ssl.should.equal true
|
25
|
-
@ec2.port.should.equal 443
|
26
|
-
@ec2.server.should.equal "foo.example.com"
|
27
|
-
end
|
28
|
-
|
29
|
-
specify "AWS::EC2::Base should work with insecure connections as well" do
|
30
|
-
@ec2 = AWS::EC2::Base.new( :access_key_id => "not a key",
|
31
|
-
:secret_access_key => "not a secret",
|
32
|
-
:use_ssl => false,
|
33
|
-
:server => "foo.example.com" )
|
34
|
-
|
35
|
-
@ec2.use_ssl.should.equal false
|
36
|
-
@ec2.port.should.equal 80
|
37
|
-
@ec2.server.should.equal "foo.example.com"
|
38
|
-
end
|
39
|
-
|
40
|
-
specify "AWS::EC2::Base should allow specification of port" do
|
41
|
-
@ec2 = AWS::EC2::Base.new( :access_key_id => "not a key",
|
42
|
-
:secret_access_key => "not a secret",
|
43
|
-
:use_ssl => true,
|
44
|
-
:server => "foo.example.com",
|
45
|
-
:port => 8443 )
|
46
|
-
|
47
|
-
@ec2.use_ssl.should.equal true
|
48
|
-
@ec2.port.should.equal 8443
|
49
|
-
@ec2.server.should.equal "foo.example.com"
|
50
|
-
end
|
51
|
-
|
52
|
-
specify "AWS.canonical_string(path) should conform to Amazon's requirements " do
|
53
|
-
path = {"name1" => "value1", "name2" => "value2", "name3" => "value3"}
|
54
|
-
if ENV['EC2_URL'].nil? || ENV['EC2_URL'] == 'https://ec2.amazonaws.com'
|
55
|
-
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\nec2.amazonaws.com\n/\nname1=value1&name2=value2&name3=value3"
|
56
|
-
elsif ENV['EC2_URL'] == 'https://us-east-1.ec2.amazonaws.com'
|
57
|
-
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\nus-east-1.ec2.amazonaws.com\n/\nname1=value1&name2=value2&name3=value3"
|
58
|
-
elsif ENV['EC2_URL'] == 'https://eu-west-1.ec2.amazonaws.com'
|
59
|
-
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\neu-west-1.ec2.amazonaws.com\n/\nname1=value1&name2=value2&name3=value3"
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
specify "AWS.encode should return the expected string" do
|
64
|
-
AWS.encode("secretaccesskey", "foobar123", urlencode=true).should.equal "e3jeuDc3DIX2mW8cVqWiByj4j5g%3D"
|
65
|
-
AWS.encode("secretaccesskey", "foobar123", urlencode=false).should.equal "e3jeuDc3DIX2mW8cVqWiByj4j5g="
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
|
-
require File.dirname(__FILE__) + '/test_helper.rb'
|
12
|
-
|
13
|
-
context "EC2 availability zones" do
|
14
|
-
|
15
|
-
before do
|
16
|
-
@ec2 = AWS::EC2::Base.new( :access_key_id => "not a key", :secret_access_key => "not a secret" )
|
17
|
-
|
18
|
-
@describe_availability_zones_response_body = <<-RESPONSE
|
19
|
-
<DescribeAvailabilityZonesResponse xmlns="http://ec2.amazonaws.com/doc/2008-02-01/">
|
20
|
-
<availabilityZoneInfo>
|
21
|
-
<item>
|
22
|
-
<zoneName>us-east-1a</zoneName>
|
23
|
-
<zoneState>available</zoneState>
|
24
|
-
</item>
|
25
|
-
<item>
|
26
|
-
<zoneName>us-east-1b</zoneName>
|
27
|
-
<zoneState>available</zoneState>
|
28
|
-
</item>
|
29
|
-
</availabilityZoneInfo>
|
30
|
-
</DescribeAvailabilityZonesResponse>
|
31
|
-
RESPONSE
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
specify "should be able to be described with describe_availability_zones" do
|
36
|
-
@ec2.stubs(:make_request).with('DescribeAvailabilityZones', { "ZoneName.1" => "us-east-1a", "ZoneName.2" => "us-east-1b" }).
|
37
|
-
returns stub(:body => @describe_availability_zones_response_body, :is_a? => true)
|
38
|
-
@ec2.describe_availability_zones( :zone_name => ["us-east-1a", "us-east-1b"] ).should.be.an.instance_of Hash
|
39
|
-
|
40
|
-
response = @ec2.describe_availability_zones( :zone_name => ["us-east-1a", "us-east-1b"] )
|
41
|
-
|
42
|
-
response.availabilityZoneInfo.item[0].zoneName.should.equal "us-east-1a"
|
43
|
-
response.availabilityZoneInfo.item[0].zoneState.should.equal "available"
|
44
|
-
|
45
|
-
response.availabilityZoneInfo.item[1].zoneName.should.equal "us-east-1b"
|
46
|
-
response.availabilityZoneInfo.item[1].zoneState.should.equal "available"
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|