Sha256: 686dd92e0b7ad7d97d6326f9db966346777627e31220f1ac82ceece4dd2093f7

Contents?: true

Size: 1.25 KB

Versions: 54

Compression:

Stored size: 1.25 KB

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

          do_provisioner_callbacks(self, :create, @ui)
        end

        true
      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

          do_provisioner_callbacks(self, :destroy, @ui)
        end

        true
      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

          do_provisioner_callbacks(self, :up, @ui)
        end

        true
      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

          do_provisioner_callbacks(self, :down, @ui)
        end

        true
      end

    end

  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
testlab-1.22.4 lib/testlab/node/actions.rb
testlab-1.22.3 lib/testlab/node/actions.rb
testlab-1.22.2 lib/testlab/node/actions.rb
testlab-1.22.1 lib/testlab/node/actions.rb
testlab-1.22.0 lib/testlab/node/actions.rb
testlab-1.21.1 lib/testlab/node/actions.rb
testlab-1.21.0 lib/testlab/node/actions.rb
testlab-1.20.6 lib/testlab/node/actions.rb
testlab-1.20.5 lib/testlab/node/actions.rb
testlab-1.20.4 lib/testlab/node/actions.rb
testlab-1.20.3 lib/testlab/node/actions.rb
testlab-1.20.2 lib/testlab/node/actions.rb
testlab-1.20.1 lib/testlab/node/actions.rb
testlab-1.20.0 lib/testlab/node/actions.rb
testlab-1.19.0 lib/testlab/node/actions.rb
testlab-1.18.1 lib/testlab/node/actions.rb
testlab-1.18.0 lib/testlab/node/actions.rb
testlab-1.17.0 lib/testlab/node/actions.rb
testlab-1.16.1 lib/testlab/node/actions.rb
testlab-1.16.0 lib/testlab/node/actions.rb