summaryrefslogtreecommitdiff
path: root/simulator
diff options
context:
space:
mode:
Diffstat (limited to 'simulator')
-rw-r--r--simulator/opendc-compute/build.gradle.kts22
-rw-r--r--simulator/opendc-compute/opendc-compute-core/build.gradle.kts41
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/Flavor.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Flavor.kt)0
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/Server.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Server.kt)0
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt)0
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/ServerState.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerState.kt)0
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt)0
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/image/Image.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/Image.kt)0
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Metadata.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Metadata.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Node.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/NodeEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeEvent.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/NodeState.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeState.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/driver/BareMetalDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/BareMetalDriver.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/service/ProvisioningService.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/ProvisioningService.kt)6
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/service/SimpleProvisioningService.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/SimpleProvisioningService.kt)6
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/Hypervisor.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/Hypervisor.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorEvent.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/InsufficientMemoryOnServerException.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/VirtDriver.kt)5
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/service/VirtProvisioningEvent.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningEvent.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/service/VirtProvisioningService.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningService.kt)11
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt)0
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts41
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/ComputeSimExecutionContext.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ComputeSimExecutionContext.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/HypervisorView.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/HypervisorView.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimBareMetalDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/SimBareMetalDriver.kt)20
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtDriver.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimVirtDriver.kt)8
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtDriverWorkload.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimVirtDriverWorkload.kt)2
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtProvisioningService.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/SimpleVirtProvisioningService.kt)49
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimWorkloadImage.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/SimWorkloadImage.kt)3
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AllocationPolicy.kt)10
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AvailableCoreMemoryAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AvailableMemoryAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ComparableAllocationPolicyLogic.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt)8
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/NumberOfActiveServersAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ProvisionedCoresAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/RandomAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt)8
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ReplayAllocationPolicy.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt)8
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/power/PowerModels.kt (renamed from simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/power/PowerModels.kt)4
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimBareMetalDriverTest.kt (renamed from simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/driver/SimBareMetalDriverTest.kt)3
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimProvisioningServiceTest.kt (renamed from simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt)7
-rw-r--r--simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimVirtDriverTest.kt (renamed from simulator/opendc-compute/src/test/kotlin/org/opendc/compute/virt/SimHypervisorTest.kt)8
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts1
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt24
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt4
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt4
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt2
-rw-r--r--simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt8
-rw-r--r--simulator/opendc-format/build.gradle.kts3
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt6
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt10
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt8
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt2
-rw-r--r--simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/wtf/WtfTraceReader.kt2
-rw-r--r--simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt2
-rw-r--r--simulator/opendc-runner-web/build.gradle.kts2
-rw-r--r--simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt2
-rw-r--r--simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt10
-rw-r--r--simulator/opendc-workflows/build.gradle.kts2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt4
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt2
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt2
-rw-r--r--simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt2
-rw-r--r--simulator/settings.gradle.kts3
76 files changed, 252 insertions, 191 deletions
diff --git a/simulator/opendc-compute/build.gradle.kts b/simulator/opendc-compute/build.gradle.kts
index 94af7861..bf920306 100644
--- a/simulator/opendc-compute/build.gradle.kts
+++ b/simulator/opendc-compute/build.gradle.kts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 AtLarge Research
+ * Copyright (c) 2020 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,22 +20,4 @@
* SOFTWARE.
*/
-description = "Cloud computing fabric simulation model"
-
-/* Build configuration */
-plugins {
- `kotlin-library-convention`
-}
-
-dependencies {
- api(project(":opendc-core"))
- implementation(project(":opendc-utils"))
- implementation("io.github.microutils:kotlin-logging:1.7.9")
- implementation(project(":opendc-simulator:opendc-simulator-compute"))
-
- testImplementation(project(":opendc-simulator:opendc-simulator-core"))
- testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}")
- testImplementation("org.junit.jupiter:junit-jupiter-api:${Library.JUNIT_JUPITER}")
- testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Library.JUNIT_JUPITER}")
- testImplementation("org.junit.platform:junit-platform-launcher:${Library.JUNIT_PLATFORM}")
-}
+description = "Cloud computing fabric controller of OpenDC"
diff --git a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts
new file mode 100644
index 00000000..9682b50f
--- /dev/null
+++ b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2020 AtLarge Research
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+description = "Core implementation of the OpenDC Compute service"
+
+/* Build configuration */
+plugins {
+ `kotlin-library-convention`
+}
+
+dependencies {
+ api(project(":opendc-core"))
+ implementation(project(":opendc-utils"))
+ implementation("io.github.microutils:kotlin-logging:1.7.9")
+
+ testImplementation(project(":opendc-simulator:opendc-simulator-core"))
+ testImplementation(project(":opendc-compute:opendc-compute-simulator"))
+ testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}")
+ testImplementation("org.junit.jupiter:junit-jupiter-api:${Library.JUNIT_JUPITER}")
+ testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Library.JUNIT_JUPITER}")
+ testImplementation("org.junit.platform:junit-platform-launcher:${Library.JUNIT_PLATFORM}")
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Flavor.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/Flavor.kt
index e5ca115f..e5ca115f 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Flavor.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/Flavor.kt
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Server.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/Server.kt
index 948f622f..948f622f 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/Server.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/Server.kt
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt
index e9212832..e9212832 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/ServerEvent.kt
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerState.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/ServerState.kt
index 4b9d7c13..4b9d7c13 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/ServerState.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/ServerState.kt
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt
index 01f86a1b..01f86a1b 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/image/EmptyImage.kt
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/Image.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/image/Image.kt
index e481fcc3..e481fcc3 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/Image.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/image/Image.kt
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Metadata.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Metadata.kt
index 61a992b2..11eadd87 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Metadata.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Metadata.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal
+package org.opendc.compute.core.metal
/*
* Common metadata keys for bare-metal nodes.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Node.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt
index 5cb4be1a..6d9506f1 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/Node.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal
+package org.opendc.compute.core.metal
import kotlinx.coroutines.flow.Flow
import org.opendc.compute.core.Server
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeEvent.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/NodeEvent.kt
index d367f2e6..4423e2bf 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeEvent.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/NodeEvent.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal
+package org.opendc.compute.core.metal
/**
* An event that is emitted by a [Node].
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeState.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/NodeState.kt
index e76e0b43..bdc4841e 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/NodeState.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/NodeState.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal
+package org.opendc.compute.core.metal
/**
* An enumeration describing the possible states of a bare-metal compute node.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/BareMetalDriver.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/driver/BareMetalDriver.kt
index 5d8521ae..6f58aa20 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/BareMetalDriver.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/driver/BareMetalDriver.kt
@@ -20,12 +20,12 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal.driver
+package org.opendc.compute.core.metal.driver
import kotlinx.coroutines.flow.Flow
import org.opendc.compute.core.Server
import org.opendc.compute.core.image.Image
-import org.opendc.compute.metal.Node
+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
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/ProvisioningService.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/service/ProvisioningService.kt
index c8b38912..bad5b47c 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/ProvisioningService.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/service/ProvisioningService.kt
@@ -20,11 +20,11 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal.service
+package org.opendc.compute.core.metal.service
import org.opendc.compute.core.image.Image
-import org.opendc.compute.metal.Node
-import org.opendc.compute.metal.driver.BareMetalDriver
+import org.opendc.compute.core.metal.Node
+import org.opendc.compute.core.metal.driver.BareMetalDriver
import org.opendc.core.services.AbstractServiceKey
import java.util.UUID
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/SimpleProvisioningService.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/service/SimpleProvisioningService.kt
index 3d126ba1..5222f2fb 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/service/SimpleProvisioningService.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/service/SimpleProvisioningService.kt
@@ -20,12 +20,12 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal.service
+package org.opendc.compute.core.metal.service
import kotlinx.coroutines.CancellationException
import org.opendc.compute.core.image.Image
-import org.opendc.compute.metal.Node
-import org.opendc.compute.metal.driver.BareMetalDriver
+import org.opendc.compute.core.metal.Node
+import org.opendc.compute.core.metal.driver.BareMetalDriver
/**
* A very basic implementation of the [ProvisioningService].
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/Hypervisor.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/Hypervisor.kt
index 5dd98bbc..1ae52baa 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/Hypervisor.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/Hypervisor.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt
+package org.opendc.compute.core.virt
import kotlinx.coroutines.flow.Flow
import org.opendc.core.Identity
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorEvent.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt
index 1e2e285c..9fb437de 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/HypervisorEvent.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt
@@ -20,10 +20,10 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt
+package org.opendc.compute.core.virt
import org.opendc.compute.core.Server
-import org.opendc.compute.virt.driver.VirtDriver
+import org.opendc.compute.core.virt.driver.VirtDriver
/**
* An event that is emitted by a [VirtDriver].
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/InsufficientMemoryOnServerException.kt
index 83dd70d4..6fe84ea6 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/InsufficientMemoryOnServerException.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/InsufficientMemoryOnServerException.kt
@@ -1,3 +1,3 @@
-package org.opendc.compute.virt.driver
+package org.opendc.compute.core.virt.driver
public class InsufficientMemoryOnServerException : IllegalStateException("Insufficient memory left on server.")
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/VirtDriver.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt
index 54728eb6..5ecfd357 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/VirtDriver.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/driver/VirtDriver.kt
@@ -20,13 +20,12 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.driver
+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.virt.HypervisorEvent
+import org.opendc.compute.core.virt.HypervisorEvent
import org.opendc.core.services.AbstractServiceKey
import java.util.UUID
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningEvent.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/service/VirtProvisioningEvent.kt
index 31f5d2c9..abd2fc95 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningEvent.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/service/VirtProvisioningEvent.kt
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service
+package org.opendc.compute.core.virt.service
/**
* An event that is emitted by the [VirtProvisioningService].
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningService.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/service/VirtProvisioningService.kt
index 13dfd640..ab96e0a3 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/VirtProvisioningService.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/service/VirtProvisioningService.kt
@@ -20,25 +20,18 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service
+package org.opendc.compute.core.virt.service
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.virt.driver.VirtDriver
-import org.opendc.compute.virt.service.allocation.AllocationPolicy
+import org.opendc.compute.core.virt.driver.VirtDriver
/**
* A service for VM provisioning on a cloud.
*/
public interface VirtProvisioningService {
/**
- * The policy used for allocating a VM on the available hypervisors.
- */
- public val allocationPolicy: AllocationPolicy
-
- /**
* The events emitted by the service.
*/
public val events: Flow<VirtProvisioningEvent>
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt
index 6c724277..6c724277 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/workload/VmWorkload.kt
diff --git a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts
new file mode 100644
index 00000000..e1ec6421
--- /dev/null
+++ b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2020 AtLarge Research
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+description = "Simulator for OpenDC Compute"
+
+/* Build configuration */
+plugins {
+ `kotlin-library-convention`
+}
+
+dependencies {
+ api(project(":opendc-compute:opendc-compute-core"))
+ implementation(project(":opendc-utils"))
+ implementation("io.github.microutils:kotlin-logging:1.7.9")
+ implementation(project(":opendc-simulator:opendc-simulator-compute"))
+
+ testImplementation(project(":opendc-simulator:opendc-simulator-core"))
+ testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}")
+ testImplementation("org.junit.jupiter:junit-jupiter-api:${Library.JUNIT_JUPITER}")
+ testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Library.JUNIT_JUPITER}")
+ testImplementation("org.junit.platform:junit-platform-launcher:${Library.JUNIT_PLATFORM}")
+}
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ComputeSimExecutionContext.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/ComputeSimExecutionContext.kt
index 3295a8e8..153a86b3 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/execution/ComputeSimExecutionContext.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/ComputeSimExecutionContext.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.core.execution
+package org.opendc.compute.simulator
import org.opendc.compute.core.Server
import org.opendc.simulator.compute.SimExecutionContext
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/HypervisorView.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/HypervisorView.kt
index cf6b4487..1a79523e 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/HypervisorView.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/HypervisorView.kt
@@ -20,10 +20,10 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service
+package org.opendc.compute.simulator
import org.opendc.compute.core.Server
-import org.opendc.compute.virt.driver.VirtDriver
+import org.opendc.compute.core.virt.driver.VirtDriver
import java.util.UUID
public class HypervisorView(
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/SimBareMetalDriver.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimBareMetalDriver.kt
index 4f72d599..08bb7e79 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/driver/SimBareMetalDriver.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimBareMetalDriver.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal.driver
+package org.opendc.compute.simulator
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.Flow
@@ -28,14 +28,13 @@ import org.opendc.compute.core.Flavor
import org.opendc.compute.core.Server
import org.opendc.compute.core.ServerEvent
import org.opendc.compute.core.ServerState
-import org.opendc.compute.core.execution.ComputeSimExecutionContext
import org.opendc.compute.core.image.EmptyImage
import org.opendc.compute.core.image.Image
-import org.opendc.compute.core.image.SimWorkloadImage
-import org.opendc.compute.metal.Node
-import org.opendc.compute.metal.NodeEvent
-import org.opendc.compute.metal.NodeState
-import org.opendc.compute.metal.power.ConstantPowerModel
+import org.opendc.compute.core.metal.Node
+import org.opendc.compute.core.metal.NodeEvent
+import org.opendc.compute.core.metal.NodeState
+import org.opendc.compute.core.metal.driver.BareMetalDriver
+import org.opendc.compute.simulator.power.ConstantPowerModel
import org.opendc.core.power.PowerModel
import org.opendc.core.services.ServiceRegistry
import org.opendc.simulator.compute.SimBareMetalMachine
@@ -218,8 +217,11 @@ public class SimBareMetalDriver(
events.emit(NodeEvent.StateChanged(value, field.state))
}
- if (field.server != null && value.server != null && field.server.state != value.server.state) {
- serverEvents?.emit(ServerEvent.StateChanged(value.server, field.server.state))
+ val oldServer = field.server
+ val newServer = value.server
+
+ if (oldServer != null && newServer != null && oldServer.state != newServer.state) {
+ serverEvents?.emit(ServerEvent.StateChanged(newServer, oldServer.state))
}
nodeState.value = value
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimVirtDriver.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtDriver.kt
index 357ad714..09eec1ef 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimVirtDriver.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtDriver.kt
@@ -20,17 +20,17 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.driver
+package org.opendc.compute.simulator
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.launch
import org.opendc.compute.core.*
-import org.opendc.compute.core.execution.ComputeSimExecutionContext
import org.opendc.compute.core.image.Image
-import org.opendc.compute.core.image.SimWorkloadImage
-import org.opendc.compute.virt.HypervisorEvent
+import org.opendc.compute.core.virt.HypervisorEvent
+import org.opendc.compute.core.virt.driver.InsufficientMemoryOnServerException
+import org.opendc.compute.core.virt.driver.VirtDriver
import org.opendc.core.services.ServiceRegistry
import org.opendc.simulator.compute.SimExecutionContext
import org.opendc.simulator.compute.SimHypervisor
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimVirtDriverWorkload.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtDriverWorkload.kt
index 91d400a4..58b9408a 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/driver/SimVirtDriverWorkload.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtDriverWorkload.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.driver
+package org.opendc.compute.simulator
import kotlinx.coroutines.coroutineScope
import org.opendc.simulator.compute.SimExecutionContext
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/SimpleVirtProvisioningService.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtProvisioningService.kt
index e7c2b8cc..e83370d7 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/SimpleVirtProvisioningService.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimVirtProvisioningService.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service
+package org.opendc.compute.simulator
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.Flow
@@ -32,14 +32,13 @@ import org.opendc.compute.core.Server
import org.opendc.compute.core.ServerEvent
import org.opendc.compute.core.ServerState
import org.opendc.compute.core.image.Image
-import org.opendc.compute.core.image.SimWorkloadImage
-import org.opendc.compute.metal.service.ProvisioningService
-import org.opendc.compute.virt.HypervisorEvent
-import org.opendc.compute.virt.driver.InsufficientMemoryOnServerException
-import org.opendc.compute.virt.driver.SimVirtDriver
-import org.opendc.compute.virt.driver.SimVirtDriverWorkload
-import org.opendc.compute.virt.driver.VirtDriver
-import org.opendc.compute.virt.service.allocation.AllocationPolicy
+import org.opendc.compute.core.metal.service.ProvisioningService
+import org.opendc.compute.core.virt.HypervisorEvent
+import org.opendc.compute.core.virt.driver.InsufficientMemoryOnServerException
+import org.opendc.compute.core.virt.driver.VirtDriver
+import org.opendc.compute.core.virt.service.VirtProvisioningEvent
+import org.opendc.compute.core.virt.service.VirtProvisioningService
+import org.opendc.compute.simulator.allocation.AllocationPolicy
import org.opendc.utils.flow.EventFlow
import java.time.Clock
import java.util.*
@@ -47,16 +46,19 @@ import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
import kotlin.math.max
-private val logger = KotlinLogging.logger {}
-
@OptIn(ExperimentalCoroutinesApi::class)
-public class SimpleVirtProvisioningService(
+public class SimVirtProvisioningService(
private val coroutineScope: CoroutineScope,
private val clock: Clock,
private val provisioningService: ProvisioningService,
- override val allocationPolicy: AllocationPolicy
+ public val allocationPolicy: AllocationPolicy
) : VirtProvisioningService {
/**
+ * The logger instance to use.
+ */
+ private val logger = KotlinLogging.logger {}
+
+ /**
* The hypervisors that have been launched by the service.
*/
private val hypervisors: MutableMap<Server, HypervisorView> = mutableMapOf()
@@ -106,7 +108,8 @@ public class SimpleVirtProvisioningService(
launch {
var init = false
val deployedNode = provisioningService.deploy(node, hypervisorImage)
- deployedNode.server!!.events.onEach { event ->
+ val server = deployedNode.server!!
+ server.events.onEach { event ->
when (event) {
is ServerEvent.StateChanged -> {
if (!init) {
@@ -118,7 +121,7 @@ public class SimpleVirtProvisioningService(
}.launchIn(this)
delay(1)
- onHypervisorAvailable(deployedNode.server, workload.driver)
+ onHypervisorAvailable(server, workload.driver)
}
}
}
@@ -135,7 +138,7 @@ public class SimpleVirtProvisioningService(
): Server {
eventFlow.emit(
VirtProvisioningEvent.MetricsAvailable(
- this@SimpleVirtProvisioningService,
+ this@SimVirtProvisioningService,
hypervisors.size,
availableHypervisors.size,
++submittedVms,
@@ -173,7 +176,7 @@ public class SimpleVirtProvisioningService(
val call = coroutineScope.launch {
delay(delay)
- this@SimpleVirtProvisioningService.call = null
+ this@SimVirtProvisioningService.call = null
schedule()
}
this.call = call
@@ -190,7 +193,7 @@ public class SimpleVirtProvisioningService(
if (requiredMemory > maxMemory || imageInstance.flavor.cpuCount > maxCores) {
eventFlow.emit(
VirtProvisioningEvent.MetricsAvailable(
- this@SimpleVirtProvisioningService,
+ this@SimVirtProvisioningService,
hypervisors.size,
availableHypervisors.size,
submittedVms,
@@ -230,7 +233,7 @@ public class SimpleVirtProvisioningService(
eventFlow.emit(
VirtProvisioningEvent.MetricsAvailable(
- this@SimpleVirtProvisioningService,
+ this@SimVirtProvisioningService,
hypervisors.size,
availableHypervisors.size,
submittedVms,
@@ -251,7 +254,7 @@ public class SimpleVirtProvisioningService(
eventFlow.emit(
VirtProvisioningEvent.MetricsAvailable(
- this@SimpleVirtProvisioningService,
+ this@SimVirtProvisioningService,
hypervisors.size,
availableHypervisors.size,
submittedVms,
@@ -309,7 +312,7 @@ public class SimpleVirtProvisioningService(
eventFlow.emit(
VirtProvisioningEvent.MetricsAvailable(
- this@SimpleVirtProvisioningService,
+ this@SimVirtProvisioningService,
hypervisors.size,
availableHypervisors.size,
submittedVms,
@@ -332,7 +335,7 @@ public class SimpleVirtProvisioningService(
eventFlow.emit(
VirtProvisioningEvent.MetricsAvailable(
- this@SimpleVirtProvisioningService,
+ this@SimVirtProvisioningService,
hypervisors.size,
availableHypervisors.size,
submittedVms,
@@ -358,7 +361,7 @@ public class SimpleVirtProvisioningService(
eventFlow.emit(
VirtProvisioningEvent.MetricsAvailable(
- this@SimpleVirtProvisioningService,
+ this@SimVirtProvisioningService,
hypervisors.size,
availableHypervisors.size,
submittedVms,
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/SimWorkloadImage.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimWorkloadImage.kt
index 1dd9a34b..b48de1d5 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/core/image/SimWorkloadImage.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimWorkloadImage.kt
@@ -20,8 +20,9 @@
* SOFTWARE.
*/
-package org.opendc.compute.core.image
+package org.opendc.compute.simulator
+import org.opendc.compute.core.image.Image
import org.opendc.core.resource.TagContainer
import org.opendc.simulator.compute.workload.SimWorkload
import java.util.*
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AllocationPolicy.kt
index 099d1740..2018b9f2 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AllocationPolicy.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AllocationPolicy.kt
@@ -20,11 +20,11 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
-import org.opendc.compute.metal.Node
-import org.opendc.compute.virt.service.HypervisorView
-import org.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.core.metal.Node
+import org.opendc.compute.simulator.HypervisorView
+import org.opendc.compute.simulator.SimVirtProvisioningService
/**
* A policy for selecting the [Node] an image should be deployed to,
@@ -39,7 +39,7 @@ public interface AllocationPolicy {
*/
public fun select(
hypervisors: Set<HypervisorView>,
- image: SimpleVirtProvisioningService.ImageView
+ image: SimVirtProvisioningService.ImageView
): HypervisorView?
}
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AvailableCoreMemoryAllocationPolicy.kt
index cfbf3cd3..38a07b2b 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableCoreMemoryAllocationPolicy.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AvailableCoreMemoryAllocationPolicy.kt
@@ -20,9 +20,9 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
-import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.simulator.HypervisorView
/**
* An [AllocationPolicy] that selects the machine with the highest/lowest amount of memory per core.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AvailableMemoryAllocationPolicy.kt
index 48172765..e87abd7b 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/AvailableMemoryAllocationPolicy.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/AvailableMemoryAllocationPolicy.kt
@@ -20,9 +20,9 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
-import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.simulator.HypervisorView
/**
* Allocation policy that selects the node with the most available memory.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ComparableAllocationPolicyLogic.kt
index c971cd7e..6aff2bab 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ComparableAllocationPolicyLogic.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ComparableAllocationPolicyLogic.kt
@@ -20,10 +20,10 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
-import org.opendc.compute.virt.service.HypervisorView
-import org.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.simulator.HypervisorView
+import org.opendc.compute.simulator.SimVirtProvisioningService
/**
* The logic for an [AllocationPolicy] that uses a [Comparator] to select the appropriate node.
@@ -36,7 +36,7 @@ public interface ComparableAllocationPolicyLogic : AllocationPolicy.Logic {
override fun select(
hypervisors: Set<HypervisorView>,
- image: SimpleVirtProvisioningService.ImageView
+ image: SimVirtProvisioningService.ImageView
): HypervisorView? {
return hypervisors.asSequence()
.filter { hv ->
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/NumberOfActiveServersAllocationPolicy.kt
index 63ba64ce..5e2b895c 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/NumberOfActiveServersAllocationPolicy.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/NumberOfActiveServersAllocationPolicy.kt
@@ -20,9 +20,9 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
-import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.simulator.HypervisorView
/**
* Allocation policy that selects the node with the least amount of active servers.
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ProvisionedCoresAllocationPolicy.kt
index d76e9c82..4344d979 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ProvisionedCoresAllocationPolicy.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ProvisionedCoresAllocationPolicy.kt
@@ -20,9 +20,9 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
-import org.opendc.compute.virt.service.HypervisorView
+import org.opendc.compute.simulator.HypervisorView
/**
* An [AllocationPolicy] that takes into account the number of vCPUs that have been provisioned on this machine
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/RandomAllocationPolicy.kt
index 26e61673..ac34f410 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/RandomAllocationPolicy.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/RandomAllocationPolicy.kt
@@ -20,10 +20,10 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
-import org.opendc.compute.virt.service.HypervisorView
-import org.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.simulator.HypervisorView
+import org.opendc.compute.simulator.SimVirtProvisioningService
import kotlin.random.Random
/**
@@ -34,7 +34,7 @@ public class RandomAllocationPolicy(private val random: Random = Random(0)) : Al
override fun invoke(): AllocationPolicy.Logic = object : AllocationPolicy.Logic {
override fun select(
hypervisors: Set<HypervisorView>,
- image: SimpleVirtProvisioningService.ImageView
+ image: SimVirtProvisioningService.ImageView
): HypervisorView? {
return hypervisors.asIterable()
.filter { hv ->
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ReplayAllocationPolicy.kt
index a623633d..fda863bb 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/allocation/ReplayAllocationPolicy.kt
@@ -20,11 +20,11 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt.service.allocation
+package org.opendc.compute.simulator.allocation
import mu.KotlinLogging
-import org.opendc.compute.virt.service.HypervisorView
-import org.opendc.compute.virt.service.SimpleVirtProvisioningService
+import org.opendc.compute.simulator.HypervisorView
+import org.opendc.compute.simulator.SimVirtProvisioningService
private val logger = KotlinLogging.logger {}
@@ -38,7 +38,7 @@ public class ReplayAllocationPolicy(private val vmPlacements: Map<String, String
override fun invoke(): AllocationPolicy.Logic = object : AllocationPolicy.Logic {
override fun select(
hypervisors: Set<HypervisorView>,
- image: SimpleVirtProvisioningService.ImageView
+ image: SimVirtProvisioningService.ImageView
): HypervisorView? {
val clusterName = vmPlacements[image.name]
?: throw IllegalStateException("Could not find placement data in VM placement file for VM ${image.name}")
diff --git a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/power/PowerModels.kt b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/power/PowerModels.kt
index 9286626c..09651720 100644
--- a/simulator/opendc-compute/src/main/kotlin/org/opendc/compute/metal/power/PowerModels.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/power/PowerModels.kt
@@ -20,11 +20,11 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal.power
+package org.opendc.compute.simulator.power
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
-import org.opendc.compute.metal.driver.BareMetalDriver
+import org.opendc.compute.core.metal.driver.BareMetalDriver
import org.opendc.core.power.PowerModel
/**
diff --git a/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/driver/SimBareMetalDriverTest.kt b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimBareMetalDriverTest.kt
index 584dcef4..0f1bd444 100644
--- a/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/driver/SimBareMetalDriverTest.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimBareMetalDriverTest.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal.driver
+package org.opendc.compute.simulator
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.collect
@@ -32,7 +32,6 @@ import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.opendc.compute.core.ServerEvent
import org.opendc.compute.core.ServerState
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.simulator.compute.SimMachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
diff --git a/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimProvisioningServiceTest.kt
index 6f13e557..def78ce7 100644
--- a/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/metal/service/SimpleProvisioningServiceTest.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimProvisioningServiceTest.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.metal.service
+package org.opendc.compute.simulator
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
@@ -29,8 +29,7 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.test.TestCoroutineScope
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
-import org.opendc.compute.core.image.SimWorkloadImage
-import org.opendc.compute.metal.driver.SimBareMetalDriver
+import org.opendc.compute.core.metal.service.SimpleProvisioningService
import org.opendc.simulator.compute.SimMachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
@@ -43,7 +42,7 @@ import java.util.UUID
* Test suite for the [SimpleProvisioningService].
*/
@OptIn(ExperimentalCoroutinesApi::class)
-internal class SimpleProvisioningServiceTest {
+internal class SimProvisioningServiceTest {
private lateinit var machineModel: SimMachineModel
@BeforeEach
diff --git a/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/virt/SimHypervisorTest.kt b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimVirtDriverTest.kt
index 9d33d395..a0c61f29 100644
--- a/simulator/opendc-compute/src/test/kotlin/org/opendc/compute/virt/SimHypervisorTest.kt
+++ b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimVirtDriverTest.kt
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package org.opendc.compute.virt
+package org.opendc.compute.simulator
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
@@ -33,9 +33,7 @@ import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertAll
import org.opendc.compute.core.Flavor
-import org.opendc.compute.core.image.SimWorkloadImage
-import org.opendc.compute.metal.driver.SimBareMetalDriver
-import org.opendc.compute.virt.driver.SimVirtDriverWorkload
+import org.opendc.compute.core.virt.HypervisorEvent
import org.opendc.simulator.compute.SimMachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
@@ -49,7 +47,7 @@ import java.util.UUID
* Basic test-suite for the hypervisor.
*/
@OptIn(ExperimentalCoroutinesApi::class)
-internal class SimHypervisorTest {
+internal class SimVirtDriverTest {
private lateinit var scope: TestCoroutineScope
private lateinit var clock: Clock
private lateinit var machineModel: SimMachineModel
diff --git a/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt b/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt
index 4aef5be3..3786eebf 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc18/src/main/kotlin/org/opendc/experiments/sc18/TestExperiment.kt
@@ -27,7 +27,7 @@ import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.test.TestCoroutineScope
-import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.core.metal.service.ProvisioningService
import org.opendc.format.environment.sc18.Sc18EnvironmentReader
import org.opendc.format.trace.gwf.GwfTraceReader
import org.opendc.simulator.utils.DelayControllerClockAdapter
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts b/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts
index c0992fc9..d93c1713 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/build.gradle.kts
@@ -38,6 +38,7 @@ dependencies {
implementation(project(":opendc-format"))
implementation(project(":opendc-simulator:opendc-simulator-core"))
implementation(project(":opendc-simulator:opendc-simulator-compute"))
+ implementation(project(":opendc-compute:opendc-compute-simulator"))
implementation("com.github.ajalt:clikt:2.6.0")
implementation("me.tongfei:progressbar:0.8.1")
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt
index 3ff21558..805e34ee 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/ExperimentHelpers.kt
@@ -34,15 +34,15 @@ import kotlinx.coroutines.launch
import mu.KotlinLogging
import org.opendc.compute.core.Flavor
import org.opendc.compute.core.ServerEvent
+import org.opendc.compute.core.metal.NODE_CLUSTER
+import org.opendc.compute.core.metal.driver.BareMetalDriver
+import org.opendc.compute.core.metal.service.ProvisioningService
+import org.opendc.compute.core.virt.HypervisorEvent
+import org.opendc.compute.core.virt.service.VirtProvisioningEvent
import org.opendc.compute.core.workload.VmWorkload
-import org.opendc.compute.metal.NODE_CLUSTER
-import org.opendc.compute.metal.driver.BareMetalDriver
-import org.opendc.compute.metal.service.ProvisioningService
-import org.opendc.compute.virt.HypervisorEvent
-import org.opendc.compute.virt.driver.SimVirtDriver
-import org.opendc.compute.virt.service.SimpleVirtProvisioningService
-import org.opendc.compute.virt.service.VirtProvisioningEvent
-import org.opendc.compute.virt.service.allocation.AllocationPolicy
+import org.opendc.compute.simulator.SimVirtDriver
+import org.opendc.compute.simulator.SimVirtProvisioningService
+import org.opendc.compute.simulator.allocation.AllocationPolicy
import org.opendc.core.failure.CorrelatedFaultInjector
import org.opendc.core.failure.FailureDomain
import org.opendc.core.failure.FaultInjector
@@ -140,14 +140,14 @@ public suspend fun createProvisioner(
clock: Clock,
environmentReader: EnvironmentReader,
allocationPolicy: AllocationPolicy
-): Pair<ProvisioningService, SimpleVirtProvisioningService> {
+): Pair<ProvisioningService, SimVirtProvisioningService> {
val environment = environmentReader.use { it.construct(coroutineScope, clock) }
val bareMetalProvisioner = environment.platforms[0].zones[0].services[ProvisioningService]
// Wait for the bare metal nodes to be spawned
delay(10)
- val scheduler = SimpleVirtProvisioningService(coroutineScope, clock, bareMetalProvisioner, allocationPolicy)
+ val scheduler = SimVirtProvisioningService(coroutineScope, clock, bareMetalProvisioner, allocationPolicy)
// Wait for the hypervisors to be spawned
delay(10)
@@ -162,7 +162,7 @@ public suspend fun createProvisioner(
public suspend fun attachMonitor(
coroutineScope: CoroutineScope,
clock: Clock,
- scheduler: SimpleVirtProvisioningService,
+ scheduler: SimVirtProvisioningService,
monitor: ExperimentMonitor
) {
@@ -224,7 +224,7 @@ public suspend fun processTrace(
coroutineScope: CoroutineScope,
clock: Clock,
reader: TraceReader<VmWorkload>,
- scheduler: SimpleVirtProvisioningService,
+ scheduler: SimVirtProvisioningService,
chan: Channel<Unit>,
monitor: ExperimentMonitor,
vmPlacements: Map<String, String> = emptyMap()
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt
index 95987d07..7a5b84e0 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/Run.kt
@@ -28,7 +28,7 @@ import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.TestCoroutineScope
import mu.KotlinLogging
-import org.opendc.compute.virt.service.allocation.*
+import org.opendc.compute.simulator.allocation.*
import org.opendc.experiments.sc20.experiment.model.CompositeWorkload
import org.opendc.experiments.sc20.experiment.monitor.ParquetExperimentMonitor
import org.opendc.experiments.sc20.runner.TrialExperimentDescriptor
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt
index 0ac532a4..18ba2c33 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ExperimentMonitor.kt
@@ -23,8 +23,8 @@
package org.opendc.experiments.sc20.experiment.monitor
import org.opendc.compute.core.Server
-import org.opendc.compute.virt.driver.VirtDriver
-import org.opendc.compute.virt.service.VirtProvisioningEvent
+import org.opendc.compute.core.virt.driver.VirtDriver
+import org.opendc.compute.core.virt.service.VirtProvisioningEvent
import java.io.Closeable
/**
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt
index bb512ef7..6ff3b518 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/experiment/monitor/ParquetExperimentMonitor.kt
@@ -24,8 +24,8 @@ package org.opendc.experiments.sc20.experiment.monitor
import mu.KotlinLogging
import org.opendc.compute.core.Server
-import org.opendc.compute.virt.driver.VirtDriver
-import org.opendc.compute.virt.service.VirtProvisioningEvent
+import org.opendc.compute.core.virt.driver.VirtDriver
+import org.opendc.compute.core.virt.service.VirtProvisioningEvent
import org.opendc.experiments.sc20.telemetry.HostEvent
import org.opendc.experiments.sc20.telemetry.ProvisionerEvent
import org.opendc.experiments.sc20.telemetry.parquet.ParquetHostEventWriter
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt
index 6ee53aec..d735ea4b 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20ParquetTraceReader.kt
@@ -22,8 +22,8 @@
package org.opendc.experiments.sc20.trace
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.experiments.sc20.experiment.model.CompositeWorkload
import org.opendc.experiments.sc20.experiment.model.Workload
import org.opendc.format.trace.TraceEntry
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt
index b40cad7c..9bc1a58e 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20RawParquetTraceReader.kt
@@ -26,8 +26,8 @@ import mu.KotlinLogging
import org.apache.avro.generic.GenericData
import org.apache.hadoop.fs.Path
import org.apache.parquet.avro.AvroParquetReader
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.core.User
import org.opendc.format.trace.TraceEntry
import org.opendc.format.trace.TraceReader
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt
index 0afdc5fd..edef276c 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/Sc20StreamingParquetTraceReader.kt
@@ -31,8 +31,8 @@ import org.apache.parquet.filter2.predicate.FilterApi
import org.apache.parquet.filter2.predicate.Statistics
import org.apache.parquet.filter2.predicate.UserDefinedPredicate
import org.apache.parquet.io.api.Binary
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.core.User
import org.opendc.format.trace.TraceEntry
import org.opendc.format.trace.TraceReader
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt
index e8cc2c36..fa225cb0 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/main/kotlin/org/opendc/experiments/sc20/trace/WorkloadSampler.kt
@@ -23,8 +23,8 @@
package org.opendc.experiments.sc20.trace
import mu.KotlinLogging
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.experiments.sc20.experiment.model.CompositeWorkload
import org.opendc.experiments.sc20.experiment.model.SamplingStrategy
import org.opendc.experiments.sc20.experiment.model.Workload
diff --git a/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt b/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt
index ff6e4bb9..9c44edfc 100644
--- a/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt
+++ b/simulator/opendc-experiments/opendc-experiments-sc20/src/test/kotlin/org/opendc/experiments/sc20/Sc20IntegrationTest.kt
@@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertAll
import org.opendc.compute.core.Server
import org.opendc.compute.core.workload.VmWorkload
-import org.opendc.compute.virt.service.SimpleVirtProvisioningService
-import org.opendc.compute.virt.service.allocation.AvailableCoreMemoryAllocationPolicy
+import org.opendc.compute.simulator.SimVirtProvisioningService
+import org.opendc.compute.simulator.allocation.AvailableCoreMemoryAllocationPolicy
import org.opendc.experiments.sc20.experiment.attachMonitor
import org.opendc.experiments.sc20.experiment.createFailureDomain
import org.opendc.experiments.sc20.experiment.createProvisioner
@@ -96,7 +96,7 @@ class Sc20IntegrationTest {
val allocationPolicy = AvailableCoreMemoryAllocationPolicy()
val traceReader = createTestTraceReader()
val environmentReader = createTestEnvironmentReader()
- lateinit var scheduler: SimpleVirtProvisioningService
+ lateinit var scheduler: SimVirtProvisioningService
testScope.launch {
val res = createProvisioner(
@@ -159,7 +159,7 @@ class Sc20IntegrationTest {
val allocationPolicy = AvailableCoreMemoryAllocationPolicy()
val traceReader = createTestTraceReader(0.5, seed)
val environmentReader = createTestEnvironmentReader("single")
- lateinit var scheduler: SimpleVirtProvisioningService
+ lateinit var scheduler: SimVirtProvisioningService
testScope.launch {
val res = createProvisioner(
diff --git a/simulator/opendc-format/build.gradle.kts b/simulator/opendc-format/build.gradle.kts
index 3ab704bd..30aafc90 100644
--- a/simulator/opendc-format/build.gradle.kts
+++ b/simulator/opendc-format/build.gradle.kts
@@ -29,9 +29,10 @@ plugins {
dependencies {
api(project(":opendc-core"))
- api(project(":opendc-compute"))
+ api(project(":opendc-compute:opendc-compute-core"))
api(project(":opendc-workflows"))
implementation(project(":opendc-simulator:opendc-simulator-compute"))
+ implementation(project(":opendc-compute:opendc-compute-simulator"))
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8") {
exclude("org.jetbrains.kotlin", module = "kotlin-reflect")
}
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
index 3fde1a6c..2e3e4a73 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
@@ -26,9 +26,9 @@ import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.coroutines.CoroutineScope
-import org.opendc.compute.metal.driver.SimBareMetalDriver
-import org.opendc.compute.metal.service.ProvisioningService
-import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.compute.core.metal.service.ProvisioningService
+import org.opendc.compute.core.metal.service.SimpleProvisioningService
+import org.opendc.compute.simulator.SimBareMetalDriver
import org.opendc.core.Environment
import org.opendc.core.Platform
import org.opendc.core.Zone
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
index 63539d61..b4c71c4e 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
@@ -23,11 +23,11 @@
package org.opendc.format.environment.sc20
import kotlinx.coroutines.CoroutineScope
-import org.opendc.compute.metal.NODE_CLUSTER
-import org.opendc.compute.metal.driver.SimBareMetalDriver
-import org.opendc.compute.metal.power.LinearLoadPowerModel
-import org.opendc.compute.metal.service.ProvisioningService
-import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.compute.core.metal.NODE_CLUSTER
+import org.opendc.compute.core.metal.service.ProvisioningService
+import org.opendc.compute.core.metal.service.SimpleProvisioningService
+import org.opendc.compute.simulator.SimBareMetalDriver
+import org.opendc.compute.simulator.power.LinearLoadPowerModel
import org.opendc.core.Environment
import org.opendc.core.Platform
import org.opendc.core.Zone
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
index 36136888..94237cb9 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
@@ -26,10 +26,10 @@ import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.coroutines.CoroutineScope
-import org.opendc.compute.metal.driver.SimBareMetalDriver
-import org.opendc.compute.metal.power.LinearLoadPowerModel
-import org.opendc.compute.metal.service.ProvisioningService
-import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.compute.core.metal.service.ProvisioningService
+import org.opendc.compute.core.metal.service.SimpleProvisioningService
+import org.opendc.compute.simulator.SimBareMetalDriver
+import org.opendc.compute.simulator.power.LinearLoadPowerModel
import org.opendc.core.Environment
import org.opendc.core.Platform
import org.opendc.core.Zone
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
index 6292a9cc..9353ef28 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/bitbrains/BitbrainsTraceReader.kt
@@ -22,8 +22,8 @@
package org.opendc.format.trace.bitbrains
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.core.User
import org.opendc.format.trace.TraceEntry
import org.opendc.format.trace.TraceReader
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt
index 53bc3956..a20b4f29 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/gwf/GwfTraceReader.kt
@@ -22,7 +22,7 @@
package org.opendc.format.trace.gwf
-import org.opendc.compute.core.image.SimWorkloadImage
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.core.User
import org.opendc.format.trace.TraceEntry
import org.opendc.format.trace.TraceReader
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt
index 558003a7..6d854fef 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/sc20/Sc20TraceReader.kt
@@ -22,8 +22,8 @@
package org.opendc.format.trace.sc20
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.core.User
import org.opendc.format.trace.TraceEntry
import org.opendc.format.trace.TraceReader
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt
index 5f312d01..f7b8a072 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/swf/SwfTraceReader.kt
@@ -22,8 +22,8 @@
package org.opendc.format.trace.swf
-import org.opendc.compute.core.image.SimWorkloadImage
import org.opendc.compute.core.workload.VmWorkload
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.core.User
import org.opendc.format.trace.TraceEntry
import org.opendc.format.trace.TraceReader
diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/wtf/WtfTraceReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/wtf/WtfTraceReader.kt
index 09f2764b..e43d68d8 100644
--- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/wtf/WtfTraceReader.kt
+++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/trace/wtf/WtfTraceReader.kt
@@ -25,7 +25,7 @@ package org.opendc.format.trace.wtf
import org.apache.avro.generic.GenericRecord
import org.apache.hadoop.fs.Path
import org.apache.parquet.avro.AvroParquetReader
-import org.opendc.compute.core.image.SimWorkloadImage
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.core.User
import org.opendc.format.trace.TraceEntry
import org.opendc.format.trace.TraceReader
diff --git a/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt
index 78066c61..8db2ab40 100644
--- a/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt
+++ b/simulator/opendc-format/src/test/kotlin/org/opendc/format/trace/swf/SwfTraceReaderTest.kt
@@ -24,7 +24,7 @@ package org.opendc.format.trace.swf
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
-import org.opendc.compute.core.image.SimWorkloadImage
+import org.opendc.compute.simulator.SimWorkloadImage
import org.opendc.simulator.compute.workload.SimTraceWorkload
import java.io.File
diff --git a/simulator/opendc-runner-web/build.gradle.kts b/simulator/opendc-runner-web/build.gradle.kts
index 9e2c5277..cf437843 100644
--- a/simulator/opendc-runner-web/build.gradle.kts
+++ b/simulator/opendc-runner-web/build.gradle.kts
@@ -34,7 +34,7 @@ application {
dependencies {
api(project(":opendc-core"))
- implementation(project(":opendc-compute"))
+ implementation(project(":opendc-compute:opendc-compute-simulator"))
implementation(project(":opendc-format"))
implementation(project(":opendc-experiments:opendc-experiments-sc20"))
implementation(project(":opendc-simulator:opendc-simulator-core"))
diff --git a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
index 2d4272ab..ca500770 100644
--- a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
+++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
@@ -38,7 +38,7 @@ import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.test.TestCoroutineScope
import mu.KotlinLogging
import org.bson.Document
-import org.opendc.compute.virt.service.allocation.*
+import org.opendc.compute.simulator.allocation.*
import org.opendc.experiments.sc20.experiment.attachMonitor
import org.opendc.experiments.sc20.experiment.createFailureDomain
import org.opendc.experiments.sc20.experiment.createProvisioner
diff --git a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
index cdcf1b08..244f2a3d 100644
--- a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
+++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
@@ -31,11 +31,11 @@ import com.mongodb.client.model.Projections
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import org.bson.Document
-import org.opendc.compute.metal.NODE_CLUSTER
-import org.opendc.compute.metal.driver.SimBareMetalDriver
-import org.opendc.compute.metal.power.LinearLoadPowerModel
-import org.opendc.compute.metal.service.ProvisioningService
-import org.opendc.compute.metal.service.SimpleProvisioningService
+import org.opendc.compute.core.metal.NODE_CLUSTER
+import org.opendc.compute.core.metal.service.ProvisioningService
+import org.opendc.compute.core.metal.service.SimpleProvisioningService
+import org.opendc.compute.simulator.SimBareMetalDriver
+import org.opendc.compute.simulator.power.LinearLoadPowerModel
import org.opendc.core.Environment
import org.opendc.core.Platform
import org.opendc.core.Zone
diff --git a/simulator/opendc-workflows/build.gradle.kts b/simulator/opendc-workflows/build.gradle.kts
index b30ecd39..f61bdac6 100644
--- a/simulator/opendc-workflows/build.gradle.kts
+++ b/simulator/opendc-workflows/build.gradle.kts
@@ -29,7 +29,7 @@ plugins {
dependencies {
api(project(":opendc-core"))
- api(project(":opendc-compute"))
+ api(project(":opendc-compute:opendc-compute-core"))
implementation(project(":opendc-utils"))
testImplementation(project(":opendc-simulator:opendc-simulator-core"))
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
index bc08b22d..3b4e6eab 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
@@ -31,8 +31,8 @@ import kotlinx.coroutines.launch
import org.opendc.compute.core.Server
import org.opendc.compute.core.ServerEvent
import org.opendc.compute.core.ServerState
-import org.opendc.compute.metal.Node
-import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.core.metal.Node
+import org.opendc.compute.core.metal.service.ProvisioningService
import org.opendc.utils.flow.EventFlow
import org.opendc.workflows.service.stage.job.JobAdmissionPolicy
import org.opendc.workflows.service.stage.job.JobOrderPolicy
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt
index ddfbeae3..ed023c82 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/TaskState.kt
@@ -22,7 +22,7 @@
package org.opendc.workflows.service
-import org.opendc.compute.metal.Node
+import org.opendc.compute.core.metal.Node
import org.opendc.workflows.workload.Task
public class TaskState(public val job: JobState, public val task: Task) {
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt
index 38b37140..8dc323ec 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FirstFitResourceSelectionPolicy.kt
@@ -22,7 +22,7 @@
package org.opendc.workflows.service.stage.resource
-import org.opendc.compute.metal.Node
+import org.opendc.compute.core.metal.Node
import org.opendc.workflows.service.StageWorkflowService
/**
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt
index 9381ffd7..ac79a9ce 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/FunctionalResourceFilterPolicy.kt
@@ -22,7 +22,7 @@
package org.opendc.workflows.service.stage.resource
-import org.opendc.compute.metal.Node
+import org.opendc.compute.core.metal.Node
import org.opendc.workflows.service.StageWorkflowService
import org.opendc.workflows.service.TaskState
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt
index b31a6217..caf87c70 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/RandomResourceSelectionPolicy.kt
@@ -22,7 +22,7 @@
package org.opendc.workflows.service.stage.resource
-import org.opendc.compute.metal.Node
+import org.opendc.compute.core.metal.Node
import org.opendc.workflows.service.StageWorkflowService
import java.util.*
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt
index 9f44fddf..4923a34b 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceFilterPolicy.kt
@@ -22,7 +22,7 @@
package org.opendc.workflows.service.stage.resource
-import org.opendc.compute.metal.Node
+import org.opendc.compute.core.metal.Node
import org.opendc.workflows.service.TaskState
import org.opendc.workflows.service.stage.StagePolicy
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt
index 3682844a..990b990a 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/stage/resource/ResourceSelectionPolicy.kt
@@ -22,7 +22,7 @@
package org.opendc.workflows.service.stage.resource
-import org.opendc.compute.metal.Node
+import org.opendc.compute.core.metal.Node
import org.opendc.workflows.service.stage.StagePolicy
/**
diff --git a/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt b/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
index 6e9e7430..90cf5b99 100644
--- a/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
+++ b/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
@@ -35,7 +35,7 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNotEquals
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test
-import org.opendc.compute.metal.service.ProvisioningService
+import org.opendc.compute.core.metal.service.ProvisioningService
import org.opendc.format.environment.sc18.Sc18EnvironmentReader
import org.opendc.format.trace.gwf.GwfTraceReader
import org.opendc.simulator.utils.DelayControllerClockAdapter
diff --git a/simulator/settings.gradle.kts b/simulator/settings.gradle.kts
index 3de05fe1..418b00fb 100644
--- a/simulator/settings.gradle.kts
+++ b/simulator/settings.gradle.kts
@@ -22,7 +22,8 @@
rootProject.name = "opendc-simulator"
include(":opendc-core")
-include(":opendc-compute")
+include(":opendc-compute:opendc-compute-core")
+include(":opendc-compute:opendc-compute-simulator")
include(":opendc-workflows")
include(":opendc-format")
include(":opendc-experiments:opendc-experiments-sc18")