Skip to content

Commit

Permalink
Merge "Add policy description for instance actions"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed May 4, 2017
2 parents a818049 + 1079550 commit a33ac31
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions nova/policies/instance_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from oslo_policy import policy

from nova.policies import base


Expand All @@ -23,12 +21,33 @@


instance_actions_policies = [
policy.RuleDefault(
name=POLICY_ROOT % 'events',
check_str=base.RULE_ADMIN_API),
policy.RuleDefault(
name=BASE_POLICY_NAME,
check_str=base.RULE_ADMIN_OR_OWNER),
base.create_rule_default(
POLICY_ROOT % 'events',
base.RULE_ADMIN_API,
"""Add events details in action details for a server.
This check is performed only after the check
os_compute_api:os-instance-actions passes""",
[
{
'method': 'GET',
'path': '/servers/{server_id}/os-instance-actions/{request_id}'
}
]),
base.create_rule_default(
BASE_POLICY_NAME,
base.RULE_ADMIN_OR_OWNER,
"""List actions and show action details for a server.""",
[
{
'method': 'GET',
'path': '/servers/{server_id}/os-instance-actions'
},
{
'method': 'GET',
'path': '/servers/{server_id}/os-instance-actions/{request_id}'
}
]),
]


Expand Down

0 comments on commit a33ac31

Please sign in to comment.