diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-01-11 20:13:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 20:13:46 +0100 |
| commit | bf558fe36c9de52310e85044ee4447b45bd50b75 (patch) | |
| tree | bea8e47037660c88df42e04105e7a0b7f709173a /simulator/opendc-compute/opendc-compute-core | |
| parent | 42e9a5b5b610f41a03e68f6fc781c54b9402925b (diff) | |
| parent | 9dbb7bbcc2202955c715aaa3b28c70641a2fbd5b (diff) | |
Merge pull request #71 from atlarge-research/perf/workload
Convert to pull-based workload model
Diffstat (limited to 'simulator/opendc-compute/opendc-compute-core')
| -rw-r--r-- | simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt index 5ecfd357..68cc7b50 100644 --- a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt +++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt @@ -23,6 +23,7 @@ package org.opendc.compute.core.virt.driver import kotlinx.coroutines.flow.Flow +import org.opendc.compute.core.Flavor import org.opendc.compute.core.Server import org.opendc.compute.core.image.Image import org.opendc.compute.core.virt.HypervisorEvent @@ -40,6 +41,11 @@ public interface VirtDriver { public val events: Flow<HypervisorEvent> /** + * Determine whether the specified [flavor] can still fit on this driver. + */ + public fun canFit(flavor: Flavor): Boolean + + /** * Spawn the given [Image] on the compute resource of this driver. * * @param name The name of the server to spawn. @@ -50,7 +56,7 @@ public interface VirtDriver { public suspend fun spawn( name: String, image: Image, - flavor: org.opendc.compute.core.Flavor + flavor: Flavor ): Server public companion object Key : AbstractServiceKey<VirtDriver>(UUID.randomUUID(), "virtual-driver") |
