From b9a11e9c3d78562fc2e6b433fd9196c5255eac8f Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Tue, 28 Sep 2021 14:49:56 +0200 Subject: Wire in dryRun deployment option --- .../api/application/v4/model/DeploymentData.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'controller-api') diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java index 1608e72b0b6..1f1f8577a32 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeploymentData.java @@ -1,4 +1,4 @@ -// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.application.v4.model; import com.yahoo.component.Version; @@ -6,7 +6,6 @@ import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.DockerImage; import com.yahoo.config.provision.zone.ZoneId; import com.yahoo.vespa.athenz.api.AthenzDomain; -import com.yahoo.vespa.hosted.controller.api.integration.aws.TenantRoles; import com.yahoo.vespa.hosted.controller.api.integration.billing.Quota; import com.yahoo.vespa.hosted.controller.api.integration.certificates.EndpointCertificateMetadata; import com.yahoo.vespa.hosted.controller.api.integration.configserver.ContainerEndpoint; @@ -37,7 +36,9 @@ public class DeploymentData { private final Quota quota; private final List tenantSecretStores; private final List operatorCertificates; + private final boolean dryRun; + // TODO: Remove when users have been updated to use constructor below public DeploymentData(ApplicationId instance, ZoneId zone, byte[] applicationPackage, Version platform, Set containerEndpoints, Optional endpointCertificateMetadata, @@ -46,6 +47,19 @@ public class DeploymentData { Quota quota, List tenantSecretStores, List operatorCertificates) { + this(instance, zone, applicationPackage, platform, containerEndpoints, endpointCertificateMetadata, + dockerImageRepo, athenzDomain, quota, tenantSecretStores, operatorCertificates, false); + } + + public DeploymentData(ApplicationId instance, ZoneId zone, byte[] applicationPackage, Version platform, + Set containerEndpoints, + Optional endpointCertificateMetadata, + Optional dockerImageRepo, + Optional athenzDomain, + Quota quota, + List tenantSecretStores, + List operatorCertificates, + boolean dryRun) { this.instance = requireNonNull(instance); this.zone = requireNonNull(zone); this.applicationPackage = requireNonNull(applicationPackage); @@ -57,6 +71,7 @@ public class DeploymentData { this.quota = quota; this.tenantSecretStores = tenantSecretStores; this.operatorCertificates = operatorCertificates; + this.dryRun = dryRun; } public ApplicationId instance() { @@ -102,4 +117,7 @@ public class DeploymentData { public List operatorCertificates() { return operatorCertificates; } + + public boolean isDryRun() { return dryRun; } + } -- cgit v1.2.3