use of com.netflix.spinnaker.halyard.config.model.v1.node.BakeryDefaults in project halyard by spinnaker.
the class AbstractListBaseImagesCommand method executeThis.
@Override
protected void executeThis() {
String providerName = getProviderName();
String currentDeployment = getCurrentDeployment();
BakeryDefaults bakeryDefaults = new OperationHandler<BakeryDefaults>().setFailureMesssage("Failed to get bakery defaults for " + providerName + "'s bakery.").setOperation(Daemon.getBakeryDefaults(currentDeployment, providerName, !noValidate)).get();
List<BaseImage> baseImages = bakeryDefaults.getBaseImages();
if (baseImages.isEmpty()) {
AnsiUi.success("No configured base images for " + getProviderName() + ".");
} else {
AnsiUi.success("Base images for " + getProviderName() + ":");
baseImages.forEach(baseImage -> AnsiUi.listItem(baseImage.getBaseImage().getId()));
}
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.BakeryDefaults in project halyard by spinnaker.
the class BakeryService method addBaseImage.
public void addBaseImage(String deploymentName, String bakeryDefaultsName, BaseImage newBaseImage) {
BakeryDefaults bakeryDefaults = getBakeryDefaults(deploymentName, bakeryDefaultsName);
bakeryDefaults.getBaseImages().add(newBaseImage);
}
Aggregations