Merge "Add more description to policies in the keypairs.py"

This commit is contained in:
Jenkins 2017-05-12 03:04:17 +00:00 committed by Gerrit Code Review
commit d139591a90
1 changed files with 14 additions and 5 deletions

View File

@ -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
@ -63,9 +61,20 @@ keypairs_policies = [
'method': 'GET'
}
]),
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 'key_name' in the response of server.",
[
{
'path': '/servers/{id}',
'method': 'GET',
},
{
'path': '/servers/detail',
'method': 'GET'
}
]),
]