From b17f382cd18a55f7f6b33ac42a851b4a57a2d46e Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 19 Jul 2024 09:57:17 +0200 Subject: [PATCH] revert required validation workarounds --- .../item/validators/HsCloudServerBookingItemValidator.java | 4 ++-- .../item/validators/HsManagedServerBookingItemValidator.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsCloudServerBookingItemValidator.java b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsCloudServerBookingItemValidator.java index 8b4aadf3..618c0b7b 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsCloudServerBookingItemValidator.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsCloudServerBookingItemValidator.java @@ -13,9 +13,9 @@ class HsCloudServerBookingItemValidator extends HsBookingItemEntityValidator { integerProperty("CPU") .min( 1) .max( 32) .required(), integerProperty("RAM").unit("GB") .min( 1) .max( 8192) .required(), - integerProperty("SSD").unit("GB") .min( 0) .max( 1000) .step(25).optional(), // (1) // FIXME: required() + integerProperty("SSD").unit("GB") .min( 0) .max( 1000) .step(25).required(), integerProperty("HDD").unit("GB") .min( 0) .max( 4000) .step(250).withDefault(0), - integerProperty("Traffic").unit("GB") .min(250) .max(10000) .step(250).optional(), // FIXME: required() + integerProperty("Traffic").unit("GB") .min(250) .max(10000) .step(250).required(), integerProperty("Bandwidth").unit("GB") .min(250) .max(10000) .step(250).optional(), // TODO.spec enumerationProperty("SLA-Infrastructure").values("BASIC", "EXT8H", "EXT4H", "EXT2H").optional() diff --git a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsManagedServerBookingItemValidator.java b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsManagedServerBookingItemValidator.java index 37f97579..1f701e20 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsManagedServerBookingItemValidator.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/validators/HsManagedServerBookingItemValidator.java @@ -12,7 +12,7 @@ class HsManagedServerBookingItemValidator extends HsBookingItemEntityValidator { super( integerProperty("CPU").min(1).max(32).required(), integerProperty("RAM").unit("GB").min(1).max(128).required(), - integerProperty("SSD").unit("GB").min(25).max(2000).step(25).optional().asTotalLimit().withThreshold(200), // FIXME: required() + integerProperty("SSD").unit("GB").min(25).max(2000).step(25).required().asTotalLimit().withThreshold(200), integerProperty("HDD").unit("GB").min(0).max(10000).step(250).withDefault(0).asTotalLimit().withThreshold(200), integerProperty("Traffic").unit("GB").min(250).max(64000).step(250).required().asTotalLimit().withThreshold(200), integerProperty("Bandwidth").unit("GB").min(250).max(64000).step(250).optional().asTotalLimit().withThreshold(200), // TODO.spec