Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use require for HandleBox, SyncedFolders, WaitForCommunicator #1485

Merged
merged 2 commits into from May 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/vagrant-libvirt/action.rb
Expand Up @@ -48,15 +48,12 @@ module Action
autoload :TimedProvision, action_root.join('timed_provision')
autoload :WaitTillUp, action_root.join('wait_till_up')

autoload :HandleBox, 'vagrant/action/builtin/handle_box'
autoload :Package, 'vagrant/action/general/package'
autoload :PackageSetupFiles, 'vagrant/action/general/package_setup_files'
autoload :PackageSetupFolders, 'vagrant/action/general/package_setup_folders'
autoload :ProvisionerCleanup, 'vagrant/action/builtin/provisioner_cleanup'
autoload :SSHRun, 'vagrant/action/builtin/ssh_run'
autoload :SyncedFolderCleanup, 'vagrant/action/builtin/synced_folder_cleanup'
autoload :SyncedFolders, 'vagrant/action/builtin/synced_folders'
autoload :WaitForCommunicator, 'vagrant/action/builtin/wait_for_communicator'

# Include the built-in & general modules so we can use them as top-level things.
include Vagrant::Action::Builtin
Expand Down Expand Up @@ -93,6 +90,7 @@ def self.action_up
b2.use SetupComplete
else
b2.use HandleStoragePool
require 'vagrant/action/builtin/handle_box'
b2.use HandleBox
b2.use HandleBoxImage
b2.use CreateDomainVolume
Expand Down Expand Up @@ -144,6 +142,7 @@ def self.action_up
# VM is not running or suspended.
b3.use PrepareNFSValidIds
b3.use SyncedFolderCleanup
require 'vagrant/action/builtin/synced_folders'
b3.use SyncedFolders
b3.use PrepareNFSSettings
b3.use ShareFolders
Expand All @@ -156,6 +155,7 @@ def self.action_up
# Machine should gain IP address when comming up,
# so wait for dhcp lease and store IP into machines data_dir.
b3.use WaitTillUp
require 'vagrant/action/builtin/wait_for_communicator'
b3.use WaitForCommunicator, [:running]

b3.use ForwardPorts
Expand Down Expand Up @@ -354,6 +354,7 @@ def self.action_resume
b3.use CreateNetworks
b3.use ResumeDomain
b3.use Provision
require 'vagrant/action/builtin/wait_for_communicator'
b3.use WaitForCommunicator, [:running]
end
end
Expand Down