Tabnine Logo
LookupService.getMatchingNodesOfType
Code IndexAdd Tabnine to your IDE (free)

How to use
getMatchingNodesOfType
method
in
com.netflix.spinnaker.halyard.config.services.v1.LookupService

Best Java code snippets using com.netflix.spinnaker.halyard.config.services.v1.LookupService.getMatchingNodesOfType (Showing top 20 results out of 315)

origin: com.netflix.spinnaker.halyard/halyard-config

public <T extends Node> FieldOptions options(NodeFilter filter, Class<T> nodeClass, String field) {
 ConfigProblemSetBuilder problemSetBuilder = new ConfigProblemSetBuilder(applicationContext);
 List<T> nodes = lookupService.getMatchingNodesOfType(filter, nodeClass);
 List<String> options = nodes.stream().map(n -> {
  problemSetBuilder.setNode(n);
  return n.fieldOptions(problemSetBuilder, field);
 }).reduce(new ArrayList<>(), (a, b) -> {
  a.addAll(b);
  return a;
 });
 return new FieldOptions().setOptions(options).setProblemSet(problemSetBuilder.build());
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<DeploymentConfiguration> getAllDeploymentConfigurations() {
 NodeFilter filter = new NodeFilter().withAnyDeployment();
 List<DeploymentConfiguration> matching = lookupService.getMatchingNodesOfType(filter, DeploymentConfiguration.class);
 if (matching.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No deployments could be found in your currently loaded halconfig")
      .build());
 } else {
  return matching;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<Ci> getAllCis(String deploymentName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).withAnyCi();
 List<Ci> matching = lookupService.getMatchingNodesOfType(filter, Ci.class);
 if (matching.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No cis could be found")
      .build());
 } else {
  return matching;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<HaService> getAllHaServices(String deploymentName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).withAnyHaService();
 List<HaService> matching = lookupService.getMatchingNodesOfType(filter, HaService.class);
 if (matching.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No high availability services could be found")
      .build());
 } else {
  return matching;
 }
}
origin: spinnaker/halyard

public List<HaService> getAllHaServices(String deploymentName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).withAnyHaService();
 List<HaService> matching = lookupService.getMatchingNodesOfType(filter, HaService.class);
 if (matching.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No high availability services could be found")
      .build());
 } else {
  return matching;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<ArtifactProvider> getAllArtifactProviders(String deploymentName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).withAnyArtifactProvider();
 List<ArtifactProvider> matching = lookupService.getMatchingNodesOfType(filter, ArtifactProvider.class);
 if (matching.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No providers could be found")
      .build());
 } else {
  return matching;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<Provider> getAllProviders(String deploymentName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).withAnyProvider();
 List<Provider> matching = lookupService.getMatchingNodesOfType(filter, Provider.class);
 if (matching.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No providers could be found")
      .build());
 } else {
  return matching;
 }
}
origin: spinnaker/halyard

