Merge "Add "supported_extensions" method to MechanismDriver"
This commit is contained in:
commit
821e559dbf
@ -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):
|
||||
|
||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user