use of com.netflix.spinnaker.halyard.config.model.v1.node.Provider 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.Provider in project halyard by spinnaker.
the class ClouddriverBootstrapProfileFactory method disableAllProviders.
private void disableAllProviders(Providers providers) {
NodeIterator providerNodes = providers.getChildren();
Provider provider;
while ((provider = (Provider) providerNodes.getNext()) != null) {
provider.setEnabled(false);
}
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.Provider 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.Provider in project halyard by spinnaker.
the class DCOSListClusterCommand method executeThis.
@Override
protected void executeThis() {
Provider provider = getProvider();
DCOSProvider dcosProvider = (DCOSProvider) provider;
List<DCOSCluster> clusters = dcosProvider.getClusters();
if (clusters.isEmpty()) {
AnsiUi.success("No configured clusters for " + getProviderName() + ".");
} else {
AnsiUi.success("Clusters for " + getProviderName() + ":");
clusters.forEach(cluster -> AnsiUi.listItem(cluster.getName()));
}
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.Provider in project halyard by spinnaker.
the class AbstractEditProviderCommand method executeThis.
@Override
protected void executeThis() {
String providerName = getProviderName();
String currentDeployment = getCurrentDeployment();
Provider provider = new OperationHandler<Provider>().setFailureMesssage("Failed to get provider " + providerName + ".").setOperation(Daemon.getProvider(currentDeployment, providerName, false)).get();
int originalHash = provider.hashCode();
provider = editProvider((P) provider);
if (originalHash == provider.hashCode()) {
AnsiUi.failure("No changes supplied.");
return;
}
new OperationHandler<Void>().setFailureMesssage("Failed to edit provider " + providerName + ".").setSuccessMessage("Successfully edited provider " + providerName + ".").setOperation(Daemon.setProvider(currentDeployment, providerName, !noValidate, provider)).get();
}
Aggregations