Sha256: 9a0bcb23016dab99dc432bd96b948b7947a7866bdc3c3781d2c894d838057eb4

Contents?: true

Size: 1.42 KB

Versions: 32

Compression:

Stored size: 1.42 KB

Contents

group "Metadata"
library :rudy, 'lib'

Gibbler.enable_debug if Tryouts.verbose > 3
  
tryout "List Machines" do
  
  setup do
    #Rudy.enable_debug
    Rudy::Huxtable.update_config          # Read config files
    global = Rudy::Huxtable.global
    akey, skey, region = global.accesskey, global.secretkey, global.region
    Rudy::Metadata.connect akey, skey, region
    Rudy::AWS::EC2.connect akey, skey, region
    ('01'..'03').each { |i| Rudy::Machine.new(i).save }
    ('04'..'05').each { |i| Rudy::Machine.new(i, :environment => :test).save }
    sleep 1 # SimpleDB, eventual consistency
  end
  
  clean do
    ('01'..'03').each { |i| Rudy::Machine.new(i).destroy }
    ('04'..'05').each { |i| Rudy::Machine.new(i, :environment => :test).destroy }
    if Rudy.debug?
      puts $/, "Rudy Debugging:"
      Rudy::Huxtable.logger.rewind
      puts Rudy::Huxtable.logger.read unless Rudy::Huxtable.logger.closed_read?
    end
  end
  
    
  dream :class, Array
  dream :empty?, false
  dream :size, 3
  drill "list available disks in default environment" do
    ret = Rudy::Machines.list
    #puts ret.to_json
    ret
  end
  
  dream :size, 2
  drill "list available disks in 'test' environment" do
    ret = Rudy::Machines.list({:environment => :test})
    #puts ret.to_json
    ret
  end
  
  dream :size, 5
  drill "list all available disks" do
    ret = Rudy::Machines.list({}, [:environment])
    #puts ret.to_json
    ret
  end
  
end



Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
solutious-rudy-0.9.2 tryouts/30_metadata/73_machine_list_tryouts.rb
solutious-rudy-0.9.3 tryouts/30_metadata/73_machine_list_tryouts.rb
solutious-rudy-0.9.4 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.020 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.019 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.018 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.017 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.016 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.015 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.014 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.013 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.012 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.011 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.010 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.009 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.008 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.007 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.006 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.005 tryouts/30_metadata/73_machine_list_tryouts.rb
rudy-0.9.8.004 tryouts/30_metadata/73_machine_list_tryouts.rb