Sha256: 117d6d494db8c3cb220e47d25c5ea153c8c28bf4a68c43409024c8ec69888abf

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require 'veewee/builder/core/builder'

module Veewee
  module Builder
    module Kvm
      class Builder < Veewee::Builder::Core::Builder

        # Translate the definition ssh options to ssh options that can be passed to Net::Ssh calls
        # We expect plain ssh for a connection

        def check_requirements
          ["ruby-libvirt","fog"].each do |gemname|
            unless gem_available?(gemname)
              raise Veewee::Error,"The kvm Builder requires the gem '#{gemname}' to be installed\n"    + "gem install #{gemname}"
            end
          end
        end

        def ssh_options(definition)
          ssh_options={
            :user => definition.ssh_user,
            :port => 22,
            :password => definition.ssh_password,
            :timeout => definition.ssh_login_timeout.to_i
          }
          return ssh_options
        end

        def build(definition_name,box_name,options)

          super(definition_name,box_name,options)

        end

      end #End Class
    end # End Module
  end # End Module
end # End Module

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veewee-0.3.0.alpha4 lib/veewee/builder/kvm/builder.rb
veewee-0.3.0.alpha3 lib/veewee/builder/kvm/builder.rb
veewee-0.3.0.alpha2 lib/veewee/builder/kvm/builder.rb
veewee-0.3.0.alpha1 lib/veewee/builder/kvm/builder.rb