From: Eric Harney Date: Tue, 19 Mar 2013 20:40:19 +0000 (-0400) Subject: Rename cinder-rtstool to rtstool X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3a77a387f0be2cb83fcd013d765ed92e0cfac4eb;p=openstack-build%2Fcinder-build.git Rename cinder-rtstool to rtstool Since rtstool is being distributed externally, it will be named rtstool rather than cinder-rtstool. Change-Id: Ieff072ab8315928ed02837aff63c08601b1d2acd --- diff --git a/cinder/tests/test_iscsi.py b/cinder/tests/test_iscsi.py index 4bd942852..7b1a327d4 100644 --- a/cinder/tests/test_iscsi.py +++ b/cinder/tests/test_iscsi.py @@ -134,6 +134,6 @@ class LioAdmTestCase(test.TestCase, TargetAdminTestCase): 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']) diff --git a/cinder/volume/iscsi.py b/cinder/volume/iscsi.py index ae664b767..77efed470 100644 --- a/cinder/volume/iscsi.py +++ b/cinder/volume/iscsi.py @@ -327,16 +327,16 @@ class FakeIscsiHelper(object): 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') @@ -354,7 +354,7 @@ class LioAdm(TargetAdmin): 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' @@ -366,7 +366,7 @@ class LioAdm(TargetAdmin): extra_args.append(FLAGS.lio_initiator_iqns) try: - command_args = ['cinder-rtstool', + command_args = ['rtstool', 'create', path, name, @@ -397,7 +397,7 @@ class LioAdm(TargetAdmin): iqn = '%s%s' % (FLAGS.iscsi_target_prefix, vol_uuid_name) try: - self._execute('cinder-rtstool', + self._execute('rtstool', 'delete', iqn, run_as_root=True) @@ -424,7 +424,7 @@ class LioAdm(TargetAdmin): # Add initiator iqns to target ACL try: - self._execute('cinder-rtstool', 'add-initiator', + self._execute('rtstool', 'add-initiator', volume_iqn, auth_user, auth_pass, diff --git a/etc/cinder/rootwrap.d/volume.filters b/etc/cinder/rootwrap.d/volume.filters index 9103db8cc..fdd63a8ef 100644 --- a/etc/cinder/rootwrap.d/volume.filters +++ b/etc/cinder/rootwrap.d/volume.filters @@ -6,7 +6,7 @@ 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