keystone  18.0.0
About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (maintained release).
  Fossies Dox: keystone-18.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

resource.py
Go to the documentation of this file.
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12 
13 from oslo_config import cfg
14 
15 from keystone.conf import utils
16 
17 
18 driver = cfg.StrOpt(
19  'driver',
20  default='sql',
21  help=utils.fmt("""
22 Entry point for the resource driver in the `keystone.resource` namespace. Only
23 a `sql` driver is supplied by keystone. Unless you are writing proprietary
24 drivers for keystone, you do not need to set this option.
25 """))
26 
27 caching = cfg.BoolOpt(
28  'caching',
29  default=True,
30  deprecated_opts=[cfg.DeprecatedOpt('caching', group='assignment')],
31  help=utils.fmt("""
32 Toggle for resource caching. This has no effect unless global caching is
33 enabled.
34 """))
35 
36 cache_time = cfg.IntOpt(
37  'cache_time',
38  deprecated_opts=[cfg.DeprecatedOpt('cache_time', group='assignment')],
39  help=utils.fmt("""
40 Time to cache resource data in seconds. This has no effect unless global
41 caching is enabled.
42 """))
43 
44 list_limit = cfg.IntOpt(
45  'list_limit',
46  deprecated_opts=[cfg.DeprecatedOpt('list_limit', group='assignment')],
47  help=utils.fmt("""
48 Maximum number of entities that will be returned in a resource collection.
49 """))
50 
51 admin_project_domain_name = cfg.StrOpt(
52  'admin_project_domain_name',
53  help=utils.fmt("""
54 Name of the domain that owns the `admin_project_name`. If left unset, then
55 there is no admin project. `[resource] admin_project_name` must also be set to
56 use this option.
57 """))
58 
59 admin_project_name = cfg.StrOpt(
60  'admin_project_name',
61  help=utils.fmt("""
62 This is a special project which represents cloud-level administrator privileges
63 across services. Tokens scoped to this project will contain a true
64 `is_admin_project` attribute to indicate to policy systems that the role
65 assignments on that specific project should apply equally across every project.
66 If left unset, then there is no admin project, and thus no explicit means of
67 cross-project role assignments. `[resource] admin_project_domain_name` must
68 also be set to use this option.
69 """))
70 
71 project_name_url_safe = cfg.StrOpt(
72  'project_name_url_safe',
73  choices=['off', 'new', 'strict'],
74  default='off',
75  help=utils.fmt("""
76 This controls whether the names of projects are restricted from containing
77 URL-reserved characters. If set to `new`, attempts to create or update a
78 project with a URL-unsafe name will fail. If set to `strict`, attempts to scope
79 a token with a URL-unsafe project name will fail, thereby forcing all project
80 names to be updated to be URL-safe.
81 """))
82 
83 domain_name_url_safe = cfg.StrOpt(
84  'domain_name_url_safe',
85  choices=['off', 'new', 'strict'],
86  default='off',
87  help=utils.fmt("""
88 This controls whether the names of domains are restricted from containing
89 URL-reserved characters. If set to `new`, attempts to create or update a domain
90 with a URL-unsafe name will fail. If set to `strict`, attempts to scope a token
91 with a URL-unsafe domain name will fail, thereby forcing all domain names to be
92 updated to be URL-safe.
93 """))
94 
95 
96 GROUP_NAME = __name__.split('.')[-1]
97 ALL_OPTS = [
98  driver,
99  caching,
100  cache_time,
101  list_limit,
102  admin_project_domain_name,
103  admin_project_name,
104  project_name_url_safe,
105  domain_name_url_safe,
106 ]
107 
108 
109 def register_opts(conf):
110  conf.register_opts(ALL_OPTS, group=GROUP_NAME)
111 
112 
113 def list_opts():
114  return {GROUP_NAME: ALL_OPTS}
keystone.conf.resource.register_opts
def register_opts(conf)
Definition: resource.py:109
keystone.conf.resource.list_opts
def list_opts()
Definition: resource.py:113
keystone.conf
Definition: __init__.py:1