Update node finding service logic to be single query; add test coverage

This commit is contained in:
Dane Everitt 2020-10-09 22:01:25 -07:00
parent 3decbd1f46
commit c2db163731
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 139 additions and 69 deletions

View file

@ -54,15 +54,4 @@ interface NodeRepositoryInterface extends RepositoryInterface
* @return \Illuminate\Support\Collection
*/
public function getNodesForServerCreation(): Collection;
/**
* Return the IDs of all nodes that exist in the provided locations and have the space
* available to support the additional disk and memory provided.
*
* @param array $locations
* @param int $disk
* @param int $memory
* @return \Illuminate\Support\LazyCollection
*/
public function getNodesWithResourceUse(array $locations, int $disk, int $memory): LazyCollection;
}