<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 06/20/2015 02:46 PM, Sajeesh Cimson
      Sasi wrote:<br>
    </div>
    <blockquote
      cite="mid:08B59792F3F22F449DE8F6390F7587EF3F51B696@CERNXCHG72.cern.ch"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;"><font size="2"><span
            style="font-size:10pt;">Hi All,<br>
               I need your advice for the implementation of the
            following blueprint. <a moz-do-not-send="true"
              href="https://review.openstack.org/#/c/160605"
              target="_blank">
              https://review.openstack.org/#/c/160605</a> .<br>
               All the use cases mentioned in the blueprint have  been
            implemented and the complete code is up for review.<br>
              <a moz-do-not-send="true"
              href="https://review.openstack.org/#/c/149828/"
              target="_blank">https://review.openstack.org/#/c/149828/</a><br>
              However, we have an issue on which we need your input. In
            the nova quota api call, keystone calls are made to<br>
              get the parent_id and the child project or sub project
            list. This is required because nova doesn't store any
            information
            <br>
              regarding the hierarchy. Hierarchy Information is  taken
            during run time,  from keystone. Since the keystone calls
            are
            <br>
              made inside the api call, it is not possible to give any
            dummy or  fake values while writing the unit tests. If the
            keystone<br>
              call was made outside the api call, we could have given
            fake values in the test cases. However,  the keystone calls
            for
            <br>
               parent_id and child projects are made inside the api
            call.<br>
              Can anyone suggest an elegant solution to this problem?
            What is the proper way to implement this ?
            <br>
                Did anybody encounter and solve a  similar  problem ?
            Many thanks for any suggestions!<br>
                     best regards<br>
                       sajeesh</span></font></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    If you are talking to a live Keystone server, make sure you are
    using valid data.<br>
    <br>
    If you are not talking to a live keystone server in a unit test, use
    RequestsMock or equivalent (varied by project)  to handle the HTTP
    request and response.<br>
    <br>
    A worst case approach is to monkey patch the Keystoneclient.  Please
    don't do that if you can avoid it;  better to provide a mock
    alternative.<br>
  </body>
</html>