Add description to policies in cells.py
blueprint policy-docs Change-Id: I4cf6762b6a30c93ae705d4ff063756aeca5aef86
This commit is contained in:
parent
390c7e420f
commit
2060f2da39
|
@ -26,21 +26,72 @@ cells_policies = [
|
||||||
policy.RuleDefault(
|
policy.RuleDefault(
|
||||||
name=POLICY_ROOT % 'discoverable',
|
name=POLICY_ROOT % 'discoverable',
|
||||||
check_str=base.RULE_ANY),
|
check_str=base.RULE_ANY),
|
||||||
policy.RuleDefault(
|
base.create_rule_default(
|
||||||
name=POLICY_ROOT % 'update',
|
POLICY_ROOT % 'update',
|
||||||
check_str=base.RULE_ADMIN_API),
|
base.RULE_ADMIN_API,
|
||||||
policy.RuleDefault(
|
'Update an existing cell',
|
||||||
name=POLICY_ROOT % 'create',
|
[
|
||||||
check_str=base.RULE_ADMIN_API),
|
{
|
||||||
policy.RuleDefault(
|
'method': 'PUT',
|
||||||
name=BASE_POLICY_NAME,
|
'path': '/os-cells/{cell_id}'
|
||||||
check_str=base.RULE_ADMIN_API),
|
}
|
||||||
policy.RuleDefault(
|
]),
|
||||||
name=POLICY_ROOT % 'sync_instances',
|
base.create_rule_default(
|
||||||
check_str=base.RULE_ADMIN_API),
|
POLICY_ROOT % 'create',
|
||||||
policy.RuleDefault(
|
base.RULE_ADMIN_API,
|
||||||
name=POLICY_ROOT % 'delete',
|
'Create a new cell',
|
||||||
check_str=base.RULE_ADMIN_API),
|
[
|
||||||
|
{
|
||||||
|
'method': 'POST',
|
||||||
|
'path': '/os-cells'
|
||||||
|
}
|
||||||
|
]),
|
||||||
|
base.create_rule_default(
|
||||||
|
BASE_POLICY_NAME,
|
||||||
|
base.RULE_ADMIN_API,
|
||||||
|
'List and get detailed info of a given cell or all cells',
|
||||||
|
[
|
||||||
|
{
|
||||||
|
'method': 'GET',
|
||||||
|
'path': '/os-cells'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'method': 'GET',
|
||||||
|
'path': '/os-cells/detail'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'method': 'GET',
|
||||||
|
'path': '/os-cells/info'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'method': 'GET',
|
||||||
|
'path': '/os-cells/capacities'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'method': 'GET',
|
||||||
|
'path': '/os-cells/{cell_id}'
|
||||||
|
}
|
||||||
|
]),
|
||||||
|
base.create_rule_default(
|
||||||
|
POLICY_ROOT % 'sync_instances',
|
||||||
|
base.RULE_ADMIN_API,
|
||||||
|
'Sync instances info in all cells',
|
||||||
|
[
|
||||||
|
{
|
||||||
|
'method': 'POST',
|
||||||
|
'path': '/os-cells/sync_instances'
|
||||||
|
}
|
||||||
|
]),
|
||||||
|
base.create_rule_default(
|
||||||
|
POLICY_ROOT % 'delete',
|
||||||
|
base.RULE_ADMIN_API,
|
||||||
|
'Remove a cell',
|
||||||
|
[
|
||||||
|
{
|
||||||
|
'method': 'DELETE',
|
||||||
|
'path': '/os-cells/{cell_id}'
|
||||||
|
}
|
||||||
|
])
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue