yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #45485
[Bug 1536586] Re: Angular: neutron.service getPorts is using the wrong call parameters
Reviewed: https://review.openstack.org/270749
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2354efe6caaa2f028bb1587af029410172127ea1
Submitter: Jenkins
Branch: master
commit 2354efe6caaa2f028bb1587af029410172127ea1
Author: Itxaka <iserrano@xxxxxxxxxx>
Date: Thu Jan 21 12:38:39 2016 +0100
Pass the proper params to getPorts call
Fixes the proper params to pass for the neutron ports
call by accepting a dictionary with param_name:value
as this is whats expected from neutron client/API
Change-Id: I75d63f561cac97d2f8e0370f39f260a40029d685
Closes-Bug: #1536586
** Changed in: horizon
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1536586
Title:
Angular: neutron.service getPorts is using the wrong call parameters
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
Looks like our getPorts needs a NetworkId parameter:
@param {string} networkId
* The network id to retrieve ports for. Required.
And it passes it directly to the apiService
return apiService.get('/api/neutron/ports/', networkId)
But looking at other services that accept params for filtering, this does not look like the correct way of doing it, see glance getImages for example:
function getImages(params) {
var config = (params) ? { 'params' : params} : {};
return apiService.get('/api/glance/images/', config)
So when passing anything as networkId, you will always get ALL ports that the tenant has access instead of filtering by network_id.
This should be changed so it looks more like the glance service and a random number of params can be passed to getPorts.
Also while networkId is marked in our code as it being required, its not as per the neutron documentation:
http://developer.openstack.org/api-ref-networking-v2.html#ports
and instead you just use query filtering to filter:
https://wiki.openstack.org/wiki/Neutron/APIv2-specification#Filtering_and_Column_Selection
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1536586/+subscriptions
References