Sha256: ffd742b19e3fd0ae3b63a0f20c29e4a9e6b9c82de659ce1c286654656a534389

Contents?: true

Size: 1.2 KB

Versions: 12

Compression:

Stored size: 1.2 KB

Contents

require File.expand_path("../version_6_0", __FILE__)

module VagrantPlugins
  module ProviderVirtualBox
    module Driver
      # Driver for VirtualBox 6.1.x
      class Version_6_1 < Version_6_0
        def initialize(uuid)
          super

          @logger = Log4r::Logger.new("vagrant::provider::virtualbox_6_1")
        end

        def read_dhcp_servers
          execute("list", "dhcpservers", retryable: true).split("\n\n").collect do |block|
            info = {}

            block.split("\n").each do |line|
              if network = line[/^NetworkName:\s+HostInterfaceNetworking-(.+?)$/, 1]
                info[:network]      = network
                info[:network_name] = "HostInterfaceNetworking-#{network}"
              elsif ip = line[/^Dhcpd IP:\s+(.+?)$/, 1]
                info[:ip] = ip
              elsif netmask = line[/^NetworkMask:\s+(.+?)$/, 1]
                info[:netmask] = netmask
              elsif lower = line[/^LowerIPAddress:\s+(.+?)$/, 1]
                info[:lower] = lower
              elsif upper = line[/^UpperIPAddress:\s+(.+?)$/, 1]
                info[:upper] = upper
              end
            end

            info
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/providers/virtualbox/driver/version_6_1.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.3.3.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.3.2.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.2.19.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.2.18.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.2.16.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.2.14.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.2.10.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.2.9.0 plugins/providers/virtualbox/driver/version_6_1.rb
vagrant-unbundled-2.2.8.0 plugins/providers/virtualbox/driver/version_6_1.rb