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.52.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-3.2.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-3.1.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-3.0.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.51.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.50.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.49.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.48.1 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.48.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.47.1 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.47.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.46.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.45.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.44.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.43.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.42.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.41.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.40.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.39.0 lib/beaker/hypervisor/vagrant_libvirt.rb
beaker-2.38.1 lib/beaker/hypervisor/vagrant_libvirt.rb