Sha256: ebf5814b497bec3c4ca9843d2df53337f73853b8a6f71736dc9ece267e077f00

Contents?: true

Size: 643 Bytes

Versions: 29

Compression:

Stored size: 643 Bytes

Contents

require 'beaker/hypervisor/vagrant'

class Beaker::VagrantLibvirt < Beaker::Vagrant
  @memory = nil

  class << self
    attr_reader :memory
  end

  def provision(provider = 'libvirt')
    super
  end

  def self.provider_vfile_section(host, options)
    "    v.vm.provider :libvirt do |node|\n" +
      "      node.memory = #{memory(host, options)}\n" +
      "    end\n"
  end

  def self.memory(host, options)
    return @memory unless @memory.nil?
    @memory = case
    when host['vagrant_memsize']
      host['vagrant_memsize']
    when options['vagrant_memsize']
      options['vagrant_memsize']
    else
      '512'
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
beaker-2.38.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.37.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.36.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.35.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.34.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.33.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.32.1 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.32.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.31.0 lib/beaker/hypervisor/vagrant_libvirt.rb