BSD: VirtualBox shared folders naming convention
This is a follow-up of #10717 to use the same naming convention as on Linux guests, in order to reduce the diffs. Also adds the missing capability to `unmount_virtualbox_shared_folder` on FreeBSD guests.
This commit is contained in:
parent
3da2270366
commit
1cf0e62400
|
@ -1,7 +1,7 @@
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module GuestBSD
|
module GuestBSD
|
||||||
module Cap
|
module Cap
|
||||||
class VirtualBox
|
class MountVirtualBoxSharedFolder
|
||||||
# BSD-based guests do not currently support VirtualBox synced folders.
|
# BSD-based guests do not currently support VirtualBox synced folders.
|
||||||
# Instead of raising an error about a missing capability, this defines
|
# Instead of raising an error about a missing capability, this defines
|
||||||
# the capability and then provides a more detailed error message,
|
# the capability and then provides a more detailed error message,
|
|
@ -42,8 +42,8 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
guest_capability(:bsd, :mount_virtualbox_shared_folder) do
|
guest_capability(:bsd, :mount_virtualbox_shared_folder) do
|
||||||
require_relative "cap/virtualbox"
|
require_relative "cap/mount_virtualbox_shared_folder"
|
||||||
Cap::VirtualBox
|
Cap::MountVirtualBoxSharedFolder
|
||||||
end
|
end
|
||||||
|
|
||||||
guest_capability(:bsd, :remove_public_key) do
|
guest_capability(:bsd, :remove_public_key) do
|
||||||
|
|
|
@ -3,7 +3,7 @@ require_relative "../../../synced_folders/unix_mount_helpers"
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module GuestFreeBSD
|
module GuestFreeBSD
|
||||||
module Cap
|
module Cap
|
||||||
class VirtualBox
|
class MountVirtualBoxSharedFolder
|
||||||
extend SyncedFolder::UnixMountHelpers
|
extend SyncedFolder::UnixMountHelpers
|
||||||
|
|
||||||
def self.mount_virtualbox_shared_folder(machine, name, guestpath, options)
|
def self.mount_virtualbox_shared_folder(machine, name, guestpath, options)
|
|
@ -52,8 +52,13 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
guest_capability(:freebsd, :mount_virtualbox_shared_folder) do
|
guest_capability(:freebsd, :mount_virtualbox_shared_folder) do
|
||||||
require_relative "cap/virtualbox"
|
require_relative "cap/mount_virtualbox_shared_folder"
|
||||||
Cap::VirtualBox
|
Cap::MountVirtualBoxSharedFolder
|
||||||
|
end
|
||||||
|
|
||||||
|
guest_capability(:freebsd, :unmount_virtualbox_shared_folder) do
|
||||||
|
require_relative "cap/mount_virtualbox_shared_folder"
|
||||||
|
Cap::MountVirtualBoxSharedFolder
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require_relative "../../../../base"
|
require_relative "../../../../base"
|
||||||
|
|
||||||
describe "VagrantPlugins::GuestBSD::Cap::VirtualBox" do
|
describe "VagrantPlugins::GuestBSD::Cap::MountVirtualBoxSharedFolder" do
|
||||||
let(:caps) do
|
let(:caps) do
|
||||||
VagrantPlugins::GuestBSD::Plugin
|
VagrantPlugins::GuestBSD::Plugin
|
||||||
.components
|
.components
|
|
@ -1,6 +1,6 @@
|
||||||
require_relative "../../../../base"
|
require_relative "../../../../base"
|
||||||
|
|
||||||
describe "VagrantPlugins::GuestFreeBSD::Cap::VirtualBox" do
|
describe "VagrantPlugins::GuestFreeBSD::Cap::MountVirtualBoxSharedFolder" do
|
||||||
let(:caps) do
|
let(:caps) do
|
||||||
VagrantPlugins::GuestFreeBSD::Plugin
|
VagrantPlugins::GuestFreeBSD::Plugin
|
||||||
.components
|
.components
|
Loading…
Reference in New Issue