Sha256: 7f6796d4e683b94fbc742b9210837fe9e00614cd9be8c1d01277fc52fede7bde

Contents?: true

Size: 1005 Bytes

Versions: 30

Compression:

Stored size: 1005 Bytes

Contents

class TestLab
  class Node

    module Actions

      # Create the node
      def create
        @ui.logger.debug { "Node Create: #{self.id} " }

        please_wait(:ui => @ui, :message => format_object_action(self, 'Create', :green)) do
          @provider.create
        end
      end

      # Destroy the node
      def destroy
        @ui.logger.debug { "Node Destroy: #{self.id} " }

        please_wait(:ui => @ui, :message => format_object_action(self, 'Destroy', :red)) do
          @provider.destroy
        end
      end

      # Start the node
      def up
        @ui.logger.debug { "Node Up: #{self.id} " }

        please_wait(:ui => @ui, :message => format_object_action(self, 'Up', :green)) do
          @provider.up
        end
      end

      # Stop the node
      def down
        @ui.logger.debug { "Node Down: #{self.id} " }

        please_wait(:ui => @ui, :message => format_object_action(self, 'Down', :red)) do
          @provider.down
        end
      end

    end

  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
testlab-0.6.5 lib/testlab/node/actions.rb
testlab-0.6.4 lib/testlab/node/actions.rb
testlab-0.6.3 lib/testlab/node/actions.rb
testlab-0.6.2 lib/testlab/node/actions.rb
testlab-0.6.1 lib/testlab/node/actions.rb
testlab-0.6.0 lib/testlab/node/actions.rb
testlab-0.5.4 lib/testlab/node/actions.rb
testlab-0.5.3 lib/testlab/node/actions.rb
testlab-0.5.2 lib/testlab/node/actions.rb
testlab-0.5.1 lib/testlab/node/actions.rb
testlab-0.5.0 lib/testlab/node/actions.rb
testlab-0.4.16 lib/testlab/node/actions.rb
testlab-0.4.15 lib/testlab/node/actions.rb
testlab-0.4.14 lib/testlab/node/actions.rb
testlab-0.4.13 lib/testlab/node/actions.rb
testlab-0.4.12 lib/testlab/node/actions.rb
testlab-0.4.11 lib/testlab/node/actions.rb
testlab-0.4.10 lib/testlab/node/actions.rb
testlab-0.4.9 lib/testlab/node/actions.rb
testlab-0.4.8 lib/testlab/node/actions.rb