Files
panel-pelican-dev/app/Contracts/Repository/AllocationRepositoryInterface.php

20 lines
518 B
PHP
Raw Normal View History

<?php
2024-03-12 22:39:16 -04:00
namespace App\Contracts\Repository;
2024-03-12 22:39:16 -04:00
use App\Models\Allocation;
interface AllocationRepositoryInterface extends RepositoryInterface
{
2018-01-21 16:02:03 -06:00
/**
* Return all the allocations that exist for a node that are not currently
2018-01-21 16:02:03 -06:00
* allocated.
*/
public function getUnassignedAllocationIds(int $node): array;
/**
* Return a single allocation from those meeting the requirements.
2018-01-28 17:14:34 -06:00
*/
public function getRandomAllocation(array $nodes, array $ports, bool $dedicated = false): ?Allocation;
}