Skip to content

Commit

Permalink
Add date stamp to allocation name
Browse files Browse the repository at this point in the history
  • Loading branch information
lpramuk committed Nov 15, 2024
1 parent 5821185 commit 3417d73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manifester/manifester.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This module defines the `Manifester` class, which provides methods for authenticating to and
interacting with the RHSM Subscription API for the purpose of generating a subscription manifest.
"""
from datetime import date
from functools import cached_property
from pathlib import Path
import random
Expand Down Expand Up @@ -74,7 +75,7 @@ def __init__(
self.username_prefix = (
self.manifest_data.get("username_prefix") or settings.username_prefix
)
self.allocation_name = allocation_name or f"{self.username_prefix}-" + "".join(
self.allocation_name = allocation_name or f"{self.username_prefix}-{date.today().strftime("%Y%m%d")}-" + "".join(
random.sample(string.ascii_letters, 8)
)
self.manifest_name = Path(f"{self.allocation_name}_manifest.zip")
Expand Down

0 comments on commit 3417d73

Please sign in to comment.