lib/testlab.rb in testlab-1.21.1 vs lib/testlab.rb in testlab-1.22.0

- old
+ new

@@ -135,10 +135,11 @@ autoload :Source, 'testlab/source' autoload :Support, 'testlab/support' autoload :User, 'testlab/user' autoload :Utility, 'testlab/utility' + include TestLab::Support::Parallel include TestLab::Utility::Misc attr_accessor :config_dir attr_accessor :repo_dir attr_accessor :labfile_path @@ -424,15 +425,17 @@ # # @return [Boolean] True if successful. def method_proxy(method_name, *method_args) nodes.each do |node| node.send(method_name, *method_args) + node.networks.each do |network| network.send(method_name, *method_args) end - node.containers.each do |container| - container.send(method_name, *method_args) + + do_parallel_actions(TestLab::Container, node.containers, method_name) do |object, action, klass| + object.send(method_name, *method_args) end end end # Reverse Method Proxy @@ -441,15 +444,17 @@ # arguments to each object. # # @return [Boolean] True if successful. def reverse_method_proxy(method_name, *method_args) nodes.reverse.each do |node| - node.containers.reverse.each do |container| - container.send(method_name, *method_args) + do_parallel_actions(TestLab::Container, node.containers.reverse, method_name, true) do |object, action, klass| + object.send(method_name, *method_args) end + node.networks.reverse.each do |network| network.send(method_name, *method_args) end + node.send(method_name, *method_args) end end # Provider Method Handler