keystone.policy.backends.rules 模块

keystone 的策略引擎。

class keystone.policy.backends.rules.Policy[source]

基类: PolicyDriverBase

create_policy(policy_id, policy)[source]

存储策略数据块。

引发:

keystone.exception.Conflict – 如果存在重复的策略。

delete_policy(policy_id)[source]

移除策略数据块。

引发:

keystone.exception.PolicyNotFound – 如果策略不存在。

enforce(credentials, action, target)[source]

验证用户是否有权执行操作。

有关完整实现的更多信息,请参阅:keystone.policy.backends.rules.Policy.enforce

get_policy(policy_id)[source]

检索特定的策略数据块。

引发:

keystone.exception.PolicyNotFound – 如果策略不存在。

list_policies()[source]

列出所有策略。

update_policy(policy_id, policy)[source]

更新策略数据块。

引发:

keystone.exception.PolicyNotFound – 如果策略不存在。