> */ public array $nodes = [['node' => 'pve']]; /** @var array */ public array $status = [ 'cpuinfo' => ['cpus' => 16], 'memory' => ['total' => 68719476736], // 64 GiB 'pveversion' => 'pve-manager/8.2.2', ]; /** @var array> */ public array $storage = [ ['storage' => 'local-lvm', 'type' => 'lvmthin', 'total' => 1099511627776], // 1 TiB ]; /** @var array */ public array $createdRoles = []; /** @var array{token_id: string, secret: string}|null */ public ?array $createdToken = null; public int $tokenCalls = 0; public function forHost(Host $host): static { $this->host = $host; return $this; } public function listNodes(): array { return $this->nodes; } public function nodeStatus(string $node): array { return $this->status; } public function nodeStorage(string $node): array { return $this->storage; } public function createRole(string $roleId, string $privs): void { $this->createdRoles[] = $roleId; } public function createUserAndToken(string $user, string $roleId): array { $this->tokenCalls++; return $this->createdToken = [ 'token_id' => $user.'!clupilot', 'secret' => 'fake-secret-'.substr(md5($user.$roleId), 0, 12), ]; } }