HPMSA: Report SAN driver options

The iSCSI and FC HPE HPMSA drivers are only reporting their specific
configuration options on the "get_driver_options" method, but they
should also report the common SAN configuration options that they
require.

This patch adds these configuration options as indicated in the current
docs [1].

[1]: https://docs.openstack.org/cinder/latest/configuration/block-storage/drivers/hp-msa-driver.html

Change-Id: Iec1f4c715b49d8a6461a9d175b9c6cfccf9b8c82
This commit is contained in:
Gorka Eguileor 2021-01-14 13:40:00 +01:00
parent f19a92064a
commit 52997e56c7
3 changed files with 11 additions and 2 deletions

View File

@ -17,6 +17,7 @@
from oslo_config import cfg
from cinder.volume import configuration
from cinder.volume import driver
import cinder.volume.drivers.san.hp.hpmsa_client as hpmsa_client
import cinder.volume.drivers.stx.common as common
@ -83,3 +84,10 @@ class HPMSACommon(common.STXCommon):
self.config.san_password,
self.api_protocol,
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

View File

@ -45,7 +45,7 @@ class HPMSAFCDriver(fc.STXFCDriver):
@staticmethod
def get_driver_options():
return hpmsa_common.common_opts
return hpmsa_common.HPMSACommon.get_driver_options()
def _init_common(self):
return hpmsa_common.HPMSACommon(self.configuration)

View File

@ -47,7 +47,8 @@ class HPMSAISCSIDriver(iscsi.STXISCSIDriver):
@staticmethod
def get_driver_options():
return hpmsa_common.common_opts + hpmsa_common.iscsi_opts
return (hpmsa_common.HPMSACommon.get_driver_options() +
hpmsa_common.iscsi_opts)
def _init_common(self):
return hpmsa_common.HPMSACommon(self.configuration)