Add UNDEFINED versionins status #70
2 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,7 @@ def _make_objs_dict(key_names):
|
|||
|
||||
|
||||
class VersioningStatus(HumanReadableEnum):
|
||||
UNDEFINED = None
|
||||
ENABLED = "Enabled"
|
||||
SUSPENDED = "Suspended"
|
||||
|
||||
|
|
|
@ -67,6 +67,9 @@ def try_to_get_objects_and_expect_error(
|
|||
|
||||
@reporter.step_deco("Set versioning status to '{status}' for bucket '{bucket}'")
|
||||
def set_bucket_versioning(s3_client: S3ClientWrapper, bucket: str, status: VersioningStatus):
|
||||
if status == VersioningStatus.UNDEFINED:
|
||||
return
|
||||
|
||||
s3_client.get_bucket_versioning_status(bucket)
|
||||
s3_client.put_bucket_versioning(bucket, status=status)
|
||||
bucket_status = s3_client.get_bucket_versioning_status(bucket)
|
||||
|
|
Loading…
Reference in a new issue