use of com.netflix.spinnaker.halyard.config.error.v1.ConfigNotFoundException in project halyard by spinnaker.
the class ArtifactAccountService method getAllArtifactAccounts.
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;
}
}
use of com.netflix.spinnaker.halyard.config.error.v1.ConfigNotFoundException in project halyard by spinnaker.
the class BakeryService method getAllBaseImages.
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;
}
}
use of com.netflix.spinnaker.halyard.config.error.v1.ConfigNotFoundException in project halyard by spinnaker.
the class ClusterService method getAllClusters.
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;
}
}
use of com.netflix.spinnaker.halyard.config.error.v1.ConfigNotFoundException in project halyard by spinnaker.
the class AccountService method getAllAccounts.
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;
}
}
use of com.netflix.spinnaker.halyard.config.error.v1.ConfigNotFoundException in project halyard by spinnaker.
the class ArtifactProviderService method getAllArtifactProviders.
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;
}
}
Aggregations