forked from TrueCloudLab/frostfs-testlib
Added delete bucket policy method to s3 client
This commit is contained in:
parent
b8ce75b299
commit
37a1177a3c
3 changed files with 21 additions and 0 deletions
|
@ -246,6 +246,13 @@ class Boto3ClientWrapper(S3ClientWrapper):
|
|||
log_command_execution("S3 get_bucket_policy result", response)
|
||||
return response.get("Policy")
|
||||
|
||||
@reporter.step("Delete bucket policy")
|
||||
@report_error
|
||||
def delete_bucket_policy(self, bucket: str) -> str:
|
||||
response = self.boto3_client.delete_bucket_policy(Bucket=bucket)
|
||||
log_command_execution("S3 delete_bucket_policy result", response)
|
||||
return response
|
||||
|
||||
@reporter.step("Put bucket policy")
|
||||
@report_error
|
||||
def put_bucket_policy(self, bucket: str, policy: dict) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue