Query extensions supported by plugin

Bug #888790 reported by Brad Hall
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Medium
Brad Hall

Bug Description

We need the ability to query for any extensions that a given plugin supports so that we can make plugin interaction conditional on whether or not it supports the extension. This will be useful in making sure we don't try to do anything that older versions of a plugin doesn't support, etc.

Revision history for this message
Brad Hall (bgh) wrote :

The proposed way of doing this is to add another function to the plugin base class called "get_supported_extensions". A plugin will be able to override this method and return a list of extensions that it supports by name.

Changed in quantum:
assignee: nobody → Brad Hall (bgh)
importance: Undecided → Medium
milestone: none → essex-2
Revision history for this message
Brad Hall (bgh) wrote :

Additionally, we already have supported_extension_aliases as an attribute of the plugin .. maybe we can just expose plugin_supports() from the PluginAwareExtensionManager.

dan wendlandt (danwent)
Changed in quantum:
milestone: essex-2 → essex-3
Brad Hall (bgh)
Changed in quantum:
milestone: essex-3 → essex-4
Revision history for this message
dan wendlandt (danwent) wrote :

Brad, should this be untargeted from e-4, or are you planning on committing a fix for this in the next few days? Thanks.

dan wendlandt (danwent)
Changed in quantum:
milestone: essex-4 → none
Revision history for this message
Nataraj Subramanian (nataraj-subramanian) wrote :

Hi, I would like to fix this bug.

I think creating get_supported_aliases() in the plugin base class is a cleaner method. Besides, isn't _plugin_supports() in PluginAwareExtensionManager basically meant to check if the particular extension is supported by a plugin or not? Whereas, here we wish to get the list of all supported extensions by a plugin?

Revision history for this message
Nataraj Subramanian (nataraj-subramanian) wrote :

_plugin_supports() could then call get_supported_aliases() and check if the plugin supports it or not.

Revision history for this message
dan wendlandt (danwent) wrote :

I think that makes sense. Thanks for taking this on!

Revision history for this message
Sumit Naiksatam (snaiksat) wrote :

Just a quick note, doing a GET on the extensions URL already returns a list of the supported extensions for the configured plugin. One can then check if the required extension is in that list or not. We have been using this approach. I believe the proposal here is to provide an API to query whether a particular extension is supported and this will get implemented in the extensions framework?

Revision history for this message
dan wendlandt (danwent) wrote :

I agree with Sumit, this is already supported by doing a get on /v1.1/extensions, since the only extensions that are listed are those that the plugin claimed to support.

Changed in quantum:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.