diff options
author | RHE <rebirthmonkey@gmail.com> | 2017-11-24 13:54:26 +0100 |
---|---|---|
committer | RHE <rebirthmonkey@gmail.com> | 2017-11-24 13:54:26 +0100 |
commit | 920a49cfa055733d575282973e23558c33087a4a (patch) | |
tree | d371dab34efa5028600dad2e7ca58063626e7ba4 /keystone-moon/keystone/common/models.py | |
parent | ef3eefca70d8abb4a00dafb9419ad32738e934b2 (diff) |
remove keystone-moon
Change-Id: I80d7c9b669f19d5f6607e162de8e0e55c2f80fdd
Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'keystone-moon/keystone/common/models.py')
-rw-r--r-- | keystone-moon/keystone/common/models.py | 196 |
1 files changed, 0 insertions, 196 deletions
diff --git a/keystone-moon/keystone/common/models.py b/keystone-moon/keystone/common/models.py deleted file mode 100644 index de996522..00000000 --- a/keystone-moon/keystone/common/models.py +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright (C) 2011 OpenStack Foundation -# -# 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. - -"""Base model for keystone internal services - -Unless marked otherwise, all fields are strings. - -""" - - -class Model(dict): - """Base model class.""" - - def __hash__(self): - return self['id'].__hash__() - - @property - def known_keys(cls): - return cls.required_keys + cls.optional_keys - - -class Token(Model): - """Token object. - - Required keys: - id - expires (datetime) - - Optional keys: - user - tenant - metadata - trust_id - """ - - required_keys = ('id', 'expires') - optional_keys = ('extra',) - - -class Service(Model): - """Service object. - - Required keys: - id - type - name - - Optional keys: - """ - - required_keys = ('id', 'type', 'name') - optional_keys = tuple() - - -class Endpoint(Model): - """Endpoint object - - Required keys: - id - region - service_id - - Optional keys: - internalurl - publicurl - adminurl - """ - - required_keys = ('id', 'region', 'service_id') - optional_keys = ('internalurl', 'publicurl', 'adminurl') - - -class User(Model): - """User object. - - Required keys: - id - name - domain_id - - Optional keys: - password - description - email - enabled (bool, default True) - default_project_id - """ - - required_keys = ('id', 'name', 'domain_id') - optional_keys = ('password', 'description', 'email', 'enabled', - 'default_project_id') - - -class Group(Model): - """Group object. - - Required keys: - id - name - domain_id - - Optional keys: - - description - - """ - - required_keys = ('id', 'name', 'domain_id') - optional_keys = ('description',) - - -class Project(Model): - """Project object. - - Required keys: - id - name - domain_id - - Optional Keys: - description - enabled (bool, default True) - is_domain (bool, default False) - - """ - - required_keys = ('id', 'name', 'domain_id') - optional_keys = ('description', 'enabled', 'is_domain') - - -class Role(Model): - """Role object. - - Required keys: - id - name - - """ - - required_keys = ('id', 'name') - optional_keys = tuple() - - -class ImpliedRole(Model): - """ImpliedRole object. - - Required keys: - prior_role_id - implied_role_id - """ - - required_keys = ('prior_role_id', 'implied_role_id') - optional_keys = tuple() - - -class Trust(Model): - """Trust object. - - Required keys: - id - trustor_user_id - trustee_user_id - project_id - """ - - required_keys = ('id', 'trustor_user_id', 'trustee_user_id', 'project_id') - optional_keys = ('expires_at',) - - -class Domain(Model): - """Domain object. - - Required keys: - id - name - - Optional keys: - - description - enabled (bool, default True) - - """ - - required_keys = ('id', 'name') - optional_keys = ('description', 'enabled') |