Add description to policies in extended_status and extended_volumes
This updates the policy doc for extended_status.py and extended_volumes.py Partial implement blueprint policy-docs Change-Id: I980eff5fd118601ecdf61c558013f3abba56a6ce
This commit is contained in:
parent
88ac5dbf08
commit
c2d3e80658
@ -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,26 @@ BASE_POLICY_NAME = 'os_compute_api:os-extended-status'
|
||||
|
||||
|
||||
extended_status_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,
|
||||
"""Return extended status in the response of server.
|
||||
|
||||
This policy will control the visibility for a set of attributes:
|
||||
OS-EXT-STS:task_state
|
||||
OS-EXT-STS:vm_state
|
||||
OS-EXT-STS:power_state
|
||||
""",
|
||||
[
|
||||
{
|
||||
'method': 'GET',
|
||||
'path': '/servers/{id}'
|
||||
},
|
||||
{
|
||||
'method': 'GET',
|
||||
'path': '/servers/detail'
|
||||
}
|
||||
]),
|
||||
]
|
||||
|
||||
|
||||
|
@ -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,21 @@ BASE_POLICY_NAME = 'os_compute_api:os-extended-volumes'
|
||||
|
||||
|
||||
extended_volumes_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,
|
||||
"Return 'os-extended-volumes:volumes_attached' in the response of "
|
||||
"server.",
|
||||
[
|
||||
{
|
||||
'method': 'GET',
|
||||
'path': '/servers/{id}'
|
||||
},
|
||||
{
|
||||
'method': 'GET',
|
||||
'path': '/servers/detail'
|
||||
}
|
||||
]),
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user