<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 07/17/2014 08:54 AM, Aline Manera
      wrote:<br>
    </div>
    <blockquote cite="mid:53C71EB7.70707@linux.vnet.ibm.com" type="cite">
      <br>
      On 07/16/2014 09:35 PM, Aline Manera wrote:
      <br>
      <blockquote type="cite">
        <br>
        On 07/15/2014 12:45 PM, <a class="moz-txt-link-abbreviated" href="mailto:shaohef@linux.vnet.ibm.com">shaohef@linux.vnet.ibm.com</a> wrote:
        <br>
        <blockquote type="cite">From: ShaoHe Feng
          <a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com">&lt;shaohef@linux.vnet.ibm.com&gt;</a>
          <br>
          <br>
          V1 -&gt; V2:
          <br>
          make ticket as sub-resource of a VM
          <br>
        </blockquote>
        <br>
        Do we need a new sub-resource?
        <br>
        Why not use PUT /vms/&lt;my-vm&gt; {passwd:...} ?
        <br>
      </blockquote>
    </blockquote>
    How do we get the passwd?<br>
    GET /vms/&lt;my-vm&gt;<br>
    {<br>
    <blockquote>"name": my-vm,<br>
      "cpu": 1,<br>
      "memory": 512,<br>
      "passwd": "abcd"<br>
    </blockquote>
    }<br>
    <blockquote cite="mid:53C71EB7.70707@linux.vnet.ibm.com" type="cite">
      <br>
      Using the PUT /vms/&lt;my-vm&gt; also can make the UI logic
      simpler as the console password will be changed on VM Edit dialog
      <br>
    </blockquote>
    at VM Edit dialog, the disks and ifaces are all sub-collection. <br>
    PUT /vms/&lt;my-vm&gt;/ifaces/iface1<br>
    <blockquote cite="mid:53C71EB7.70707@linux.vnet.ibm.com" type="cite">(which
      already uses this PUT method)
      <br>
      <br>
      <blockquote type="cite">
        <br>
        <blockquote type="cite">
          <br>
          A ticket is the credential to access VM.
          <br>
          Only who get the ticket can access a VM.
          <br>
          <br>
          test this patch set:
          <br>
          set the ticket
          <br>
          $sudo curl -k -u &lt;user&gt;:&lt;password&gt; -H
          "Content-Type: application/json" -H&nbsp; \
          <br>
          "Accept: application/json"
          <a class="moz-txt-link-freetext" href="https://localhost:8001/vms/test-vm-8/ticket/">https://localhost:8001/vms/test-vm-8/ticket/</a> \
          <br>
          -X PUT -d '{"passwd": "abcd"}'
          <br>
          <br>
          get the ticket
          <br>
          $sudo curl -k -u &lt;user&gt;:&lt;password&gt; -H
          "Content-Type: application/json" -H \
          <br>
          "Accept: application/json"
          <a class="moz-txt-link-freetext" href="https://localhost:8001/vms/test-vm-8/ticket/">https://localhost:8001/vms/test-vm-8/ticket/</a>
          <br>
          <br>
          <br>
          ShaoHe Feng (5):
          <br>
          &nbsp;&nbsp; vm ticket in backend: update API.md
          <br>
          &nbsp;&nbsp; vm ticket in backend: update controller and API.json
          <br>
          &nbsp;&nbsp; vm ticket in backend: update model
          <br>
          &nbsp;&nbsp; vm ticket in backend: update mockmodel
          <br>
          &nbsp;&nbsp; vm ticket in backend: update test case
          <br>
          <br>
          &nbsp; docs/API.md&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 20 +++++++++++++++
          <br>
          &nbsp; src/kimchi/API.json&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 14 ++++++++++
          <br>
          &nbsp; src/kimchi/control/vms.py | 13 ++++++++++
          <br>
          &nbsp; src/kimchi/i18n.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 1 +
          <br>
          &nbsp; src/kimchi/mockmodel.py&nbsp;&nbsp; | 18 +++++++++++++
          <br>
          &nbsp; src/kimchi/model/vms.py&nbsp;&nbsp; | 65
          +++++++++++++++++++++++++++++++++++++++++++++++
          <br>
          &nbsp; tests/test_model.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 31 ++++++++++++++++++++++
          <br>
          &nbsp; tests/test_rest.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 36 ++++++++++++++++++++++++++
          <br>
          &nbsp; 8 files changed, 198 insertions(+)
          <br>
          <br>
        </blockquote>
        <br>
        _______________________________________________
        <br>
        Kimchi-devel mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
        <br>
        <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
        <br>
        <br>
      </blockquote>
      <br>
      <br>
      <br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thanks and best regards!

Sheldon Feng(&#20911;&#23569;&#21512;)<a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com">&lt;shaohef@linux.vnet.ibm.com&gt;</a>
IBM Linux Technology Center</pre>
  </body>
</html>