[openstack-dev] [Nova][Neutron] Neutron network in Nova V3 API

Alex Xu xuhj at linux.vnet.ibm.com
Wed Feb 12 17:31:17 UTC 2014


On 2014?02?12? 17:15, Alex Xu wrote:
> Hi, guys,
>
> I'm working neutron network stuff in nova V3 API. We will only pass 
> port ids when create server, and
> Nova won't proxy any neutron call in the future. I plan to add new v3 
> network extension, that only
> accept port ids as parameters. And it will pass those port ids in the 
> old request_networks parameters.
> (line 50 in 
> https://review.openstack.org/#/c/36615/13/nova/api/openstack/compute/plugins/v3/networks.py)
> Then other code path is same with before. In next release or when we 
> remove nova-network, we
> can add neutron specific code path. But v2 and v3 api's behavior is 
> different. I need change something
> before adding new network api. I want to hear you guys' suggestion 
> first, ensure I'm working on the right
> way.
>
>
> 1. Disable allocate ports automatically when create server without any 
> port in v3 api.
> When user create server without any port, the new server shouldn't be 
> created with any ports in V3.
> But in v2, nova-compute will allocate port from existed networks. I 
> plan to pass parameter down to
> nova-compute, that told nova-compute don't allocate ports for new 
> server. And also keep old behavior
> for v2 api.

reference to https://review.openstack.org/#/c/73000/

>
> 2. Disable delete ports from neutron when remove server in v3 api.
> In v2 api, after remove server, the port that attached to that server 
> is removed by nova-compute.
> But in v3 api, we shoudn't proxy any neutron call. Because there are 
> some periodic tasks will delete
> servers, just pass a parameter down to nova-compute from api isn't 
> enough. So I plan to add a parameter in instance's
> metadata when create server. When remove server, it will check the 
> metadata first. If the server is marked as
> created by v3 api, nova-compute won't remove attached neutron ports.

reference to https://review.openstack.org/#/c/73001/

>
> 3. Enable pass port ids when multiple servers creation.
> Currently multiple_create didn't support pass port ids. And we won't 
> allocate ports automatically in v3 api.
> So my plan as below:
>
> When request with max_count=2 and ports=[{'id': 'port_id1'}, {'id': 
> 'port_id2'}, {'id': 'port_id3'}, {'id': 'port_id4}]
> The first server create with ports 'port_id1' and 'port_id2', the 
> second server create with ports 'port_id3' and 'port_id4'
>
> When request with max_count=2 and ports = [{'id': 'port_id1'}]
> The request return fault.
> The request must be len(ports) % max_count == 0
>

reference to https://review.openstack.org/#/c/73002/

V3 API layer works reference to:
https://review.openstack.org/#/c/36615/
https://review.openstack.org/#/c/42315/
https://review.openstack.org/#/c/42315/


> Thanks
> Alex
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140213/815bba02/attachment.html>


More information about the OpenStack-dev mailing list