diff --git a/cinderlib/__init__.py b/cinderlib/__init__.py index 7648dd9..fc1b1e9 100644 --- a/cinderlib/__init__.py +++ b/cinderlib/__init__.py @@ -36,6 +36,7 @@ setup = cinderlib.setup Backend = cinderlib.Backend +driver_options = cinderlib.Backend.driver_options get_connector_properties = objects.brick_connector.get_connector_properties list_supported_drivers = cinderlib.Backend.list_supported_drivers diff --git a/cinderlib/cinderlib.py b/cinderlib/cinderlib.py index 0009b45..e9c2b1b 100644 --- a/cinderlib/cinderlib.py +++ b/cinderlib/cinderlib.py @@ -101,6 +101,11 @@ def __init__(self, volume_backend_name, **driver_cfg): self._pool_names = tuple(pool['pool_name'] for pool in stats['pools']) + @staticmethod + def driver_options(volume_driver): + """Return the driver specific configuration options.""" + return importutils.import_class(volume_driver).get_driver_options() + @property def pool_names(self): return self._pool_names