Add initial disk builtin action

This commit is contained in:
Brian Cain 2019-10-23 15:31:51 -07:00
parent a55e3d2b91
commit cef1bd47b3
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
3 changed files with 17 additions and 0 deletions

View File

@ -15,6 +15,7 @@ module Vagrant
autoload :Confirm, "vagrant/action/builtin/confirm"
autoload :ConfigValidate, "vagrant/action/builtin/config_validate"
autoload :DestroyConfirm, "vagrant/action/builtin/destroy_confirm"
autoload :Disk, "vagrant/action/builtin/disk"
autoload :EnvSet, "vagrant/action/builtin/env_set"
autoload :GracefulHalt, "vagrant/action/builtin/graceful_halt"
autoload :HandleBox, "vagrant/action/builtin/handle_box"

View File

@ -9,10 +9,25 @@ module Vagrant
def call(env)
machine = env[:machine]
defined_disks = get_disks(machine, env)
# Check that provider plugin is installed for disk
# If not, log warning or error to user that disks won't be managed
# Continue On
@app.call(env)
end
def get_disks(machine, env)
return @_disks if @_disks
@_disks = []
@_disks = machine.config.vm.disks.map do |disk|
# initialize the disk provider??
end
@_disks
end
end
end
end

View File

@ -79,6 +79,7 @@ module VagrantPlugins
b.use ForwardPorts
b.use SetHostname
b.use SaneDefaults
b.use Disk
b.use Customize, "pre-boot"
b.use Boot
b.use Customize, "post-boot"