Module: BigBang::TestCmd
- Included in:
- Universe
- Defined in:
- lib/bigbang/test.rb
Instance Method Summary collapse
Instance Method Details
#test ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/bigbang/test.rb', line 41 def test get_instances puts "ec2 access OK" test_availability_zones test_amis test_dns end |
#test_amis ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/bigbang/test.rb', line 22 def test_amis @instances.collect { |i| i.ami }.to_set.each do |ami| begin provider.ec2.describe_images(:image_id => [ami]) rescue AWS::InvalidAMIIDNotFound => e puts "ami #{ami} not found" end end puts "AMI's OK" end |
#test_availability_zones ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bigbang/test.rb', line 3 def test_availability_zones zones = Set.new @runs.each do |r| r.zone_sizes.each_key do |k| zones << k end end return if zones.empty? ec2_zones = get_availability_zones zones.each do |zone| unless ec2_zones.find { |z| z.zoneName == zone} raise "zone '#{zone}' not found" end end puts "Availability zones OK" end |
#test_dns ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/bigbang/test.rb', line 33 def test_dns if provider.configured_zone.nil? puts "Configured DNS domain zone not found" else puts "DNS domain OK" end end |