From: john-griffith Date: Thu, 17 Jan 2013 01:49:07 +0000 (-0700) Subject: Move iscsi flags back to driver.py X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=67c300604afa2d0c7e702f439fe1d4e45b90a7d8;p=openstack-build%2Fcinder-build.git Move iscsi flags back to driver.py During the lvm class create the iscsi flags were moved. This is NOT correct, the flags belong with the ISCSI class and should have been left in driver.py where ISCSIDriver is defined. Moving these breaks the inheritance structure for all those that inherit from ISCSIDriver. Change-Id: I1fda9158d9f8f01005875b87265d2dd87bcbc67f --- diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index 9a3cc70b0..2e4de3648 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -26,7 +26,6 @@ from cinder import exception from cinder import flags from cinder.openstack.common import cfg from cinder.openstack.common import log as logging -from cinder.openstack.common import timeutils from cinder import utils @@ -42,7 +41,18 @@ volume_opts = [ cfg.IntOpt('num_iscsi_scan_tries', default=3, help='number of times to rescan iSCSI target to find volume'), -] + cfg.IntOpt('iscsi_num_targets', + default=100, + help='Number of iscsi target ids per host'), + cfg.StrOpt('iscsi_target_prefix', + default='iqn.2010-10.org.openstack:', + help='prefix for iscsi volumes'), + cfg.StrOpt('iscsi_ip_address', + default='$my_ip', + help='The port that the iSCSI daemon is listening on'), + cfg.IntOpt('iscsi_port', + default=3260, + help='The port that the iSCSI daemon is listening on'), ] FLAGS = flags.FLAGS FLAGS.register_opts(volume_opts) diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 1e0c694e5..b1b217d73 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -50,18 +50,7 @@ volume_opts = [ default=0, help='If set, create lvms with multiple mirrors. Note that ' 'this requires lvm_mirrors + 2 pvs with available space'), - cfg.IntOpt('iscsi_num_targets', - default=100, - help='Number of iscsi target ids per host'), - cfg.StrOpt('iscsi_target_prefix', - default='iqn.2010-10.org.openstack:', - help='prefix for iscsi volumes'), - cfg.StrOpt('iscsi_ip_address', - default='$my_ip', - help='The port that the iSCSI daemon is listening on'), - cfg.IntOpt('iscsi_port', - default=3260, - help='The port that the iSCSI daemon is listening on'), ] +] FLAGS = flags.FLAGS FLAGS.register_opts(volume_opts)