hosting-asset-validation-for-cloud-server-to-webspace #54
@ -115,7 +115,7 @@ class EnumPropertyValidator extends HsHostingAssetPropertyValidator<String> {
|
|||||||
super(String.class, propertyName);
|
super(String.class, propertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EnumPropertyValidator enumProperty(final String propertyName) {
|
public static EnumPropertyValidator enumerationProperty(final String propertyName) {
|
||||||
return new EnumPropertyValidator(propertyName);
|
return new EnumPropertyValidator(propertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static java.util.Arrays.stream;
|
import static java.util.Arrays.stream;
|
||||||
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.EnumPropertyValidator.enumProperty;
|
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.EnumPropertyValidator.enumerationProperty;
|
||||||
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.HsHostingAssetPropertyValidator.defType;
|
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.HsHostingAssetPropertyValidator.defType;
|
||||||
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.BooleanPropertyValidator.booleanProperty;
|
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.BooleanPropertyValidator.booleanProperty;
|
||||||
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.IntegerPropertyValidator.integerProperty;
|
import static net.hostsharing.hsadminng.hs.hosting.asset.validator.IntegerPropertyValidator.integerProperty;
|
||||||
@ -27,14 +27,14 @@ public class HsHostingAssetValidator {
|
|||||||
integerProperty("SSD").unit("GB").min(25).max(1000).step(25).required(),
|
integerProperty("SSD").unit("GB").min(25).max(1000).step(25).required(),
|
||||||
integerProperty("HDD").unit("GB").min(0).max(4000).step(250).optional(),
|
integerProperty("HDD").unit("GB").min(0).max(4000).step(250).optional(),
|
||||||
integerProperty("Traffic").unit("GB").min(250).max(10000).step(250).required(),
|
integerProperty("Traffic").unit("GB").min(250).max(10000).step(250).required(),
|
||||||
enumProperty("SLA-Infrastructure").values("BASIC", "EXT8H", "EXT4H", "EXT2H").optional())),
|
enumerationProperty("SLA-Infrastructure").values("BASIC", "EXT8H", "EXT4H", "EXT2H").optional())),
|
||||||
defType(HsHostingAssetType.MANAGED_SERVER, new HsHostingAssetValidator(
|
defType(HsHostingAssetType.MANAGED_SERVER, new HsHostingAssetValidator(
|
||||||
integerProperty("CPUs").min(1).max(32).required(),
|
integerProperty("CPUs").min(1).max(32).required(),
|
||||||
integerProperty("RAM").unit("GB").min(1).max(128).required(),
|
integerProperty("RAM").unit("GB").min(1).max(128).required(),
|
||||||
integerProperty("SSD").unit("GB").min(25).max(1000).step(25).required(),
|
integerProperty("SSD").unit("GB").min(25).max(1000).step(25).required(),
|
||||||
integerProperty("HDD").unit("GB").min(0).max(4000).step(250).optional(),
|
integerProperty("HDD").unit("GB").min(0).max(4000).step(250).optional(),
|
||||||
integerProperty("Traffic").unit("GB").min(250).max(10000).step(250).required(),
|
integerProperty("Traffic").unit("GB").min(250).max(10000).step(250).required(),
|
||||||
enumProperty("SLA-Platform").values("BASIC", "EXT8H", "EXT4H", "EXT2H").optional(),
|
enumerationProperty("SLA-Platform").values("BASIC", "EXT8H", "EXT4H", "EXT2H").optional(),
|
||||||
booleanProperty("SLA-EMail").falseIf("SLA-Platform", "BASIC").optional(),
|
booleanProperty("SLA-EMail").falseIf("SLA-Platform", "BASIC").optional(),
|
||||||
booleanProperty("SLA-Maria").falseIf("SLA-Platform", "BASIC").optional(),
|
booleanProperty("SLA-Maria").falseIf("SLA-Platform", "BASIC").optional(),
|
||||||
booleanProperty("SLA-PgSQL").falseIf("SLA-Platform", "BASIC").optional(),
|
booleanProperty("SLA-PgSQL").falseIf("SLA-Platform", "BASIC").optional(),
|
||||||
@ -44,7 +44,7 @@ public class HsHostingAssetValidator {
|
|||||||
integerProperty("SSD").unit("GB").min(1).max(100).step(1).required(),
|
integerProperty("SSD").unit("GB").min(1).max(100).step(1).required(),
|
||||||
integerProperty("HDD").unit("GB").min(0).max(250).step(10).optional(),
|
integerProperty("HDD").unit("GB").min(0).max(250).step(10).optional(),
|
||||||
integerProperty("Traffic").unit("GB").min(10).max(1000).step(10).required(),
|
integerProperty("Traffic").unit("GB").min(10).max(1000).step(10).required(),
|
||||||
enumProperty("SLA-Platform").values("BASIC", "EXT24H").optional(),
|
enumerationProperty("SLA-Platform").values("BASIC", "EXT24H").optional(),
|
||||||
integerProperty("Daemons").min(0).max(10).optional(),
|
integerProperty("Daemons").min(0).max(10).optional(),
|
||||||
booleanProperty("Online Office Server").optional())
|
booleanProperty("Online Office Server").optional())
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user