Skip to content

Commit

Permalink
PR9697: fix unit tests error
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache committed Sep 18, 2024
1 parent cea6511 commit decc016
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ void validateNetworkCidrSize(Account caller, Integer cidrSize, String cidr, Netw
throw new InvalidParameterValueException("network cidr and cidr size are mutually exclusive");
}
if (NetworkOffering.NetworkMode.ROUTED.equals(networkOffering.getNetworkMode())
&& !routedIpv4Manager.RoutedNetworkVpcEnabled.valueIn(zoneId)) {
&& !RoutedIpv4Manager.RoutedNetworkVpcEnabled.valueIn(zoneId)) {
throw new InvalidParameterValueException("Routed network is not enabled in this zone");
}
if (NetworkOffering.NetworkMode.ROUTED.equals(networkOffering.getNetworkMode())
Expand All @@ -1409,11 +1409,11 @@ void validateNetworkCidrSize(Account caller, Integer cidrSize, String cidr, Netw
if (cidrSize == null) {
throw new InvalidParameterValueException("network cidr or cidr size is required for Isolated networks with ROUTED mode");
}
Integer maxCidrSize = routedIpv4Manager.RoutedNetworkIPv4MaxCidrSize.valueIn(accountId);
Integer maxCidrSize = RoutedIpv4Manager.RoutedNetworkIPv4MaxCidrSize.valueIn(accountId);
if (cidrSize > maxCidrSize) {
throw new InvalidParameterValueException("network cidr size cannot be bigger than maximum cidr size " + maxCidrSize);
}
Integer minCidrSize = routedIpv4Manager.RoutedNetworkIPv4MinCidrSize.valueIn(accountId);
Integer minCidrSize = RoutedIpv4Manager.RoutedNetworkIPv4MinCidrSize.valueIn(accountId);
if (cidrSize < minCidrSize) {
throw new InvalidParameterValueException("network cidr size cannot be smaller than minimum cidr size " + minCidrSize);
}
Expand Down

0 comments on commit decc016

Please sign in to comment.