diff options
author | Harald Musum <musum@yahooinc.com> | 2023-10-05 15:59:36 +0200 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2023-10-05 15:59:36 +0200 |
commit | 706284c6878b3758cf6d95b3d26bf1c4d0352469 (patch) | |
tree | e37a5eb63e12c699506c562358a252ac93861d5b /controller-api/src/main/java | |
parent | ad72fccfcd7aed3ae88cbbfadc0edf7b00286921 (diff) |
Add pricing info and pricing controller to API
Diffstat (limited to 'controller-api/src/main/java')
2 files changed, 27 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/pricing/PricingController.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/pricing/PricingController.java new file mode 100644 index 00000000000..a4e386f6195 --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/pricing/PricingController.java @@ -0,0 +1,18 @@ +// 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.integration.pricing; + +import com.yahoo.config.provision.ClusterResources; +import com.yahoo.vespa.hosted.controller.api.integration.billing.Plan; + +import java.util.List; + +/** + * A service that calculates price information based on cluster resources, plan, service level etc. + * + * @author hmusum + */ +public interface PricingController { + + PriceInformation price(List<ClusterResources> clusterResources, PricingInfo pricingInfo, Plan plan); + +} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/pricing/PricingInfo.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/pricing/PricingInfo.java new file mode 100644 index 00000000000..d43e59362c5 --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/pricing/PricingInfo.java @@ -0,0 +1,9 @@ +package com.yahoo.vespa.hosted.controller.api.integration.pricing; + +public record PricingInfo(boolean enclave, SupportLevel supportLevel, double committedHourlyAmount) { + + public enum SupportLevel { STANDARD, COMMERCIAL, ENTERPRISE } + + public static PricingInfo empty() { return new PricingInfo(false, SupportLevel.COMMERCIAL, 0); } + +}
\ No newline at end of file |