<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 07/17/2014 12:00 PM, Sheldon wrote:<br>
    </div>
    <blockquote cite="mid:53C7E527.3070802@linux.vnet.ibm.com"
      type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">On 07/17/2014 09:25 PM, Aline Manera
        wrote:<br>
      </div>
      <blockquote cite="mid:53C7CECC.8050107@linux.vnet.ibm.com"
        type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <br>
        <div class="moz-cite-prefix">On 07/17/2014 01:24 AM, Sheldon
          wrote:<br>
        </div>
        <blockquote cite="mid:53C7500A.7080609@linux.vnet.ibm.com"
          type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          <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 moz-do-not-send="true"
                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
                  moz-do-not-send="true" 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>
        <br>
        data = GET /vms/&lt;my-vm&gt;<br>
        data.passwd<br>
        <br>
        <blockquote cite="mid:53C7500A.7080609@linux.vnet.ibm.com"
          type="cite">
          <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>
        <br>
        You are correct, but disks and ifaces have their own tab on VM
        Edit<br>
        I was thinking in add the password in the VM configuration tab,
        which means use the PUT method<br>
      </blockquote>
      <span class="op_dict3_font24 op_dict3_marginRight">I have no </span><span
        class="op_dict3_font24 op_dict3_marginRight">preference. <br>
        I can change it in the next version. <br>
        <br>
      </span><br>
      <span class="op_dict3_font24 op_dict3_marginRight"><span
          class="op_dict3_font24 op_dict3_marginRight">But we had better
          to get agreement before our patches. Though it is difficult
          sometimes.</span><br>
      </span></blockquote>
    <br>
    Agree<br>
    <br>
    <blockquote cite="mid:53C7E527.3070802@linux.vnet.ibm.com"
      type="cite"><span class="op_dict3_font24 op_dict3_marginRight"> In
        my V1 version I did take </span><span class="op_dict3_font24
        op_dict3_marginRight">passwd as an attribute of VM instead of </span><span
        class="op_dict3_font24 op_dict3_marginRight"><span
          class="op_dict3_font24 op_dict3_marginRight">sub-</span><span
          class="op_dict3_font24 op_dict3_marginRight">resource.<br>
        </span><br>
      </span></blockquote>
    <br>
    Sorry I haven't had chance to review the V1<br>
    <br>
    <blockquote cite="mid:53C7E527.3070802@linux.vnet.ibm.com"
      type="cite"><span class="op_dict3_font24 op_dict3_marginRight"> </span><span
        class="op_dict3_font24 op_dict3_marginRight"><span
          class="op_dict3_font24 op_dict3_marginRight"></span><br>
        Anyway&nbsp; we have get agreement that&nbsp; "have their own tab" is the
        criterion of sub-</span><span class="op_dict3_font24
        op_dict3_marginRight">collection&nbsp; and&nbsp; sub-</span><span
        class="op_dict3_font24 op_dict3_marginRight">resource.<br>
        <br>
        <br>
      </span>
      <blockquote cite="mid:53C7CECC.8050107@linux.vnet.ibm.com"
        type="cite"> <br>
        <blockquote cite="mid:53C7500A.7080609@linux.vnet.ibm.com"
          type="cite">
          <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 moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  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 moz-do-not-send="true" class="moz-txt-link-abbreviated"
                href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
              <br>
              <a moz-do-not-send="true" 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 moz-do-not-send="true" 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>
        </blockquote>
        <br>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Thanks and best regards!

Sheldon Feng(&#20911;&#23569;&#21512;)<a moz-do-not-send="true" 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>
    </blockquote>
    <br>
  </body>
</html>