Skip to content

Commit

Permalink
Merge "Remove deprecated config option volume_api_class"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jul 26, 2016
2 parents 652eede + 6af8d2c commit 734151d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 80 deletions.
1 change: 0 additions & 1 deletion 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
Expand Down
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/volumes.py
Expand Up @@ -33,7 +33,7 @@
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"

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions nova/compute/api.py
Expand Up @@ -81,7 +81,7 @@
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__)

Expand Down Expand Up @@ -197,7 +197,7 @@ def __init__(self, image_api=None, network_api=None, volume_api=None,
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()
Expand Down
4 changes: 2 additions & 2 deletions nova/compute/manager.py
Expand Up @@ -98,7 +98,7 @@
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
Expand Down Expand Up @@ -494,7 +494,7 @@ def __init__(self, compute_driver=None, *args, **kwargs):
"""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
Expand Down
35 changes: 0 additions & 35 deletions nova/opts.py

This file was deleted.

4 changes: 2 additions & 2 deletions nova/virt/libvirt/driver.py
Expand Up @@ -111,7 +111,7 @@
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
Expand Down Expand Up @@ -378,7 +378,7 @@ def __init__(self, virtapi, read_only=False):
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 = {
Expand Down
34 changes: 0 additions & 34 deletions 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()
@@ -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.

0 comments on commit 734151d

Please sign in to comment.