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 15 def self.installed? client.installed? end
new(machine, **opts)
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 19 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 11 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 30 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 39 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 48 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 65 def initialize_capabilities!(*args, **opts) # no-op end
machine_id_changed()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 53 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 57 def ssh_info client.ssh_info(@machine.to_proto) end
state()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 61 def state client.state(@machine.to_proto) end
to_proto()
click to toggle source
# File lib/vagrant/plugin/remote/provider.rb, line 69 def to_proto client.proto end