Module: Vagrant::MachineIndex::Entry::Remote::ClassMethods

Defined in:
lib/vagrant/machine_index/remote.rb

Instance Method Summary collapse

Instance Method Details

#load(machine) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/vagrant/machine_index/remote.rb', line 9

def load(machine)
  raw = Vagrant::Util::HashWithIndifferentAccess.new({
    name: machine.name,
    local_data_path: machine.project.local_data,
    provider: machine.provider_name,
    full_state: machine.machine_state,
    state: machine.machine_state.id,
    vagrantfile_name: machine.project.vagrantfile_name,
    vagrantfile_path: machine.project.vagrantfile_path,
    machine: machine
  })
  self.new(machine.id, raw)
end