Sha256: 15392727a4db2a97332ecae4254cf264512927fe8af99348252e863dabde7ea9

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

class TestLab
  class Container

    module Provision

      # Provision the container
      #
      # Attempts to provision the container.  Calls the containers defined
      # provisioners provision methods.
      #
      # @return [Boolean] True if successful.
      def provision
        @ui.logger.debug { "Container Provision: #{self.id} " }

        self.node.alive? or return false
        self.node.ok?

        please_wait(:ui => @ui, :message => format_object_action(self, :provision, :green)) do
          do_provisioner_callbacks(self, :provision, @ui)
        end

        true
      end

      # Deprovision the container
      #
      # Attempts to deprovision the container.  Calls the containers defined
      # provisioners deprovision methods.
      #
      # @return [Boolean] True if successful.
      def deprovision
        @ui.logger.debug { "Container Deprovision: #{self.id} " }

        self.node.alive? or return false
        self.node.ok?

        persistent_operation_check(:deprovision)

        please_wait(:ui => @ui, :message => format_object_action(self, :deprovision, :red)) do
          do_provisioner_callbacks(self, :deprovision, @ui)
        end

        true
      end

    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
testlab-1.13.0 lib/testlab/container/provision.rb
testlab-1.12.0 lib/testlab/container/provision.rb
testlab-1.11.7 lib/testlab/container/provision.rb
testlab-1.11.6 lib/testlab/container/provision.rb
testlab-1.11.5 lib/testlab/container/provision.rb
testlab-1.11.4 lib/testlab/container/provision.rb
testlab-1.11.3 lib/testlab/container/provision.rb