public List<Pubsub> getAllPubsubs(String deploymentName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).withAnyPubsub();
 List<Pubsub> matching = lookupService.getMatchingNodesOfType(filter, Pubsub.class);
 if (matching.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No pubsubs could be found")
      .build());
 } else {
  return matching;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<Account> getAllAccounts(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setProvider(providerName).withAnyAccount();
 List<Account> matchingAccounts = lookupService.getMatchingNodesOfType(filter, Account.class);
 if (matchingAccounts.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No accounts could be found").build());
 } else {
  return matchingAccounts;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<Subscription> getAllSubscriptions(String deploymentName, String pubsubName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setPubsub(pubsubName).withAnySubscription();
 List<Subscription> matchingSubscriptions = lookupService.getMatchingNodesOfType(filter, Subscription.class);
 if (matchingSubscriptions.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No subscriptions could be found").build());
 } else {
  return matchingSubscriptions;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<ArtifactAccount> getAllArtifactAccounts(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setArtifactProvider(providerName).withAnyArtifactAccount();
 List<ArtifactAccount> matchingArtifactAccounts = lookupService.getMatchingNodesOfType(filter, ArtifactAccount.class);
 if (matchingArtifactAccounts.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No accounts could be found").build());
 } else {
  return matchingArtifactAccounts;
 }
}
origin: spinnaker/halyard

public List<Subscription> getAllSubscriptions(String deploymentName, String pubsubName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setPubsub(pubsubName).withAnySubscription();
 List<Subscription> matchingSubscriptions = lookupService.getMatchingNodesOfType(filter, Subscription.class);
 if (matchingSubscriptions.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No subscriptions could be found").build());
 } else {
  return matchingSubscriptions;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<Cluster> getAllClusters(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setProvider(providerName).withAnyCluster();
 List<Cluster> matchingClusters = lookupService.getMatchingNodesOfType(filter, Cluster.class);
 if (matchingClusters.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Problem.Severity.FATAL, "No clusters could be found").build());
 } else {
  return matchingClusters;
 }
}
origin: spinnaker/halyard

public List<Master> getAllMasters(String deploymentName, String ciName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setCi(ciName).withAnyMaster();
 List<Master> matchingMasters = lookupService.getMatchingNodesOfType(filter, Master.class);
 if (matchingMasters.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No masters could be found").build());
 } else {
  return matchingMasters;
 }
}
origin: spinnaker/halyard

public List<Cluster> getAllClusters(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setProvider(providerName).withAnyCluster();
 List<Cluster> matchingClusters = lookupService.getMatchingNodesOfType(filter, Cluster.class);
 if (matchingClusters.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Problem.Severity.FATAL, "No clusters could be found").build());
 } else {
  return matchingClusters;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<Master> getAllMasters(String deploymentName, String ciName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setCi(ciName).withAnyMaster();
 List<Master> matchingMasters = lookupService.getMatchingNodesOfType(filter, Master.class);
 if (matchingMasters.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No masters could be found").build());
 } else {
  return matchingMasters;
 }
}
origin: spinnaker/halyard

public List<Account> getAllAccounts(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setProvider(providerName).withAnyAccount();
 List<Account> matchingAccounts = lookupService.getMatchingNodesOfType(filter, Account.class);
 if (matchingAccounts.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No accounts could be found").build());
 } else {
  return matchingAccounts;
 }
}
origin: spinnaker/halyard

public List<ArtifactAccount> getAllArtifactAccounts(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setArtifactProvider(providerName).withAnyArtifactAccount();
 List<ArtifactAccount> matchingArtifactAccounts = lookupService.getMatchingNodesOfType(filter, ArtifactAccount.class);
 if (matchingArtifactAccounts.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No accounts could be found").build());
 } else {
  return matchingArtifactAccounts;
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public List<BaseImage> getAllBaseImages(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setProvider(providerName).setBakeryDefaults().withAnyBaseImage();
 List<BaseImage> matchingBaseImages = lookupService.getMatchingNodesOfType(filter, BaseImage.class);
 if (matchingBaseImages.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No base images could be found").build());
 } else {
  return matchingBaseImages;
 }
}
origin: spinnaker/halyard

public List<BaseImage> getAllBaseImages(String deploymentName, String providerName) {
 NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setProvider(providerName).setBakeryDefaults().withAnyBaseImage();
 List<BaseImage> matchingBaseImages = lookupService.getMatchingNodesOfType(filter, BaseImage.class);
 if (matchingBaseImages.size() == 0) {
  throw new ConfigNotFoundException(
    new ConfigProblemBuilder(Severity.FATAL, "No base images could be found").build());
 } else {
  return matchingBaseImages;
 }
}
com.netflix.spinnaker.halyard.config.services.v1LookupServicegetMatchingNodesOfType

Javadoc

Given a node filter and a node type, find all nodes that match both the filter and the type of the Node.

Popular methods of LookupService

  • getMatchingNodes
  • getSingularNodeOrDefault

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Reference (javax.naming)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now