Add a stateful Proxmox API console and broad handler coverage beyond the
initial QEMU slice, backed by imported contracts for majors 6–9. - Implement durable handlers for access/auth, cluster, LXC, storage, HA, firewall, Ceph, SDN, ACME, notifications, pools, mapping, and node ops - Serve an interactive Web UI with catalog browsing, demo seed controls, and OpenAPI/help surfaces - Bundle PVE 6.4-15, 7.4-16, and 8.4.5 contract revisions alongside 9.2.3 - Support in-memory runtime contract Apply (POST /ui/api/contract/apply) so /version and /api2 routes follow the selected major until restart - Expand seed profiles (including demo-cluster), migrations 007–008, TLS gateway config, Compose/Makefile tooling, and compatibility evidence - Tighten .gitignore for macOS, hidden directories (.*/), and local secrets
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
import secrets
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
|
||||
UPID_RE = re.compile(
|
||||
@@ -57,3 +59,17 @@ class Upid:
|
||||
task_id=values["task_id"],
|
||||
user=values["user"],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def allocate(cls, node: str, task_type: str, task_id: str, user: str) -> Upid:
|
||||
"""Build a collision-resistant UPID for a new task."""
|
||||
|
||||
return cls(
|
||||
node=node,
|
||||
pid=secrets.randbits(32),
|
||||
process_start=secrets.randbits(32),
|
||||
start_time=int(time.time()) & 0xFFFFFFFF,
|
||||
task_type=task_type,
|
||||
task_id=str(task_id),
|
||||
user=user,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user