Add capability methods for remote server
This commit is contained in:
parent
168c307aef
commit
b58b77ef0b
@ -371,7 +371,8 @@ module Vagrant
|
||||
end
|
||||
|
||||
def synced_folders
|
||||
self.class.synced_folders(self)
|
||||
# self.class.synced_folders(self)
|
||||
client.synced_folders
|
||||
end
|
||||
|
||||
def to_proto
|
||||
|
||||
@ -14,6 +14,7 @@ module Vagrant
|
||||
end
|
||||
|
||||
def _initialize(machine, synced_folder_type)
|
||||
@client = nil#TODO!
|
||||
self
|
||||
end
|
||||
|
||||
@ -54,6 +55,29 @@ module Vagrant
|
||||
def cleanup(machine, opts)
|
||||
client.cleanup(machine.to_proto, opts)
|
||||
end
|
||||
|
||||
# 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
|
||||
def capability(cap_name, *args)
|
||||
@logger.debug("running remote host capability #{cap_name} with args #{args}")
|
||||
client.capability(cap_name, *args)
|
||||
end
|
||||
|
||||
# Tests whether the given capability is possible.
|
||||
#
|
||||
# @param [Symbol] cap_name Capability name
|
||||
# @return [Boolean]
|
||||
def capability?(cap_name)
|
||||
@logger.debug("checking for remote host capability #{cap_name}")
|
||||
client.has_capability?(cap_name)
|
||||
end
|
||||
|
||||
def to_proto
|
||||
client.proto
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user