<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 05/02/13 11:33, Patil, Kavan K
      (HPCS) wrote:<br>
    </div>
    <blockquote
cite="mid:F71DD1E4E347624083BCAD3AEA80BB49017454A1@G4W3209.americas.hpqcorp.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi Matthew Treinish,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">[I am not sure how one could reply to
          comments on gerrit, so I am mailing this across. I am using
          the list as other people could express their thoughts here.]<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Quoted Text from your review comment for :
          <a moz-do-not-send="true"
            href="https://review.openstack.org/#/c/20464/">
            https://review.openstack.org/#/c/20464/</a> <o:p></o:p></p>
        <p class="MsoNormal">---------------<o:p></o:p></p>
        <p class="MsoNormal">“I also have some concerns about whether
          using http from glanceclient common is distinct enough from
          just testing glanceclient (like we do currently) for tempest.
          I'm not sure if we should use tempest's RestClient or another
          tempest specific http client for glance, or if using
          glanceclient's http lib is enough. If someone with more
          knowledge about this could chime in...<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Either way I think writing a client class
          for the API is the right way to do it, instead of baking the
          request formatting and headers into the tests like you did
          here. I have a WIP up for this at:
          <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/19963/">https://review.openstack.org/#/c/19963/</a> . It doesn't currently
          work because of issues with image upload, but I'll rework it
          ASAP depending on what the consensus is on which http client
          to use. (Using glance client's would be easier) Once that's
          done I'll update the review so you can rebase the tests on top
          of it.”<o:p></o:p></p>
        <p class="MsoNormal">---------------<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">About your first point, i.e. which http
          base client to use while writing tempest tests: I think we
          will be reinventing the wheel if we try to write our own http
          base class, especially for tricky things like SSL support. The
          glanceclient.common.http module has special consideration for
          SSL (https) based connections and we would also have to do the
          same thing if we want to write a http base client ourselves.
          So I would vote to just use glanceclient.common.http as the
          base http client.<o:p></o:p></p>
      </div>
    </blockquote>
    <br>
    I'm not sure why SSL is complex. It's been done before, many times.<br>
    <br>
    <blockquote
cite="mid:F71DD1E4E347624083BCAD3AEA80BB49017454A1@G4W3209.americas.hpqcorp.net"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Next, I agree that we should try to have a
          API client wrapper (like the ones for Compute and Quantum),
          and use that in our tests. I didn’t do it because I thought
          that will again be like implementing glanceclient.v1.images,
          while we could do all the stuff through the base http client
          directly in tests as I have done in my proposal.
          <o:p></o:p></p>
      </div>
    </blockquote>
    <br>
    Well, you could go even further and ask why not use the command line
    tool? This way we are testing:<br>
    CLI -> client -> API<br>
    <br>
    (say we use 'pexpect' or something for the command line client, or
    just parse it).<br>
    <br>
    I think there are cons and pros to each direction - I like that we
    test all those layers in one sweep, but we are definitely adding
    complexity to the debugging process if there are issues. <br>
    I'm mostly concerned that the clients do not have stable versions
    and are just rolling along.<br>
    <br>
    <blockquote
cite="mid:F71DD1E4E347624083BCAD3AEA80BB49017454A1@G4W3209.americas.hpqcorp.net"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Still if we want to maintain consistency
          (w.r.t. other services) we could implement an Image v1 API
          client for Tempest, as you have done here:
          <a moz-do-not-send="true"
            href="https://review.openstack.org/#/c/19963/">https://review.openstack.org/#/c/19963/</a>
          and use that in the test scripts instead of plain http.<o:p></o:p></p>
      </div>
    </blockquote>
    <br>
    I'm in favor of a simple client, mainly because I don't 'trust' the
    clients and want to maintain independence in implementation
    according to the API, and not use an implementation that may have
    been tailored between the client and the server.<br>
    Y.<br>
    <br>
    <blockquote
cite="mid:F71DD1E4E347624083BCAD3AEA80BB49017454A1@G4W3209.americas.hpqcorp.net"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I request others to chime in.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Regards,<o:p></o:p></p>
        <p class="MsoNormal">Kavan<o:p></o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
openstack-qa mailing list
<a class="moz-txt-link-abbreviated" href="mailto:openstack-qa@lists.openstack.org">openstack-qa@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-qa">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-qa</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>