Method: Vagrant::Action::VM::Network#verify_adapters

Defined in:
lib/vagrant/action/vm/network.rb

#verify_adapters(adapters) ⇒ Object

Verifies that the adapter configurations look good. This will raise an exception in the case that any errors occur.



115
116
117
118
119
120
121
122
# File 'lib/vagrant/action/vm/network.rb', line 115

def verify_adapters(adapters)
  # Verify that there are no collisions in the adapters being used.
  used = Set.new
  adapters.each do |adapter|
    raise Errors::NetworkAdapterCollision if used.include?(adapter[:adapter])
    used.add(adapter[:adapter])
  end
end