Remove code that handles node resources based on flavors for cd
We don't use flavors in cd tests any more, only node resources, remove
unused code
@@ -5,7 +5,6 @@ import com.yahoo.config.provision.Capacity;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.NodeResources;
-import com.yahoo.config.provision.SystemName;
import com.yahoo.config.provision.Zone;
import com.yahoo.config.provision.NodeFlavors;
@@ -64,11 +63,6 @@ public class CapacityPolicies {
if (requestedResources.isEmpty())
return defaultNodeResources(cluster.type());
- // Flavor is specified and is allocateByLegacyName: Handle legacy flavor specs
- if (zone.system() == SystemName.cd)
- return flavors.exists(requestedResources.get().legacyName().get()) ? requestedResources.get()
- : defaultNodeResources(cluster.type());
- else {
switch (zone.environment()) {
case dev: case test: case staging: return defaultNodeResources(cluster.type());
default:
@@ -79,7 +73,6 @@ public class CapacityPolicies {
return requestedResources.get();
}
}
- }
private NodeResources defaultNodeResources(ClusterSpec.Type clusterType) {
if (clusterType == ClusterSpec.Type.admin)
