jumpgate icon indicating copy to clipboard operation
jumpgate copied to clipboard

Adding shared flag support to network v2 list api

Open zhiyanliu opened this issue 10 years ago • 4 comments

As spec defined [0], jumpgate should care about shared flag for network v2 list api. And currently horizon use this flag to obtain shared and non-shared network by two separted calls and orignize network list in GUI [1], so without this fix horizon will get wrong as well.

[0] http://developer.openstack.org/api-ref-networking-v2.html [1] https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/neutron.py#L535

Signed-off-by: Zhi Yan Liu [email protected]

zhiyanliu avatar Nov 17 '14 10:11 zhiyanliu

So in this change, we are asserting that if the REST param shared=True is present, it should return back a { "networks": [] } result.

@sudorandom , do you think that's the way we should have it return list network results? Or should the 'public' networks should be returned with shared=True and not if shared=False?

jimlindeman avatar Nov 20 '14 22:11 jimlindeman

It seems more logical for the public network to show up as a shared network.

Can you explain how Horizon presents the private and public network lists in both cases of (a) the public network only being included when shared=False and (b) the public network only being included when shared=True?

briancline avatar Nov 23 '14 02:11 briancline

@jimlindeman , currently base on the code [0], I think both public and private network are all non-shared.

[0] https://github.com/softlayer/jumpgate/blob/master/jumpgate/network/drivers/sl/networks.py#L61

zhiyanliu avatar Dec 02 '14 06:12 zhiyanliu

@briancline , frankly I'm not familiar with Horizon code so much, the case what I saw in Horizon UI is it shows private and public both networks in VM provisioning dialog, and in Horizon code, the same logic at https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/neutron.py#L535 . Without this change, a network will be duplicated.

zhiyanliu avatar Dec 02 '14 06:12 zhiyanliu