Make unused iscsi_num_targets, iser_num_targets configs as deprecated
After introducing new iscsi target driver model via Change-Id: I43190d1dac33748fe55fa00f260f32ab209be656, configuration options of iscsi_num_targets and iser_num_targets are not used in these new scsi targets. This patch makes these unused configuration options as deprecated and adds warning messages to notify future removal of these configs to users. Also this patch removes _ensure_iscsi_targets() which uses these two config options from cxt scsi target because this method is never called anywhere. Closes-Bug: #1427904 DocImpact: Two unused config options are deprecated Change-Id: Ic34910f4765f46e2708de7cb686e49418f486709
This commit is contained in:
@@ -17,6 +17,7 @@ from oslo_log import log as logging
|
||||
|
||||
from cinder import exception
|
||||
from cinder.i18n import _, _LI, _LW, _LE
|
||||
from cinder.openstack.common import versionutils
|
||||
from cinder import utils
|
||||
from cinder.volume.targets import driver
|
||||
from cinder.volume import utils as vutils
|
||||
@@ -42,6 +43,13 @@ class ISCSITarget(driver.Target):
|
||||
self.protocol = 'iSCSI'
|
||||
self.volumes_dir = self.configuration.safe_get('volumes_dir')
|
||||
|
||||
# If any of the deprecated options are set, we'll warn the operator.
|
||||
msg = _LW("The option %s has been deprecated and no longer has "
|
||||
"any effect. It will be removed in the Liberty release.")
|
||||
for opt in ('iscsi_num_targets', 'iser_num_targets'):
|
||||
if self.configuration.safe_get(opt) is not None:
|
||||
versionutils.report_deprecated_feature(LOG, msg, opt)
|
||||
|
||||
def _get_iscsi_properties(self, volume, multipath=False):
|
||||
"""Gets iscsi configuration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user