lib/testlab/network/actions.rb in testlab-1.0.1 vs lib/testlab/network/actions.rb in testlab-1.1.0

- old
+ new

@@ -9,11 +9,11 @@ (self.node.state != :running) and return false (self.state != :not_created) and return false please_wait(:ui => @ui, :message => format_object_action(self, 'Create', :green)) do - self.node.ssh.bootstrap(<<-EOF, :ignore_exit_status => true) + self.node.bootstrap(<<-EOF, :ignore_exit_status => true) set -x grep '#{def_tag}' /etc/network/interfaces && exit 0 cat <<EOI | tee -a /etc/network/interfaces #{def_tag} auto br0 @@ -43,11 +43,11 @@ (self.node.state != :running) and return false (self.state == :not_created) and return false please_wait(:ui => @ui, :message => format_object_action(self, 'Destroy', :red)) do - self.node.ssh.bootstrap(<<-EOF, :ignore_exit_status => true) + self.node.bootstrap(<<-EOF, :ignore_exit_status => true) set -x sed -i '/#{def_tag}/,/#{end_tag}/d' /etc/network/interfaces brctl delbr #{self.bridge} EOF @@ -63,11 +63,11 @@ (self.node.state != :running) and return false (self.state == :running) and return false please_wait(:ui => @ui, :message => format_object_action(self, 'Up', :green)) do - self.node.ssh.bootstrap(<<-EOF, :ignore_exit_status => true) + self.node.bootstrap(<<-EOF, :ignore_exit_status => true) set -x ifconfig #{self.bridge} #{self.ip} netmask #{self.netmask} broadcast #{self.broadcast} up EOF do_provisioner_callbacks(self, :up, @ui) @@ -82,10 +82,10 @@ (self.node.state != :running) and return false (self.state != :running) and return false please_wait(:ui => @ui, :message => format_object_action(self, 'Down', :red)) do - self.node.ssh.bootstrap(<<-EOF, :ignore_exit_status => true) + self.node.bootstrap(<<-EOF, :ignore_exit_status => true) set -x ifconfig #{self.bridge} down EOF do_provisioner_callbacks(self, :down, @ui)