Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: smtp: collapse JavaMailSender into transport
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: smtp: collapse JavaMailSender into transport
......................................................................
tools: notifier: smtp: collapse JavaMailSender into transport
transport is all about sending smtp, there is no need for cross class
access and multiple configuration access.
Change-Id: I5082144693689c4feebb9c7e3be9bffaf75b8d72
Signed-off-by: Alon Bar-Lev <alonbl(a)redhat.com>
---
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/JavaMailSender.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
2 files changed, 125 insertions(+), 165 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24701
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5082144693689c4feebb9c7e3be9bffaf75b8d72
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: move mail specific validations into smtp tr...
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: move mail specific validations into smtp transport
......................................................................
tools: notifier: move mail specific validations into smtp transport
the static usage will be altered once we reorder transport creation.
Change-Id: I5c956198a2bb41deff7259607feb83dfe1a7ad53
Signed-off-by: Alon Bar-Lev <alonbl(a)redhat.com>
---
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/Notifier.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/JavaMailSender.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
4 files changed, 114 insertions(+), 113 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24700
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5c956198a2bb41deff7259607feb83dfe1a7ad53
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: remove smtp host validation on notifier sta...
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: remove smtp host validation on notifier startup
......................................................................
tools: notifier: remove smtp host validation on notifier startup
A daemon running non interactively should start always
and log failures during runtime.
Change-Id: Ie1385c910824a66567540dff4b76e80d8a1298a5
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
1 file changed, 0 insertions(+), 22 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24699
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1385c910824a66567540dff4b76e80d8a1298a5
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: Required changes in events data mapping.
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: Required changes in events data mapping.
......................................................................
tools: notifier: Required changes in events data mapping.
The event_audit_log_subscriber_view contains info
about users and events. Since we will need to
provide subscribers from other sources (snmp subscribers
will come from the configuration) we must query the two
separately.
As a result of this: event_audit_log_subscriber_view is dropped,
EventAuditLogSubscriber the entity that represented it is deleted,
and new entities were defined: AuditLogEvent and AuditLogEventSubscriber
AuditLogEventType is no longer an inner class and a new interface,
EventFilter, represents the matching between events and subscribers.
More implementations of this enum will follow.
Mail senders and tests updated to use the new entities.
Change-Id: I3350d1c1caa6d730a3c7916ee0581f1aaa4a582a
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/AuditLogEvent.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/AuditLogEventSubscriber.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/AuditLogEventType.java
D backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/EventAuditLogSubscriber.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/EventFilter.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/UpDownEventFilter.java
A backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/NotificationMethodsMapper.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/NotificationService.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/NotificationServiceException.java
A backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/dao/EventsManager.java
R backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/EventSenderResult.java
A backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/Transport.java
A backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/EventMessageContent.java
R backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/JavaMailSender.java
R backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/MessageBody.java
R backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/MessageHelper.java
R backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationMethodsMapper.java
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/sender/EventSender.java
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/sender/mail/EventMessageContent.java
M packaging/dbscripts/create_views.sql
21 files changed, 802 insertions(+), 688 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24698
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3350d1c1caa6d730a3c7916ee0581f1aaa4a582a
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: remove SmtpTest.
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: remove SmtpTest.
......................................................................
tools: notifier: remove SmtpTest.
MailSenderTest uses external resources that should not be used for
unit testing. some of which are also not available.
Change-Id: I040014e8afaa19db0b5127fac2712b874806e4b8
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
D backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/mail/MailSenderTest.java
D backend/manager/tools/src/test/resources/conf/notifier-mail-test-plain.conf
D backend/manager/tools/src/test/resources/conf/notifier-mail-test-secured.conf
3 files changed, 0 insertions(+), 162 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24697
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I040014e8afaa19db0b5127fac2712b874806e4b8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: Remove auxiliary email address from EventSe...
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: Remove auxiliary email address from EventSender interface
......................................................................
tools: notifier: Remove auxiliary email address from EventSender interface
Prior to this change the interface EventSender.java
contained the following logic: an email address can come from wither
The subscriber table(event_subscriber) or if it does not exist the user
table (users). This patch moves this logic from the interface to the
component loading the email subscriber, as this logic is email specific.
Simpler interfaces are better.
Change-Id: Ic69ff7541fca8347fb7cb85665934ca704fa9d06
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/NotificationService.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/sender/EventSender.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/sender/mail/EventSenderMailImpl.java
M backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/mail/MailSenderTest.java
M packaging/dbscripts/create_views.sql
5 files changed, 37 insertions(+), 67 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24696
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic69ff7541fca8347fb7cb85665934ca704fa9d06
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: more changes in NotificationProperties
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: more changes in NotificationProperties
......................................................................
tools: notifier: more changes in NotificationProperties
split validate into sub calls (validateBasic, validateEmail ...) to sections.
as more sections are expected in following commits (validateFilter, validateSnmp ).
Order methods (constructor befor any other method).
Apply code style & add requireAll and requireOne methods.
Change-Id: I2ebbf76a23c79d354cb9026dc3ad0f4310a804be
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
1 file changed, 141 insertions(+), 89 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24695
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2ebbf76a23c79d354cb9026dc3ad0f4310a804be
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: Notification properties changes.
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: Notification properties changes.
......................................................................
tools: notifier: Notification properties changes.
Before this change validation was done both in
NotificationService.initConfigurationProperties and in NotificationProperties
itself. all moved to NotificationProperties.
The properties themself are not read from the notification service
to be instance variables inside the notifier but are read each time
they are needed.
Change-Id: I5753ba2cad2de90a7f2d14bd4675edc1dd35045e
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/NotificationService.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
2 files changed, 92 insertions(+), 118 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24694
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5753ba2cad2de90a7f2d14bd4675edc1dd35045e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: Rename EventNotificationMethods to EventNot...
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: Rename EventNotificationMethods to EventNotificationMethod.
......................................................................
tools: notifier: Rename EventNotificationMethods to EventNotificationMethod.
Change-Id: Icb24075599969e4f8ee987851a91032f22190ee9
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddEventSubscriptionCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/EventSubscriptionCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveEventSubscriptionCommand.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/EventNotificationMethod.java
D backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/EventNotificationMethods.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/EventAuditLogSubscriber.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/event_subscriber.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/event_subscriber_id.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAODbFacadeImpl.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/EventDAOTest.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/NotificationService.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationMethodsMapper.java
M frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserEventNotifierListModel.java
14 files changed, 48 insertions(+), 48 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24693
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icb24075599969e4f8ee987851a91032f22190ee9
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months
Change in ovirt-engine[ovirt-engine-3.4]: tools: notifier: Refactor model and DB mapping of eventNotif...
by iheim@redhat.com
Itamar Heim has submitted this change and it was merged.
Change subject: tools: notifier: Refactor model and DB mapping of eventNotificationMethods.
......................................................................
tools: notifier: Refactor model and DB mapping of eventNotificationMethods.
Main change in this patch set is storing eventNotificationMethods
as enum in java objects and as an sql string in the event_subscribers
table(and not int). The mapping is easier and the db is human readable.
Another side effect of this change is there is no more need for
some mapping classes deleted in this patch. They are all replaced
by the simpler NotificationMethodsMapper. The table
event_notification_methods was dropped since it duplicates the enum
eventNotificationMethods and replaced by new an sql CHECK constraint.
Change-Id: I8b71c4e78bbdca3d02d2ac4ef419b9d3d7d58761
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddEventSubscriptionCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/EventSubscriptionCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveEventSubscriptionCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/EventNotificationMethods.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/EventAuditLogSubscriber.java
D backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/EventNotificationMethod.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/event_subscriber.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/event_subscriber_id.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAO.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAODbFacadeImpl.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/EventDAOTest.java
M backend/manager/modules/dal/src/test/resources/fixtures.xml
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/NotificationService.java
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/methods/EventMethodFiller.java
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/methods/NotificationMethodFactory.java
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/methods/NotificationMethodFactoryEmailImpl.java
D backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/methods/NotificationMethodMapBuilder.java
A backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationMethodsMapper.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserEventNotifierListModel.java
M packaging/dbscripts/create_views.sql
M packaging/dbscripts/event_sp.sql
M packaging/dbscripts/insert_data.sql
A packaging/dbscripts/upgrade/03_04_0600_event_notification_methods.sql
23 files changed, 113 insertions(+), 559 deletions(-)
Approvals:
Eli Mesika: Looks good to me, approved
mooli tayer: Verified
--
To view, visit http://gerrit.ovirt.org/24692
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8b71c4e78bbdca3d02d2ac4ef419b9d3d7d58761
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 10 months