Search in sources :

Example 1 with Validator

use of com.netflix.spinnaker.halyard.config.model.v1.node.Validator in project halyard by spinnaker.

the class ValidatorCollection method runAllValidators.

/**
 * Runs every validator defined against the given node.
 *
 * @param psBuilder contains the problems encountered during validation so far.
 * @param node is the node being validated.
 *
 * @return # of validators run (for logging purposes).
 */
public int runAllValidators(ConfigProblemSetBuilder psBuilder, Node node) {
    psBuilder.setNode(node);
    int validatorRuns = 0;
    for (Validator validator : validators) {
        validatorRuns += runMatchingValidators(psBuilder, validator, node, node.getClass()) ? 1 : 0;
    }
    return validatorRuns;
}
Also used : Validator(com.netflix.spinnaker.halyard.config.model.v1.node.Validator)

Aggregations

Validator (com.netflix.spinnaker.halyard.config.model.v1.node.Validator)1