Sha256: 27bf1f6738249fdc919857412f705fb6d791bae7fcaaf73f986a9213f24758c6

Contents?: true

Size: 610 Bytes

Versions: 6

Compression:

Stored size: 610 Bytes

Contents

module VagrantMutate
  module Converter
    class Libvirt < Converter

      def generate_metadata
        metadata = {
          'provider' => @output_box.provider_name,
          'format'   => @output_box.image_format,
          'virtual_size' => ( @input_box.virtual_size.to_f / (1024 * 1024 * 1024) ).ceil
        }
      end

      def generate_vagrantfile
        <<-EOF
        config.vm.provider :libvirt do |libvirt|
          libvirt.disk_bus = '#{@input_box.disk_interface}'
        end
        EOF
      end

      def write_specific_files
        # nothing to do here
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vagrant-mutate-0.3.2 lib/vagrant-mutate/converter/libvirt.rb
vagrant-mutate-0.3.1 lib/vagrant-mutate/converter/libvirt.rb
vagrant-mutate-0.3.0 lib/vagrant-mutate/converter/libvirt.rb
vagrant-mutate-0.2.6 lib/vagrant-mutate/converter/libvirt.rb
vagrant-mutate-0.2.5 lib/vagrant-mutate/converter/libvirt.rb
vagrant-mutate-0.2.4 lib/vagrant-mutate/converter/libvirt.rb