Actions
Bug #63537
openobject lock: The query does not match after the worm protection time is set to 2124, 1, 1
% Done:
0%
Source:
Tags:
object-lock backport_processed
Backport:
quincy reef
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Set the protection time to 2124.1.1 and then check the protection of this object to get 198x.x.x time
res=client1.copy_object(Bucket=dst_bucket, Key=dst_object,CopySource=str(src_bucket+'/'+src_object),ObjectLockMode='GOVERNANCE',ObjectLockRetainUntilDate=datetime(2124, 1, 1),ObjectLockLegalHoldStatus='ON')
resp = client1.get_object_retention(Bucket=dst_bucket,Key=dst_object)
print(resp['Retention'])
resp = client1.get_object_legal_hold(Bucket=dst_bucket,Key=dst_object)
print(resp['LegalHold'])
The output after executing the python script is
{'Mode': 'GOVERNANCE', 'RetainUntilDate': datetime.datetime(1987, 11, 24, 17, 31, 44, tzinfo=tzlocal())}
{'Status': 'ON'}
Actions