summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-07-26 23:11:23 +0000
committerGerrit Code Review <review@openstack.org>2016-07-26 23:11:24 +0000
commit734151daee0febedaac76079c40deaa7c0577d52 (patch)
tree51eaa7b71c4e531053fcbacdb2e78748ab2299f1
parent652eede9369b1af7051946a718749bbc5a927f3a (diff)
parent6af8d2c8e9bd66956b03f946a86daf1c567821a2 (diff)
downloadnova-734151daee0febedaac76079c40deaa7c0577d52.tar.gz
Merge "Remove deprecated config option volume_api_class"
-rw-r--r--etc/nova/nova-config-generator.conf1
-rw-r--r--nova/api/openstack/compute/volumes.py8
-rw-r--r--nova/compute/api.py4
-rw-r--r--nova/compute/manager.py4
-rw-r--r--nova/opts.py35
-rw-r--r--nova/virt/libvirt/driver.py4
-rw-r--r--nova/volume/__init__.py34
-rw-r--r--releasenotes/notes/remove_volume_api_class-a3c618228c89f57b.yaml5
8 files changed, 15 insertions, 80 deletions
diff --git a/etc/nova/nova-config-generator.conf b/etc/nova/nova-config-generator.conf
index c11a4153df..2597e0c9cf 100644
--- a/etc/nova/nova-config-generator.conf
+++ b/etc/nova/nova-config-generator.conf
@@ -1,7 +1,6 @@
[DEFAULT]
output_file = etc/nova/nova.conf.sample
wrap_width = 80
-namespace = nova
namespace = nova.conf
namespace = nova.api
namespace = nova.cells
diff --git a/nova/api/openstack/compute/volumes.py b/nova/api/openstack/compute/volumes.py
index bf2c8096f5..3521ccc995 100644
--- a/nova/api/openstack/compute/volumes.py
+++ b/nova/api/openstack/compute/volumes.py
@@ -33,7 +33,7 @@ from nova.i18n import _
from nova import objects
from nova.policies import volumes as vol_policies
from nova.policies import volumes_attachments as va_policies
-from nova import volume
+from nova.volume import cinder
ALIAS = "os-volumes"
@@ -99,7 +99,7 @@ class VolumeController(wsgi.Controller):
"""The Volumes API controller for the OpenStack API."""
def __init__(self):
- self.volume_api = volume.API()
+ self.volume_api = cinder.API()
super(VolumeController, self).__init__()
@wsgi.Controller.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
@@ -256,7 +256,7 @@ class VolumeAttachmentController(wsgi.Controller):
def __init__(self):
self.compute_api = compute.API()
- self.volume_api = volume.API()
+ self.volume_api = cinder.API()
super(VolumeAttachmentController, self).__init__()
@extensions.expected_errors(404)
@@ -508,7 +508,7 @@ class SnapshotController(wsgi.Controller):
"""The Snapshots API controller for the OpenStack API."""
def __init__(self):
- self.volume_api = volume.API()
+ self.volume_api = cinder.API()
super(SnapshotController, self).__init__()
@wsgi.Controller.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 2e251619d9..a278ba836b 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -81,7 +81,7 @@ from nova.scheduler import utils as scheduler_utils
from nova import servicegroup
from nova import utils
from nova.virt import hardware
-from nova import volume
+from nova.volume import cinder
LOG = logging.getLogger(__name__)
@@ -197,7 +197,7 @@ class API(base.Base):
security_group_api=None, **kwargs):
self.image_api = image_api or image.API()
self.network_api = network_api or network.API()
- self.volume_api = volume_api or volume.API()
+ self.volume_api = volume_api or cinder.API()
self.security_group_api = (security_group_api or
openstack_driver.get_openstack_security_group_driver())
self.consoleauth_rpcapi = consoleauth_rpcapi.ConsoleAuthAPI()
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 189a1fed9b..6115af6f20 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -98,7 +98,7 @@ from nova.virt import driver
from nova.virt import event as virtevent
from nova.virt import storage_users
from nova.virt import virtapi
-from nova import volume
+from nova.volume import cinder
from nova.volume import encryptors
CONF = nova.conf.CONF
@@ -494,7 +494,7 @@ class ComputeManager(manager.Manager):
"""Load configuration options and connect to the hypervisor."""
self.virtapi = ComputeVirtAPI(self)
self.network_api = network.API()
- self.volume_api = volume.API()
+ self.volume_api = cinder.API()
self.image_api = image.API()
self._last_host_check = 0
self._last_bw_usage_poll = 0
diff --git a/nova/opts.py b/nova/opts.py
deleted file mode 100644
index 0420918189..0000000000
--- a/nova/opts.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License"); you may not
-# use this file except in compliance with the License. You may obtain a copy
-# of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import itertools
-
-import nova.baserpc
-import nova.cloudpipe.pipelib
-import nova.cmd.serialproxy
-import nova.cmd.spicehtml5proxy
-import nova.conductor.rpcapi
-import nova.conf
-import nova.console.rpcapi
-import nova.console.serial
-import nova.consoleauth.rpcapi
-import nova.exception
-import nova.image.download.file
-import nova.volume
-
-
-def list_opts():
- return [
- ('DEFAULT',
- itertools.chain(
- nova.volume._volume_opts,
- )),
- ]
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 457eac0c58..1db166e3ce 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -111,7 +111,7 @@ from nova.virt.libvirt import vif as libvirt_vif
from nova.virt.libvirt.volume import remotefs
from nova.virt import netutils
from nova.virt import watchdog_actions
-from nova import volume
+from nova.volume import cinder
from nova.volume import encryptors
libvirt = None
@@ -378,7 +378,7 @@ class LibvirtDriver(driver.ComputeDriver):
continue
self.disk_cachemodes[disk_type] = cache_mode
- self._volume_api = volume.API()
+ self._volume_api = cinder.API()
self._image_api = image.API()
sysinfo_serial_funcs = {
diff --git a/nova/volume/__init__.py b/nova/volume/__init__.py
index b57e843879..e69de29bb2 100644
--- a/nova/volume/__init__.py
+++ b/nova/volume/__init__.py
@@ -1,34 +0,0 @@
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import oslo_config.cfg
-from oslo_utils import importutils
-
-_volume_opts = [
- oslo_config.cfg.StrOpt(
- 'volume_api_class',
- default='nova.volume.cinder.API',
- help='DEPRECATED: The full class name of the volume API class to use',
- deprecated_for_removal=True)
-]
-
-oslo_config.cfg.CONF.register_opts(_volume_opts)
-
-
-def API():
- volume_api_class = oslo_config.cfg.CONF.volume_api_class
- cls = importutils.import_class(volume_api_class)
- return cls()
diff --git a/releasenotes/notes/remove_volume_api_class-a3c618228c89f57b.yaml b/releasenotes/notes/remove_volume_api_class-a3c618228c89f57b.yaml
new file mode 100644
index 0000000000..2a9367c4c4
--- /dev/null
+++ b/releasenotes/notes/remove_volume_api_class-a3c618228c89f57b.yaml
@@ -0,0 +1,5 @@
+---
+upgrade:
+ - The deprecated ``volume_api_class`` config option has been
+ removed. We only have one sensible backend for it, so
+ don't need it anymore.