<div dir="ltr">Hi Denis, Michael, Vipul and all,<div><br></div><div>I noticed a discussion in irc about adding a single entry point (sort of 'SuperManager') to the guestagent. Let me add my 5cent.</div><div><br></div>
<div>I agree with that we would ultimately avoid code duplication. But from my experience, only very small part of GA Manager can be considered as really duplicated code, namely Manager#prepare(). A 'backup' part may be another candidate, but I'm not yet. It may still be rather service type specific. All the rest of the code was just delegating.</div>
<div><br></div><div>If we add a 'SuperManager' all we'll have -- just more delegation:</div><div><br></div><div>1. There is no use for dynamic loading of corresponding Manager implementation because there will never be more than one service type supported on a concrete guest. So current implementation with configurable dictionary service_type->ManagerImpl looks good for me.<br>
</div><div><br></div><div>2. Neither the 'SuperManager' provide common interface for Manager -- due to dynamic nature of python. As it has been told, trove.guestagent.api.API provides list of methods with parameters we need to implement. What I'd like to have is a description of types for those params as well as return types. (Man, I miss static typing). All we can do for that is make sure we have proper unittests with REAL values for params and returns.<br>
</div><div><br></div><div>As for the common part of the Manager's code, I'd go for extracting that into a mixin.<br><div><br></div><div>Thanks for your attention.<br clear="all"><div><br></div>-- <br><div dir="ltr">
<p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Best regards,</p><p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Illia Khudoshyn,<br>Software Engineer, Mirantis, Inc.</p>
<p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p><p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">38, Lenina ave. Kharkov, Ukraine</p><p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(136,136,136)"><a href="http://www.mirantis.ru/" style="color:rgb(17,85,204)" target="_blank">www.mirantis.com</a></span></p><p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(136,136,136)"><a href="http://www.mirantis.ru/" style="color:rgb(17,85,204)" target="_blank">www.mirantis.ru</a></span></p><p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(136,136,136)"> </span></p><p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">Skype: gluke_work</span><br>
</p><p style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(136,136,136)"><a href="mailto:ikhudoshyn@mirantis.com" style="color:rgb(17,85,204)" target="_blank">ikhudoshyn@mirantis.com</a></span></p>
</div>
</div></div></div>