# File lib/vagrant-libvirt/action/forward_ports.rb, line 13 def call(env) @env = env # Get the ports we're forwarding env[:forwarded_ports] = compile_forwarded_ports(env[:machine].config) # Warn if we're port forwarding to any privileged ports env[:forwarded_ports].each do |fp| next unless fp[:host] <= 1024 env[:ui].warn I18n.t( 'vagrant.actions.vm.forward_ports.privileged_ports' ) break end # Continue, we need the VM to be booted in order to grab its IP @app.call env if @env[:forwarded_ports].any? env[:ui].info I18n.t('vagrant.actions.vm.forward_ports.forwarding') forward_ports end end