From bb3b8e207a08edff81b8c2fe30b476c94bfea086 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 17 Mar 2021 16:23:48 +0100 Subject: simulator: Make hypervisors generic for the resource type This change moves the hypervisor implementations to the opendc-simulator-resources module and makes them generic to the resource type that is being used (e.g., CPU, disk or networking). --- .../src/main/kotlin/org/opendc/compute/simulator/SimHost.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'simulator/opendc-compute/opendc-compute-simulator/src/main') diff --git a/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt index 0da81152..9cc1bf54 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt +++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt @@ -84,7 +84,7 @@ public class SimHost( /** * The machine to run on. */ - public val machine: SimBareMetalMachine = SimBareMetalMachine(scope, clock, model) + public val machine: SimBareMetalMachine = SimBareMetalMachine(context, clock, model) /** * The hypervisor to run multiple workloads. @@ -206,6 +206,7 @@ public class SimHost( override fun close() { scope.cancel() + machine.close() _state = HostState.DOWN } -- cgit v1.2.3