diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-22 15:00:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-22 15:00:11 +0200 |
| commit | 8a2b475f082572033438eb5b8703d211323f1b52 (patch) | |
| tree | 76179cf3802a34d65829f4d8b9aa708c9a41eec1 /opendc-compute/opendc-compute-simulator/src/test | |
| parent | 147951f39de8f93eba6c7b0b7e6e5c9d2bce32e7 (diff) | |
| parent | dcd1bc82b9126b8122c671102d4d22843b73c847 (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-compute/opendc-compute-simulator/src/test')
| -rw-r--r-- | opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt index 79489fdb..5414d042 100644 --- a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt +++ b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt @@ -40,8 +40,8 @@ import org.opendc.compute.api.ServerState import org.opendc.compute.api.ServerWatcher import org.opendc.compute.service.driver.Host import org.opendc.compute.service.driver.HostListener -import org.opendc.simulator.compute.SimFairShareHypervisorProvider -import org.opendc.simulator.compute.SimMachineModel +import org.opendc.simulator.compute.kernel.SimFairShareHypervisorProvider +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 @@ -58,13 +58,13 @@ import kotlin.coroutines.resume */ @OptIn(ExperimentalCoroutinesApi::class) internal class SimHostTest { - private lateinit var machineModel: SimMachineModel + private lateinit var machineModel: MachineModel @BeforeEach fun setUp() { val cpuNode = ProcessingNode("Intel", "Xeon", "amd64", 2) - machineModel = SimMachineModel( + machineModel = MachineModel( cpus = List(cpuNode.coreCount) { ProcessingUnit(cpuNode, it, 3200.0) }, memory = List(4) { MemoryUnit("Crucial", "MTA18ASF4G72AZ-3G2B1", 3200.0, 32_000) } ) |
