<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=""><div class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div></div></div><div><blockquote type="cite" class=""><div class="">On 28 Jun 2016, at 15:13, Hardik <<a href="mailto:hardik.parekh@nectechnologies.in" class="">hardik.parekh@nectechnologies.in</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class="">
    Hi folks,<br class="">
    <br class="">
    In Mistral, we face issues related managing openstack actions.<br class="">
    <br class="">
    Currently we have mapping.json file which should be updated manually
    using tools/get_actions_list.py.<br class="">
    However, this script cannot be useful for neutron, zaqar, swift etc.<br class="">
    <br class="">
    Also, our unit test cases are not so efficient. So, I have following
    few suggestions.<br class="">
    <br class="">
    <ul class="">
      <li class="">We should improve our tests in
        mistral/tests/unit/actions/openstack/test_generator.py and
        mistral/tests/unit/actions/test_action_manager.py. So that, we
        can assure that openstack actions are correctly registered to
        database with correct parameters.</li></ul></div></div></blockquote><div>Ok, agree. Those tests are now pretty poor.</div><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class=""><ul class="">
      <li class="">Also, we should install all supported openstack services  in
        our gates and we should have at least one functional test for
        each service.</li></ul></div></div></blockquote>Agree. I was thinking about not just one test per service but rather several tests that comprise a representative subset of certain service functionality.<br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class=""><ul class="">
      <li class="">Improvement of get_actions_list.py. So that, it can generate
        actions for almost all openstack service.<br class=""></li></ul></div></div></blockquote>Yeah, I wonder if we can use openstackclient instead of individual clients. Do think it’s possible? The bad thing about the current approach is that we should rely on different clients whereas not all of them are built in the same way. So we have to come up with certain tricks and it’s very volatile and hard to maintain.<br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class=""><ul class=""><li class="">Also, I think we should get rid of mapping.json file (Don't
        know right now how) because its size will increase as we support
        more actions and it will become difficult to maintain this file. </li>
    </ul>
    </div></div></blockquote>Ideally, yes, but the issue I see here is that actions must be registered in DB, this is how the whole model works. So we’ll have to migrate DB every time we detect some changes.</div><div>Regarding this, we discussed the idea of action providers long ago, [1]. It’s basically about moving away from having to store action definitions in DB. Instead we could register a number of providers and each of them could provide an interface to work with actions: get action, get list of them, etc. Maybe we need to resurrect this BP again when rebuilding action mechanism. </div><div><br class=""></div><div>Just one more note: keep in mind that we’re now revisiting all the approach around actions and a number of activities are going on, e.g. [2]. Eventually, these actions and tests for them will go into a different repository.</div><div><br class=""></div><div>[1] <a href="https://blueprints.launchpad.net/mistral/+spec/mistral-action-providers" class="">https://blueprints.launchpad.net/mistral/+spec/mistral-action-providers</a></div><div>[2] <a href="https://review.openstack.org/#/c/325769/" class="">https://review.openstack.org/#/c/325769/</a></div><div><br class=""></div><div><br class=""></div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Renat Akhmerov</div><div class="">@Nokia</div><div class=""><br class=""></div></div></div></body></html>