Seagate/Lenovo drivers: Update get_driver_options
Lenovo driver: Return additional options from get_driver_options that the driver may use but were not previously being returned Seagate driver: Implement get_driver_options static method Change-Id: Ic66a055358c4afaf198acad48f0afd75d9304dca
This commit is contained in:
parent
983f62ed50
commit
b6559c1171
|
@ -17,6 +17,7 @@
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.volume import configuration
|
from cinder.volume import configuration
|
||||||
|
from cinder.volume import driver
|
||||||
import cinder.volume.drivers.lenovo.lenovo_client as lenovo_client
|
import cinder.volume.drivers.lenovo.lenovo_client as lenovo_client
|
||||||
import cinder.volume.drivers.stx.common as common
|
import cinder.volume.drivers.stx.common as common
|
||||||
|
|
||||||
|
@ -83,3 +84,10 @@ class LenovoCommon(common.STXCommon):
|
||||||
self.config.san_password,
|
self.config.san_password,
|
||||||
self.api_protocol,
|
self.api_protocol,
|
||||||
ssl_verify)
|
ssl_verify)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_driver_options():
|
||||||
|
additional_opts = driver.BaseVD._get_oslo_driver_opts(
|
||||||
|
'san_ip', 'san_login', 'san_password', 'driver_use_ssl',
|
||||||
|
'driver_ssl_cert_verify', 'driver_ssl_cert_path')
|
||||||
|
return common_opts + additional_opts
|
||||||
|
|
|
@ -46,7 +46,7 @@ class LenovoFCDriver(fc.STXFCDriver):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_driver_options():
|
def get_driver_options():
|
||||||
return lenovo_common.common_opts
|
return lenovo_common.LenovoCommon.get_driver_options()
|
||||||
|
|
||||||
def _init_common(self):
|
def _init_common(self):
|
||||||
return lenovo_common.LenovoCommon(self.configuration)
|
return lenovo_common.LenovoCommon(self.configuration)
|
||||||
|
|
|
@ -48,7 +48,8 @@ class LenovoISCSIDriver(iscsi.STXISCSIDriver):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_driver_options():
|
def get_driver_options():
|
||||||
return lenovo_common.common_opts + lenovo_common.iscsi_opts
|
return (lenovo_common.LenovoCommon.get_driver_options() +
|
||||||
|
lenovo_common.iscsi_opts)
|
||||||
|
|
||||||
def _init_common(self):
|
def _init_common(self):
|
||||||
return lenovo_common.LenovoCommon(self.configuration)
|
return lenovo_common.LenovoCommon(self.configuration)
|
||||||
|
|
|
@ -27,6 +27,7 @@ from cinder import exception
|
||||||
from cinder.i18n import _
|
from cinder.i18n import _
|
||||||
from cinder.objects import fields
|
from cinder.objects import fields
|
||||||
from cinder.volume import configuration
|
from cinder.volume import configuration
|
||||||
|
from cinder.volume import driver
|
||||||
import cinder.volume.drivers.stx.client as client
|
import cinder.volume.drivers.stx.client as client
|
||||||
import cinder.volume.drivers.stx.exception as stx_exception
|
import cinder.volume.drivers.stx.exception as stx_exception
|
||||||
from cinder.volume import volume_utils
|
from cinder.volume import volume_utils
|
||||||
|
@ -618,3 +619,10 @@ class STXCommon(object):
|
||||||
return self._get_manageable_vols(cinder_snapshots, 'snapshot',
|
return self._get_manageable_vols(cinder_snapshots, 'snapshot',
|
||||||
marker, limit,
|
marker, limit,
|
||||||
offset, sort_keys, sort_dirs)
|
offset, sort_keys, sort_dirs)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_driver_options():
|
||||||
|
additional_opts = driver.BaseVD._get_oslo_driver_opts(
|
||||||
|
'san_ip', 'san_login', 'san_password', 'driver_use_ssl',
|
||||||
|
'driver_ssl_cert_verify', 'driver_ssl_cert_path')
|
||||||
|
return common_opts + additional_opts
|
||||||
|
|
|
@ -204,3 +204,7 @@ class STXFCDriver(cinder.volume.driver.FibreChannelDriver):
|
||||||
return self.common.get_manageable_snapshots(cinder_snapshots,
|
return self.common.get_manageable_snapshots(cinder_snapshots,
|
||||||
marker, limit, offset,
|
marker, limit, offset,
|
||||||
sort_keys, sort_dirs)
|
sort_keys, sort_dirs)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_driver_options():
|
||||||
|
return common.STXCommon.get_driver_options()
|
||||||
|
|
|
@ -230,3 +230,7 @@ class STXISCSIDriver(cinder.volume.driver.ISCSIDriver):
|
||||||
return self.common.get_manageable_snapshots(cinder_snapshots,
|
return self.common.get_manageable_snapshots(cinder_snapshots,
|
||||||
marker, limit, offset,
|
marker, limit, offset,
|
||||||
sort_keys, sort_dirs)
|
sort_keys, sort_dirs)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_driver_options():
|
||||||
|
return (common.STXCommon.get_driver_options() + common.iscsi_opts)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Seagate driver: Added support for ``get_driver_options`` api call
|
||||||
|
- |
|
||||||
|
Lenovo driver: Return additional configuration options from ``get_driver_options`` call
|
Loading…
Reference in New Issue