From 1768292251957da5ce6411ecc7d2dffebf8709c8 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 10 Jun 2021 17:32:43 +0200 Subject: simulator: Integrate power subsystem with compute subsystem This change integrates the power subsystem of the simulator with the compute subsystem by exposing a new field on a SimBareMetalMachine, psu, which provides access to the machine's PSU, which in turn can be connected to a SimPowerOutlet. --- opendc-simulator/opendc-simulator-compute/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) (limited to 'opendc-simulator/opendc-simulator-compute/build.gradle.kts') diff --git a/opendc-simulator/opendc-simulator-compute/build.gradle.kts b/opendc-simulator/opendc-simulator-compute/build.gradle.kts index 4eb0be33..41cdd40c 100644 --- a/opendc-simulator/opendc-simulator-compute/build.gradle.kts +++ b/opendc-simulator/opendc-simulator-compute/build.gradle.kts @@ -32,6 +32,7 @@ plugins { dependencies { api(platform(projects.opendcPlatform)) api(projects.opendcSimulator.opendcSimulatorResources) + api(projects.opendcSimulator.opendcSimulatorPower) implementation(projects.opendcSimulator.opendcSimulatorCore) implementation(projects.opendcUtils) implementation(libs.yaml) -- cgit v1.2.3 From ba3efea6c5d2f4d2fbd2ecc9364817f541000839 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 21 Jun 2021 21:33:06 +0200 Subject: simulator: Add support for attaching network adapter to machine This change bridges the compute and network simulation module by adding support for network adapters in the compute module. With these network adapters, compute workloads can communicate over the network that the adapters are connected to. --- opendc-simulator/opendc-simulator-compute/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) (limited to 'opendc-simulator/opendc-simulator-compute/build.gradle.kts') diff --git a/opendc-simulator/opendc-simulator-compute/build.gradle.kts b/opendc-simulator/opendc-simulator-compute/build.gradle.kts index 41cdd40c..74384480 100644 --- a/opendc-simulator/opendc-simulator-compute/build.gradle.kts +++ b/opendc-simulator/opendc-simulator-compute/build.gradle.kts @@ -33,6 +33,7 @@ dependencies { api(platform(projects.opendcPlatform)) api(projects.opendcSimulator.opendcSimulatorResources) api(projects.opendcSimulator.opendcSimulatorPower) + api(projects.opendcSimulator.opendcSimulatorNetwork) implementation(projects.opendcSimulator.opendcSimulatorCore) implementation(projects.opendcUtils) implementation(libs.yaml) -- cgit v1.2.3 From 76a0f8889a4990108bc7906556dec6381647404b Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 19 Sep 2021 13:59:33 +0200 Subject: refactor(simulator): Remove dependency on SnakeYaml This change removes the dependency on SnakeYaml for the simulator. It was only required for a very small component of the simulator and therefore does not justify bringing in such a dependency. --- opendc-simulator/opendc-simulator-compute/build.gradle.kts | 1 - 1 file changed, 1 deletion(-) (limited to 'opendc-simulator/opendc-simulator-compute/build.gradle.kts') diff --git a/opendc-simulator/opendc-simulator-compute/build.gradle.kts b/opendc-simulator/opendc-simulator-compute/build.gradle.kts index 74384480..7d06ee62 100644 --- a/opendc-simulator/opendc-simulator-compute/build.gradle.kts +++ b/opendc-simulator/opendc-simulator-compute/build.gradle.kts @@ -36,5 +36,4 @@ dependencies { api(projects.opendcSimulator.opendcSimulatorNetwork) implementation(projects.opendcSimulator.opendcSimulatorCore) implementation(projects.opendcUtils) - implementation(libs.yaml) } -- cgit v1.2.3 From 4cc1d40d421c8736f8b21b360b61d6b065158b7a Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 29 Sep 2021 23:56:16 +0200 Subject: refactor(simulator): Migrate to flow-based simulation This change renames the `opendc-simulator-resources` module into the `opendc-simulator-flow` module to indicate that the core simulation model of OpenDC is based around modelling and simulating flows. Previously, the distinction between resource consumer and provider, and input and output caused some confusion. By switching to a flow-based model, this distinction is now clear (as in, the water flows from source to consumer/sink). --- opendc-simulator/opendc-simulator-compute/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-simulator/opendc-simulator-compute/build.gradle.kts') diff --git a/opendc-simulator/opendc-simulator-compute/build.gradle.kts b/opendc-simulator/opendc-simulator-compute/build.gradle.kts index 7d06ee62..e2290a14 100644 --- a/opendc-simulator/opendc-simulator-compute/build.gradle.kts +++ b/opendc-simulator/opendc-simulator-compute/build.gradle.kts @@ -31,7 +31,7 @@ plugins { dependencies { api(platform(projects.opendcPlatform)) - api(projects.opendcSimulator.opendcSimulatorResources) + api(projects.opendcSimulator.opendcSimulatorFlow) api(projects.opendcSimulator.opendcSimulatorPower) api(projects.opendcSimulator.opendcSimulatorNetwork) implementation(projects.opendcSimulator.opendcSimulatorCore) -- cgit v1.2.3 From b0fc93f818e5e735e972a04f5aa49e0ebe1de181 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 30 Sep 2021 14:35:30 +0200 Subject: refactor(simulator): Remove failure callback from FlowSource This change removes the `onFailure` method from FlowSource. Instead, the FlowConsumer will receive the reason for failure of the source. --- opendc-simulator/opendc-simulator-compute/build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'opendc-simulator/opendc-simulator-compute/build.gradle.kts') diff --git a/opendc-simulator/opendc-simulator-compute/build.gradle.kts b/opendc-simulator/opendc-simulator-compute/build.gradle.kts index e2290a14..a2bb89c2 100644 --- a/opendc-simulator/opendc-simulator-compute/build.gradle.kts +++ b/opendc-simulator/opendc-simulator-compute/build.gradle.kts @@ -36,4 +36,6 @@ dependencies { api(projects.opendcSimulator.opendcSimulatorNetwork) implementation(projects.opendcSimulator.opendcSimulatorCore) implementation(projects.opendcUtils) + + testImplementation(libs.slf4j.simple) } -- cgit v1.2.3