summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-api
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2024-05-07 12:33:39 +0200
committerGitHub <noreply@github.com>2024-05-07 12:33:39 +0200
commitad20465a5df47b49561bb0afbdda5cd65c5da4b8 (patch)
tree268f0fde5924b71ca2750dbbbba4cbe24c361f12 /opendc-compute/opendc-compute-api
parent7c0691eb6c348d2e49da3ef354b652cf26604905 (diff)
Revamped failure models (#228)
Diffstat (limited to 'opendc-compute/opendc-compute-api')
-rw-r--r--opendc-compute/opendc-compute-api/build.gradle.kts3
-rw-r--r--opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ComputeClient.kt6
2 files changed, 9 insertions, 0 deletions
diff --git a/opendc-compute/opendc-compute-api/build.gradle.kts b/opendc-compute/opendc-compute-api/build.gradle.kts
index f9b04299..2f855c79 100644
--- a/opendc-compute/opendc-compute-api/build.gradle.kts
+++ b/opendc-compute/opendc-compute-api/build.gradle.kts
@@ -26,3 +26,6 @@ description = "API interface for the OpenDC Compute service"
plugins {
`kotlin-library-conventions`
}
+dependencies {
+ implementation(project(mapOf("path" to ":opendc-simulator:opendc-simulator-compute")))
+}
diff --git a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ComputeClient.kt b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ComputeClient.kt
index 09cfe6f5..7863f20b 100644
--- a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ComputeClient.kt
+++ b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ComputeClient.kt
@@ -22,6 +22,7 @@
package org.opendc.compute.api
+import org.opendc.simulator.compute.workload.SimWorkload
import java.util.UUID
/**
@@ -113,6 +114,11 @@ public interface ComputeClient : AutoCloseable {
start: Boolean = true,
): Server
+ public fun rescheduleServer(
+ server: Server,
+ workload: SimWorkload,
+ )
+
/**
* Release the resources associated with this client, preventing any further API calls.
*/