]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Rename "rtstool" to "cinder-rtstool", add dep
authorEric Harney <eharney@redhat.com>
Mon, 21 Oct 2013 18:55:43 +0000 (14:55 -0400)
committerEric Harney <eharney@redhat.com>
Wed, 23 Oct 2013 22:04:33 +0000 (18:04 -0400)
With rtstool merged into Cinder, it should use the
"cinder-" prefix.

Add to setup.cfg scripts section for installation.

Additionally, add the rtslib-fb>=2.1.39 dependency
to Cinder's runtime requirements.

Implements blueprint: lio-rtslib

Change-Id: I715db09cb86145c6769c345f59ecda4d18b5e659

cinder/brick/iscsi/iscsi.py
cinder/tests/test_iscsi.py
etc/cinder/rootwrap.d/volume.filters
requirements.txt
setup.cfg

index 098ce56248d71061e0cec5ee9fa3acf1c35f8aae..5438283a777aaf8b6b37e32c66e77ee0a763b9de 100644 (file)
@@ -441,7 +441,7 @@ class LioAdm(TargetAdmin):
     def __init__(self, root_helper, lio_initiator_iqns='',
                  iscsi_target_prefix='iqn.2010-10.org.openstack:',
                  execute=putils.execute):
-        super(LioAdm, self).__init__('rtstool', root_helper, execute)
+        super(LioAdm, self).__init__('cinder-rtstool', root_helper, execute)
 
         self.iscsi_target_prefix = iscsi_target_prefix
         self.lio_initiator_iqns = lio_initiator_iqns
@@ -449,13 +449,13 @@ class LioAdm(TargetAdmin):
 
     def _verify_rtstool(self):
         try:
-            self._execute('rtstool', 'verify')
+            self._execute('cinder-rtstool', 'verify')
         except (OSError, putils.ProcessExecutionError):
-            LOG.error(_('rtstool is not installed correctly'))
+            LOG.error(_('cinder-rtstool is not installed correctly'))
             raise
 
     def _get_target(self, iqn):
-        (out, err) = self._execute('rtstool',
+        (out, err) = self._execute('cinder-rtstool',
                                    'get-targets',
                                    run_as_root=True)
         lines = out.split('\n')
@@ -485,7 +485,7 @@ class LioAdm(TargetAdmin):
             extra_args.append(self.lio_initiator_iqns)
 
         try:
-            command_args = ['rtstool',
+            command_args = ['cinder-rtstool',
                             'create',
                             path,
                             name,
@@ -516,7 +516,7 @@ class LioAdm(TargetAdmin):
         iqn = '%s%s' % (self.iscsi_target_prefix, vol_uuid_name)
 
         try:
-            self._execute('rtstool',
+            self._execute('cinder-rtstool',
                           'delete',
                           iqn,
                           run_as_root=True)
@@ -543,7 +543,7 @@ class LioAdm(TargetAdmin):
 
         # Add initiator iqns to target ACL
         try:
-            self._execute('rtstool', 'add-initiator',
+            self._execute('cinder-rtstool', 'add-initiator',
                           volume_iqn,
                           auth_user,
                           auth_pass,
index bf2b6056e6d6fcd9c25583f3c7b46ad500bfc659..f190bd525a6a897937009fb43aeef04a4ec1cc81 100644 (file)
@@ -198,9 +198,9 @@ class LioAdmTestCase(test.TestCase, TargetAdminTestCase):
         self.persist_tempdir = tempfile.mkdtemp()
         self.flags(iscsi_helper='lioadm')
         self.script_template = "\n".join([
-            'rtstool create '
+            'cinder-rtstool create '
             '/foo iqn.2011-09.org.foo.bar:blaa test_id test_pass',
-            'rtstool delete iqn.2010-10.org.openstack:volume-blaa'])
+            'cinder-rtstool delete iqn.2010-10.org.openstack:volume-blaa'])
 
 
 class ISERTgtAdmTestCase(TgtAdmTestCase):
index ba7ea698a835910e495d90bf662901def88dba42..f9e46d32e8ce93c34988e468fb487bcb6e11b5f5 100644 (file)
@@ -6,7 +6,7 @@
 ietadm: CommandFilter, ietadm, root
 tgtadm: CommandFilter, tgtadm, root
 tgt-admin: CommandFilter, tgt-admin, root
-rtstool: CommandFilter, rtstool, root
+cinder-rtstool: CommandFilter, cinder-rtstool, root
 
 # cinder/volume/driver.py: 'vgs', '--noheadings', '-o', 'name'
 vgs: CommandFilter, vgs, root
index d297a22b129be1ac8fe7f0f508381886e19c2f1b..94946b3dc002a0e3026ad1d49d88ebae60595def 100644 (file)
@@ -19,6 +19,7 @@ python-keystoneclient>=0.4.1
 python-novaclient>=2.15.0
 python-swiftclient>=1.5
 Routes>=1.12.3
+rtslib-fb>=2.1.39
 six>=1.4.1
 SQLAlchemy>=0.7.8,<=0.7.99
 sqlalchemy-migrate>=0.7.2
index 7a6fcaf7b4887e52240484d2a85d7d32584454cb..8377c21c7e13f3750763bb883d83c3712cd8f239 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -33,6 +33,7 @@ scripts =
     bin/cinder-manage
     bin/cinder-rootwrap
     bin/cinder-rpc-zmq-receiver
+    bin/cinder-rtstool
     bin/cinder-scheduler
     bin/cinder-volume
     bin/cinder-volume-usage-audit