From b8637f4d54dd228f08029f66f45cfe4d2240ddff Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Tue, 5 May 2020 19:01:39 +0200 Subject: Fix cluster format --- .../opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opendc/opendc-compute/src') diff --git a/opendc/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt b/opendc/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt index 790121c4..280f3028 100644 --- a/opendc/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt +++ b/opendc/opendc-compute/src/main/kotlin/com/atlarge/opendc/compute/virt/service/allocation/ReplayAllocationPolicy.kt @@ -16,10 +16,10 @@ class ReplayAllocationPolicy(val vmPlacements: Map) : Allocation image: SimpleVirtProvisioningService.ImageView ): HypervisorView? { val clusterName = vmPlacements[image.name] - ?: throw IllegalArgumentException("Could not find placement data in VM placement file for VM ${image.name}") + ?: throw RuntimeException("Could not find placement data in VM placement file for VM ${image.name}") val machinesInCluster = hypervisors.filter { it.server.name.contains(clusterName) } return machinesInCluster.minBy { it.numberOfActiveServers } - ?: throw IllegalArgumentException("Cloud not find any machines belonging to cluster $clusterName for image ${image.name}") + ?: throw RuntimeException("Cloud not find any machines belonging to cluster $clusterName for image ${image.name}") } } } -- cgit v1.2.3