core (memory/encryption): added getNamespaces method to retrieve all plugins namespaces

This commit is contained in:
Goffi 2019-01-04 11:14:17 +01:00
commit 9ad238b884

View file

@ -104,6 +104,11 @@ class EncryptionHandler(object):
u"Can't find requested encryption plugin: {namespace}").format(
namespace=namespace))
@classmethod
def getNamespaces(cls):
"""Get available plugin namespaces"""
return {p.namespace for p in cls.getPlugins()}
@classmethod
def getNSFromName(cls, name):
"""Retrieve plugin namespace from its name