Get rid of dependency on VBox provider for displaying some messages to the user

This commit is contained in:
Fabio Rehm 2013-04-12 22:31:18 -03:00
parent 3a458df621
commit ecc127321f
2 changed files with 18 additions and 14 deletions

View file

@ -26,8 +26,7 @@ module Vagrant
# b.use CheckDependencies # b.use CheckDependencies
b.use Vagrant::Action::Builtin::Call, Created do |env1, b2| b.use Vagrant::Action::Builtin::Call, Created do |env1, b2|
if !env1[:result] if !env1[:result]
# TODO: Implement our own MessageNotCreated b2.use Message, :not_created
b2.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated
next next
end end
@ -61,15 +60,13 @@ module Vagrant
b.use Vagrant::Action::Builtin::ConfigValidate b.use Vagrant::Action::Builtin::ConfigValidate
b.use Vagrant::Action::Builtin::Call, Created do |env1, b2| b.use Vagrant::Action::Builtin::Call, Created do |env1, b2|
if !env1[:result] if !env1[:result]
# TODO: Implement our own MessageNotCreated b2.use Message, :not_created
b2.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated
next next
end end
b2.use Vagrant::Action::Builtin::Call, IsRunning do |env2, b3| b2.use Vagrant::Action::Builtin::Call, IsRunning do |env2, b3|
if !env2[:result] if !env2[:result]
# TODO: Implement our own MessageNotRunning b3.use Message, :not_running
b3.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotRunning
next next
end end
@ -128,8 +125,7 @@ module Vagrant
end end
end end
else else
# TODO: Implement our own MessageNotCreated b2.use Message, :not_created
b2.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated
end end
end end
end end
@ -142,8 +138,7 @@ module Vagrant
# b.use CheckDependencies # b.use CheckDependencies
b.use Vagrant::Action::Builtin::Call, Created do |env1, b2| b.use Vagrant::Action::Builtin::Call, Created do |env1, b2|
if !env1[:result] if !env1[:result]
# TODO: Implement our own MessageNotCreated b2.use Message, :not_created
b2.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated
next next
end end
@ -155,8 +150,7 @@ module Vagrant
b3.use action_halt b3.use action_halt
b3.use Destroy b3.use Destroy
else else
# TODO: Implement our own MessageWillNotDestroy b3.use Message, :will_not_destroy
b3.use VagrantPlugins::ProviderVirtualBox::Action::MessageWillNotDestroy
end end
end end
end end
@ -169,8 +163,7 @@ module Vagrant
# b.use CheckDependencies # b.use CheckDependencies
b.use Vagrant::Action::Builtin::Call, Created do |env1, b2| b.use Vagrant::Action::Builtin::Call, Created do |env1, b2|
if !env1[:result] if !env1[:result]
# TODO: Implement our own MessageNotCreated b2.use Message, :not_created
b2.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated
next next
end end

View file

@ -1,4 +1,15 @@
en: en:
vagrant_lxc:
messages:
not_created: |-
The container hasn't been created yet.
not_running: |-
The container is not currently running.
will_not_destroy: |-
The container '%{name}' will not be destroyed, since the confirmation
was declined.
# TODO: Review messages below
vagrant: vagrant:
actions: actions:
lxc: lxc: