Martin Mucha has posted comments on this change. Change subject: engine: Introduce network attachments command ......................................................................
Patch Set 28: (3 comments) https://gerrit.ovirt.org/#/c/34971/28/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/RemoveNetworkAttachmentCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/RemoveNetworkAttachmentCommand.java: Line 12: import org.ovirt.engine.core.common.businessentities.network.NetworkAttachment; Line 13: import org.ovirt.engine.core.common.validation.group.RemoveEntity; Line 14: Line 15: @NonTransactiveCommandAttribute Line 16: public class RemoveNetworkAttachmentCommand<T extends NetworkAttachmentParameters> extends VdsCommand<T> { > Please refer to the comment on patchset 21 line 56- the parameter should be as I wrote you in mine comment. This cannot be done without querying db for VdsId and changing supertype. Are you ok with it? (please respond there, so any reader can keep track). Done. Line 17: Line 18: @Inject Line 19: private ManagementNetworkUtil managementNetworkUtil; Line 20: Line 24: } Line 25: Line 26: @Override Line 27: protected boolean canDoAction() { Line 28: // VDS host = getVds(); > Please remove the commented code. Done Line 29: // Line 30: // List<String> hostValidationMessages = new HostValidator(host, isInternalExecution()).validate(); Line 31: // if (!hostValidationMessages.isEmpty()) { Line 32: // getReturnValue().getCanDoActionMessages().addAll(hostValidationMessages); Line 45: Line 46: @Override Line 47: protected void executeCommand() { Line 48: HostSetupNetworksParameters params = new HostSetupNetworksParameters(getParameters().getVdsId()); Line 49: NetworkAttachment networkAttachmentForRemove = > As I wrote in patchset 21, the query is redundant, please remove it. Done Line 50: getDbFacade().getNetworkAttachmentDao().get(getParameters().getNetworkAttachment().getId()); Line 51: params.getRemovedNetworkAttachments().add(networkAttachmentForRemove.getId()); Line 52: VdcReturnValueBase returnValue = runInternalAction(VdcActionType.HostSetupNetworks, params); Line 53: propagateFailure(returnValue); -- To view, visit https://gerrit.ovirt.org/34971 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c1b7a4e0b5ceacf6ea436c4ede84e414817dbdd Gerrit-PatchSet: 28 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches