Merge pull request #138 from mpalmer/nfs-default-impl

Use the MixinSyncedFolders to allow us to comprehend default shared folders implementations
This commit is contained in:
Dmitry Vasilets 2014-01-30 17:30:51 -08:00
commit b719d1832c

View File

@ -3,6 +3,8 @@ module VagrantPlugins
module ProviderLibvirt
module Action
class PrepareNFSSettings
include Vagrant::Action::Builtin::MixinSyncedFolders
def initialize(app,env)
@app = app
@logger = Log4r::Logger.new("vagrant::action::vm::nfs")
@ -27,7 +29,7 @@ module VagrantPlugins
# we are not using NFS we don't need to do the extra work to
# populate these fields in the environment.
def using_nfs?
@machine.config.vm.synced_folders.any? { |_, opts| opts[:type] == :nfs }
!!synced_folders(@machine)[:nfs]
end
# Returns the IP address of the first host only network adapter