Merge "Add "supported_extensions" method to MechanismDriver"

This commit is contained in:
Zuul 2020-08-05 22:28:20 +00:00 committed by Gerrit Code Review
commit 821e559dbf
2 changed files with 22 additions and 0 deletions

View File

@ -455,6 +455,21 @@ class MechanismDriver(object, metaclass=abc.ABCMeta):
"""
return []
def supported_extensions(self, extensions):
"""Return the mechanism driver supported extensions
By default this method will return the same provided set, without any
filtering. In case any particular mechanism driver needs to filter out
any specific extension or supports only a reduced set of extensions,
this method should be override.
:param extensions: set of extensions supported by the instance that
created this mechanism driver.
:returns: a set of the extensions currently supported by this
mechanism driver
"""
return extensions
class _TypeDriverBase(object, metaclass=abc.ABCMeta):

View File

@ -0,0 +1,7 @@
---
features:
- |
Add ``supported_extensions`` method to ``MechanismDriver``. This method
provides an standard API to implement, per mechanism driver, a way to
filter the supported extensions. By default, this method will return the
same set of extensions passed.