<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-08-02 22:09 GMT+08:00 Matt Riedemann <span dir="ltr"><<a href="mailto:mriedem@linux.vnet.ibm.com" target="_blank">mriedem@linux.vnet.ibm.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 8/2/2016 2:41 AM, Alex Xu wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
A little strange we have two API endpoints, one is<br>
'/servers/{uuid}/os-interfaces', another one is<br>
'/servers/{uuid}/os-virtual-interfaces'.<br>
<br>
I prefer to keep os-attach-interface. Due to I think we should deprecate<br>
the nova-network also. Actually we deprecate all the nova-network<br>
related API in the 2.36 also. And os-attach-interface didn't support<br>
nova-network, then it is the right choice.<br>
<br>
So we can deprecate the os-virtual-interface in newton. And in Ocata, we<br>
correct the implementation to get the vif info and tag.<br>
os-attach-interface actually accept the server_id, and there is check<br>
ensure the port belong to the server. So it shouldn't very hard to get<br>
the vif info and tag.<br>
<br>
And sorry for I missed that when coding patches also...let me if you<br>
need any help at here.<br>
<br>
<br>
<br>
    --<br>
<br>
    Thanks,<br>
<br>
    Matt Riedemann<br>
<br>
<br>
<br>
    __________________________________________________________________________<br>
    OpenStack Development Mailing List (not for usage questions)<br>
    Unsubscribe:<br>
    <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br></span>
    <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><span class=""><br>
    <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
<br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</span></blockquote>
<br>
Alex,<br>
<br>
os-interface will be deprecated, that's the APIs to show/list ports for a given server.<br>
<br>
os-virtual-interfaces is not the same, and was never a proxy for neutron since before 2.32 we never stored anything in the virtual_interfaces table in the nova database for neutron, but now we do because that's where we store the VIF tags.<br>
<br>
We have to keep os-attach-interface (attach/detach interface actions on a server).<br>
<br>
Are you suggesting we drop os-virtual-interfaces and change the behavior of os-interfaces to use the nova virtual_interfaces table rather than proxying to neutron?<br></blockquote><div><br></div><div>Yes, but I missed the point your point out as below. The reason is that if we only deprecate the GET of os-interface, then when user want to add interface, user needs to send request 'POST /servers/{uuid}/os-interface'. When user want to query the interface which attach to the server, user needs send request to 'GET /servers/{uuid}/os-virtual-interfaces'. That means user access one resource but they are under different API endpoint.</div><div><br></div><div>Initially I think we can use virtual_interface table to reimplement the GET of os-interface'. But as you pointed out, neutron ports won't show if it is created before Newton. That means we change the os-interface behaviour in old Microversion. Emm... I'm a little hesitate.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Note that with os-virtual-interfaces even if we start showing VIFs for neutron ports, any ports created before Newton won't be in there, which might be a bit confusing.</blockquote><div><br></div><div>If we keep the os-virtual-interfaces, but we can't ensure this API works for all the instances forever. Due to we can't ensure there won't any old instance which created before Newton in user's cloud.</div><div><br></div><div>So.. one idea, we keep the GET of os-interface, deprecate the os-virtual-interfaces in Newton. In Ocata, we use virtual_interface table/object instead of neutron API proxy, but we fallback to proxy neutron API when the instance haven't virtual_interface table( this is detected by compare the network_info_cache, instance have vif in network_info_cace, but no entry in virtual_interface table.).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
<br>
Thanks,<br>
<br>
Matt Riedemann<br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>