proxmox-kube/ext/name-gen.py

11 lines
228 B
Python
Raw Normal View History

2024-10-16 09:13:28 +00:00
from datetime import datetime
from json import dumps
from sys import argv
name = argv[1]
type = argv[2]
timestamp = datetime.now().strftime('%d.%m.%Y-%H:%M:%S')
name = f'{name}-{type}-{timestamp}'
print(dumps({'name': name}))