summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorOla Aunrønning <olaa@verizonmedia.com>2019-10-18 14:37:16 +0200
committerOla Aunrønning <olaa@verizonmedia.com>2019-10-18 14:37:16 +0200
commit7554e7b7dd6f0eade988baa021ffd7e2184907f1 (patch)
tree0d83ac63d612451d9f9796bce78df2aa93fccca1 /controller-api
parent7f0b02ec8e4e6cad99560073963338ddf6746e90 (diff)
Added empty TenantCost
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/TenantCost.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/TenantCost.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/TenantCost.java
index f9b7aaabcdc..b4ca0cd7076 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/TenantCost.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/TenantCost.java
@@ -5,6 +5,7 @@ import com.yahoo.config.provision.TenantName;
import java.time.LocalDate;
import java.time.YearMonth;
+import java.util.Collections;
import java.util.List;
import java.util.Set;
@@ -16,4 +17,18 @@ public interface TenantCost {
Set<YearMonth> monthsWithMetering(TenantName tenantName);
List<CostInfo> getTenantCostOfMonth(TenantName tenantName, YearMonth month);
+
+ static TenantCost empty() {
+ return new TenantCost() {
+ @Override
+ public Set<YearMonth> monthsWithMetering(TenantName tenantName) {
+ return Collections.emptySet();
+ }
+
+ @Override
+ public List<CostInfo> getTenantCostOfMonth(TenantName tenantName, YearMonth month) {
+ return Collections.emptyList();
+ }
+ };
+ }
}