Add bulk power management via CLI

This commit is contained in:
Dane Everitt 2018-03-02 20:58:58 -06:00
parent c6137db529
commit 021710aa1c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 182 additions and 0 deletions

View file

@ -117,4 +117,23 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getByUuid(string $uuid): Server;
/**
* Return all of the servers that should have a power action performed aganist them.
*
* @param int[] $servers
* @param int[] $nodes
* @param bool $returnCount
* @return int|\Generator
*/
public function getServersForPowerAction(array $servers = [], array $nodes = [], bool $returnCount = false);
/**
* Return the total number of servers that will be affected by the query.
*
* @param int[] $servers
* @param int[] $nodes
* @return int
*/
public function getServersForPowerActionCount(array $servers = [], array $nodes = []): int;
}