Moti Asayag has posted comments on this change. Change subject: engine: Audit log warning about display network change. ......................................................................
Patch Set 9: (5 comments) General comment: Please don't add author in classes' javadoc. Also, test as prefix for test methods isn't necessary (junit pre-annotation convention). http://gerrit.ovirt.org/#/c/26256/9/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/common/predicates/ActiveVmAttachedToClusterPredicate.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/common/predicates/ActiveVmAttachedToClusterPredicate.java: Line 11: Line 12: /** Line 13: * Evaluates a cluster with the given id on existence of running VMs attached to it. Line 14: * Line 15: * @author yzaspits please remove the author. there is no such convention within the project (and also there is 'git blame' which is more relevant and concrete) Line 16: */ Line 17: public final class ActiveVmAttachedToClusterPredicate implements Predicate<Guid> { Line 18: Line 19: private static final Predicate<VM> RUNNING_VM_PREDICATE = new RunningVmPredicate(); http://gerrit.ovirt.org/#/c/26256/9/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/AttachNetworkToVdsGroupCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/AttachNetworkToVdsGroupCommand.java: Line 60: addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ATTACH); Line 61: } Line 62: Line 63: @Override Line 64: protected void executeCommand() { Note that this should be reverted once http://gerrit.ovirt.org/#/c/24902/ is merged, so - whoever goes last should adjust. Line 65: final DisplayNetworkClusterHelper displayNetworkClusterHelper = new DisplayNetworkClusterHelper( Line 66: getNetworkClusterDAO(), Line 67: getVmDAO(), Line 68: getNetworkCluster(), http://gerrit.ovirt.org/#/c/26256/9/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/cluster/helper/DisplayNetworkClusterHelperTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/cluster/helper/DisplayNetworkClusterHelperTest.java: Line 70: /** Line 71: * Test method for Line 72: * {@link org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelper#isDisplayToBeUpdated()}. Line 73: */ Line 74: @Test the test prefix of the methods' names is redundant. Line 75: public void testIsDisplayToBeUpdatedPositive1() { Line 76: Line 77: testIsDisplayToBeUpdatedInner(true, false, true); Line 78: } http://gerrit.ovirt.org/#/c/26256/9/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java: Line 17: AddEventNotificationEntry(EventNotificationEntity.Engine, AuditLogType.VDC_STOP); Line 18: // VDS GROUP Line 19: AddEventNotificationEntry(EventNotificationEntity.VdsGroup, AuditLogType.CLUSTER_ALERT_HA_RESERVATION); Line 20: AddEventNotificationEntry(EventNotificationEntity.VdsGroup, Line 21: AuditLogType.NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM); you should add a matching entry into event_map table. see http://www.ovirt.org/Features/configuration-event-subscribers (or run grep on any other event which appears here to find its db upgrade script) Line 22: // VDS Line 23: AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.VDS_FAILURE); Line 24: AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.USER_VDS_MAINTENANCE); Line 25: AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.USER_VDS_MAINTENANCE_MANUAL_HA); http://gerrit.ovirt.org/#/c/26256/9/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties File backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties: Line 513: NETWORK_REMOVE_TEMPLATE_INTERFACE=Interface ${InterfaceName} (${InterfaceType}) was removed from Template ${VmTemplateName}. (User: ${UserName}) Line 514: NETWORK_REMOVE_TEMPLATE_INTERFACE_FAILED=Failed to remove Interface ${InterfaceName} (${InterfaceType}) from Template ${VmTemplateName}. (User: ${UserName}) Line 515: NETWORK_REMOVE_VM_INTERFACE=Interface ${InterfaceName} (${InterfaceType}) was removed from VM ${VmName}. (User: ${UserName}) Line 516: NETWORK_REMOVE_VM_INTERFACE_FAILED=Failed to remove Interface ${InterfaceName} (${InterfaceType}) from VM ${VmName}. (User: ${UserName}) Line 517: NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM=Update Display Network (${NetworkName}) for Cluster ${VdsGroupName} with active VMs. The change will be applied to those VMs after the next reboot. s/the next reboot/their next reboot ? Line 518: NETWORK_UPDATE_DISPLAY_TO_VDS_GROUP=Update Display Network (${NetworkName}) for Cluster ${VdsGroupName}. (User: ${UserName}) Line 519: NETWORK_UPDATE_DISPLAY_TO_VDS_GROUP_FAILED=Failed to update Display Network (${NetworkName}) for Cluster ${VdsGroupName}. (User: ${UserName}) Line 520: NETWORK_UPDATE_NETWORK_TO_VDS_INTERFACE=Update Network ${NetworkName} in Host ${VdsName}. (User: ${UserName}) Line 521: NETWORK_UPDATE_NETWORK_TO_VDS_INTERFACE_FAILED=Failed to update Network ${NetworkName} in Host ${VdsName}. (User: ${UserName}) -- To view, visit http://gerrit.ovirt.org/26256 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9df4cd96fe71b3a44132004f17a7889dbe912b2 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches