Pearl1594 commented on code in PR #10168:
URL: https://github.com/apache/cloudstack/pull/10168#discussion_r1930557118
##########
server/src/main/java/com/cloud/network/NetworkServiceImpl.java:
##########
@@ -1634,6 +1634,18 @@ public Network createGuestNetwork(CreateNetworkCmd cmd)
throws InsufficientCapac
throwInvalidIdException("Network offering with specified id
doesn't support adding multiple ip ranges", ntwkOff.getUuid(),
NETWORK_OFFERING_ID);
}
+ if (GuestType.Shared == ntwkOff.getGuestType()) {
+ if (!ntwkOff.isSpecifyIpRanges()) {
+ throw new CloudRuntimeException("Specify IP Ranged should be
true for Shared Networks");
+ }
+ if (ipv4 && Objects.isNull(startIP)) {
Review Comment:
I hadn;t placed the check for endIP, as as per the param description, if not
specified, it will default to the start IP.
##########
server/src/main/java/com/cloud/network/NetworkServiceImpl.java:
##########
@@ -1634,6 +1634,18 @@ public Network createGuestNetwork(CreateNetworkCmd cmd)
throws InsufficientCapac
throwInvalidIdException("Network offering with specified id
doesn't support adding multiple ip ranges", ntwkOff.getUuid(),
NETWORK_OFFERING_ID);
}
+ if (GuestType.Shared == ntwkOff.getGuestType()) {
+ if (!ntwkOff.isSpecifyIpRanges()) {
+ throw new CloudRuntimeException("Specify IP Ranged should be
true for Shared Networks");
+ }
+ if (ipv4 && Objects.isNull(startIP)) {
Review Comment:
I hadn't placed the check for endIP, as as per the param description, if not
specified, it will default to the start IP.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]