
Alona Kaplan has submitted this change and it was merged. Change subject: core: refactor&test for HostNetworkAttachmentsPersister ...................................................................... core: refactor&test for HostNetworkAttachmentsPersister • added few javadoc • typo • extracted some conditions to give them name • extracted part of constructor code out to method to make constructor shorter/simpler. • renamed method 'removeNetworkAttachments' to make it clearer why are they removed. • minor refactoring so that there's neither 'global' collection for representing 'valid attachments' nor 'cached' db content, which is rendered out-of-date after first method call (removeInvalidNetworkAttachmentsFromDb). It creates a little bit procedural design, but I think it's less error prone this way, without out-of-date gotchas. • added tests for this class Change-Id: Ib39c3678a29a7bd8728d32b55490f8500a77d9d6 Signed-off-by: Martin Mucha <mmucha@redhat.com> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HostNetworkAttachmentsPersister.java A backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HostNetworkAttachmentsPersisterTest.java M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 6 files changed, 434 insertions(+), 5 deletions(-) Approvals: Alona Kaplan: Verified; Looks good to me, approved; Passed CI tests -- To view, visit https://gerrit.ovirt.org/36067 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib39c3678a29a7bd8728d32b55490f8500a77d9d6 Gerrit-PatchSet: 55 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmucha@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkaplan@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Mucha <mmucha@redhat.com> Gerrit-Reviewer: Moti Asayag <masayag@redhat.com> Gerrit-Reviewer: automation@ovirt.org