Skip to content

Commit

Permalink
Merge "Add description to nova/policies/shelve.py"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 28, 2017
2 parents 4914abd + cb70f9c commit 19fdbb1
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 19fdbb1

Please sign in to comment.