summaryrefslogtreecommitdiff
path: root/simulator/opendc-compute/opendc-compute-core/src/main
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-03-02 21:15:38 +0100
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-03-07 16:13:13 +0100
commite85a11645a2262e2e6fd1e3570ad001eb805c85f (patch)
treec5a6958d89ab1cfc6b557f2a50446d603bb05b57 /simulator/opendc-compute/opendc-compute-core/src/main
parent58c73773a75a0e0a8f85217e2e97c64128ce8ab8 (diff)
compute: Separate cloud compute layer from bare-metal layer
This change separates the cloud compute layer in OpenDC (e.g., Server) from the bare-metal layer (e.g., Node), such that Node and BareMetalDriver are unaware of the existence of Server and co.
Diffstat (limited to 'simulator/opendc-compute/opendc-compute-core/src/main')
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt10
-rw-r--r--simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt4
2 files changed, 7 insertions, 7 deletions
diff --git a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt
index 6d9506f1..480bc224 100644
--- a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/metal/Node.kt
@@ -23,7 +23,7 @@
package org.opendc.compute.core.metal
import kotlinx.coroutines.flow.Flow
-import org.opendc.compute.core.Server
+import org.opendc.compute.core.Flavor
import org.opendc.compute.core.image.Image
import org.opendc.core.Identity
import java.util.UUID
@@ -53,14 +53,14 @@ public data class Node(
public val state: NodeState,
/**
- * The boot image of the node.
+ * The flavor of the node.
*/
- public val image: Image,
+ public val flavor: Flavor,
/**
- * The server instance that is running on the node or `null` if no server is running.
+ * The boot image of the node.
*/
- public val server: Server?,
+ public val image: Image,
/**
* The events that are emitted by the node.
diff --git a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt
index 9fb437de..d1c8d790 100644
--- a/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt
+++ b/simulator/opendc-compute/opendc-compute-core/src/main/kotlin/org/opendc/compute/core/virt/HypervisorEvent.kt
@@ -22,7 +22,7 @@
package org.opendc.compute.core.virt
-import org.opendc.compute.core.Server
+import org.opendc.compute.core.metal.Node
import org.opendc.compute.core.virt.driver.VirtDriver
/**
@@ -71,6 +71,6 @@ public sealed class HypervisorEvent {
public val cpuUsage: Double,
public val cpuDemand: Double,
public val numberOfDeployedImages: Int,
- public val hostServer: Server
+ public val host: Node
) : HypervisorEvent()
}