Sha256: 0bc7bc62e5b98cd43fb9a014e278b1f88c316b2d92de3d244835c12623c763a7

Contents?: true

Size: 941 Bytes

Versions: 5

Compression:

Stored size: 941 Bytes

Contents

# Vagrant private network
#
# @see http://docs.vagrantup.com/v2/networking/private_network.html
class ConfigBuilder::Model::Network::PrivateNetwork < ConfigBuilder::Model::Base

  # @!attribute [rw] :ip
  #   @return [String] The IP address to use for the private network interface.
  def_model_attribute :ip

  # @!attribute [rw] :netmask
  #   @return [String] The netmask to use for the private network interface.
  def_model_attribute :netmask

  # @!attribute [rw] :type
  #   @return [String]
  def_model_attribute :type

  # @!attribute [rw] :auto_config
  #   @return [Boolean]
  def_model_attribute :auto_config

  def to_proc
    Proc.new do |vm_config|
      # NOTE: @attrs _must_ be used here to preserve compatibility with the
      # vagrant-auto_network plugin.
      # FIXME: Re-factor attribute handling so that this sort of magic isn't
      # necessary.
      vm_config.network(:private_network, @attrs)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-config_builder-1.3.0 lib/config_builder/model/network/private_network.rb
vagrant-config_builder-1.2.0 lib/config_builder/model/network/private_network.rb
vagrant-config_builder-1.1.0 lib/config_builder/model/network/private_network.rb
vagrant-config_builder-1.0.0 lib/config_builder/model/network/private_network.rb
vagrant-config_builder-1.0.0.rc1 lib/config_builder/model/network/private_network.rb