Merge "Add policy description for server_usage"
This commit is contained in:
commit
4d6ff4f835
|
@ -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
|
||||
|
||||
|
||||
|
@ -22,9 +20,27 @@ BASE_POLICY_NAME = 'os_compute_api:os-server-usage'
|
|||
|
||||
|
||||
server_usage_policies = [
|
||||
policy.RuleDefault(
|
||||
name=BASE_POLICY_NAME,
|
||||
check_str=base.RULE_ADMIN_OR_OWNER),
|
||||
base.create_rule_default(
|
||||
BASE_POLICY_NAME,
|
||||
base.RULE_ADMIN_OR_OWNER,
|
||||
"""Add 'OS-SRV-USG:launched_at' & 'OS-SRV-USG:terminated_at' attribute
|
||||
in the server response.
|
||||
|
||||
This check is performed only after the check
|
||||
'os_compute_api:servers:show' for GET /servers/{id} and
|
||||
'os_compute_api:servers:detail' for GET /servers/detail passes""",
|
||||
|
||||
|
||||
[
|
||||
{
|
||||
'method': 'GET',
|
||||
'path': '/servers/{id}'
|
||||
},
|
||||
{
|
||||
'method': 'GET',
|
||||
'path': '/servers/detail'
|
||||
}
|
||||
]),
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue