mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Set plugin name
This commit is contained in:
parent
1217189616
commit
153d218d68
4 changed files with 21 additions and 3 deletions
|
|
@ -160,6 +160,12 @@ func (m *Machine) Guest() (g core.Guest, err error) {
|
|||
// TODO(spox): Fix this in the plugin manager
|
||||
m.seedPlugin(result)
|
||||
m.guest = result
|
||||
if named, ok := result.(core.Named); ok {
|
||||
named.SetPluginName(result_name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
g = result
|
||||
return result, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ module Vagrant
|
|||
#
|
||||
# @param [Symbol] cap_name Name of the capability
|
||||
def capability(cap_name, *args)
|
||||
@logger.debug("running name just 'cause:")
|
||||
@logger.debug("neam is: #{name}")
|
||||
@logger.debug("running remote guest capability #{cap_name} with args #{args}")
|
||||
if !client.has_capability?(cap_name)
|
||||
raise Errors::GuestCapabilityNotFound,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ module VagrantPlugins
|
|||
|
||||
# @return [String] plugin name
|
||||
def name
|
||||
c = client.name(Empty.new)
|
||||
c = client.plugin_name(Empty.new)
|
||||
c.name
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -83,6 +83,20 @@ module VagrantPlugins
|
|||
end
|
||||
end
|
||||
|
||||
def set_plugin_name(req, ctx)
|
||||
logger.debug("setting plugin name to nothing 'cause i don't care")
|
||||
Empty.new
|
||||
end
|
||||
|
||||
def plugin_name(req, ctx)
|
||||
with_info(ctx, broker: broker) do |info|
|
||||
logger.debug("returning plugin name #{info.plugin_name}")
|
||||
SDK::PluginInfo::Name.new(
|
||||
name: info.plugin_name
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def capability_arguments(args)
|
||||
target, direct = args
|
||||
nargs = direct.args.dup
|
||||
|
|
|
|||
Loading…
Reference in a new issue