summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-api/src/main/kotlin/org
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2024-03-05 13:23:57 +0100
committerGitHub <noreply@github.com>2024-03-05 13:23:57 +0100
commit5864cbcbfe2eb8c36ca05c3a39c7e5916aeecaec (patch)
tree5b2773b8dc21c2e1b526fb70f829c376dd80532a /opendc-compute/opendc-compute-api/src/main/kotlin/org
parentd28002a3c151d198298574312f32f1cb43f3a660 (diff)
Updated package versions, updated web server tests. (#207)
* Updated all package versions including kotlin. Updated all web-server tests to run. * Changed the java version of the tests. OpenDC now only supports java 19. * small update * test update * new update * updated docker version to 19 * updated docker version to 19
Diffstat (limited to 'opendc-compute/opendc-compute-api/src/main/kotlin/org')
-rw-r--r--opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ComputeClient.kt6
-rw-r--r--opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/InsufficientServerCapacityException.kt4
-rw-r--r--opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerState.kt2
-rw-r--r--opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerWatcher.kt5
4 files changed, 11 insertions, 6 deletions
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 c26d0b8b..09cfe6f5 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
@@ -54,7 +54,7 @@ public interface ComputeClient : AutoCloseable {
cpuCount: Int,
memorySize: Long,
labels: Map<String, String> = emptyMap(),
- meta: Map<String, Any> = emptyMap()
+ meta: Map<String, Any> = emptyMap(),
): Flavor
/**
@@ -79,7 +79,7 @@ public interface ComputeClient : AutoCloseable {
public fun newImage(
name: String,
labels: Map<String, String> = emptyMap(),
- meta: Map<String, Any> = emptyMap()
+ meta: Map<String, Any> = emptyMap(),
): Image
/**
@@ -110,7 +110,7 @@ public interface ComputeClient : AutoCloseable {
flavor: Flavor,
labels: Map<String, String> = emptyMap(),
meta: Map<String, Any> = emptyMap(),
- start: Boolean = true
+ start: Boolean = true,
): Server
/**
diff --git a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/InsufficientServerCapacityException.kt b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/InsufficientServerCapacityException.kt
index 8fbb7308..497d5266 100644
--- a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/InsufficientServerCapacityException.kt
+++ b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/InsufficientServerCapacityException.kt
@@ -26,4 +26,6 @@ package org.opendc.compute.api
* This exception is thrown to indicate that the compute service does not have enough capacity at the moment to
* fulfill a launch request.
*/
-public class InsufficientServerCapacityException(override val cause: Throwable? = null) : Exception("There was insufficient capacity available to satisfy the launch request")
+public class InsufficientServerCapacityException(
+ override val cause: Throwable? = null,
+) : Exception("There was insufficient capacity available to satisfy the launch request")
diff --git a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerState.kt b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerState.kt
index 2b5aebb1..a4d7d7d7 100644
--- a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerState.kt
+++ b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerState.kt
@@ -49,5 +49,5 @@ public enum class ServerState {
/**
* The server has been deleted and cannot be started later on.
*/
- DELETED
+ DELETED,
}
diff --git a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerWatcher.kt b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerWatcher.kt
index cf995fc3..3229e101 100644
--- a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerWatcher.kt
+++ b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/ServerWatcher.kt
@@ -32,5 +32,8 @@ public interface ServerWatcher {
* @param server The server whose state has changed.
* @param newState The new state of the server.
*/
- public fun onStateChanged(server: Server, newState: ServerState) {}
+ public fun onStateChanged(
+ server: Server,
+ newState: ServerState,
+ ) {}
}