This starts the transition of replacing VM with Machine. Machine still isn't ready to fully replace VM but by moving it now, I'm able to find the spots that need to be fixed. At this point `vagrant status` works with the new provider interface.
20 lines
487 B
Ruby
20 lines
487 B
Ruby
module VagrantPlugins
|
|
module ProviderVirtualBox
|
|
class Provider < Vagrant.plugin("1", :provider)
|
|
def initialize(machine)
|
|
@machine = machine
|
|
@driver = Driver::Meta.new(@machine.id)
|
|
end
|
|
|
|
# Return the state of VirtualBox virtual machine by actually
|
|
# querying VBoxManage.
|
|
def state
|
|
return :not_created if !@driver.uuid
|
|
state = @driver.read_state
|
|
return :unknown if !state
|
|
state
|
|
end
|
|
end
|
|
end
|
|
end
|