Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Adding shared flag support to network v2 list api #160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding shared flag support to network v2 list api #160

wants to merge 1 commit into from

Conversation

zhiyanliu
Copy link
Contributor

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]

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]>
@jimlindeman
Copy link
Contributor

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?

@briancline
Copy link
Member

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?

@zhiyanliu
Copy link
Contributor Author

@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
Copy link
Contributor Author

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants