summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-proto
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-web/opendc-web-proto
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-web/opendc-web-proto')
-rw-r--r--opendc-web/opendc-web-proto/build.gradle.kts2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/JobState.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Machine.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/MemoryUnit.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/OperationalPhenomena.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/ProcessingUnit.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Rack.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Room.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/RoomTile.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Targets.kt4
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Trace.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Workload.kt6
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Portfolio.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Scenario.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Topology.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Job.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Portfolio.kt8
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Project.kt8
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/ProjectRole.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Scenario.kt8
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Topology.kt8
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/User.kt2
-rw-r--r--opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/UserAccounting.kt2
24 files changed, 40 insertions, 38 deletions
diff --git a/opendc-web/opendc-web-proto/build.gradle.kts b/opendc-web/opendc-web-proto/build.gradle.kts
index 4a566346..9b307655 100644
--- a/opendc-web/opendc-web-proto/build.gradle.kts
+++ b/opendc-web/opendc-web-proto/build.gradle.kts
@@ -22,7 +22,7 @@
description = "Web communication protocol for OpenDC"
-/* Build configuration */
+// Build configuration
plugins {
`kotlin-library-conventions`
id("org.kordamp.gradle.jandex") // Necessary for Quarkus to process annotations
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/JobState.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/JobState.kt
index 38b8ca42..a8e67ec5 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/JobState.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/JobState.kt
@@ -49,5 +49,5 @@ public enum class JobState {
/**
* The job has failed.
*/
- FAILED;
+ FAILED,
}
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Machine.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Machine.kt
index f5c50cc3..72163f51 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Machine.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Machine.kt
@@ -36,5 +36,5 @@ public data class Machine(
val memory: List<MemoryUnit> = emptyList(),
@JsonProperty("storages")
val storage: List<MemoryUnit> = emptyList(),
- val rackId: String? = null
+ val rackId: String? = null,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/MemoryUnit.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/MemoryUnit.kt
index 1fc604fa..00560ad6 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/MemoryUnit.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/MemoryUnit.kt
@@ -30,5 +30,5 @@ public data class MemoryUnit(
val name: String,
val speedMbPerS: Double,
val sizeMb: Double,
- val energyConsumptionW: Double
+ val energyConsumptionW: Double,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/OperationalPhenomena.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/OperationalPhenomena.kt
index f3164f64..28006d27 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/OperationalPhenomena.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/OperationalPhenomena.kt
@@ -27,5 +27,5 @@ package org.opendc.web.proto
*/
public data class OperationalPhenomena(
val failures: Boolean,
- val interference: Boolean
+ val interference: Boolean,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/ProcessingUnit.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/ProcessingUnit.kt
index 5f79d1bd..86f40516 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/ProcessingUnit.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/ProcessingUnit.kt
@@ -30,5 +30,5 @@ public data class ProcessingUnit(
val name: String,
val clockRateMhz: Double,
val numberOfCores: Int,
- val energyConsumptionW: Double
+ val energyConsumptionW: Double,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Rack.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Rack.kt
index 131aa184..c997e814 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Rack.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Rack.kt
@@ -30,5 +30,5 @@ public data class Rack(
val name: String,
val capacity: Int,
val powerCapacityW: Double,
- val machines: List<Machine>
+ val machines: List<Machine>,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Room.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Room.kt
index c5499150..5b305168 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Room.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Room.kt
@@ -29,5 +29,5 @@ public data class Room(
val id: String,
val name: String,
val tiles: Set<RoomTile>,
- val topologyId: String? = null
+ val topologyId: String? = null,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/RoomTile.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/RoomTile.kt
index 53cb53cd..666d66ee 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/RoomTile.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/RoomTile.kt
@@ -30,5 +30,5 @@ public data class RoomTile(
val positionX: Double,
val positionY: Double,
val rack: Rack? = null,
- val roomId: String? = null
+ val roomId: String? = null,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Targets.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Targets.kt
index a0100f72..25516ff0 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Targets.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Targets.kt
@@ -22,7 +22,7 @@
package org.opendc.web.proto
-import javax.validation.constraints.Min
+import jakarta.validation.constraints.Min
/**
* The targets of a portfolio.
@@ -33,5 +33,5 @@ import javax.validation.constraints.Min
public data class Targets(
val metrics: Set<String>,
@field:Min(1)
- val repeats: Int = 1
+ val repeats: Int = 1,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Trace.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Trace.kt
index 1c086cd8..2952a273 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Trace.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Trace.kt
@@ -32,5 +32,5 @@ package org.opendc.web.proto
public data class Trace(
val id: String,
val name: String,
- val type: String
+ val type: String,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Workload.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Workload.kt
index cc6e0ed8..58daf817 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Workload.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/Workload.kt
@@ -22,8 +22,8 @@
package org.opendc.web.proto
-import javax.validation.constraints.DecimalMax
-import javax.validation.constraints.DecimalMin
+import jakarta.validation.constraints.DecimalMax
+import jakarta.validation.constraints.DecimalMin
/**
* The workload to simulate for a scenario.
@@ -39,6 +39,6 @@ public data class Workload(val trace: Trace, val samplingFraction: Double) {
val trace: String,
@DecimalMin(value = "0.001", message = "Sampling fraction must be non-zero")
@DecimalMax(value = "1", message = "Sampling fraction cannot exceed one")
- val samplingFraction: Double
+ val samplingFraction: Double,
)
}
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt
index 4f21f0bb..34642436 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt
@@ -37,7 +37,7 @@ public data class Job(
val createdAt: Instant,
val updatedAt: Instant,
val runtime: Int,
- val results: Map<String, Any>? = null
+ val results: Map<String, Any>? = null,
) {
/**
* A request to update the state of a job.
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Portfolio.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Portfolio.kt
index 5faad5b3..916d8cf0 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Portfolio.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Portfolio.kt
@@ -39,5 +39,5 @@ public data class Portfolio(
val id: Long,
val number: Int,
val name: String,
- val targets: Targets
+ val targets: Targets,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Scenario.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Scenario.kt
index aeffc4d7..ebc10bb0 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Scenario.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Scenario.kt
@@ -38,5 +38,5 @@ public data class Scenario(
val workload: Workload,
val topology: Topology,
val phenomena: OperationalPhenomena,
- val schedulerName: String
+ val schedulerName: String,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Topology.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Topology.kt
index bc185aea..4bffdee9 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Topology.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Topology.kt
@@ -36,5 +36,5 @@ public data class Topology(
val name: String,
val rooms: List<Room>,
val createdAt: Instant,
- val updatedAt: Instant
+ val updatedAt: Instant,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Job.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Job.kt
index de5f8de3..dd2f209e 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Job.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Job.kt
@@ -36,5 +36,5 @@ public data class Job(
val state: JobState,
val createdAt: Instant,
val updatedAt: Instant,
- val results: Map<String, Any>? = null
+ val results: Map<String, Any>? = null,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Portfolio.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Portfolio.kt
index 99d0f65e..6f433a04 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Portfolio.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Portfolio.kt
@@ -22,9 +22,9 @@
package org.opendc.web.proto.user
+import jakarta.validation.constraints.NotBlank
import org.eclipse.microprofile.openapi.annotations.media.Schema
import org.opendc.web.proto.Targets
-import javax.validation.constraints.NotBlank
/**
* A portfolio is the composition of multiple scenarios.
@@ -42,7 +42,7 @@ public data class Portfolio(
val project: Project,
val name: String,
val targets: Targets,
- val scenarios: List<Scenario.Summary>
+ val scenarios: List<Scenario.Summary>,
) {
/**
* A request to create a new portfolio.
@@ -51,7 +51,7 @@ public data class Portfolio(
public data class Create(
@field:NotBlank(message = "Name must not be empty")
val name: String,
- val targets: Targets
+ val targets: Targets,
)
/**
@@ -67,6 +67,6 @@ public data class Portfolio(
val id: Long,
val number: Int,
val name: String,
- val targets: Targets
+ val targets: Targets,
)
}
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Project.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Project.kt
index 3a2807ca..635552a9 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Project.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Project.kt
@@ -22,9 +22,9 @@
package org.opendc.web.proto.user
+import jakarta.validation.constraints.NotBlank
import org.eclipse.microprofile.openapi.annotations.media.Schema
import java.time.Instant
-import javax.validation.constraints.NotBlank
/**
* A project in OpenDC encapsulates all the datacenter designs and simulation runs for a set of users.
@@ -34,11 +34,13 @@ public data class Project(
val name: String,
val createdAt: Instant,
val updatedAt: Instant,
- val role: ProjectRole
+ val role: ProjectRole,
) {
/**
* A request to create a new project.
*/
@Schema(name = "Project.Create")
- public data class Create(@field:NotBlank(message = "Name must not be empty") val name: String)
+ public data class Create(
+ @field:NotBlank(message = "Name must not be empty") val name: String,
+ )
}
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/ProjectRole.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/ProjectRole.kt
index ea6a30ab..0f6de1fc 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/ProjectRole.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/ProjectRole.kt
@@ -39,5 +39,5 @@ public enum class ProjectRole {
/**
* The user owns the project (so he can delete it).
*/
- OWNER
+ OWNER,
}
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Scenario.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Scenario.kt
index b9c7a4cf..e0c790f5 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Scenario.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Scenario.kt
@@ -22,10 +22,10 @@
package org.opendc.web.proto.user
+import jakarta.validation.constraints.NotBlank
import org.eclipse.microprofile.openapi.annotations.media.Schema
import org.opendc.web.proto.OperationalPhenomena
import org.opendc.web.proto.Workload
-import javax.validation.constraints.NotBlank
/**
* A single scenario to be explored by the simulator.
@@ -40,7 +40,7 @@ public data class Scenario(
val topology: Topology.Summary,
val phenomena: OperationalPhenomena,
val schedulerName: String,
- val jobs: List<Job>
+ val jobs: List<Job>,
) {
/**
* Create a new scenario.
@@ -58,7 +58,7 @@ public data class Scenario(
val workload: Workload.Spec,
val topology: Long,
val phenomena: OperationalPhenomena,
- val schedulerName: String
+ val schedulerName: String,
)
/**
@@ -81,6 +81,6 @@ public data class Scenario(
val topology: Topology.Summary,
val phenomena: OperationalPhenomena,
val schedulerName: String,
- val jobs: List<Job>
+ val jobs: List<Job>,
)
}
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Topology.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Topology.kt
index 73748bb9..0943eaf8 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Topology.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/Topology.kt
@@ -22,10 +22,10 @@
package org.opendc.web.proto.user
+import jakarta.validation.constraints.NotBlank
import org.eclipse.microprofile.openapi.annotations.media.Schema
import org.opendc.web.proto.Room
import java.time.Instant
-import javax.validation.constraints.NotBlank
/**
* Model for an OpenDC topology.
@@ -37,7 +37,7 @@ public data class Topology(
val name: String,
val rooms: List<Room>,
val createdAt: Instant,
- val updatedAt: Instant
+ val updatedAt: Instant,
) {
/**
* Create a new topology for a project.
@@ -46,7 +46,7 @@ public data class Topology(
public data class Create(
@field:NotBlank(message = "Name must not be empty")
val name: String,
- val rooms: List<Room>
+ val rooms: List<Room>,
)
/**
@@ -70,6 +70,6 @@ public data class Topology(
val number: Int,
val name: String,
val createdAt: Instant,
- val updatedAt: Instant
+ val updatedAt: Instant,
)
}
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/User.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/User.kt
index f18cda61..33dad4ff 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/User.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/User.kt
@@ -27,5 +27,5 @@ package org.opendc.web.proto.user
*/
public data class User(
val userId: String,
- val accounting: UserAccounting
+ val accounting: UserAccounting,
)
diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/UserAccounting.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/UserAccounting.kt
index 2441983a..970721eb 100644
--- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/UserAccounting.kt
+++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/user/UserAccounting.kt
@@ -30,5 +30,5 @@ import java.time.LocalDate
public data class UserAccounting(
val periodEnd: LocalDate,
val simulationTime: Int,
- val simulationTimeBudget: Int
+ val simulationTimeBudget: Int,
)