From 99731446257c600e872e117fd0a0779aa31f3154 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Wed, 5 Aug 2015 11:29:01 +1000 Subject: [PATCH] Move AccessInfo objects into own module The ServiceCatalog and ServiceProviders should not really be needed in a standalone sense. They are there to make it easier to work with an AccessInfo. Therefore move all of this into a standalone access module. Change-Id: Idc6856d89c2131855657d01114cc72372b3b11f4 --- keystoneauth1/access/__init__.py | 19 +++++++++++++++++++ keystoneauth1/{ => access}/access.py | 10 ++++++++-- keystoneauth1/{ => access}/service_catalog.py | 0 .../{ => access}/service_providers.py | 0 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 keystoneauth1/access/__init__.py rename keystoneauth1/{ => access}/access.py (98%) rename keystoneauth1/{ => access}/service_catalog.py (100%) rename keystoneauth1/{ => access}/service_providers.py (100%) diff --git a/keystoneauth1/access/__init__.py b/keystoneauth1/access/__init__.py new file mode 100644 index 00000000..3d1a48bd --- /dev/null +++ b/keystoneauth1/access/__init__.py @@ -0,0 +1,19 @@ +# 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 keystoneauth1.access.access import * # noqa + + +__all__ = ['AccessInfo', + 'AccessInfoV2', + 'AccessInfoV3', + 'create'] diff --git a/keystoneauth1/access.py b/keystoneauth1/access/access.py similarity index 98% rename from keystoneauth1/access.py rename to keystoneauth1/access/access.py index 64765d24..20b1f897 100644 --- a/keystoneauth1/access.py +++ b/keystoneauth1/access/access.py @@ -17,14 +17,20 @@ import functools from keystoneauth1 import _utils as utils -from keystoneauth1 import service_catalog -from keystoneauth1 import service_providers +from keystoneauth1.access import service_catalog +from keystoneauth1.access import service_providers # gap, in seconds, to determine whether the given token is about to expire STALE_TOKEN_DURATION = 30 +__all__ = ['AccessInfo', + 'AccessInfoV2', + 'AccessInfoV3', + 'create'] + + @utils.positional() def create(resp=None, body=None, auth_token=None): if resp and not body: diff --git a/keystoneauth1/service_catalog.py b/keystoneauth1/access/service_catalog.py similarity index 100% rename from keystoneauth1/service_catalog.py rename to keystoneauth1/access/service_catalog.py diff --git a/keystoneauth1/service_providers.py b/keystoneauth1/access/service_providers.py similarity index 100% rename from keystoneauth1/service_providers.py rename to keystoneauth1/access/service_providers.py