Remove deprecated ISERTgtAdm
ISERTgtAdm was deprecated in the Kilo release. It should now be removed. Change-Id: I143b7b2fe9f5eb254d9e6b7ce35824d1ba97d457
This commit is contained in:
parent
bec0dd843b
commit
0bc4bb4fbc
@ -14,36 +14,10 @@ import mock
|
||||
|
||||
from cinder.tests.unit.targets import targets_fixture as tf
|
||||
from cinder import utils
|
||||
from cinder.volume.targets import iser
|
||||
from cinder.volume.targets import lio
|
||||
from cinder.volume.targets import tgt
|
||||
|
||||
|
||||
class TestIserAdmDriver(tf.TargetDriverFixture):
|
||||
"""Unit tests for the deprecated ISERTgtAdm flow"""
|
||||
|
||||
def setUp(self):
|
||||
super(TestIserAdmDriver, self).setUp()
|
||||
self.target = iser.ISERTgtAdm(root_helper=utils.get_root_helper(),
|
||||
configuration=self.configuration)
|
||||
|
||||
@mock.patch.object(iser.ISERTgtAdm, '_get_iscsi_properties')
|
||||
def test_initialize_connection(self, mock_get_iscsi):
|
||||
|
||||
connector = {'initiator': 'fake_init'}
|
||||
|
||||
# Test the normal case
|
||||
mock_get_iscsi.return_value = {}
|
||||
expected_return = {'driver_volume_type': 'iser',
|
||||
'data': {}}
|
||||
self.assertEqual(expected_return,
|
||||
self.target.initialize_connection(self.testvol,
|
||||
connector))
|
||||
|
||||
def test_iscsi_protocol(self):
|
||||
self.assertEqual('iser', self.target.iscsi_protocol)
|
||||
|
||||
|
||||
class TestIserTgtDriver(tf.TargetDriverFixture):
|
||||
"""Unit tests for the iSER TGT flow"""
|
||||
|
||||
|
@ -88,12 +88,12 @@ volume_opts = [
|
||||
'for example "-c3" for idle only priority.'),
|
||||
cfg.StrOpt('iscsi_helper',
|
||||
default='tgtadm',
|
||||
choices=['tgtadm', 'lioadm', 'scstadmin', 'iseradm', 'iscsictl',
|
||||
choices=['tgtadm', 'lioadm', 'scstadmin', 'iscsictl',
|
||||
'ietadm', 'fake'],
|
||||
help='iSCSI target user-land tool to use. tgtadm is default, '
|
||||
'use lioadm for LIO iSCSI support, scstadmin for SCST '
|
||||
'target support, iseradm for the ISER protocol, ietadm '
|
||||
'for iSCSI Enterprise Target, iscsictl for Chelsio iSCSI '
|
||||
'target support, ietadm for iSCSI Enterprise Target, '
|
||||
'iscsictl for Chelsio iSCSI '
|
||||
'Target or fake for testing.'),
|
||||
cfg.StrOpt('volumes_dir',
|
||||
default='$state_path/volumes',
|
||||
@ -130,7 +130,7 @@ volume_opts = [
|
||||
help='Sets the behavior of the iSCSI target to either '
|
||||
'perform write-back(on) or write-through(off). '
|
||||
'This parameter is valid if iscsi_helper is set '
|
||||
'to tgtadm or iseradm.'),
|
||||
'to tgtadm.'),
|
||||
cfg.StrOpt('iscsi_target_flags',
|
||||
default='',
|
||||
help='Sets the target-specific flags for the iSCSI target. '
|
||||
@ -329,7 +329,6 @@ class BaseVD(object):
|
||||
self.target_mapping = {
|
||||
'fake': 'cinder.volume.targets.fake.FakeTarget',
|
||||
'ietadm': 'cinder.volume.targets.iet.IetAdm',
|
||||
'iseradm': 'cinder.volume.targets.iser.ISERTgtAdm',
|
||||
'lioadm': 'cinder.volume.targets.lio.LioAdm',
|
||||
'tgtadm': 'cinder.volume.targets.tgt.TgtAdm',
|
||||
'scstadmin': 'cinder.volume.targets.scst.SCSTAdm',
|
||||
@ -2414,7 +2413,7 @@ class ISCSIDriver(VolumeDriver):
|
||||
except (IndexError, ValueError):
|
||||
if (self.configuration.volume_driver ==
|
||||
'cinder.volume.drivers.lvm.ThinLVMVolumeDriver' and
|
||||
self.configuration.iscsi_helper in ('tgtadm', 'iseradm')):
|
||||
self.configuration.iscsi_helper == 'tgtadm'):
|
||||
lun = 1
|
||||
else:
|
||||
lun = 0
|
||||
|
@ -1,46 +0,0 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from cinder.i18n import _LW
|
||||
from cinder.volume.targets import tgt
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ISERTgtAdm(tgt.TgtAdm):
|
||||
VERSION = '0.2'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ISERTgtAdm, self).__init__(*args, **kwargs)
|
||||
|
||||
LOG.warning(_LW('ISERTgtAdm is deprecated, you should '
|
||||
'now just use LVMVolumeDriver and specify '
|
||||
'iscsi_helper for the target driver you '
|
||||
'wish to use. In order to enable iser, please '
|
||||
'set iscsi_protocol=iser with lioadm or tgtadm '
|
||||
'target helpers.'))
|
||||
|
||||
self.volumes_dir = self.configuration.safe_get('volumes_dir')
|
||||
self.iscsi_protocol = 'iser'
|
||||
self.protocol = 'iSER'
|
||||
|
||||
# backwards compatibility mess
|
||||
self.configuration.num_volume_device_scan_tries = \
|
||||
self.configuration.num_iser_scan_tries
|
||||
self.configuration.iscsi_target_prefix = \
|
||||
self.configuration.iser_target_prefix
|
||||
self.configuration.iscsi_ip_address = \
|
||||
self.configuration.iser_ip_address
|
||||
self.configuration.iscsi_port = self.configuration.iser_port
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
upgrade:
|
||||
- The ISERTgtAdm target was deprecated in the Kilo release.
|
||||
It has now been removed. You should now just use
|
||||
LVMVolumeDriver and specify iscsi_helper for the target
|
||||
driver you wish to use. In order to enable iser, please
|
||||
set iscsi_protocol=iser with lioadm or tgtadm target
|
||||
helpers.
|
Loading…
Reference in New Issue
Block a user