summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-runner/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-22 15:00:11 +0200
committerGitHub <noreply@github.com>2021-06-22 15:00:11 +0200
commit8a2b475f082572033438eb5b8703d211323f1b52 (patch)
tree76179cf3802a34d65829f4d8b9aa708c9a41eec1 /opendc-web/opendc-web-runner/src
parent147951f39de8f93eba6c7b0b7e6e5c9d2bce32e7 (diff)
parentdcd1bc82b9126b8122c671102d4d22843b73c847 (diff)
simulator: Add support for networking (v1)
This change adds support for networking in the simulator. As outlined in #84, the network model doesn't model individual packets, but instead considers dynamic flows between network devices. This pull request adds the bare-minimum implementation necessary to model network traffic. In the future, we will add advanced functionality such as routing and other L3 concepts. * Add core model for network simulation * Add model for network adapter that attaches to machine * Add virtual network switch to bridge traffic between hosts.
Diffstat (limited to 'opendc-web/opendc-web-runner/src')
-rw-r--r--opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
index e96a681d..2135ee1d 100644
--- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
+++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/runner/web/TopologyParser.kt
@@ -32,7 +32,7 @@ import org.bson.Document
import org.bson.types.ObjectId
import org.opendc.format.environment.EnvironmentReader
import org.opendc.format.environment.MachineDef
-import org.opendc.simulator.compute.SimMachineModel
+import org.opendc.simulator.compute.model.MachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
import org.opendc.simulator.compute.model.ProcessingUnit
@@ -80,7 +80,7 @@ public class TopologyParser(private val collection: MongoCollection<Document>) {
UUID(random.nextLong(), random.nextLong()),
"node-$clusterId-$position",
mapOf("cluster" to clusterId),
- SimMachineModel(processors, memoryUnits),
+ MachineModel(processors, memoryUnits),
LinearPowerModel(2 * energyConsumptionW, energyConsumptionW * 0.5)
)
)