Export now uses proper function and has progress bar (like import)
This commit is contained in:
parent
aa52d977a8
commit
f0fa8aa5df
|
@ -2,6 +2,8 @@ module Vagrant
|
||||||
module Actions
|
module Actions
|
||||||
module VM
|
module VM
|
||||||
class Export < Base
|
class Export < Base
|
||||||
|
include Util::ProgressMeter
|
||||||
|
|
||||||
attr_reader :temp_dir
|
attr_reader :temp_dir
|
||||||
|
|
||||||
def execute!
|
def execute!
|
||||||
|
@ -33,7 +35,11 @@ module Vagrant
|
||||||
|
|
||||||
def export
|
def export
|
||||||
logger.info "Exporting VM to #{ovf_path} ..."
|
logger.info "Exporting VM to #{ovf_path} ..."
|
||||||
@runner.vm.export(ovf_path, {}, true)
|
@runner.vm.export(ovf_path) do |progress|
|
||||||
|
update_progress(progress, 100)
|
||||||
|
end
|
||||||
|
|
||||||
|
complete_progress
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,7 +55,7 @@ class ExportActionTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "call export on the runner with the ovf path" do
|
should "call export on the runner with the ovf path" do
|
||||||
@vm.expects(:export).with(@ovf_path, {}, true).once
|
@vm.expects(:export).with(@ovf_path).once
|
||||||
@action.export
|
@action.export
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue