extensions = list(self.cls_list)
+ # NOTE(thingee): Until we update devstack to have the new location,
+ # we'll just set replace the old contrib path with the new and preserve
+ # any other extensions that need to be loaded
+ old_contrib_path = ('cinder.api.openstack.volume.contrib.'
+ 'standard_extensions')
+ new_contrib_path = 'cinder.api.contrib.standard_extensions'
+ if old_contrib_path in extensions:
+ LOG.warn(_('osapi_volume_extension is set to deprecated path: %s'),
+ old_contrib_path)
+ LOG.warn(_('Please set your flag or cinder.conf settings for '
+ 'osapi_volume_extension to: %s'), new_contrib_path)
+ extensions = [e.replace(old_contrib_path, new_contrib_path)
+ for e in extensions]
+
for ext_factory in extensions:
try:
self.load_extension(ext_factory)
+++ /dev/null
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# 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.
cfg.ListOpt('osapi_volume_ext_list',
default=[],
help='Specify list of extensions to load when using osapi_'
- 'volume_extension option with cinder.api.openstack.'
- 'volume.contrib.select_extensions'),
+ 'volume_extension option with cinder.api.contrib.'
+ 'select_extensions'),
+ # NOTE(thingee): default contrib for old and new location for compatibility
cfg.MultiStrOpt('osapi_volume_extension',
default=[
- 'cinder.api.openstack.volume.contrib.standard_extensions'
- ],
+ 'cinder.api.openstack.volume.contrib.'
+ 'standard_extensions',
+ 'cinder.api.contrib.standard_extensions',
+ ],
help='osapi volume extension to load'),
cfg.StrOpt('osapi_compute_link_prefix',
default=None,
from lxml import etree
import webob
-from cinder.api.openstack.volume.contrib import extended_snapshot_attributes
+from cinder.api.contrib import extended_snapshot_attributes
from cinder import exception
from cinder import flags
from cinder.openstack.common import jsonutils
from lxml import etree
import webob
-from cinder.api.openstack.volume.contrib import types_extra_specs
+from cinder.api.contrib import types_extra_specs
from cinder import test
from cinder.tests.api.openstack import fakes
import cinder.wsgi
import webob
-from cinder.api.openstack.volume.contrib import types_manage
+from cinder.api.contrib import types_manage
from cinder import exception
from cinder import test
from cinder.tests.api.openstack import fakes
import uuid
import webob
-from cinder.api.openstack.volume.contrib import volume_actions
+from cinder.api.contrib import volume_actions
from cinder import exception
from cinder import flags
from cinder.openstack.common import jsonutils
+++ /dev/null
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2011 OpenStack LLC.
-# 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.
-
-# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
-from cinder.tests import *