Register builtin plugins against all available components
This commit is contained in:
parent
ab59e254ac
commit
d004125712
@ -35,6 +35,9 @@ type Plugin struct {
|
||||
Guest bool
|
||||
Host bool
|
||||
SyncedFolder bool
|
||||
Config bool
|
||||
LogViewer bool
|
||||
LogPlatform bool
|
||||
}
|
||||
|
||||
// Checksum is the SHA256 checksum to validate this plugin.
|
||||
@ -138,6 +141,9 @@ func (p *Plugin) pluginMap() map[interface{}]*bool {
|
||||
component.ProviderType: &p.Type.Provider,
|
||||
component.ProvisionerType: &p.Type.Provisioner,
|
||||
component.SyncedFolderType: &p.Type.SyncedFolder,
|
||||
component.ConfigType: &p.Type.Config,
|
||||
component.LogPlatformType: &p.Type.LogPlatform,
|
||||
component.LogViewerType: &p.Type.LogViewer,
|
||||
ruby_vagrant.Plugin_COMMAND: &p.Type.Command,
|
||||
ruby_vagrant.Plugin_COMMUNICATOR: &p.Type.Communicator,
|
||||
ruby_vagrant.Plugin_GUEST: &p.Type.Guest,
|
||||
|
||||
@ -31,15 +31,21 @@ func (r *Runner) LoadPlugins(cfg *configpkg.Config) error {
|
||||
cfg.TrackRubyPlugin(p.Name, []interface{}{p.Type})
|
||||
}
|
||||
|
||||
components := []interface{}{}
|
||||
for typ, _ := range plugin.BaseFactories {
|
||||
components = append(components, typ)
|
||||
}
|
||||
// Now lets load builtin plugins
|
||||
for name, options := range plugin.Builtins {
|
||||
r.logger.Info("loading builtin plugin " + name)
|
||||
|
||||
if plugin.IN_PROCESS_PLUGINS {
|
||||
if err := r.builtinPlugins.Add(name, options...); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
cfg.TrackBuiltinPlugin(name, []interface{}{component.CommandType})
|
||||
cfg.TrackBuiltinPlugin(name, components)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user