From 5864cbcbfe2eb8c36ca05c3a39c7e5916aeecaec Mon Sep 17 00:00:00 2001 From: Dante Niewenhuis Date: Tue, 5 Mar 2024 13:23:57 +0100 Subject: 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 --- .../src/main/kotlin/org/opendc/compute/api/ComputeClient.kt | 6 +++--- .../org/opendc/compute/api/InsufficientServerCapacityException.kt | 4 +++- .../src/main/kotlin/org/opendc/compute/api/ServerState.kt | 2 +- .../src/main/kotlin/org/opendc/compute/api/ServerWatcher.kt | 5 ++++- 4 files changed, 11 insertions(+), 6 deletions(-) (limited to 'opendc-compute/opendc-compute-api/src/main/kotlin/org') 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 = emptyMap(), - meta: Map = emptyMap() + meta: Map = emptyMap(), ): Flavor /** @@ -79,7 +79,7 @@ public interface ComputeClient : AutoCloseable { public fun newImage( name: String, labels: Map = emptyMap(), - meta: Map = emptyMap() + meta: Map = emptyMap(), ): Image /** @@ -110,7 +110,7 @@ public interface ComputeClient : AutoCloseable { flavor: Flavor, labels: Map = emptyMap(), meta: Map = 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, + ) {} } -- cgit v1.2.3