Skip to content

Commit

Permalink
Add description to nova/policies/shelve.py
Browse files Browse the repository at this point in the history
The 'discoverable' policy is not documented as it will be removed in a
future change.

blueprint policy-docs

Change-Id: Ie44ced1a5551ed085fd48ec6c55547ca423d3278
  • Loading branch information
Anusha Unnam committed Mar 24, 2017
1 parent 2a41eb8 commit cb70f9c
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions nova/policies/shelve.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,36 @@


shelve_policies = [
policy.RuleDefault(
name=POLICY_ROOT % 'shelve',
check_str=base.RULE_ADMIN_OR_OWNER),
policy.RuleDefault(
name=POLICY_ROOT % 'unshelve',
check_str=base.RULE_ADMIN_OR_OWNER),
policy.RuleDefault(
name=POLICY_ROOT % 'shelve_offload',
check_str=base.RULE_ADMIN_API),
base.create_rule_default(
POLICY_ROOT % 'shelve',
base.RULE_ADMIN_OR_OWNER,
"Shelve Server",
[
{
'method': 'POST',
'path': '/servers/{server_id}/action (shelve)'
}
]),
base.create_rule_default(
POLICY_ROOT % 'unshelve',
base.RULE_ADMIN_OR_OWNER,
"Unshelve (Restore) Shelved Server",
[
{
'method': 'POST',
'path': '/servers/{server_id}/action (unshelve)'
}
]),
base.create_rule_default(
POLICY_ROOT % 'shelve_offload',
base.RULE_ADMIN_API,
"Shelf-Offload (Remove) Server",
[
{
'method': 'POST',
'path': '/servers/{server_id}/action (shelveOffload)'
}
]),
policy.RuleDefault(
name=POLICY_ROOT % 'discoverable',
check_str=base.RULE_ANY),
Expand Down

0 comments on commit cb70f9c

Please sign in to comment.