openstack.identity.v3.domain

领域类

Domain 类继承自 Resource

class openstack.identity.v3.domain.Domain(_synchronized=False, connection=None, **attrs)

基础资源

参数:
  • _synchronized (bool) – 这不打算直接使用。请参阅 new()existing()

  • connection (openstack.connection.Connection) – 对正在使用的 Connection 的引用。默认为 None,允许在单元测试中等情况下使用不带活动 Connection 的 Resource 对象。Resource 代码中对 self._connection 的使用应使用 None 检查进行保护。

resource_key = 'domain'

资源的单数形式的键。

resources_key = 'domains'

资源的复数形式的键。

base_path = '/domains'

此资源的 URI 的基本部分。

allow_create = True

允许对此资源进行创建操作。

allow_fetch = True

允许对此资源进行获取操作。

allow_commit = True

允许对此资源进行更新操作。

allow_delete = True

允许对此资源进行删除操作。

allow_list = True

允许对此资源进行列表操作。

commit_method = 'PATCH'

提交资源的 HTTP 方法 (PUT、PATCH、POST)

description

此域的描述。 *类型:字符串*

is_enabled

将此属性设置为 False 会阻止用户针对此域或此域拥有的任何项目进行授权,并阻止此域拥有的用户进行身份验证或接收任何其他授权。 此外,适用于上述实体的所有预先存在的令牌都会立即失效。 重新启用域不会重新启用预先存在的令牌。 *类型:布尔值*

options

项目的资源选项。 可用的资源选项是不可变的。

与域资源相关的链接。

assign_role_to_user(session, user, role, inherited)

将角色分配给域中的用户

validate_user_has_role(session, user, role, inherited)

验证用户是否在域中具有角色

unassign_role_from_user(session, user, role, inherited)

从域中的用户取消分配角色

assign_role_to_group(session, group, role, inherited)

将角色分配给域中的组

validate_group_has_role(session, group, role, inherited)

验证组是否在域中具有角色

unassign_role_from_group(session, group, role, inherited)

从域中的组取消分配角色