Make default snap name just the datestring

This commit is contained in:
Joshua Boniface 2024-05-21 15:19:00 -04:00
parent e6bfbb6d45
commit 3d0d5e63f6
1 changed files with 1 additions and 2 deletions

View File

@ -1257,8 +1257,7 @@ def create_vm_snapshot(zkhandler, domain, snapshot_name=None):
if snapshot_name is None:
now = datetime.now()
datestring = now.strftime("%Y%m%d%H%M%S")
snapshot_name = f"snapshot_{datestring}"
snapshot_name = now.strftime("%Y%m%d%H%M%S")
else:
reg = re.compile("^[a-z0-9.-_]+$")
if not reg.match(snapshot_name):