Add policy config for get_flavor_service_profile operation

Policy for this API call was commented out but it is needed
for DELETE flavor_service_profile operation as Neutron's policy
module looks for ability for SHOW command when DELETE is rejected
to ensure what error message should be returned to the user.

This patch will fix Patrole test failure, see related bug description
for details.

Change-Id: I4a0e97845a40888f7f2c7267d9adb7be663ee380
Closes-Bug: #1843290
This commit is contained in:
Slawek Kaplonski 2019-09-16 17:33:03 +02:00 committed by Akihiro Motoki
parent 0809f4e224
commit ac0a426017
1 changed files with 8 additions and 9 deletions

View File

@ -122,6 +122,14 @@ rules = [
]
),
policy.RuleDefault(
'get_flavor_service_profile',
base.RULE_ANY,
('Get a flavor associated with a given service profiles. '
'There is no corresponding GET operations in API currently. '
'This rule is currently referred only in the DELETE '
'of flavor_service_profile.')
),
policy.DocumentedRuleDefault(
'create_flavor_service_profile',
base.RULE_ADMIN_ONLY,
@ -144,15 +152,6 @@ rules = [
},
]
),
# TODO(amotoki): GET /flavors/{flavor_id}/service_profiles/{profile_id}
# does not work and leads to an internal server error.
# It is not defined in the API reference either.
# It needs investigation and temporarily commented out.
# policy.RuleDefault(
# 'get_flavor_service_profile',
# base.RULE_ANY,
# 'Get a flavor associate with a given service profiles',
# ),
]