From 30f8d3f8d62251023cceef21eca19fd508950f37 Mon Sep 17 00:00:00 2001 From: Mike Perez Date: Sun, 4 Nov 2012 01:34:27 -0700 Subject: [PATCH] Moving common api code into cinder.api This is progress for beginning to have separate versions of the cinder api. Common code that would be shared by v1, v2 etc will use these modules, so we'll just move them to a common place. Test directory structure has also been updated. progress on blueprint apiv2 Change-Id: I99fd95fc3bb5d4f4fc3d9ef5b76b6372a1f6033d --- cinder/api/{openstack => }/common.py | 2 +- cinder/api/{openstack => }/extensions.py | 2 +- cinder/api/openstack/volume/__init__.py | 2 +- cinder/api/openstack/volume/contrib/__init__.py | 2 +- cinder/api/openstack/volume/contrib/admin_actions.py | 2 +- .../volume/contrib/extended_snapshot_attributes.py | 4 ++-- cinder/api/openstack/volume/contrib/image_create.py | 2 +- cinder/api/openstack/volume/contrib/quota_classes.py | 4 ++-- cinder/api/openstack/volume/contrib/quotas.py | 4 ++-- cinder/api/openstack/volume/contrib/types_extra_specs.py | 4 ++-- cinder/api/openstack/volume/contrib/types_manage.py | 4 ++-- cinder/api/openstack/volume/contrib/volume_actions.py | 4 ++-- .../api/openstack/volume/contrib/volume_host_attribute.py | 4 ++-- .../api/openstack/volume/contrib/volume_tenant_attribute.py | 4 ++-- cinder/api/openstack/volume/extensions.py | 2 +- cinder/api/openstack/volume/limits.py | 4 ++-- cinder/api/openstack/volume/snapshots.py | 4 ++-- cinder/api/openstack/volume/types.py | 4 ++-- cinder/api/openstack/volume/volumes.py | 4 ++-- cinder/api/{openstack/volume => }/schemas/atom-link.rng | 0 .../api/{openstack/volume => }/schemas/v1.1/extension.rng | 0 .../api/{openstack/volume => }/schemas/v1.1/extensions.rng | 0 cinder/api/{openstack/volume => }/schemas/v1.1/limits.rng | 0 cinder/api/{openstack/volume => }/schemas/v1.1/metadata.rng | 0 cinder/api/{openstack => }/urlmap.py | 0 cinder/api/{openstack/volume => }/versions.py | 5 ++--- cinder/api/{openstack/volume => }/views/__init__.py | 0 cinder/api/{openstack/volume => }/views/limits.py | 0 cinder/api/{openstack/volume => }/views/types.py | 2 +- cinder/api/{openstack/volume => }/views/versions.py | 0 cinder/api/{openstack => }/xmlutil.py | 4 ++-- cinder/tests/api/{openstack => }/common.py | 0 cinder/tests/api/openstack/fakes.py | 4 ++-- cinder/tests/api/openstack/test_faults.py | 2 +- cinder/tests/api/openstack/volume/extensions/foxinsocks.py | 2 +- cinder/tests/api/openstack/volume/test_extensions.py | 2 +- cinder/tests/api/openstack/volume/test_limits.py | 4 ++-- cinder/tests/api/openstack/volume/test_router.py | 2 +- cinder/tests/api/openstack/volume/test_types.py | 2 +- cinder/tests/api/{openstack => }/test_common.py | 6 +++--- cinder/tests/api/{openstack => }/test_xmlutil.py | 2 +- cinder/tests/integrated/test_xml.py | 2 +- etc/cinder/api-paste.ini | 4 ++-- 43 files changed, 52 insertions(+), 53 deletions(-) rename cinder/api/{openstack => }/common.py (99%) rename cinder/api/{openstack => }/extensions.py (99%) rename cinder/api/{openstack/volume => }/schemas/atom-link.rng (100%) rename cinder/api/{openstack/volume => }/schemas/v1.1/extension.rng (100%) rename cinder/api/{openstack/volume => }/schemas/v1.1/extensions.rng (100%) rename cinder/api/{openstack/volume => }/schemas/v1.1/limits.rng (100%) rename cinder/api/{openstack/volume => }/schemas/v1.1/metadata.rng (100%) rename cinder/api/{openstack => }/urlmap.py (100%) rename cinder/api/{openstack/volume => }/versions.py (98%) rename cinder/api/{openstack/volume => }/views/__init__.py (100%) rename cinder/api/{openstack/volume => }/views/limits.py (100%) rename cinder/api/{openstack/volume => }/views/types.py (97%) rename cinder/api/{openstack/volume => }/views/versions.py (100%) rename cinder/api/{openstack => }/xmlutil.py (99%) rename cinder/tests/api/{openstack => }/common.py (100%) rename cinder/tests/api/{openstack => }/test_common.py (98%) rename cinder/tests/api/{openstack => }/test_xmlutil.py (99%) diff --git a/cinder/api/openstack/common.py b/cinder/api/common.py similarity index 99% rename from cinder/api/openstack/common.py rename to cinder/api/common.py index 465269cd5..392bbb551 100644 --- a/cinder/api/openstack/common.py +++ b/cinder/api/common.py @@ -22,7 +22,7 @@ import urlparse import webob from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/extensions.py b/cinder/api/extensions.py similarity index 99% rename from cinder/api/openstack/extensions.py rename to cinder/api/extensions.py index 718607b94..a6886724e 100644 --- a/cinder/api/openstack/extensions.py +++ b/cinder/api/extensions.py @@ -23,7 +23,7 @@ import webob.exc import cinder.api.openstack from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import exception from cinder import flags from cinder.openstack.common import exception as common_exception diff --git a/cinder/api/openstack/volume/__init__.py b/cinder/api/openstack/volume/__init__.py index 8f5095597..0f945190d 100644 --- a/cinder/api/openstack/volume/__init__.py +++ b/cinder/api/openstack/volume/__init__.py @@ -25,8 +25,8 @@ 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 -from cinder.api.openstack.volume import versions from cinder.api.openstack.volume import volumes +from cinder.api import versions from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/contrib/__init__.py b/cinder/api/openstack/volume/contrib/__init__.py index 7672a74a8..503bc90b8 100644 --- a/cinder/api/openstack/volume/contrib/__init__.py +++ b/cinder/api/openstack/volume/contrib/__init__.py @@ -21,7 +21,7 @@ It can't be called 'extensions' because that causes namespacing problems. """ -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/contrib/admin_actions.py b/cinder/api/openstack/volume/contrib/admin_actions.py index 2794b11a1..a45b37077 100644 --- a/cinder/api/openstack/volume/contrib/admin_actions.py +++ b/cinder/api/openstack/volume/contrib/admin_actions.py @@ -15,7 +15,7 @@ import webob from webob import exc -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi from cinder import db from cinder import exception diff --git a/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py b/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py index 3b9f8cd2b..a14e11b76 100644 --- a/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py +++ b/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py @@ -16,9 +16,9 @@ from webob import exc -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import exception from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/contrib/image_create.py b/cinder/api/openstack/volume/contrib/image_create.py index 51cf6bcbd..ecfffbf4c 100644 --- a/cinder/api/openstack/volume/contrib/image_create.py +++ b/cinder/api/openstack/volume/contrib/image_create.py @@ -19,7 +19,7 @@ """The Create Volume from Image extension.""" -from cinder.api.openstack import extensions +from cinder.api import extensions class Image_create(extensions.ExtensionDescriptor): diff --git a/cinder/api/openstack/volume/contrib/quota_classes.py b/cinder/api/openstack/volume/contrib/quota_classes.py index cbad0e3af..897fd3104 100644 --- a/cinder/api/openstack/volume/contrib/quota_classes.py +++ b/cinder/api/openstack/volume/contrib/quota_classes.py @@ -15,9 +15,9 @@ import webob -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import db from cinder import exception from cinder import quota diff --git a/cinder/api/openstack/volume/contrib/quotas.py b/cinder/api/openstack/volume/contrib/quotas.py index 7f00863e4..1daa13318 100644 --- a/cinder/api/openstack/volume/contrib/quotas.py +++ b/cinder/api/openstack/volume/contrib/quotas.py @@ -17,9 +17,9 @@ import webob -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import db from cinder.db.sqlalchemy import api as sqlalchemy_api from cinder import exception diff --git a/cinder/api/openstack/volume/contrib/types_extra_specs.py b/cinder/api/openstack/volume/contrib/types_extra_specs.py index 50ddb234a..80243eaca 100644 --- a/cinder/api/openstack/volume/contrib/types_extra_specs.py +++ b/cinder/api/openstack/volume/contrib/types_extra_specs.py @@ -19,9 +19,9 @@ import webob -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import db from cinder import exception from cinder.volume import volume_types diff --git a/cinder/api/openstack/volume/contrib/types_manage.py b/cinder/api/openstack/volume/contrib/types_manage.py index 3ff2efebc..4b0dabc03 100644 --- a/cinder/api/openstack/volume/contrib/types_manage.py +++ b/cinder/api/openstack/volume/contrib/types_manage.py @@ -19,10 +19,10 @@ import webob -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack.volume import types -from cinder.api.openstack.volume.views import types as views_types from cinder.api.openstack import wsgi +from cinder.api.views import types as views_types from cinder import exception from cinder.volume import volume_types diff --git a/cinder/api/openstack/volume/contrib/volume_actions.py b/cinder/api/openstack/volume/contrib/volume_actions.py index e0882e9b2..2f054215e 100644 --- a/cinder/api/openstack/volume/contrib/volume_actions.py +++ b/cinder/api/openstack/volume/contrib/volume_actions.py @@ -15,9 +15,9 @@ import webob from xml.dom import minidom -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import exception from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/contrib/volume_host_attribute.py b/cinder/api/openstack/volume/contrib/volume_host_attribute.py index 5db3c18ef..183e72587 100644 --- a/cinder/api/openstack/volume/contrib/volume_host_attribute.py +++ b/cinder/api/openstack/volume/contrib/volume_host_attribute.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder.openstack.common import log as logging from cinder import volume diff --git a/cinder/api/openstack/volume/contrib/volume_tenant_attribute.py b/cinder/api/openstack/volume/contrib/volume_tenant_attribute.py index 193f65bde..620ae1006 100644 --- a/cinder/api/openstack/volume/contrib/volume_tenant_attribute.py +++ b/cinder/api/openstack/volume/contrib/volume_tenant_attribute.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import volume diff --git a/cinder/api/openstack/volume/extensions.py b/cinder/api/openstack/volume/extensions.py index af1f367a3..182f58fc3 100644 --- a/cinder/api/openstack/volume/extensions.py +++ b/cinder/api/openstack/volume/extensions.py @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. -from cinder.api.openstack import extensions as base_extensions +from cinder.api import extensions as base_extensions from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/limits.py b/cinder/api/openstack/volume/limits.py index a9e62dde5..b8a0ad848 100644 --- a/cinder/api/openstack/volume/limits.py +++ b/cinder/api/openstack/volume/limits.py @@ -27,9 +27,9 @@ import time import webob.dec import webob.exc -from cinder.api.openstack.volume.views import limits as limits_views from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api.views import limits as limits_views +from cinder.api import xmlutil from cinder.openstack.common import importutils from cinder.openstack.common import jsonutils from cinder import quota diff --git a/cinder/api/openstack/volume/snapshots.py b/cinder/api/openstack/volume/snapshots.py index bf12d30a3..114b4e58c 100644 --- a/cinder/api/openstack/volume/snapshots.py +++ b/cinder/api/openstack/volume/snapshots.py @@ -18,10 +18,10 @@ import webob from webob import exc -from cinder.api.openstack import common +from cinder.api import common from cinder.api.openstack.volume import volumes from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import exception from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/types.py b/cinder/api/openstack/volume/types.py index 467c22c87..87583681c 100644 --- a/cinder/api/openstack/volume/types.py +++ b/cinder/api/openstack/volume/types.py @@ -19,9 +19,9 @@ from webob import exc -from cinder.api.openstack.volume.views import types as views_types from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api.views import types as views_types +from cinder.api import xmlutil from cinder import exception from cinder.volume import volume_types diff --git a/cinder/api/openstack/volume/volumes.py b/cinder/api/openstack/volume/volumes.py index 53abd8b54..065e4d5a6 100644 --- a/cinder/api/openstack/volume/volumes.py +++ b/cinder/api/openstack/volume/volumes.py @@ -19,9 +19,9 @@ import webob from webob import exc from xml.dom import minidom -from cinder.api.openstack import common +from cinder.api import common from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import exception from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/schemas/atom-link.rng b/cinder/api/schemas/atom-link.rng similarity index 100% rename from cinder/api/openstack/volume/schemas/atom-link.rng rename to cinder/api/schemas/atom-link.rng diff --git a/cinder/api/openstack/volume/schemas/v1.1/extension.rng b/cinder/api/schemas/v1.1/extension.rng similarity index 100% rename from cinder/api/openstack/volume/schemas/v1.1/extension.rng rename to cinder/api/schemas/v1.1/extension.rng diff --git a/cinder/api/openstack/volume/schemas/v1.1/extensions.rng b/cinder/api/schemas/v1.1/extensions.rng similarity index 100% rename from cinder/api/openstack/volume/schemas/v1.1/extensions.rng rename to cinder/api/schemas/v1.1/extensions.rng diff --git a/cinder/api/openstack/volume/schemas/v1.1/limits.rng b/cinder/api/schemas/v1.1/limits.rng similarity index 100% rename from cinder/api/openstack/volume/schemas/v1.1/limits.rng rename to cinder/api/schemas/v1.1/limits.rng diff --git a/cinder/api/openstack/volume/schemas/v1.1/metadata.rng b/cinder/api/schemas/v1.1/metadata.rng similarity index 100% rename from cinder/api/openstack/volume/schemas/v1.1/metadata.rng rename to cinder/api/schemas/v1.1/metadata.rng diff --git a/cinder/api/openstack/urlmap.py b/cinder/api/urlmap.py similarity index 100% rename from cinder/api/openstack/urlmap.py rename to cinder/api/urlmap.py diff --git a/cinder/api/openstack/volume/versions.py b/cinder/api/versions.py similarity index 98% rename from cinder/api/openstack/volume/versions.py rename to cinder/api/versions.py index a3cc91f9b..f4e4015a0 100644 --- a/cinder/api/openstack/volume/versions.py +++ b/cinder/api/versions.py @@ -16,12 +16,11 @@ # under the License. import datetime - from lxml import etree -from cinder.api.openstack.volume.views import versions as views_versions from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil +from cinder.api.views import versions as views_versions +from cinder.api import xmlutil VERSIONS = { diff --git a/cinder/api/openstack/volume/views/__init__.py b/cinder/api/views/__init__.py similarity index 100% rename from cinder/api/openstack/volume/views/__init__.py rename to cinder/api/views/__init__.py diff --git a/cinder/api/openstack/volume/views/limits.py b/cinder/api/views/limits.py similarity index 100% rename from cinder/api/openstack/volume/views/limits.py rename to cinder/api/views/limits.py diff --git a/cinder/api/openstack/volume/views/types.py b/cinder/api/views/types.py similarity index 97% rename from cinder/api/openstack/volume/views/types.py rename to cinder/api/views/types.py index a0c510cdd..4b89167c8 100644 --- a/cinder/api/openstack/volume/views/types.py +++ b/cinder/api/views/types.py @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. -from cinder.api.openstack import common +from cinder.api import common class ViewBuilder(common.ViewBuilder): diff --git a/cinder/api/openstack/volume/views/versions.py b/cinder/api/views/versions.py similarity index 100% rename from cinder/api/openstack/volume/views/versions.py rename to cinder/api/views/versions.py diff --git a/cinder/api/openstack/xmlutil.py b/cinder/api/xmlutil.py similarity index 99% rename from cinder/api/openstack/xmlutil.py rename to cinder/api/xmlutil.py index b8461ca5e..105625ba8 100644 --- a/cinder/api/openstack/xmlutil.py +++ b/cinder/api/xmlutil.py @@ -32,9 +32,9 @@ XMLNS_VOLUME_V1 = 'http://docs.openstack.org/volume/api/v1' def validate_schema(xml, schema_name): if isinstance(xml, str): xml = etree.fromstring(xml) - base_path = 'cinder/api/openstack/volume/schemas/v1.1/' + base_path = 'cinder/api/schemas/v1.1/' if schema_name in ('atom', 'atom-link'): - base_path = 'cinder/api/openstack/volume/schemas/' + base_path = 'cinder/api/schemas/' schema_path = os.path.join(utils.cinderdir(), '%s%s.rng' % (base_path, schema_name)) schema_doc = etree.parse(schema_path) diff --git a/cinder/tests/api/openstack/common.py b/cinder/tests/api/common.py similarity index 100% rename from cinder/tests/api/openstack/common.py rename to cinder/tests/api/common.py diff --git a/cinder/tests/api/openstack/fakes.py b/cinder/tests/api/openstack/fakes.py index 97a5b95f5..cbc8613b3 100644 --- a/cinder/tests/api/openstack/fakes.py +++ b/cinder/tests/api/openstack/fakes.py @@ -26,11 +26,11 @@ import webob.request from cinder.api import auth as api_auth from cinder.api import openstack as openstack_api from cinder.api.openstack import auth -from cinder.api.openstack import urlmap from cinder.api.openstack import volume from cinder.api.openstack.volume import limits -from cinder.api.openstack.volume import versions from cinder.api.openstack import wsgi as os_wsgi +from cinder.api import urlmap +from cinder.api import versions from cinder import context from cinder import exception as exc from cinder.openstack.common import timeutils diff --git a/cinder/tests/api/openstack/test_faults.py b/cinder/tests/api/openstack/test_faults.py index 9c874c8f0..4ca375e08 100644 --- a/cinder/tests/api/openstack/test_faults.py +++ b/cinder/tests/api/openstack/test_faults.py @@ -21,7 +21,7 @@ import webob import webob.dec import webob.exc -from cinder.api.openstack import common +from cinder.api import common from cinder.api.openstack import wsgi from cinder.openstack.common import jsonutils from cinder import test diff --git a/cinder/tests/api/openstack/volume/extensions/foxinsocks.py b/cinder/tests/api/openstack/volume/extensions/foxinsocks.py index 5fcd6a2ba..f01244d77 100644 --- a/cinder/tests/api/openstack/volume/extensions/foxinsocks.py +++ b/cinder/tests/api/openstack/volume/extensions/foxinsocks.py @@ -17,7 +17,7 @@ import webob.exc -from cinder.api.openstack import extensions +from cinder.api import extensions from cinder.api.openstack import wsgi diff --git a/cinder/tests/api/openstack/volume/test_extensions.py b/cinder/tests/api/openstack/volume/test_extensions.py index e1e9748be..409f8b4ad 100644 --- a/cinder/tests/api/openstack/volume/test_extensions.py +++ b/cinder/tests/api/openstack/volume/test_extensions.py @@ -21,7 +21,7 @@ from lxml import etree import webob from cinder.api.openstack import volume -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import flags from cinder.openstack.common import jsonutils from cinder import test diff --git a/cinder/tests/api/openstack/volume/test_limits.py b/cinder/tests/api/openstack/volume/test_limits.py index aaa9eb845..6a83a08e4 100644 --- a/cinder/tests/api/openstack/volume/test_limits.py +++ b/cinder/tests/api/openstack/volume/test_limits.py @@ -25,8 +25,8 @@ from lxml import etree import webob from cinder.api.openstack.volume import limits -from cinder.api.openstack.volume import views -from cinder.api.openstack import xmlutil +from cinder.api import views +from cinder.api import xmlutil import cinder.context from cinder.openstack.common import jsonutils from cinder import test diff --git a/cinder/tests/api/openstack/volume/test_router.py b/cinder/tests/api/openstack/volume/test_router.py index eba2388c0..c0fc754ab 100644 --- a/cinder/tests/api/openstack/volume/test_router.py +++ b/cinder/tests/api/openstack/volume/test_router.py @@ -16,9 +16,9 @@ from cinder.api.openstack import volume from cinder.api.openstack.volume import snapshots -from cinder.api.openstack.volume import versions from cinder.api.openstack.volume import volumes from cinder.api.openstack import wsgi +from cinder.api import versions from cinder import flags from cinder.openstack.common import log as logging from cinder import test diff --git a/cinder/tests/api/openstack/volume/test_types.py b/cinder/tests/api/openstack/volume/test_types.py index 52380928e..9f13b1ff6 100644 --- a/cinder/tests/api/openstack/volume/test_types.py +++ b/cinder/tests/api/openstack/volume/test_types.py @@ -17,7 +17,7 @@ from lxml import etree import webob from cinder.api.openstack.volume import types -from cinder.api.openstack.volume.views import types as views_types +from cinder.api.views import types as views_types from cinder import exception from cinder.openstack.common import timeutils from cinder import test diff --git a/cinder/tests/api/openstack/test_common.py b/cinder/tests/api/test_common.py similarity index 98% rename from cinder/tests/api/openstack/test_common.py rename to cinder/tests/api/test_common.py index b9b1c1015..bcea2befc 100644 --- a/cinder/tests/api/openstack/test_common.py +++ b/cinder/tests/api/test_common.py @@ -22,7 +22,7 @@ Test suites for 'common' code used throughout the OpenStack HTTP API. import webob import webob.exc -from cinder.api.openstack import common +from cinder.api import common from cinder import test @@ -32,7 +32,7 @@ ATOMNS = "{http://www.w3.org/2005/Atom}" class LimiterTest(test.TestCase): """ - Unit tests for the `cinder.api.openstack.common.limited` method which takes + Unit tests for the `cinder.api.common.limited` method which takes in a list of items and, depending on the 'offset' and 'limit' GET params, returns a subset or complete set of the given items. """ @@ -156,7 +156,7 @@ class LimiterTest(test.TestCase): class PaginationParamsTest(test.TestCase): """ - Unit tests for the `cinder.api.openstack.common.get_pagination_params` + Unit tests for the `cinder.api.common.get_pagination_params` method which takes in a request object and returns 'marker' and 'limit' GET params. """ diff --git a/cinder/tests/api/openstack/test_xmlutil.py b/cinder/tests/api/test_xmlutil.py similarity index 99% rename from cinder/tests/api/openstack/test_xmlutil.py rename to cinder/tests/api/test_xmlutil.py index 2c1ab0fb4..1799c45ff 100644 --- a/cinder/tests/api/openstack/test_xmlutil.py +++ b/cinder/tests/api/test_xmlutil.py @@ -17,7 +17,7 @@ from lxml import etree -from cinder.api.openstack import xmlutil +from cinder.api import xmlutil from cinder import test diff --git a/cinder/tests/integrated/test_xml.py b/cinder/tests/integrated/test_xml.py index fb579d3f1..2017a89e3 100644 --- a/cinder/tests/integrated/test_xml.py +++ b/cinder/tests/integrated/test_xml.py @@ -17,7 +17,7 @@ from lxml import etree -from cinder.api.openstack import common +from cinder.api import common from cinder.openstack.common import log as logging from cinder.tests.integrated import integrated_helpers diff --git a/etc/cinder/api-paste.ini b/etc/cinder/api-paste.ini index e18a9da22..575f4bd6a 100644 --- a/etc/cinder/api-paste.ini +++ b/etc/cinder/api-paste.ini @@ -3,7 +3,7 @@ ############# [composite:osapi_volume] -use = call:cinder.api.openstack.urlmap:urlmap_factory +use = call:cinder.api.urlmap:urlmap_factory /: osvolumeversions /v1: openstack_volume_api_v1 @@ -29,7 +29,7 @@ paste.app_factory = cinder.api.openstack.volume:APIRouter.factory pipeline = faultwrap osvolumeversionapp [app:osvolumeversionapp] -paste.app_factory = cinder.api.openstack.volume.versions:Versions.factory +paste.app_factory = cinder.api.versions:Versions.factory ########## # Shared # -- 2.45.2