Add unsupported status to driver listing
Appending "unsupported" to the driver name in the driver listing for unsupported drivers. The instance variable "_supported" in BaseVD is changed to class variable "SUPPORTED" so that the supported status of drivers can be read after loading the driver modules. Change-Id: I21ca9137a847873f2ec026520daf8b97603d1888
This commit is contained in:
parent
d1a56e435a
commit
2a247e89e5
@ -68,6 +68,7 @@ class DriverInfo(object):
|
||||
self.class_name)
|
||||
self.version = getattr(cls, 'VERSION', None)
|
||||
self.ci_wiki_name = getattr(cls, 'CI_WIKI_NAME', None)
|
||||
self.supported = getattr(cls, 'SUPPORTED', True)
|
||||
|
||||
def __str__(self):
|
||||
return self.class_name
|
||||
|
@ -329,6 +329,12 @@ class BaseVD(object):
|
||||
# method since the manager will do the check after that.
|
||||
SUPPORTS_ACTIVE_ACTIVE = False
|
||||
|
||||
# If a driver hasn't maintained their CI system, this will get
|
||||
# set to False, which prevents the driver from starting.
|
||||
# Add enable_unsupported_driver = True in cinder.conf to get
|
||||
# the unsupported driver started.
|
||||
SUPPORTED = True
|
||||
|
||||
def __init__(self, execute=utils.execute, *args, **kwargs):
|
||||
# NOTE(vish): db is set by Manager
|
||||
self.db = kwargs.get('db')
|
||||
@ -364,12 +370,6 @@ class BaseVD(object):
|
||||
# set True by manager after successful check_for_setup
|
||||
self._initialized = False
|
||||
|
||||
# If a driver hasn't maintained their CI system, this will get
|
||||
# set to False, which prevents the driver from starting.
|
||||
# Add enable_unsupported_driver = True inn cinder.conf to get
|
||||
# the unsupported driver started.
|
||||
self._supported = True
|
||||
|
||||
def _driver_data_namespace(self):
|
||||
namespace = self.__class__.__name__
|
||||
if self.configuration:
|
||||
@ -496,7 +496,7 @@ class BaseVD(object):
|
||||
|
||||
@property
|
||||
def supported(self):
|
||||
return self._supported
|
||||
return self.SUPPORTED
|
||||
|
||||
def set_throttle(self):
|
||||
bps_limit = ((self.configuration and
|
||||
|
@ -70,6 +70,10 @@ class ScalityDriver(remotefs_drv.RemoteFSSnapDriver):
|
||||
# ThirdPartySystems wiki page
|
||||
CI_WIKI_NAME = "Scality_CI"
|
||||
|
||||
# TODO(smcginnis) Either remove this if CI requirements are met, or
|
||||
# remove this driver in the Ocata release per normal deprecation
|
||||
SUPPORTED = False
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ScalityDriver, self).__init__(*args, **kwargs)
|
||||
self.configuration.append_config_values(volume_opts)
|
||||
@ -85,10 +89,6 @@ class ScalityDriver(remotefs_drv.RemoteFSSnapDriver):
|
||||
# as a config switch to customers.
|
||||
self.configuration.scality_sofs_sparsed_volumes = True
|
||||
|
||||
# TODO(smcginnis) Either remove this if CI requirements are met, or
|
||||
# remove this driver in the Ocata release per normal deprecation
|
||||
self._supported = False
|
||||
|
||||
def check_for_setup_error(self):
|
||||
"""Sanity checks before attempting to mount SOFS."""
|
||||
|
||||
|
@ -41,16 +41,16 @@ class FCZoneDriver(
|
||||
fc_common.FCCommon, fczm_driver.FibreChannelZoneManagerDriver):
|
||||
"""Interface to manage Connection control during attach/detach."""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(FCZoneDriver, self).__init__(**kwargs)
|
||||
LOG.debug("Initializing FCZoneDriver")
|
||||
|
||||
# If a driver hasn't maintained their CI system, this will get set
|
||||
# to False, which prevents the driver from starting.
|
||||
# Add enable_unsupported_driver = True in cinder.conf to get the
|
||||
# unsupported driver started.
|
||||
self._supported = True
|
||||
SUPPORTED = True
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(FCZoneDriver, self).__init__(**kwargs)
|
||||
LOG.debug("Initializing FCZoneDriver")
|
||||
|
||||
@property
|
||||
def supported(self):
|
||||
return self._supported
|
||||
return self.SUPPORTED
|
||||
|
@ -68,8 +68,11 @@ def format_description(desc, output):
|
||||
|
||||
def print_drivers(drivers, config_name, output):
|
||||
for driver in sorted(drivers, key=lambda x: x.class_fqn):
|
||||
output.write(driver.class_name)
|
||||
output.write('-' * len(driver.class_name))
|
||||
driver_name = driver.class_name
|
||||
if not driver.supported:
|
||||
driver_name += " (unsupported)"
|
||||
output.write(driver_name)
|
||||
output.write('-' * len(driver_name))
|
||||
if driver.version:
|
||||
output.write('* Version: %s' % driver.version)
|
||||
output.write('* %s=%s' % (config_name, driver.class_fqn))
|
||||
|
Loading…
x
Reference in New Issue
Block a user