public class PodSpecsCannotUseUnsupportedFeatures extends java.lang.Object implements ConfigValidator<ServiceSpec>
ServiceSpec only requires features supported by the DC/OS
cluster being run on.| Constructor and Description |
|---|
PodSpecsCannotUseUnsupportedFeatures() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
serviceRequestsGpuResources(ServiceSpec serviceSpec) |
java.util.Collection<ConfigValidationError> |
validate(java.util.Optional<ServiceSpec> oldConfig,
ServiceSpec newConfig)
Returns
List of ConfigurationValidationErrors for the newly supplied
Configuration object. |
public PodSpecsCannotUseUnsupportedFeatures()
public java.util.Collection<ConfigValidationError> validate(java.util.Optional<ServiceSpec> oldConfig, ServiceSpec newConfig)
ConfigValidatorList of ConfigurationValidationErrors for the newly supplied
Configuration object.
A validation can validate a newConfig in following ways:
1. Validate newConfig parameters against the oldConfig paramater.
Ex: If DiskType was ROOT in oldConfig, then it cannot be changed to, ex: MOUNT, in the newConfig.
2. Validate just newConfig parameter(s). Ex: CPU value > 0validate in interface ConfigValidator<ServiceSpec>oldConfig - Currently persisted Configuration, or an empty Optional if none is available
(first launch of service)newConfig - Proposed new Configurationpublic static boolean serviceRequestsGpuResources(ServiceSpec serviceSpec)