Main entry point into the Resource service.
Bases: Manager
Default pivot point for the Domain Config backend.
Create config for a domain.
domain_id – the domain in question
config – the dict of config groups/options to assign to the domain
Creates a new config, overwriting any previous config (no Conflict error will be generated).
a dict of group dicts containing the options, with any that are sensitive removed
keystone.exception.InvalidDomainConfig – when the config contains options we do not support
Delete config, or partial config, for the domain.
domain_id – the domain in question
group – an optional specific group of options
option – an optional specific option within the group
If group and option are None, then the entire config for the domain is deleted. If group is not None, then just that group of options will be deleted. If group and option are both specified, then just that option is deleted.
keystone.exception.InvalidDomainConfig – when group/option parameters specify an option we do not support or one that does not exist in the original config.
Get config, or partial config, for a domain.
domain_id – the domain in question
group – an optional specific group of options
option – an optional specific option within the group
a dict of group dicts containing the whitelisted options, filtered by group and option specified
keystone.exception.DomainConfigNotFound – when no config found that matches domain_id, group and option specified
keystone.exception.InvalidDomainConfig – when the config and group/option parameters specify an option we do not support
An example response:
{
'ldap': {
'url': 'myurl'
'user_tree_dn': 'OU=myou'},
'identity': {
'driver': 'ldap'}
}
Get default config, or partial default config.
group – an optional specific group of options
option – an optional specific option within the group
a dict of group dicts containing the default options, filtered by group and option if specified
keystone.exception.InvalidDomainConfig – when the config and group/option parameters specify an option we do not support (or one that is not whitelisted).
An example response:
{
'ldap': {
'url': 'myurl',
'user_tree_dn': 'OU=myou',
....},
'identity': {
'driver': 'ldap'}
}
Get config for a domain with sensitive info included.
This method is not exposed via the public API, but is used by the identity manager to initialize a domain with the fully formed config options.
Get full or partial security compliance config from configuration.
domain_id – the domain in question
group – a specific group of options
option – an optional specific option within the group
a dict of group dicts containing the whitelisted options, filtered by group and option specified
keystone.exception.InvalidDomainConfig – when the config and group/option parameters specify an option we do not support
An example response:
{
'security_compliance': {
'password_regex': '^(?=.*\d)(?=.*[a-zA-Z]).{7,}$'
'password_regex_description':
'A password must consist of at least 1 letter, '
'1 digit, and have a minimum length of 7 characters'
}
}
Update config, or partial config, for a domain.
domain_id – the domain in question
config – the config dict containing and groups/options being updated
group – an optional specific group of options, which if specified must appear in config, with no other groups
option – an optional specific option within the group, which if specified must appear in config, with no other options
The contents of the supplied config will be merged with the existing config for this domain, updating or creating new options if these did not previously exist. If group or option is specified, then the update will be limited to those specified items and the inclusion of other options in the supplied config will raise an exception, as will the situation when those options do not already exist in the current config.
a dict of groups containing all whitelisted options
keystone.exception.InvalidDomainConfig – when the config and group/option parameters specify an option we do not support or one that does not exist in the original config
Bases: Manager
Default pivot point for the Resource backend.
See keystone.common.manager.Manager
for more details on how this
dynamically calls the backend.
Assert the Domain is enabled.
AssertionError – if domain is disabled.
Assert the Domain’s name and id do not match the reserved keyword.
Note that the reserved keyword is defined in the configuration file, by default, it is ‘Federated’, it is also case insensitive. If config’s option is empty the default hardcoded value ‘Federated’ will be used.
AssertionError – if domain named match the value in the config.
Assert the project is enabled and its associated domain is enabled.
AssertionError – if the project or domain is disabled.
Create a new tag on project.
project_id – ID of a project to create a tag for
tag – The string value of a tag to add
The value of the created tag
Delete one project or a subtree.
cascade (boolean) – If true, the specified project and all its sub-projects are deleted. Otherwise, only the specified project is deleted.
keystone.exception.ValidationError – if project is a domain
keystone.exception.Forbidden – if project is not a leaf
Delete single tag from project.
project_id – The ID of the project
tag – The tag value to delete
keystone.exception.ProjectTagNotFound – If the tag name does not exist on the project
Get the IDs from the parents from a given project.
The project IDs are returned as a structured dictionary traversing up the hierarchy to the top level project. For example, considering the following project hierarchy:
A
|
+-B-+
| |
C D
If we query for project C parents, the expected return is the following dictionary:
'parents': {
B['id']: {
A['id']: None
}
}
Return information for a single tag on a project.
project_id – ID of a project to retrive a tag from
tag_name – Name of a tag to return
keystone.exception.ProjectTagNotFound – If the tag name does not exist on the project
The tag value
Get the IDs from the projects in the subtree from a given project.
The project IDs are returned as a structured dictionary representing their hierarchy. For example, considering the following project hierarchy:
A
|
+-B-+
| |
C D
If we query for project A subtree, the expected return is the following dictionary:
'subtree': {
B['id']: {
C['id']: None,
D['id']: None
}
}
List domains for the provided list of ids.
domain_ids – list of ids
a list of domain_refs.
This method is used internally by the assignment manager to bulk read a set of domains given their ids.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.