class VagrantPlugins::CORL::Action::LinkNetwork
Public Instance Methods
call(env)
click to toggle source
Calls superclass method
VagrantPlugins::CORL::BaseAction#call
# File lib/core/vagrant/actions/link_network.rb 7 def call(env) 8 super do 9 env[:ui].info I18n.t("corl.vagrant.actions.link_network.start") 10 11 vm.communicate.tap do |comm| 12 # TODO: Figure out a better solution for remote network path. 13 # Needs to work before facter and corl are installed 14 # Local searches of remote configurations in the project perhaps? 15 network_path = ::CORL::Config.fact(:corl_network) 16 17 # Make sure the CORL network directory is properly set up 18 # Vagrant root (project) directory is shared by default 19 comm.sudo("rm -Rf #{network_path}") 20 comm.sudo("ln -s /vagrant #{network_path}") 21 end 22 @app.call env 23 end 24 end