providers/hyperv: update driver stuff
This commit is contained in:
parent
d1dc010073
commit
1ccedcd2cb
|
@ -9,11 +9,11 @@ module VagrantPlugins
|
|||
class Driver
|
||||
ERROR_REGEXP = /===Begin-Error===(.+?)===End-Error===/m
|
||||
OUTPUT_REGEXP = /===Begin-Output===(.+?)===End-Output===/m
|
||||
attr_reader :vm_id, :machine
|
||||
|
||||
def initialize(machine)
|
||||
@vm_id = machine.id
|
||||
@machine = machine
|
||||
attr_reader :vm_id
|
||||
|
||||
def initialize(id)
|
||||
@vm_id = id
|
||||
end
|
||||
|
||||
def execute(path, options)
|
||||
|
|
|
@ -31,12 +31,6 @@ module VagrantPlugins
|
|||
machine_id_changed
|
||||
end
|
||||
|
||||
# If the machine ID changed, then we need to rebuild our underlying
|
||||
# driver.
|
||||
def machine_id_changed
|
||||
@driver = Driver.new(@machine)
|
||||
end
|
||||
|
||||
def action(name)
|
||||
# Attempt to get the action method from the Action class if it
|
||||
# exists, otherwise return nil to show that we don't support the
|
||||
|
@ -46,6 +40,10 @@ module VagrantPlugins
|
|||
nil
|
||||
end
|
||||
|
||||
def machine_id_changed
|
||||
@driver = Driver.new(@machine.id)
|
||||
end
|
||||
|
||||
def state
|
||||
state_id = nil
|
||||
state_id = :not_created if !@machine.id
|
||||
|
|
Loading…
Reference in New Issue