Get rid of broken env.ui calls in actions
This commit is contained in:
parent
697fb7eaaf
commit
448e9429ac
|
@ -9,9 +9,9 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
if env["vm"].created? && env["vm"].vm.saved?
|
if env[:vm].created? && env[:vm].vm.saved?
|
||||||
env.ui.info I18n.t("vagrant.actions.vm.discard_state.discarding")
|
env[:ui].info I18n.t("vagrant.actions.vm.discard_state.discarding")
|
||||||
env["vm"].vm.discard_state
|
env[:vm].vm.discard_state
|
||||||
end
|
end
|
||||||
|
|
||||||
@app.call(env)
|
@app.call(env)
|
||||||
|
|
|
@ -65,9 +65,9 @@ module Vagrant
|
||||||
# Enables and assigns the host only network to the proper
|
# Enables and assigns the host only network to the proper
|
||||||
# adapter on the VM, and saves the adapter.
|
# adapter on the VM, and saves the adapter.
|
||||||
def assign_network
|
def assign_network
|
||||||
@env.ui.info I18n.t("vagrant.actions.vm.network.preparing")
|
@env[:ui].info I18n.t("vagrant.actions.vm.network.preparing")
|
||||||
|
|
||||||
@env.env.config.vm.network_options.compact.each do |network_options|
|
@env.[:vm].config.vm.network_options.compact.each do |network_options|
|
||||||
adapter = @env["vm"].vm.network_adapters[network_options[:adapter]]
|
adapter = @env["vm"].vm.network_adapters[network_options[:adapter]]
|
||||||
adapter.enabled = true
|
adapter.enabled = true
|
||||||
adapter.attachment_type = :host_only
|
adapter.attachment_type = :host_only
|
||||||
|
@ -98,7 +98,7 @@ module Vagrant
|
||||||
raise Errors::NetworkNotFound, :name => net_options[:name] if net_options[:name]
|
raise Errors::NetworkNotFound, :name => net_options[:name] if net_options[:name]
|
||||||
|
|
||||||
# One doesn't exist, create it.
|
# One doesn't exist, create it.
|
||||||
@env.ui.info I18n.t("vagrant.actions.vm.network.creating")
|
@env[:ui].info I18n.t("vagrant.actions.vm.network.creating")
|
||||||
|
|
||||||
ni = interfaces.create
|
ni = interfaces.create
|
||||||
ni.enable_static(network_ip(net_options[:ip], net_options[:netmask]),
|
ni.enable_static(network_ip(net_options[:ip], net_options[:netmask]),
|
||||||
|
|
|
@ -111,7 +111,7 @@ module Vagrant
|
||||||
|
|
||||||
# Uses the system class to mount the NFS folders.
|
# Uses the system class to mount the NFS folders.
|
||||||
def mount_folders
|
def mount_folders
|
||||||
@env.ui.info I18n.t("vagrant.actions.vm.nfs.mounting")
|
@env[:ui].info I18n.t("vagrant.actions.vm.nfs.mounting")
|
||||||
|
|
||||||
# Only mount the folders which have a guest path specified
|
# Only mount the folders which have a guest path specified
|
||||||
am_folders = folders.select { |name, folder| folder[:guestpath] }
|
am_folders = folders.select { |name, folder| folder[:guestpath] }
|
||||||
|
|
|
@ -18,7 +18,7 @@ module Vagrant
|
||||||
|
|
||||||
# Take prepared provisioners and run the provisioning
|
# Take prepared provisioners and run the provisioning
|
||||||
provisioners.each do |instance|
|
provisioners.each do |instance|
|
||||||
@env.ui.info I18n.t("vagrant.actions.vm.provision.beginning", :provisioner => instance.class)
|
@env[:ui].info I18n.t("vagrant.actions.vm.provision.beginning", :provisioner => instance.class)
|
||||||
instance.provision!
|
instance.provision!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue