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

20 lines
441 B
Ruby
Raw Normal View History

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
env[:ui].info("[Settings] [Network Adapter] Setting Vlan ID to: #{vlan_id}")
env[:machine].provider.driver.net_set_vlan(vlan_id)
@app.call(env)
end
end
end
end
end