Sha256: be0a926121e839de41344ebca83952cdc4e96407ea3ceeabeb46e33db01b974e

Contents?: true

Size: 998 Bytes

Versions: 66

Compression:

Stored size: 998 Bytes

Contents

class TestLab

  class Provisioner

    # Ubuntu Raring Provisioner Error Class
    class RaringError < ProvisionerError; end

    # Ubuntu Raring Provisioner Class
    #
    # @author Zachary Patten <zachary AT jovelabs DOT com>
    class Raring

      def initialize(config={}, ui=nil)
        @config = (config || Hash.new)
        @ui     = (ui     || TestLab.ui)

        @config[:raring] ||= Hash.new

        @ui.logger.debug { "config(#{@config.inspect})" }
      end

      # Ubuntu Raring: Node Provision
      #
      # @param [TestLab::Node] node The node which we want to
      #   provision.
      # @return [Boolean] True if successful.
      def on_node_provision(node)
        @ui.logger.debug { "Ubuntu Raring Provisioner: Node #{node.id}" }

        node.bootstrap(ZTK::Template.render(provision_template, @config))
      end

    private

      def provision_template
        File.join(TestLab::Provisioner.template_dir, 'raring', 'provision.erb')
      end

    end

  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

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