<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><span style="font-family: arial,helvetica,sans-serif;">Usage of AuditLogDirector in VdsBrokerObjectsBuilder is an illustration for a sub-optimal design:</span><br><span style="font-family: arial,helvetica,sans-serif;">1. The methods it is used in them are checkTimeDrift and reportInvalidInterfacesForNetwork. Both are:</span><br><span style="font-family: arial,helvetica,sans-serif;">public static and both should not be</span><br></div><div><br></div><div><span style="font-family: arial,helvetica,sans-serif;"><span name="x"></span>Best regards, </span><br><span style="font-family: arial,helvetica,sans-serif;">____________________ </span><br><span style="font-family: arial,helvetica,sans-serif;">Yevgeny Zaspitsky </span><br><span style="font-family: arial,helvetica,sans-serif;">Senior Software Engineer </span><br><span style="font-family: arial,helvetica,sans-serif;">Red Hat Israel </span><br><span style="font-family: arial,helvetica,sans-serif;">34 Jerusalem Road, </span><br><span style="font-family: arial,helvetica,sans-serif;">Ra'anana, Israel 43501 </span><br><div><br></div><span style="font-family: arial,helvetica,sans-serif;">Tel: +972 9 7692098 </span><br><span style="font-family: arial,helvetica,sans-serif;">Mobile: +972 52 6323656 </span><br><span style="font-family: arial,helvetica,sans-serif;">Email: yzaspits@redhat.com </span><br><span style="font-family: arial,helvetica,sans-serif;">IRC: yzaspits </span><br><span name="x"></span><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Yair Zaslavsky" <yzaslavs@redhat.com><br><b>To: </b>"Yevgeny Zaspitsky" <yzaspits@redhat.com><br><b>Cc: </b>devel@ovirt.org<br><b>Sent: </b>Monday, October 6, 2014 5:23:25 PM<br><b>Subject: </b>Re: [ovirt-devel] [ENGINE] splitting AuditLogDirector to its own module<br><div><br></div><br><div><br></div><hr id="zwchr"><br>> From: "Yevgeny Zaspitsky" <yzaspits@redhat.com><br>> To: "Yair Zaslavsky" <yzaslavs@redhat.com>, devel@ovirt.org<br>> Sent: Sunday, October 5, 2014 11:31:18 AM<br>> Subject: Re: [ovirt-devel] [ENGINE] splitting AuditLogDirector to its own module<br>> <br>> Hi Yair and All,<br>> <br>> As soon as you turned our attention to dependencies problems in oVirt, I<br>> guess would worse to mention that vdsbroker is directly dependent on dal<br>> (very weird to me).<br>> That is because some business logic found its way into vdsbroker code<br>> and uses dal directly. Using dal should be allowed to bll module only.<br>> Next to allowing ourselves using dal in vdsbroker, we've found very<br>> creative way to use bll commands in vdsbroker completing by that a<br>> circular dependency ring.<br>> <br>> The current situation when vdsbroker is directly dependent on dal and in<br>> fact dependent on bll is sever violation of a good design practice IMHO.<br>> <br>> I'm in favor solving that dependency mesh asap prior it become more<br>> difficult. We should strive to extract the business logic from vdsbroker<br>> (and any other module) and move that to bll module where its natural<br>> place is, then fix the dependencies chain (that have to be a tree and<br>> not any geometric figure).<br>> <br>> When that will happen, we'd be able to figure more easily what the<br>> natural place for AuditLogDirector should be, I guess that'll be utils<br>> package.<br>> <br>> Regards,<br>> Yevgeny<br><div><br></div>git grep will show you that it is in VdsBrokerObjectsBuilder which creates the entities from the XMlRpcStruct maps.<br>The calls to AuditLogDirector simply "report" of various issues during the "transformation" to the audit log, to be presented at UI. The objects builder class already involves business entities.<br>I agre usage of AuditLogDirector there seems ackward.<br><div><br></div><br>> <br>> On 03/10/14 20:03, Yair Zaslavsky wrote:<br>> > Hi all,<br>> > I just reviewed a patch regarding AuditLogDirector and I thought to myself<br>> > - why is it located in DAL?<br>> > Our maven dependencies are built in a way that both bll and vdsbroker<br>> > depend on DAL, and if you perform git grep AuditLogDirector you will see<br>> > it is used<br>> > by bll and vdsbroker.<br>> > But that this is not necessary a reason to include AuditlogDirector in DAL.<br>> > I think DAL should be our Data Access Layer, and for audit log (which is a<br>> > class that uses our DAOs) we should have a separate module.<br>> ><br>> > Thoughts on this are welcome,<br>> ><br>> > Yair<br>> > _______________________________________________<br>> > Devel mailing list<br>> > Devel@ovirt.org<br>> > http://lists.ovirt.org/mailman/listinfo/devel<br>> <br>> <br></blockquote><div><br></div></div></body></html>