@Test public void testDeploymentGroupWithNoSelectors() { final DeploymentGroup deploymentGroup = group(); assertThat(matcher.getMatchingHosts(deploymentGroup), empty()); }
public List<String> getMatchingHosts(final DeploymentGroup deploymentGroup) { final List<HostSelector> selectors = deploymentGroup.getHostSelectors(); if (selectors == null || selectors.isEmpty()) { log.error("skipping deployment group with no host selectors: " + deploymentGroup.getName()); return emptyList(); } return getMatchingHosts(selectors); }
HostMatcher { public List<String> getMatchingHosts(final DeploymentGroup deploymentGroup) { final List<HostSelector> selectors = deploymentGroup.getHostSelectors(); if (selectors == null || selectors.isEmpty()) { log.error("skipping deployment group with no host selectors: " + deploymentGroup.getName()); return emptyList(); } return getMatchingHosts(selectors); } }
HostMatcher { public List<String> getMatchingHosts(final DeploymentGroup deploymentGroup) { final List<HostSelector> selectors = deploymentGroup.getHostSelectors(); if (selectors == null || selectors.isEmpty()) { log.error("skipping deployment group with no host selectors: " + deploymentGroup.getName()); return emptyList(); } return getMatchingHosts(selectors); } HostMatcher(final Map<String, Map<String, String>> hostsAndLabels); }
HostMatcher { public List<String> getMatchingHosts(final DeploymentGroup deploymentGroup) { final List<HostSelector> selectors = deploymentGroup.getHostSelectors(); if (selectors == null || selectors.isEmpty()) { log.error("skipping deployment group with no host selectors: " + deploymentGroup.getName()); return emptyList(); } return getMatchingHosts(selectors); } HostMatcher(final Map<String, Map<String, String>> hostsAndLabels); List<String> getMatchingHosts(final DeploymentGroup deploymentGroup); List<String> getMatchingHosts(final List<HostSelector> selectors); }
HostMatcher { public List<String> getMatchingHosts(final DeploymentGroup deploymentGroup) { final List<HostSelector> selectors = deploymentGroup.getHostSelectors(); if (selectors == null || selectors.isEmpty()) { log.error("skipping deployment group with no host selectors: " + deploymentGroup.getName()); return emptyList(); } return getMatchingHosts(selectors); } HostMatcher(final Map<String, Map<String, String>> hostsAndLabels); List<String> getMatchingHosts(final DeploymentGroup deploymentGroup); List<String> getMatchingHosts(final List<HostSelector> selectors);  }