Laszlo Hornyak has posted comments on this change. Change subject: engine: check if vds exists with same name ......................................................................
Patch Set 1: No score (1 inline comment) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java Line 302: // check that VDS hostname does not contain special characters. Line 303: } else if (!ValidationUtils.validHostname(hostName)) { Line 304: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_INVALID_VDS_HOSTNAME); Line 305: returnValue = false; Line 306: } else if (getVdsDAO().getAllWithName(vdsName).size() != 0) { this should be ok, but unfortunately not enough because it allows to add "vds01" when "Vds01" already exists. The db constrainf does not stop that either. So unfortunately a new query is needed here. But then again we are back to DAO change. Line 307: addCanDoActionMessage(VdcBllMessages.VDS_TRY_CREATE_WITH_EXISTING_PARAMS); Line 308: returnValue = false; Line 309: } else if (getVdsDAO().getAllForHostname(hostName).size() != 0) { Line 310: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST); -- To view, visit http://gerrit.ovirt.org/12192 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I59bea31c78da3f718497bd1b58bada21c744fdc7 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches