class Vagrant::Plugin::V1::Host
Base class for a host in Vagrant
. A host class contains functionality that is specific to a specific OS that is running Vagrant
. This abstraction is done because there is some host-specific logic that Vagrant
must do in some cases.
Public Class Methods
This returns true/false depending on if the current running system matches the host class.
@return [Boolean]
# File lib/vagrant/plugin/v1/host.rb, line 13 def self.match? nil end
The precedence of the host when checking for matches. This is to allow certain host such as generic OS’s (“Linux”, “BSD”, etc.) to be specified last.
The hosts with the higher numbers will be checked first.
If you’re implementing a basic host, you can probably ignore this.
# File lib/vagrant/plugin/v1/host.rb, line 24 def self.precedence 5 end
Public Instance Methods
Returns true of false denoting whether or not this host supports NFS shared folder setup. This method ideally should verify that NFS is installed.
@return [Boolean]
# File lib/vagrant/plugin/v1/host.rb, line 43 def nfs? false end
Exports the given hash of folders via NFS.
@param [String] id A unique ID that is guaranteed to be unique to
match these sets of folders.
@param [String] ip IP of the guest machine. @param [Hash] folders Shared folders to sync.
# File lib/vagrant/plugin/v1/host.rb, line 53 def nfs_export(id, ip, folders) end
Prunes any NFS exports made by Vagrant
which aren’t in the set of valid ids given.
@param [Array<String>] valid_ids Valid IDs that should not be
pruned.
# File lib/vagrant/plugin/v1/host.rb, line 61 def nfs_prune(valid_ids) end