use of com.mesosphere.sdk.offer.evaluate.placement.RoundRobinByZoneRule in project dcos-commons by mesosphere.
the class ZoneValidatorTest method getServiceSpec.
private static ServiceSpec getServiceSpec(boolean referenceZones) {
PlacementRule zoneRule = new RoundRobinByZoneRule(3);
PlacementRule hostRule = new HostnameRule(ExactMatcher.create("hostname"));
PlacementRule rule = referenceZones ? zoneRule : hostRule;
PodSpec podSpec = getPodSpec(getTaskSpec(Collections.emptyMap()));
podSpec = DefaultPodSpec.newBuilder(podSpec).placementRule(rule).build();
return getServiceSpec(podSpec);
}
Aggregations