Method: VagrantPlugins::ProviderLocal::Provider#state
- Defined in:
- lib/vagrant-local/provider.rb
permalink #state ⇒ Object
[View source]
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/vagrant-local/provider.rb', line 66 def state state_id = nil state_id = :not_created unless @machine.id state_id = driver.state if @machine.id && !state_id # This is a special pseudo-state so that we don't set the # NOT_CREATED_ID while we're setting up the machine. This avoids # clearing the data dir. state_id = :preparing if @machine.id == 'preparing' # Get the short and long description short = state_id.to_s.tr('_', ' ') # If we're not created, then specify the special ID flag state_id = Vagrant::MachineState::NOT_CREATED_ID if state_id == :not_created # Return the MachineState object Vagrant::MachineState.new(state_id, short, short) end |