use of com.netflix.spinnaker.halyard.config.model.v1.node.NodeDiff.ChangeType.ADDED in project halyard by spinnaker.
the class AbstractAddArtifactAccountCommand method executeThis.
@Override
protected void executeThis() {
String accountName = getArtifactAccountName();
ArtifactAccount account = buildArtifactAccount(accountName);
String providerName = getArtifactProviderName();
String currentDeployment = getCurrentDeployment();
new OperationHandler<Void>().setFailureMesssage("Failed to add artifact account " + accountName + " for artifact provider " + providerName + ".").setSuccessMessage("Successfully added artifact account " + accountName + " for artifact provider " + providerName + ".").setOperation(Daemon.addArtifactAccount(currentDeployment, providerName, !noValidate, account)).get();
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.NodeDiff.ChangeType.ADDED in project halyard by spinnaker.
the class AbstractAddMasterCommand method executeThis.
@Override
protected void executeThis() {
String masterName = getMasterName();
Master master = buildMaster(masterName);
String ciName = getCiName();
String currentDeployment = getCurrentDeployment();
new OperationHandler<Void>().setOperation(Daemon.addMaster(currentDeployment, ciName, !noValidate, master)).setSuccessMessage("Added " + masterName + " for " + ciName + ".").setFailureMesssage("Failed to add " + masterName + " for " + ciName + ".").get();
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.NodeDiff.ChangeType.ADDED in project halyard by spinnaker.
the class DCOSAddClusterCommand method executeThis.
@Override
protected void executeThis() {
DCOSCluster cluster = new DCOSCluster();
cluster.setName(getClusterName()).setDcosUrl(dcosUrl).setCaCertFile(caCertFile).setInsecureSkipTlsVerify(insecureSkipTlsVerify);
if (nonNull(loadBalancerImage)) {
final DCOSCluster.LoadBalancer loadBalancer = new DCOSCluster.LoadBalancer().setImage(loadBalancerImage).setServiceAccountSecret(loadBalancerServiceAccountSecret);
cluster.setLoadBalancer(loadBalancer);
}
new OperationHandler<Void>().setFailureMesssage("Failed to add cluster " + getClusterName() + " for provider " + getProviderName() + ".").setSuccessMessage("Successfully added cluster " + getClusterName() + " for provider " + getProviderName() + ".").setOperation(Daemon.addCluster(getCurrentDeployment(), getProviderName(), !noValidate, cluster)).get();
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.NodeDiff.ChangeType.ADDED in project halyard by spinnaker.
the class AbstractAddCanaryAccountCommand method executeThis.
@Override
protected void executeThis() {
String currentDeployment = getCurrentDeployment();
// Disable validation here, since we don't want an illegal config to prevent us from fixing it.
Canary canary = new OperationHandler<Canary>().setFailureMesssage("Failed to get canary.").setOperation(Daemon.getCanary(currentDeployment, false)).get();
String accountName = getAccountName();
AbstractCanaryAccount account = buildAccount(canary, accountName);
String serviceIntegration = getServiceIntegration();
new OperationHandler<Void>().setFailureMesssage("Failed to add canary account " + accountName + " for service integration " + serviceIntegration + ".").setSuccessMessage("Successfully added canary account " + accountName + " for service integration " + serviceIntegration + ".").setOperation(Daemon.addCanaryAccount(currentDeployment, serviceIntegration.toLowerCase(), !noValidate, account)).get();
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.NodeDiff.ChangeType.ADDED in project halyard by spinnaker.
the class AbstractAddSubscriptionCommand method executeThis.
@Override
protected void executeThis() {
String subscriptionName = getSubscriptionName();
Subscription subscription = buildSubscription(subscriptionName);
String pubsubName = getPubsubName();
String currentDeployment = getCurrentDeployment();
new OperationHandler<Void>().setFailureMesssage("Failed to add subscription " + subscriptionName + " for pubsub " + pubsubName + ".").setSuccessMessage("Successfully added subscription " + subscriptionName + " for pubsub " + pubsubName + ".").setOperation(Daemon.addSubscription(currentDeployment, pubsubName, !noValidate, subscription)).get();
}
Aggregations