summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-runner/src/main/kotlin
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-10 12:41:00 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-15 15:45:28 +0200
commite200dbfdc076ac6263c9ac6f9dabdcc475f01d6e (patch)
tree18bbe61cbf14f5b57e5effe04feda0da4b6d572a /opendc-web/opendc-web-runner/src/main/kotlin
parent1ab168fb80fbf3958fbadda00d1c6714cad66c86 (diff)
fix(ui): Relax topology schema requirements
This change fixes an issue where the topology generated by the frontend was not accepted by the API server.
Diffstat (limited to 'opendc-web/opendc-web-runner/src/main/kotlin')
-rw-r--r--opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Machine.kt3
-rw-r--r--opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Room.kt3
-rw-r--r--opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/RoomTile.kt3
3 files changed, 6 insertions, 3 deletions
diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Machine.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Machine.kt
index c6757c5c..86d2d46f 100644
--- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Machine.kt
+++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Machine.kt
@@ -38,5 +38,6 @@ public data class Machine(
@JsonProperty("memories")
val memory: List<MemoryUnit> = emptyList(),
@JsonProperty("storages")
- val storage: List<MemoryUnit> = emptyList()
+ val storage: List<MemoryUnit> = emptyList(),
+ val rackId: String? = null
)
diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Room.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Room.kt
index e961d6db..f1b8f946 100644
--- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Room.kt
+++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/Room.kt
@@ -33,5 +33,6 @@ public data class Room(
@JsonProperty("_id")
val id: String,
val name: String,
- val tiles: Set<RoomTile>
+ val tiles: Set<RoomTile>,
+ val topologyId: String? = null,
)
diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/RoomTile.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/RoomTile.kt
index 3bee3204..0b956262 100644
--- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/RoomTile.kt
+++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/client/model/RoomTile.kt
@@ -34,5 +34,6 @@ public data class RoomTile(
val id: String,
val positionX: Double,
val positionY: Double,
- val rack: Rack? = null
+ val rack: Rack? = null,
+ val roomId: String? = null,
)