class ExtensionManager(object):
"""Load extensions from the configured extension path.
- See cinder/tests/api/openstack/extensions/foxinsocks/extension.py for an
+ See cinder/tests/api/extensions/foxinsocks/extension.py for an
example extension implementation.
"""
+ def __init__(self):
+ LOG.audit(_('Initializing extension manager.'))
+
+ self.cls_list = FLAGS.osapi_volume_extension
+ self.extensions = {}
+ self._load_extensions()
+
def is_loaded(self, alias):
return alias in self.extensions
WSGI middleware for OpenStack Volume API.
"""
+from cinder.api import extensions
import cinder.api.openstack
-from cinder.api.openstack.volume import extensions
from cinder.api.openstack.volume import limits
from cinder.api.openstack.volume import snapshots
from cinder.api.openstack.volume import types
+++ /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.
-
-from cinder.api import extensions as base_extensions
-from cinder import flags
-from cinder.openstack.common import log as logging
-
-
-LOG = logging.getLogger(__name__)
-FLAGS = flags.FLAGS
-
-
-class ExtensionManager(base_extensions.ExtensionManager):
- def __init__(self):
- LOG.audit(_('Initializing extension manager.'))
-
- self.cls_list = FLAGS.osapi_volume_extension
- self.extensions = {}
- self._load_extensions()
def setUp(self):
super(ExtensionTestCase, self).setUp()
ext_list = FLAGS.osapi_volume_extension[:]
- fox = ('cinder.tests.api.openstack.volume.extensions.'
- 'foxinsocks.Foxinsocks')
+ fox = ('cinder.tests.api.extensions.foxinsocks.Foxinsocks')
if fox not in ext_list:
ext_list.append(fox)
self.flags(osapi_volume_extension=ext_list)
f = super(ExtensionsTest, self)._get_flags()
f['osapi_volume_extension'] = FLAGS.osapi_volume_extension[:]
f['osapi_volume_extension'].append(
- 'cinder.tests.api.openstack.volume.extensions.'
- 'foxinsocks.Foxinsocks')
+ 'cinder.tests.api.extensions.foxinsocks.Foxinsocks')
return f
def test_get_foxnsocks(self):