Moti Asayag has uploaded a new change for review. Change subject: engine: Remove IP Address validations for UpdateNetwork (#852076) ......................................................................
engine: Remove IP Address validations for UpdateNetwork (#852076) https://bugzilla.redhat.com/852076 Since the IP Addresses are being verified for any interface being sent by the clients, there is need to re-check it only for static-ip case. Change-Id: Icf1b9578724c433f246b699e4727f39d99506aab Signed-off-by: Moti Asayag <masa...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateNetworkToVdsInterfaceCommand.java 1 file changed, 0 insertions(+), 17 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/37/7637/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateNetworkToVdsInterfaceCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateNetworkToVdsInterfaceCommand.java index b019427..907d9b9 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateNetworkToVdsInterfaceCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateNetworkToVdsInterfaceCommand.java @@ -1,7 +1,6 @@ package org.ovirt.engine.core.bll; import java.util.List; -import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import org.ovirt.engine.core.common.AuditLogType; @@ -245,24 +244,8 @@ // check address exists in static ip if (getParameters().getBootProtocol() == NetworkBootProtocol.StaticIp) { - Pattern IP_PATTERN = Pattern - .compile("^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$"); if (StringUtils.isEmpty(getParameters().getAddress())) { addCanDoActionMessage(VdcBllMessages.NETWROK_ADDR_MANDATORY_IN_STATIC_IP); - return false; - } - if (!IP_PATTERN.matcher(getParameters().getAddress()).matches()) { - addCanDoActionMessage(VdcBllMessages.NETWROK_ADDR_IN_STATIC_IP_BAD_FORMAT); - return false; - } - if (StringUtils.isNotEmpty(getParameters().getGateway()) - && !IP_PATTERN.matcher(getParameters().getGateway()).matches()) { - addCanDoActionMessage(VdcBllMessages.NETWROK_ADDR_IN_GATEWAY_BAD_FORMAT); - return false; - } - if (StringUtils.isNotEmpty(getParameters().getSubnet()) - && !IP_PATTERN.matcher(getParameters().getSubnet()).matches()) { - addCanDoActionMessage(VdcBllMessages.NETWROK_ADDR_IN_SUBNET_BAD_FORMAT); return false; } } -- To view, visit http://gerrit.ovirt.org/7637 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf1b9578724c433f246b699e4727f39d99506aab Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches