Skip to content

Commit

Permalink
add date to payload name
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb committed Oct 27, 2023
1 parent b2ba9c9 commit 47c7dd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nise/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ def ocp_create_report(options): # noqa: C901
minio_upload = options.get("minio_upload")
write_monthly = options.get("write_monthly", False)
for month in months:
print(month)
data = {OCP_POD_USAGE: [], OCP_STORAGE_USAGE: [], OCP_NODE_LABEL: [], OCP_NAMESPACE_LABEL: []}
file_numbers = {OCP_POD_USAGE: 0, OCP_STORAGE_USAGE: 0, OCP_NODE_LABEL: 0, OCP_NAMESPACE_LABEL: 0}
if ros_ocp_info:
Expand Down Expand Up @@ -964,7 +965,9 @@ def ocp_create_report(options): # noqa: C901
else:
report_files = list(temp_files.values()) + list(temp_ros_files.values()) + [temp_manifest_name]
temp_usage_zip = _tar_gzip_report_files(report_files)
payload_key = f"{options.get('payload_name') or ocp_assembly_id.hex}.tar.gz"
payload_key = (
f"{options.get('payload_name') or ocp_assembly_id.hex}.{gen_start_date.strftime('%Y_%m')}.tar.gz"
)
ocp_route_file_minio(minio_upload, temp_usage_zip, payload_key)
os.remove(temp_usage_zip)

Expand Down

0 comments on commit 47c7dd7

Please sign in to comment.