class Vagrant::Plugin::Remote::Provider
Attributes
client[R]
client[RW]
Public Class Methods
installed?()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 18 def self.installed? client.installed? end
new(machine, **opts)
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 22 def initialize(machine, **opts) @logger = Log4r::Logger.new("vagrant::remote::provider") @logger.debug("initializing provider with remote backend") @machine = machine if opts[:client].nil? raise ArgumentError, "Remote client is required for `#{self.class.name}`" end @client = opts.delete(:client) end
usable?(raise_error=false)
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 14 def self.usable?(raise_error=false) client.usable? end
Public Instance Methods
action(name)
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 33 def action(name) client.action(@machine.to_proto, name) end
capability(cap_name, *args)
click to toggle source
Executes the capability with the given name, optionally passing more arguments onwards to the capability. If the capability returns a value, it will be returned.
@param [Symbol] cap_name Name of the capability
# File lib/vagrant/plugin/remote/provider.rb, line 42 def capability(cap_name, *args) @logger.debug("running remote provider capability #{cap_name} with args #{args}") client.capability(cap_name, @machine, *args) end
capability?(cap_name)
click to toggle source
Tests whether the given capability is possible.
@param [Symbol] cap_name Capability name @return [Boolean]
# File lib/vagrant/plugin/remote/provider.rb, line 51 def capability?(cap_name) @logger.debug("checking for remote provider capability #{cap_name}") client.has_capability?(cap_name) end
initialize_capabilities!(*args, **opts)
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 68 def initialize_capabilities!(*args, **opts) # no-op end
machine_id_changed()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 56 def machine_id_changed client.machine_id_changed(@machine.to_proto) end
ssh_info()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 60 def ssh_info client.ssh_info(@machine.to_proto) end
state()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 64 def state client.state(@machine.to_proto) end
to_proto()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 72 def to_proto client.proto end