revert required validation workarounds

This commit is contained in:
Michael Hoennig 2024-07-19 09:57:17 +02:00
parent 298fd2f438
commit b17f382cd1
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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