Search in sources :

Example 1 with Cis

use of com.netflix.spinnaker.halyard.config.model.v1.node.Cis in project halyard by spinnaker.

the class CiService method getAllCis.

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;
    }
}
Also used : Ci(com.netflix.spinnaker.halyard.config.model.v1.node.Ci) ConfigProblemBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemBuilder) ConfigNotFoundException(com.netflix.spinnaker.halyard.config.error.v1.ConfigNotFoundException) NodeFilter(com.netflix.spinnaker.halyard.config.model.v1.node.NodeFilter)

Example 2 with Cis

use of com.netflix.spinnaker.halyard.config.model.v1.node.Cis in project halyard by spinnaker.

the class IgorProfileFactory method setProfile.

@Override
public void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
    super.setProfile(profile, deploymentConfiguration, endpoints);
    Providers providers = deploymentConfiguration.getProviders();
    if (providers.getDockerRegistry().isEnabled()) {
        profile.appendContents("dockerRegistry.enabled: true");
    }
    Cis cis = deploymentConfiguration.getCi();
    List<String> files = backupRequiredFiles(cis, deploymentConfiguration.getName());
    profile.appendContents(yamlToString(cis)).appendContents(profile.getBaseContents()).setRequiredFiles(files);
}
Also used : Providers(com.netflix.spinnaker.halyard.config.model.v1.node.Providers) Cis(com.netflix.spinnaker.halyard.config.model.v1.node.Cis)

Aggregations

ConfigNotFoundException (com.netflix.spinnaker.halyard.config.error.v1.ConfigNotFoundException)1 Ci (com.netflix.spinnaker.halyard.config.model.v1.node.Ci)1 Cis (com.netflix.spinnaker.halyard.config.model.v1.node.Cis)1 NodeFilter (com.netflix.spinnaker.halyard.config.model.v1.node.NodeFilter)1 Providers (com.netflix.spinnaker.halyard.config.model.v1.node.Providers)1 ConfigProblemBuilder (com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemBuilder)1