vagrant/plugins/providers/hyperv/action/net_set_vlan.rb

21 lines
482 B
Ruby

module VagrantPlugins
module HyperV
module Action
class NetSetVLan
def initialize(app, env)
@app = app
end
def call(env)
vlan_id = env[:machine].provider_config.vlan_id
if vlan_id
env[:ui].info("[Settings] [Network Adapter] Setting Vlan ID to: #{vlan_id}")
env[:machine].provider.driver.net_set_vlan(vlan_id)
end
@app.call(env)
end
end
end
end
end