Class: VagrantPlugins::ProviderKvm::Action::MatchMACAddress
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderKvm::Action::MatchMACAddress
- Defined in:
- lib/vagrant-kvm/action/match_mac_address.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ MatchMACAddress
constructor
A new instance of MatchMACAddress.
Constructor Details
#initialize(app, env) ⇒ MatchMACAddress
Returns a new instance of MatchMACAddress.
5 6 7 |
# File 'lib/vagrant-kvm/action/match_mac_address.rb', line 5 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/vagrant-kvm/action/match_mac_address.rb', line 9 def call(env) raise Vagrant::Errors::VMBaseMacNotSpecified if !env[:machine].config.vm.base_mac # Create the proc which we want to use to modify the virtual machine env[:ui].info I18n.t("vagrant.actions.vm.match_mac.matching") env[:machine].provider.driver.set_mac_address(env[:machine].config.vm.base_mac) @app.call(env) end |