Merge "Introduce scope_types in shelve server"
This commit is contained in:
commit
f4c5216372
|
@ -23,35 +23,38 @@ POLICY_ROOT = 'os_compute_api:os-shelve:%s'
|
||||||
|
|
||||||
shelve_policies = [
|
shelve_policies = [
|
||||||
policy.DocumentedRuleDefault(
|
policy.DocumentedRuleDefault(
|
||||||
POLICY_ROOT % 'shelve',
|
name=POLICY_ROOT % 'shelve',
|
||||||
base.RULE_ADMIN_OR_OWNER,
|
check_str=base.RULE_ADMIN_OR_OWNER,
|
||||||
"Shelve server",
|
description="Shelve server",
|
||||||
[
|
operations=[
|
||||||
{
|
{
|
||||||
'method': 'POST',
|
'method': 'POST',
|
||||||
'path': '/servers/{server_id}/action (shelve)'
|
'path': '/servers/{server_id}/action (shelve)'
|
||||||
}
|
}
|
||||||
]),
|
],
|
||||||
|
scope_types=['system', 'project']),
|
||||||
policy.DocumentedRuleDefault(
|
policy.DocumentedRuleDefault(
|
||||||
POLICY_ROOT % 'unshelve',
|
name=POLICY_ROOT % 'unshelve',
|
||||||
base.RULE_ADMIN_OR_OWNER,
|
check_str=base.RULE_ADMIN_OR_OWNER,
|
||||||
"Unshelve (restore) shelved server",
|
description="Unshelve (restore) shelved server",
|
||||||
[
|
operations=[
|
||||||
{
|
{
|
||||||
'method': 'POST',
|
'method': 'POST',
|
||||||
'path': '/servers/{server_id}/action (unshelve)'
|
'path': '/servers/{server_id}/action (unshelve)'
|
||||||
}
|
}
|
||||||
]),
|
],
|
||||||
|
scope_types=['system', 'project']),
|
||||||
policy.DocumentedRuleDefault(
|
policy.DocumentedRuleDefault(
|
||||||
POLICY_ROOT % 'shelve_offload',
|
name=POLICY_ROOT % 'shelve_offload',
|
||||||
base.RULE_ADMIN_API,
|
check_str=base.RULE_ADMIN_API,
|
||||||
"Shelf-offload (remove) server",
|
description="Shelf-offload (remove) server",
|
||||||
[
|
operations=[
|
||||||
{
|
{
|
||||||
'method': 'POST',
|
'method': 'POST',
|
||||||
'path': '/servers/{server_id}/action (shelveOffload)'
|
'path': '/servers/{server_id}/action (shelveOffload)'
|
||||||
}
|
}
|
||||||
]),
|
],
|
||||||
|
scope_types=['system', 'project']),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue