From e200dbfdc076ac6263c9ac6f9dabdcc475f01d6e Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sat, 10 Jul 2021 12:41:00 +0200 Subject: 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. --- .../src/main/kotlin/org/opendc/web/client/model/Machine.kt | 3 ++- .../src/main/kotlin/org/opendc/web/client/model/Room.kt | 3 ++- .../src/main/kotlin/org/opendc/web/client/model/RoomTile.kt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'opendc-web/opendc-web-runner/src') 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 = emptyList(), @JsonProperty("storages") - val storage: List = emptyList() + val storage: List = 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 + val tiles: Set, + 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, ) -- cgit v1.2.3