<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yeah, I finally understood too what Thomas meant.<div class=""><br class=""></div><div class="">Just to clarify, I think mixed two different discussions here:</div><div class=""><ol class="MailOutline"><li class="">Base framework for all actions residing in mistral-lib (what I was trying to discuss)</li><li class="">The new design for OpenStack actions</li></ol><div class=""><br class=""></div></div><div class="">On #2 I agree with you that NovaAction.get_client(context) should work. No problem with that.</div><div class="">And I believe that it doesn’t make sense to use multiple inheritance in this particular case, it’s</div><div class="">simply not worth it.</div><div class=""><br class=""></div><div class="">Getting back to #1.. Of course, using mixins can be problematic (method and state conflicts etc.).</div><div class="">I think mixins is just one of the options that’s possible to use if we want to. Regular class inheritance</div><div class="">is also an option I think. At this point if we just agree on action base class I think nothing prevents</div><div class="">us from choosing how to evolve in the future. So just agreeing on the base class design seems</div><div class="">to be sufficient for now. It’s just a base contract that a runner needs to be aware of (sorry for</div><div class="">repeating this thought but I think it’s important). The rest is related with action developer</div><div class="">convenience.</div><div class=""><br class=""></div>
<div><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">I think the outstanding questions are;</div><div class=""><br class="">- should the context be a mixin or should run() always accept context? <br class=""></div></div></div></div></blockquote><div><br class=""></div><div>I’m for run() having “context” argument. Not sure why mixin is needed here. If an action doesn’t</div><div>need context it can be ignored.</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">- should async be a mixin or should we continue with the is_sync() method and overwriting that in the sublcass?<br class=""></div></div></div></div></blockquote><div><br class=""></div><div>I’m for is_sync() method as it is now. It’s more flexible and less confusing (imagine an action inheriting</div><div>AsyncAction but having is_async() returning False).</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">- should the openstack actions in mistral-extra be mixins?<br class=""></div></div></div></div></blockquote></div><div class=""><div class=""><br class="webkit-block-placeholder"></div><div class="">No, not at all. They don’t have to be. This is a different discussion I think. We need to collect what’s bad about</div><div class="">the current OpenStack actions and think how to rewrite them (extract the common infrastructure they use,</div><div class="">make them more extensible, etc.)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Renat Akhmerov</div></div></div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">@Nokia</div><div class=""><br class=""></div></div></body></html>