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:
Jose Luis Duran 2019-03-28 02:25:43 -03:00
parent 3da2270366
commit 1cf0e62400
No known key found for this signature in database
GPG Key ID: 8BE8242E460537F4
6 changed files with 13 additions and 8 deletions

View File

@ -1,7 +1,7 @@
module VagrantPlugins
module GuestBSD
module Cap
class VirtualBox
class MountVirtualBoxSharedFolder
# BSD-based guests do not currently support VirtualBox synced folders.
# Instead of raising an error about a missing capability, this defines
# the capability and then provides a more detailed error message,

View File

@ -42,8 +42,8 @@ module VagrantPlugins
end
guest_capability(:bsd, :mount_virtualbox_shared_folder) do
require_relative "cap/virtualbox"
Cap::VirtualBox
require_relative "cap/mount_virtualbox_shared_folder"
Cap::MountVirtualBoxSharedFolder
end
guest_capability(:bsd, :remove_public_key) do

View File

@ -3,7 +3,7 @@ require_relative "../../../synced_folders/unix_mount_helpers"
module VagrantPlugins
module GuestFreeBSD
module Cap
class VirtualBox
class MountVirtualBoxSharedFolder
extend SyncedFolder::UnixMountHelpers
def self.mount_virtualbox_shared_folder(machine, name, guestpath, options)

View File

@ -52,8 +52,13 @@ module VagrantPlugins
end
guest_capability(:freebsd, :mount_virtualbox_shared_folder) do
require_relative "cap/virtualbox"
Cap::VirtualBox
require_relative "cap/mount_virtualbox_shared_folder"
Cap::MountVirtualBoxSharedFolder
end
guest_capability(:freebsd, :unmount_virtualbox_shared_folder) do
require_relative "cap/mount_virtualbox_shared_folder"
Cap::MountVirtualBoxSharedFolder
end
end
end

View File

@ -1,6 +1,6 @@
require_relative "../../../../base"
describe "VagrantPlugins::GuestBSD::Cap::VirtualBox" do
describe "VagrantPlugins::GuestBSD::Cap::MountVirtualBoxSharedFolder" do
let(:caps) do
VagrantPlugins::GuestBSD::Plugin
.components

View File

@ -1,6 +1,6 @@
require_relative "../../../../base"
describe "VagrantPlugins::GuestFreeBSD::Cap::VirtualBox" do
describe "VagrantPlugins::GuestFreeBSD::Cap::MountVirtualBoxSharedFolder" do
let(:caps) do
VagrantPlugins::GuestFreeBSD::Plugin
.components