Add description to policies in hypervisors.py
blueprint policy-docs Change-Id: Ie27ba40d8d5cfd811dc5a82f01fe9fa1e49e4ed6 Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
3cc34c2aa3
commit
be7f40c92b
|
@ -26,9 +26,51 @@ hypervisors_policies = [
|
|||
policy.RuleDefault(
|
||||
name=POLICY_ROOT % 'discoverable',
|
||||
check_str=base.RULE_ANY),
|
||||
policy.RuleDefault(
|
||||
name=BASE_POLICY_NAME,
|
||||
check_str=base.RULE_ADMIN_API),
|
||||
base.create_rule_default(
|
||||
BASE_POLICY_NAME,
|
||||
base.RULE_ADMIN_API,
|
||||
"""Policy rule for hypervisor related APIs.
|
||||
|
||||
This rule will be checked for the following APIs:
|
||||
|
||||
List all hypervisors, list all hypervisors with details, show
|
||||
summary statistics for all hypervisors over all compute nodes,
|
||||
show details for a hypervisor, show the uptime of a hypervisor,
|
||||
search hypervisor by hypervisor_hostname pattern and list all
|
||||
servers on hypervisors that can match the provided hypervisor_hostname
|
||||
pattern.""",
|
||||
[
|
||||
{
|
||||
'path': '/os-hypervisors',
|
||||
'method': 'GET'
|
||||
},
|
||||
{
|
||||
'path': '/os-hypervisors/details',
|
||||
'method': 'GET'
|
||||
},
|
||||
{
|
||||
'path': '/os-hypervisors/statistics',
|
||||
'method': 'GET'
|
||||
},
|
||||
{
|
||||
'path': '/os-hypervisors/{hypervisor_id}',
|
||||
'method': 'GET'
|
||||
},
|
||||
{
|
||||
'path': '/os-hypervisors/{hypervisor_id}/uptime',
|
||||
'method': 'GET'
|
||||
},
|
||||
{
|
||||
'path': '/os-hypervisors/{hypervisor_hostname_pattern}/search',
|
||||
'method': 'GET'
|
||||
},
|
||||
{
|
||||
'path':
|
||||
'/os-hypervisors/{hypervisor_hostname_pattern}/servers',
|
||||
'method': 'GET'
|
||||
}
|
||||
]
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue