diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-10-05 12:12:32 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-10-05 12:12:32 +0200 |
| commit | e06c953d1c71c704b351c81611e2e2bececf8e67 (patch) | |
| tree | 174b15ad968baed22922c103220c08703426f92d /simulator/opendc-compute | |
| parent | 8aaeb93e81fc3c4689d42747f87734fc4732d030 (diff) | |
Move failure models to separate module
Diffstat (limited to 'simulator/opendc-compute')
3 files changed, 4 insertions, 3 deletions
diff --git a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/driver/BareMetalDriver.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/driver/BareMetalDriver.kt index 6f58aa20..8697a553 100644 --- a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/driver/BareMetalDriver.kt +++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/driver/BareMetalDriver.kt @@ -26,7 +26,6 @@ import kotlinx.coroutines.flow.Flow import org.opendc.compute.core.Server import org.opendc.compute.core.image.Image import org.opendc.compute.core.metal.Node -import org.opendc.core.failure.FailureDomain import org.opendc.core.power.Powerable import org.opendc.core.services.AbstractServiceKey import java.util.UUID @@ -34,7 +33,7 @@ import java.util.UUID /** * A driver interface for the management interface of a bare-metal compute node. */ -public interface BareMetalDriver : Powerable, FailureDomain { +public interface BareMetalDriver : Powerable { /** * The [Node] that is controlled by this driver. */ diff --git a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts index e1ec6421..d7570e54 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts @@ -32,6 +32,7 @@ dependencies { implementation(project(":opendc-utils")) implementation("io.github.microutils:kotlin-logging:1.7.9") implementation(project(":opendc-simulator:opendc-simulator-compute")) + api(project(":opendc-simulator:opendc-simulator-failures")) testImplementation(project(":opendc-simulator:opendc-simulator-core")) testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}") diff --git a/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimBareMetalDriver.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimBareMetalDriver.kt index 08bb7e79..7b1f0af6 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimBareMetalDriver.kt +++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimBareMetalDriver.kt @@ -41,6 +41,7 @@ import org.opendc.simulator.compute.SimBareMetalMachine import org.opendc.simulator.compute.SimExecutionContext import org.opendc.simulator.compute.SimMachineModel import org.opendc.simulator.compute.workload.SimWorkload +import org.opendc.simulator.failures.FailureDomain import org.opendc.utils.flow.EventFlow import org.opendc.utils.flow.StateFlow import java.time.Clock @@ -67,7 +68,7 @@ public class SimBareMetalDriver( metadata: Map<String, Any>, machine: SimMachineModel, powerModel: PowerModel<SimBareMetalDriver> = ConstantPowerModel(0.0) -) : BareMetalDriver { +) : BareMetalDriver, FailureDomain { /** * The flavor that corresponds to this machine. */ |
