diff options
author | Lance Bragstad <lbragstad@gmail.com> | 2021-08-26 14:50:35 +0000 |
---|---|---|
committer | Lance Bragstad <lbragstad@gmail.com> | 2021-10-07 13:32:04 +0000 |
commit | a57ae85c9699e7a560b7ffe9786ed0a6453c1e86 (patch) | |
tree | da49cf029823f0b38434e348e5d57f32a502d60e | |
parent | f510c806de3e20cdedd55291cd58dafa59398bec (diff) | |
download | keystone-a57ae85c9699e7a560b7ffe9786ed0a6453c1e86.tar.gz |
Fix typos in ec2 credential policies
There was a trailing s in two of these policies and it caused the policy
names to mismatch, which causes confusion with the rendered policy files
and potentially causes uses with deprecation logic.
Conflicts:
keystone/common/policies/ec2_credential.py in later releases the
deprecated parameters were moved from the DocumentedRuleDefault
object to the deprecated object.
Change-Id: I54021986d17c57d7733d53caa4032c2767eaf25e
(cherry picked from commit 82da8824df0f56ef4e137805bf32d647cef1ea59)
(cherry picked from commit 6dff22b5baa1a19842aca435782fe1f9789f72cc)
-rw-r--r-- | keystone/common/policies/ec2_credential.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/keystone/common/policies/ec2_credential.py b/keystone/common/policies/ec2_credential.py index 25e65b532..266a80e0b 100644 --- a/keystone/common/policies/ec2_credential.py +++ b/keystone/common/policies/ec2_credential.py @@ -23,12 +23,12 @@ deprecated_ec2_list_credentials = policy.DeprecatedRule( name=base.IDENTITY % 'ec2_list_credentials', check_str=base.RULE_ADMIN_OR_OWNER ) -deprecated_ec2_create_credentials = policy.DeprecatedRule( - name=base.IDENTITY % 'ec2_create_credentials', +deprecated_ec2_create_credential = policy.DeprecatedRule( + name=base.IDENTITY % 'ec2_create_credential', check_str=base.RULE_ADMIN_OR_OWNER ) -deprecated_ec2_delete_credentials = policy.DeprecatedRule( - name=base.IDENTITY % 'ec2_delete_credentials', +deprecated_ec2_delete_credential = policy.DeprecatedRule( + name=base.IDENTITY % 'ec2_delete_credential', check_str=base.RULE_ADMIN_OR_CREDENTIAL_OWNER ) @@ -67,7 +67,7 @@ ec2_credential_policies = [ description='Create ec2 credential.', operations=[{'path': '/v3/users/{user_id}/credentials/OS-EC2', 'method': 'POST'}], - deprecated_rule=deprecated_ec2_create_credentials, + deprecated_rule=deprecated_ec2_create_credential, deprecated_reason=DEPRECATED_REASON, deprecated_since=versionutils.deprecated.TRAIN ), @@ -79,7 +79,7 @@ ec2_credential_policies = [ operations=[{'path': ('/v3/users/{user_id}/credentials/OS-EC2/' '{credential_id}'), 'method': 'DELETE'}], - deprecated_rule=deprecated_ec2_delete_credentials, + deprecated_rule=deprecated_ec2_delete_credential, deprecated_reason=DEPRECATED_REASON, deprecated_since=versionutils.deprecated.TRAIN ) |