self.persist_tempdir = tempfile.mkdtemp()
self.flags(iscsi_helper='lioadm')
self.script_template = "\n".join([
- 'cinder-rtstool create '
+ 'rtstool create '
'/foo iqn.2011-09.org.foo.bar:blaa test_id test_pass',
- 'cinder-rtstool delete iqn.2010-10.org.openstack:volume-blaa'])
+ 'rtstool delete iqn.2010-10.org.openstack:volume-blaa'])
class LioAdm(TargetAdmin):
"""iSCSI target administration for LIO using python-rtslib."""
def __init__(self, execute=utils.execute):
- super(LioAdm, self).__init__('cinder-rtstool', execute)
+ super(LioAdm, self).__init__('rtstool', execute)
try:
- self._execute('cinder-rtstool', 'verify')
+ self._execute('rtstool', 'verify')
except (OSError, exception.ProcessExecutionError):
- LOG.error(_('cinder-rtstool is not installed correctly'))
+ LOG.error(_('rtstool is not installed correctly'))
raise
def _get_target(self, iqn):
- (out, err) = self._execute('cinder-rtstool',
+ (out, err) = self._execute('rtstool',
'get-targets',
run_as_root=True)
lines = out.split('\n')
LOG.info(_('Creating iscsi_target for volume: %s') % vol_id)
- # cinder-rtstool requires chap_auth, but unit tests don't provide it
+ # rtstool requires chap_auth, but unit tests don't provide it
chap_auth_userid = 'test_id'
chap_auth_password = 'test_pass'
extra_args.append(FLAGS.lio_initiator_iqns)
try:
- command_args = ['cinder-rtstool',
+ command_args = ['rtstool',
'create',
path,
name,
iqn = '%s%s' % (FLAGS.iscsi_target_prefix, vol_uuid_name)
try:
- self._execute('cinder-rtstool',
+ self._execute('rtstool',
'delete',
iqn,
run_as_root=True)
# Add initiator iqns to target ACL
try:
- self._execute('cinder-rtstool', 'add-initiator',
+ self._execute('rtstool', 'add-initiator',
volume_iqn,
auth_user,
auth_pass,
ietadm: CommandFilter, ietadm, root
tgtadm: CommandFilter, tgtadm, root
tgt-admin: CommandFilter, tgt-admin, root
-cinder-rtstool: CommandFilter, cinder-rtstool, root
+rtstool: CommandFilter, rtstool, root
# cinder/volume/driver.py: 'vgs', '--noheadings', '-o', 'name'
vgs: CommandFilter, vgs, root