Add description to policies in agents.py

The 'discoverable' policy is not documented as it will be removed in a
future change.

blueprint policy-doc

Change-Id: Iaf5e81f6dc5cb53356cec3ec823444a4c72168c9
This commit is contained in:
Sujitha 2017-03-13 21:05:21 +00:00
parent 8e1100f641
commit 965f3c1f44
1 changed files with 12 additions and 3 deletions

View File

@ -23,9 +23,18 @@ POLICY_ROOT = 'os_compute_api:os-agents:%s'
agents_policies = [
policy.RuleDefault(
name=BASE_POLICY_NAME,
check_str=base.RULE_ADMIN_API),
base.create_rule_default(
BASE_POLICY_NAME,
base.RULE_ADMIN_API,
"""Create, list, update, and delete guest agent builds
This is XenAPI driver specific. It is used to force the upgrade of the
XenAPI guest agent on instance boot.
""",
[{'path': '/os-agents', 'method': 'GET'},
{'path': '/os-agents', 'method': 'POST'},
{'path': '/os-agents/{agent_build_id}', 'method': 'PUT'},
{'path': '/os-agents/{agent_build_id}', 'method': 'DELETE'}]),
policy.RuleDefault(
name=POLICY_ROOT % 'discoverable',
check_str=base.RULE_ANY),