feat(cloud): add targeted task governance foundation
Tests / Test passed: 659

This commit is contained in:
2026-07-13 22:21:12 +08:00
parent a3ba94be04
commit 2cd314b183
41 changed files with 2099 additions and 15 deletions
@@ -31,6 +31,8 @@ class TaskConstraints:
driver_type: str | None = None
capability_tags: list[str] = field(default_factory=list)
target_host_id: str | None = None
target_device_id: str | None = None
@dataclass
@@ -195,6 +197,10 @@ class TaskScheduler:
def _matches(device: "PooledDevice", constraints: TaskConstraints) -> bool:
if constraints.target_host_id and device.host_id != constraints.target_host_id:
return False
if constraints.target_device_id and device.device_id != constraints.target_device_id:
return False
if constraints.driver_type and device.driver_type != constraints.driver_type:
return False
if constraints.capability_tags: