vagrant status uses new MachineState results
This commit is contained in:
parent
f24dba0dc5
commit
8c4a7350fe
|
@ -15,15 +15,15 @@ module VagrantPlugins
|
||||||
state = nil
|
state = nil
|
||||||
results = []
|
results = []
|
||||||
with_target_vms(argv) do |machine|
|
with_target_vms(argv) do |machine|
|
||||||
state = machine.state.to_s if !state
|
state = machine.state if !state
|
||||||
results << "#{machine.name.to_s.ljust(25)}#{machine.state.to_s.gsub("_", " ")}"
|
results << "#{machine.name.to_s.ljust(25)}#{machine.state.short_description}"
|
||||||
end
|
end
|
||||||
|
|
||||||
state = results.length == 1 ? state : "listing"
|
state = results.length == 1 ? state : "listing"
|
||||||
|
|
||||||
@env.ui.info(I18n.t("vagrant.commands.status.output",
|
@env.ui.info(I18n.t("vagrant.commands.status.output",
|
||||||
:states => results.join("\n"),
|
:states => results.join("\n"),
|
||||||
:message => I18n.t("vagrant.commands.status.#{state}")),
|
:message => state.long_description),
|
||||||
:prefix => false)
|
:prefix => false)
|
||||||
|
|
||||||
# Success, exit status 0
|
# Success, exit status 0
|
||||||
|
|
|
@ -71,8 +71,8 @@ module VagrantPlugins
|
||||||
state_id = :unknown if !state_id
|
state_id = :unknown if !state_id
|
||||||
|
|
||||||
# Translate into short/long descriptions
|
# Translate into short/long descriptions
|
||||||
short = state_id.to_s
|
short = state_id.to_s.gsub("_", " ")
|
||||||
long = I18n.t("vagrant.commands.state.#{state_id}")
|
long = I18n.t("vagrant.commands.status.#{state_id}")
|
||||||
|
|
||||||
# Return the state
|
# Return the state
|
||||||
Vagrant::MachineState.new(state_id, short, long)
|
Vagrant::MachineState.new(state_id, short, long)
|
||||||
|
|
Loading…
Reference in New Issue