use of com.thoughtworks.go.config.EnvironmentAgentConfig in project gocd by gocd.
the class EnvironmentAgentValidator method validateConfig.
public List<ConfigErrors> validateConfig(CruiseConfig cruiseConfig) {
List<ConfigErrors> errors = new ArrayList<>();
Set<String> uuids = cruiseConfig.agents().acceptedUuids();
if (!cruiseConfig.getEnvironments().validateContainOnlyUuids(uuids)) {
for (EnvironmentConfig environmentConfig : cruiseConfig.getEnvironments()) {
for (EnvironmentAgentConfig environmentAgentConfig : environmentConfig.getAgents()) {
if (!environmentAgentConfig.errors().isEmpty()) {
errors.add(environmentAgentConfig.errors());
}
}
}
}
return errors;
}
Aggregations