lib/testlab.rb in testlab-0.0.4 vs lib/testlab.rb in testlab-0.1.0
- old
+ new
@@ -8,20 +8,20 @@
class TestLab
# Top-Level Error Class
class TestLabError < StandardError; end
- autoload :Provider, 'testlab/provider'
+ # Main Classes
+ autoload :Container, 'testlab/container'
+ autoload :Labfile, 'testlab/labfile'
+ autoload :Network, 'testlab/network'
+ autoload :Node, 'testlab/node'
+ autoload :Provider, 'testlab/provider'
autoload :Provisioner, 'testlab/provisioner'
+ autoload :Router, 'testlab/router'
+ autoload :Utility, 'testlab/utility'
- autoload :Labfile, 'testlab/labfile'
- autoload :Node, 'testlab/node'
- autoload :Router, 'testlab/router'
- autoload :Container, 'testlab/container'
- autoload :Network, 'testlab/network'
- autoload :Link, 'testlab/link'
-
@@ui ||= nil
def initialize(options={})
labfile = (options[:labfile] || 'Labfile')
labfile_path = ZTK::Locator.find(labfile)
@@ -61,20 +61,20 @@
def status
if alive?
@@ui.stdout.puts("NODES:")
ZTK::Report.new(:ui => @@ui).spreadsheet(TestLab::Node.all, TestLab::Node::STATUS_KEYS) do |node|
- OpenStruct.new(node.status.merge(:id => node.id))
+ OpenStruct.new(node.status)
end
@@ui.stdout.puts
@@ui.stdout.puts("NETWORKS:")
ZTK::Report.new(:ui => @@ui).spreadsheet(TestLab::Network.all, TestLab::Network::STATUS_KEYS) do |network|
- OpenStruct.new(network.status.merge(:id => network.id))
+ OpenStruct.new(network.status)
end
@@ui.stdout.puts
@@ui.stdout.puts("CONTAINERS:")
ZTK::Report.new(:ui => @@ui).spreadsheet(TestLab::Container.all, TestLab::Container::STATUS_KEYS) do |container|
- OpenStruct.new(container.status.merge(:id => container.id))
+ OpenStruct.new(container.status)
end
true
else
@@ui.stdout.puts("Looks like your test lab is dead; fix this and try again.")