]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
[Netapp/Nexenta] Move registration of config options
authorDirk Mueller <dirk@dmllr.de>
Thu, 12 Dec 2013 13:17:43 +0000 (14:17 +0100)
committerDirk Mueller <dirk@dmllr.de>
Sat, 14 Dec 2013 11:35:15 +0000 (12:35 +0100)
This doesn't really make a difference in practice, but
makes it possible for the sample config generator to figure
out the config group relationship when options are in one
file.

Change-Id: I3bc6ab5bcc85a8c11c9261b0d8c520fb846a7864

cinder/volume/drivers/netapp/common.py
cinder/volume/drivers/netapp/iscsi.py
cinder/volume/drivers/netapp/nfs.py
cinder/volume/drivers/netapp/options.py
cinder/volume/drivers/nexenta/iscsi.py
cinder/volume/drivers/nexenta/nfs.py
cinder/volume/drivers/nexenta/options.py

index 4c45354ea2a6a142d8b48c46c62e385e8a3e84c0..956b8d7bf07126ad43e9d2b5d2fb2dd0538b9ced 100644 (file)
@@ -21,8 +21,6 @@ Unified driver for NetApp storage systems.
 Supports call to multiple storage systems of different families and protocols.
 """
 
-from oslo.config import cfg
-
 from cinder import exception
 from cinder.openstack.common import importutils
 from cinder.openstack.common import log as logging
@@ -33,10 +31,6 @@ from cinder.volume.drivers.netapp.options import netapp_proxy_opts
 LOG = logging.getLogger(__name__)
 
 
-CONF = cfg.CONF
-CONF.register_opts(netapp_proxy_opts)
-
-
 #NOTE(singn): Holds family:{protocol:driver} registration information.
 #Plug in new families and protocols to support new drivers.
 #No other code modification required.
index e28adf45a7c1fc6d75485c2d84202223f0c02d37..92e520d77b4be9cc342aeb4d2e62dd961dd5a436 100644 (file)
@@ -49,21 +49,11 @@ from cinder.volume.drivers.netapp.utils import provide_ems
 from cinder.volume.drivers.netapp.utils import set_safe_attr
 from cinder.volume.drivers.netapp.utils import validate_instantiation
 from cinder.volume import volume_types
-from oslo.config import cfg
 
 
 LOG = logging.getLogger(__name__)
 
 
-CONF = cfg.CONF
-CONF.register_opts(netapp_connection_opts)
-CONF.register_opts(netapp_transport_opts)
-CONF.register_opts(netapp_basicauth_opts)
-CONF.register_opts(netapp_cluster_opts)
-CONF.register_opts(netapp_7mode_opts)
-CONF.register_opts(netapp_provisioning_opts)
-
-
 class NetAppLun(object):
     """Represents a LUN on NetApp storage."""
 
index 2c3dfba32cf6f054c820c5d0106f29d454ddaee9..6ec3686af0c6a8e4d5fad42f5eded6bfa9fac676 100644 (file)
@@ -26,8 +26,6 @@ from threading import Timer
 import time
 import urlparse
 
-from oslo.config import cfg
-
 from cinder import exception
 from cinder.image import image_utils
 from cinder.openstack.common import excutils
@@ -54,13 +52,6 @@ from cinder.volume.drivers import nfs
 LOG = logging.getLogger(__name__)
 
 
-CONF = cfg.CONF
-CONF.register_opts(netapp_connection_opts)
-CONF.register_opts(netapp_transport_opts)
-CONF.register_opts(netapp_basicauth_opts)
-CONF.register_opts(netapp_img_cache_opts)
-
-
 class NetAppNFSDriver(nfs.NfsDriver):
     """Base class for NetApp NFS driver.
       Executes commands relating to Volumes.
index cb5b6a428bc9a2287d18f954d4cdd0b093697de2..0f922bd6698e5e1df897f2457bb1013d7c53c07e 100644 (file)
@@ -134,3 +134,13 @@ netapp_img_cache_opts = [
                      'not been accessed in the last M minutes, where M is '
                      'the value of this parameter, will be deleted from the '
                      'cache to create free space on the NFS share.')), ]
+
+CONF = cfg.CONF
+CONF.register_opts(netapp_proxy_opts)
+CONF.register_opts(netapp_connection_opts)
+CONF.register_opts(netapp_transport_opts)
+CONF.register_opts(netapp_basicauth_opts)
+CONF.register_opts(netapp_cluster_opts)
+CONF.register_opts(netapp_7mode_opts)
+CONF.register_opts(netapp_provisioning_opts)
+CONF.register_opts(netapp_img_cache_opts)
index a909e8a36fd17227cf70323cf842bd055551c05d..81d1c84f6c390b9a8fe5a45c40472a825769abe1 100644 (file)
@@ -24,8 +24,6 @@
 .. moduleauthor:: Yuriy Taraday <yorik.sar@gmail.com>
 """
 
-from oslo.config import cfg
-
 from cinder import exception
 from cinder.openstack.common import log as logging
 from cinder.volume import driver
@@ -37,11 +35,6 @@ from cinder.volume.drivers.nexenta import utils
 VERSION = '1.1.3'
 LOG = logging.getLogger(__name__)
 
-CONF = cfg.CONF
-CONF.register_opts(options.NEXENTA_CONNECTION_OPTIONS)
-CONF.register_opts(options.NEXENTA_ISCSI_OPTIONS)
-CONF.register_opts(options.NEXENTA_VOLUME_OPTIONS)
-
 
 class NexentaISCSIDriver(driver.ISCSIDriver):  # pylint: disable=R0921
     """Executes volume driver commands on Nexenta Appliance.
index 047e3f8eef1f1ee96119b0669174476432ce3d19..53b9832e56fceab8b301ba8c7147b971af52d363 100644 (file)
@@ -26,8 +26,6 @@
 import hashlib
 import os
 
-from oslo.config import cfg
-
 from cinder import context
 from cinder import db
 from cinder import exception
@@ -42,9 +40,6 @@ from cinder.volume.drivers import nfs
 VERSION = '1.1.3'
 LOG = logging.getLogger(__name__)
 
-CONF = cfg.CONF
-CONF.register_opts(options.NEXENTA_NFS_OPTIONS)
-
 
 class NexentaNfsDriver(nfs.NfsDriver):  # pylint: disable=R0921
     """Executes volume driver commands on Nexenta Appliance.
index f56340b160feb052f1c23358b15889bb94ec30a6..8a04d4242da9507792fcdf663caf320ac95fa021 100644 (file)
@@ -116,3 +116,10 @@ NEXENTA_RRMGR_OPTIONS = [
                default=2,
                help='Number of TCP connections.'),
 ]
+
+CONF = cfg.CONF
+CONF.register_opts(NEXENTA_CONNECTION_OPTIONS)
+CONF.register_opts(NEXENTA_ISCSI_OPTIONS)
+CONF.register_opts(NEXENTA_VOLUME_OPTIONS)
+CONF.register_opts(NEXENTA_NFS_OPTIONS)
+CONF.register_opts(NEXENTA_RRMGR_OPTIONS)