summaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-05-27 13:01:46 +0200
committerJon Bratseth <bratseth@verizonmedia.com>2019-05-27 13:01:46 +0200
commit21a32d23892e37436f13aaba80e8c9e296b920c3 (patch)
tree90d2092a5ddd47b76e922e907cfcceca85a1e267 /node-repository
parent6dafac8266a710f77bcbaa444e5d780da1522bce (diff)
Move default flavor info from zone setup
Diffstat (limited to 'node-repository')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java42
1 files changed, 36 insertions, 6 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java
index 7c2c061b62f..4a31970e7ab 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java
@@ -61,19 +61,17 @@ public class CapacityPolicies {
if (requestedResources.isPresent() && ! requestedResources.get().allocateByLegacyName())
return requestedResources.get();
- NodeResources defaultResources = NodeResources.fromLegacyName(zone.defaultFlavor(cluster.type()));
if (requestedResources.isEmpty())
- return defaultResources;
+ return defaultNodeResources();
// Flavor is specified and is allocateByLegacyName: Handle legacy flavor specs
if (zone.system() == SystemName.cd)
- return flavors.exists(requestedResources.get().legacyName().get()) ? requestedResources.get() : defaultResources;
+ return flavors.exists(requestedResources.get().legacyName().get()) ? requestedResources.get() : defaultNodeResources();
else {
switch (zone.environment()) {
- case dev: case test: case staging: return defaultResources;
+ case dev: case test: case staging: return defaultNodeResources();
default:
- // Check existence of the legacy specified flavor
- flavors.getFlavorOrThrow(requestedResources.get().legacyName().get());
+ flavors.getFlavorOrThrow(requestedResources.get().legacyName().get()); // verify existence
// Return this spec containing the legacy flavor name, not the flavor's capacity object
// which describes the flavors capacity, as the point of legacy allocation is to match
// by name, not by resources
@@ -82,6 +80,38 @@ public class CapacityPolicies {
}
}
+ private NodeResources defaultNodeResources() {
+ /*
+CD_DEV_CD_US_CENTRAL_1: d_2_8_50
+CD_DEV_CD_US_WEST_1: d_1_4_50
+CD_PROD_AWS_US_EAST_1A: d_2_8_50
+CD_PROD_CD_US_CENTRAL_1: d_2_8_50
+CD_PROD_CD_US_WEST_1: d_2_8_50
+CD_TEST_CD_US_CENTRAL_1: d_4_4_50, admin: d_1_3_50
+CD_STAGING_CD_US_CENTRAL_1: d_4_4_50, admin: d_1_3_50
+MAIN_DEV_AWS_US_EAST_2A: d_2_8_50
+MAIN_DEV_US_EAST_1: d_2_8_50
+MAIN_PERF_US_EAST_3: d_2_8_50
+MAIN_PROD_AWS_US_EAST_1A: d_2_8_50
+MAIN_PROD_AWS_US_EAST_1B: d_2_8_50
+MAIN_PROD_AWS_US_WEST_2A: d_2_8_50
+MAIN_PROD_US_EAST_3: d_2_8_50
+MAIN_TEST_US_EAST_1: d_2_8_50
+MAIN_PROD_US_WEST_1: d_2_8_50
+MAIN_PROD_US_CENTRAL_1: d_2_8_50
+MAIN_PROD_EU_WEST_1: d_2_8_50
+MAIN_PROD_AP_NORTHEAST_1: d_2_8_50
+MAIN_PROD_AP_NORTHEAST_2: d_2_8_50
+MAIN_STAGING_US_EAST_3: d_2_8_50
+MAIN_PROD_AP_SOUTHEAST_1: d_2_8_50
+PUBLIC_CD_PROD_AWS_US_EAST_1C: d_2_8_50
+PUBLIC_CD_TEST_AWS_US_EAST_1C: d_2_8_50, admin: d_1_3_50
+PUBLIC_CD_STAGING_AWS_US_EAST_1C: d_2_8_50, admin: d_1_3_50
+VAAS_DEV_AWS_US_EAST_1B: d_2_8_50
+ */
+
+ }
+
/**
* Whether or not the nodes requested can share physical host with other applications.
* A security feature which only makes sense for prod.