Validate that we don't attempt to scale bandwith
@@ -63,9 +63,14 @@ public class NodesSpecification {
if (max.smallerThan(min))
throw new IllegalArgumentException("Min resources must be larger or equal to max resources, but " +
max + " is smaller than " + min);
+
+ // Non-scaled resources must be equal
if ( ! min.nodeResources().justNonNumbers().equals(max.nodeResources().justNonNumbers()))
throw new IllegalArgumentException("Min and max resources must have the same non-numeric settings, but " +
"min is " + min + " and max " + max);
+ if (min.nodeResources().bandwidthGbps() != max.nodeResources().bandwidthGbps())
+ throw new IllegalArgumentException("Min and max resources must have the same bandwith, but " +
+ "min is " + min + " and max " + max);
this.min = min;
this.max = max;
