Add description to policies in evacuate.py and rescue.py

blueprint policy-docs

Change-Id: I502deec4902194e7a5d31745735d18977d768b4c
This commit is contained in:
Kevin_Zheng 2017-03-27 09:52:33 +08:00 committed by Zhenyu Zheng
parent a3df985a6e
commit ae73d14244
2 changed files with 25 additions and 6 deletions

View File

@ -26,9 +26,16 @@ evacuate_policies = [
policy.RuleDefault(
name=POLICY_ROOT % 'discoverable',
check_str=base.RULE_ANY),
policy.RuleDefault(
name=BASE_POLICY_NAME,
check_str=base.RULE_ADMIN_API),
base.create_rule_default(
BASE_POLICY_NAME,
base.RULE_ADMIN_API,
"Evacuate a server from a failed host to a new host",
[
{
'path': '/servers/{server_id}/action (evacuate)',
'method': 'POST'
}
]),
]

View File

@ -26,9 +26,21 @@ rescue_policies = [
policy.RuleDefault(
name=POLICY_ROOT % 'discoverable',
check_str=base.RULE_ANY),
policy.RuleDefault(
name=BASE_POLICY_NAME,
check_str=base.RULE_ADMIN_OR_OWNER),
base.create_rule_default(
BASE_POLICY_NAME,
base.RULE_ADMIN_OR_OWNER,
"Rescue/unrescue a server",
[
{
'path': '/servers/{server_id}/action (rescue)',
'method': 'POST'
},
{
'path': '/servers/{server_id}/action (unrescue)',
'method': 'POST'
}
]
),
]