<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 2014年02月12日 17:15, Alex Xu wrote:<br>
    </div>
    <blockquote cite="mid:52FB3B9F.2070105@linux.vnet.ibm.com"
      type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      Hi, guys,<br>
      <br>
      I'm working neutron network stuff in nova V3 API. We will only
      pass port ids when create server, and<br>
      Nova won't proxy any neutron call in the future. I plan to add new
      v3 network extension, that only<br>
      accept port ids as parameters. And it will pass those port ids in
      the old request_networks parameters.<br>
      (line 50 in
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <a moz-do-not-send="true"
href="https://review.openstack.org/#/c/36615/13/nova/api/openstack/compute/plugins/v3/networks.py">https://review.openstack.org/#/c/36615/13/nova/api/openstack/compute/plugins/v3/networks.py</a>)<br>
      Then other code path is same with before. In next release or when
      we remove nova-network, we<br>
      can add neutron specific code path. But v2 and v3 api's behavior
      is different. I need change something<br>
      before adding new network api. I want to hear you guys' suggestion
      first, ensure I'm working on the right<br>
      way.<br>
      <br>
      <br>
      1. Disable allocate ports automatically when create server without
      any port in v3 api.<br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      When user create server without any port, the new server shouldn't
      be created with any ports in V3.<br>
      But in v2, nova-compute will allocate port from existed networks.
      I plan to pass parameter down to<br>
      nova-compute, that told nova-compute don't allocate ports for new
      server. And also keep old behavior<br>
      for v2 api.<br>
    </blockquote>
    <br>
    reference to <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/73000/">https://review.openstack.org/#/c/73000/</a><br>
    <br>
    <blockquote cite="mid:52FB3B9F.2070105@linux.vnet.ibm.com"
      type="cite"> <br>
      2. Disable delete ports from neutron when remove server in v3 api.<br>
      In v2 api, after remove server, the port that attached to that
      server is removed by nova-compute.<br>
      But in v3 api, we shoudn't proxy any neutron call. Because there
      are some periodic tasks will delete<br>
      servers, just pass a parameter down to nova-compute from api isn't
      enough. So I plan to add a parameter in instance's<br>
      metadata when create server. When remove server, it will check the
      metadata first. If the server is marked as<br>
      created by v3 api, nova-compute won't remove attached neutron
      ports.<br>
    </blockquote>
    <br>
    reference to <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/73001/">https://review.openstack.org/#/c/73001/</a><br>
    <br>
    <blockquote cite="mid:52FB3B9F.2070105@linux.vnet.ibm.com"
      type="cite"> <br>
      3. Enable pass port ids when multiple servers creation.<br>
      Currently multiple_create didn't support pass port ids. And we
      won't allocate ports automatically in v3 api.<br>
      So my plan as below:<br>
      <br>
      When request with max_count=2 and ports=[{'id': 'port_id1'}, 
      {'id': 'port_id2'}, {'id': 'port_id3'}, {'id': 'port_id4}]<br>
      The first server create with ports 'port_id1' and 'port_id2', the
      second server create with ports 'port_id3' and 'port_id4'<br>
      <br>
      When request with max_count=2 and ports = [{'id': 'port_id1'}]<br>
      The request return fault.<br>
      The request must be len(ports) % max_count == 0<br>
      <br>
    </blockquote>
    <br>
    reference to <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/73002/">https://review.openstack.org/#/c/73002/</a><br>
    <br>
    V3 API layer works reference to:<br>
    <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/36615/">https://review.openstack.org/#/c/36615/</a><br>
    <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/42315/">https://review.openstack.org/#/c/42315/</a><br>
    <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/42315/">https://review.openstack.org/#/c/42315/</a><br>
    <br>
    <br>
    <blockquote cite="mid:52FB3B9F.2070105@linux.vnet.ibm.com"
      type="cite"> Thanks<br>
      Alex<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</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>
    <br>
  </body>
</html>