From 315a031c9b90169d8c3c7c462848c4729c70ccf3 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Fri, 16 Dec 2011 13:51:35 -0600 Subject: Refactor: Workaround for python build_sphinx failure See: https://jenkins.openstack.org/view/Keystone/job/keystone-docs/228/console Change-Id: I2dd3724d0347c2525a1f02cebd4a5eb2e3142cb0 --- keystone/logic/service.py | 4 ++-- keystone/managers/__init__.py | 0 keystone/managers/tenant.py | 32 ++++++++++++++++++++++++++++++++ keystone/managers/token.py | 32 ++++++++++++++++++++++++++++++++ keystone/tenant.py | 32 -------------------------------- keystone/token.py | 32 -------------------------------- 6 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 keystone/managers/__init__.py create mode 100644 keystone/managers/tenant.py create mode 100644 keystone/managers/token.py delete mode 100644 keystone/tenant.py delete mode 100644 keystone/token.py diff --git a/keystone/logic/service.py b/keystone/logic/service.py index 2d1b6f08..c76c971e 100755 --- a/keystone/logic/service.py +++ b/keystone/logic/service.py @@ -35,8 +35,8 @@ from keystone.logic.types.credential import Credentials, PasswordCredentials from keystone import utils # New imports as we refactor old backend design and models from keystone.models import Tenant, Token -from keystone.token import Manager as TokenManager -from keystone.tenant import Manager as TenantManager +from keystone.managers.token import Manager as TokenManager +from keystone.managers.tenant import Manager as TenantManager LOG = logging.getLogger('keystone.logic.service') diff --git a/keystone/managers/__init__.py b/keystone/managers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/keystone/managers/tenant.py b/keystone/managers/tenant.py new file mode 100644 index 00000000..e846d7b0 --- /dev/null +++ b/keystone/managers/tenant.py @@ -0,0 +1,32 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 +# +# Copyright (C) 2011 OpenStack LLC. +# +# 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. + +""" Tenant manager module + +TODO: move functionality into here. Ex: + + def get_tenant(self, context, tenant_id): + '''Return info for a tenant if it is valid.''' + return self.driver.get(tenant_id) +""" + +import keystone.backends.api as api + + +class Manager(object): + def __init__(self, options): + self.options = options + self.driver = api.TENANT diff --git a/keystone/managers/token.py b/keystone/managers/token.py new file mode 100644 index 00000000..99607a58 --- /dev/null +++ b/keystone/managers/token.py @@ -0,0 +1,32 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 +# +# Copyright (C) 2011 OpenStack LLC. +# +# 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. + +""" Token manager module + +TODO: move functionality into here. Ex: + + def get_token(self, context, token_id): + '''Return info for a token if it is valid.''' + return self.driver.get(token_id) +""" + +import keystone.backends.api as api + + +class Manager(object): + def __init__(self, options): + self.options = options + self.driver = api.TOKEN diff --git a/keystone/tenant.py b/keystone/tenant.py deleted file mode 100644 index e846d7b0..00000000 --- a/keystone/tenant.py +++ /dev/null @@ -1,32 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# -# Copyright (C) 2011 OpenStack LLC. -# -# 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. - -""" Tenant manager module - -TODO: move functionality into here. Ex: - - def get_tenant(self, context, tenant_id): - '''Return info for a tenant if it is valid.''' - return self.driver.get(tenant_id) -""" - -import keystone.backends.api as api - - -class Manager(object): - def __init__(self, options): - self.options = options - self.driver = api.TENANT diff --git a/keystone/token.py b/keystone/token.py deleted file mode 100644 index 99607a58..00000000 --- a/keystone/token.py +++ /dev/null @@ -1,32 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# -# Copyright (C) 2011 OpenStack LLC. -# -# 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. - -""" Token manager module - -TODO: move functionality into here. Ex: - - def get_token(self, context, token_id): - '''Return info for a token if it is valid.''' - return self.driver.get(token_id) -""" - -import keystone.backends.api as api - - -class Manager(object): - def __init__(self, options): - self.options = options - self.driver = api.TOKEN -- cgit