mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Support for integration plugins in plugin manager
* List action shows integration and provided plugins * List action shows integration when searching by inner plugin * Install action removed plugins provided by integration * Install action aborts if plugin is provided by an integration * Remove action aborts if plugin is provided by an integration Fixes #9802 Fixes #9811
This commit is contained in:
parent
f087fcb9ca
commit
859cbaaea9
6 changed files with 179 additions and 5 deletions
|
@ -20,6 +20,11 @@ class LogStash::PluginManager::Remove < LogStash::PluginManager::Command
|
|||
# them toward the OSS-only distribution of Logstash
|
||||
LogStash::PluginManager::XPackInterceptor::Remove.intercept!(plugin)
|
||||
|
||||
# if the plugin is provided by an integration plugin. abort.
|
||||
if integration_plugin = LogStash::PluginManager.which_integration_plugin_provides(plugin, gemfile)
|
||||
signal_error("This plugin is already provided by '#{integration_plugin.name}' so it can't be removed individually")
|
||||
end
|
||||
|
||||
# make sure this is an installed plugin and present in Gemfile.
|
||||
# it is not possible to uninstall a dependency not listed in the Gemfile, for example a dependent codec
|
||||
signal_error("This plugin has not been previously installed") unless LogStash::PluginManager.installed_plugin?(plugin, gemfile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue