Skip to content

Commit

Permalink
Automation Toolkit Release v2024.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xs2suruchi committed Sep 30, 2024
1 parent 0d88778 commit 99e1c90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,12 @@ def create_terraform_oss(inputfile, outdir, service_dir, prefix, ct):
print(
f"'{time_rule_locked}' is not in the correct format. It should be in the format 'dd-mm-yyyy'. The retention rules will not be processed.")
continue
'''
else:
print(
f"'{time_rule_locked}' is not in the correct format. It should be in the format of 'YYYY-MM-DDThh:mm:ssZ' or 'YYYY-MM-DDThh:mm:ss.fffZ'. The retention rules will not be processed.")
continue
'''

tempdict = {'retention_rule_display_name': retention_rule_display_name,
'time_unit': time_unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ def export_buckets(inputfile, outdir, service_dir, config, signer, ct, export_co
rt_time_rule_locked = str(retention_policy.time_rule_locked)
if rt_time_rule_locked != 'None' and rt_time_rule_locked != '':
date_obj = parser.parse(rt_time_rule_locked)
rt_time_rule_locked = date_obj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z"
# rt_time_rule_locked = date_obj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z"
rt_time_rule_locked = (date_obj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3]).rstrip("0") + "Z"
rt_data = rt_name + "::" + rt_time_amount + "::" + rt_time_unit + "::" + rt_time_rule_locked
else:
rt_data = rt_name + "::" + rt_time_amount + "::" + rt_time_unit

else:
rt_data=rt_name + "::indefinite"
retention_rule_data_list.append(rt_data)
Expand Down

0 comments on commit 99e1c90

Please sign in to comment.