shwstppr commented on code in PR #6425:
URL: https://github.com/apache/cloudstack/pull/6425#discussion_r902541993
##########
server/src/main/java/com/cloud/network/NetworkServiceImpl.java:
##########
@@ -557,6 +558,42 @@ private Set<Purpose> getPublicIpPurposeInRules(PublicIp
ip, boolean includeRevok
return result;
}
+ private void checkNetworkDns(boolean isIpv6, NetworkOffering
networkOffering, Long vpcId,
+ String ip4Dns1, String ip4Dns2, String ip6Dns1, String ip6Dns2) {
+ if (ObjectUtils.anyNotNull(ip4Dns1, ip4Dns2, ip6Dns1, ip6Dns2)) {
+ if (GuestType.L2.equals(networkOffering.getGuestType())) {
+ throw new InvalidParameterValueException(String.format("DNS
can not be specified %s networks", GuestType.L2));
+ }
+ if (vpcId != null) {
+ throw new InvalidParameterValueException("DNS can not be
specified for a VPC tier");
+ }
+ if
(!areServicesSupportedByNetworkOffering(networkOffering.getId(), Service.Dns)) {
+ throw new InvalidParameterValueException("DNS can not be
specified for networks with network offering that do not support DNS service");
+ }
+ }
+ if (!isIpv6 && !StringUtils.isAllEmpty(ip6Dns1, ip6Dns2)) {
Review Comment:
@nvazquez currently ACS won't support IPv6 only network (neither for shared
nw nor for isolated) so not sure if we need to check anything there with IPv4
DNS
--
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]