[Netapp/Nexenta] Move registration of config options
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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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."""
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user