Merge "Pass the proper params to getPorts call"
This commit is contained in:
commit
2faa5d2ed6
@ -220,11 +220,42 @@
|
|||||||
* The listing result is an object with property "items". Each item is
|
* The listing result is an object with property "items". Each item is
|
||||||
* a port.
|
* a port.
|
||||||
*
|
*
|
||||||
* @param {string} networkId
|
* @param {string} params.status
|
||||||
* The network id to retrieve ports for. Required.
|
* The port status. Value is ACTIVE or DOWN.
|
||||||
|
*
|
||||||
|
* @param {string} params.display_name
|
||||||
|
* The port name.
|
||||||
|
*
|
||||||
|
* @param {boolean} params.admin_state
|
||||||
|
* The administrative state of the router, which is up (true) or down (false).
|
||||||
|
*
|
||||||
|
* @param {string} params.network_id
|
||||||
|
* The UUID of the attached network.
|
||||||
|
*
|
||||||
|
* @param {string} params.tenant_id
|
||||||
|
* The UUID of the tenant who owns the network.
|
||||||
|
* Only administrative users can specify a tenant UUID other than their own.
|
||||||
|
* You cannot change this value through authorization policies.
|
||||||
|
*
|
||||||
|
* @param {string} params.device_owner
|
||||||
|
* The UUID of the entity that uses this port. For example, a DHCP agent.
|
||||||
|
*
|
||||||
|
* @param {string} params.mac_address
|
||||||
|
* The MAC address of the port.
|
||||||
|
*
|
||||||
|
* @param {string} params.port_id
|
||||||
|
* The UUID of the port.
|
||||||
|
*
|
||||||
|
* @param {Array} params.security_groups
|
||||||
|
* The UUIDs of any attached security groups.
|
||||||
|
*
|
||||||
|
* @param {string} params.device_id
|
||||||
|
* The UUID of the device that uses this port. For example, a virtual server.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
function getPorts(networkId) {
|
function getPorts(params) {
|
||||||
return apiService.get('/api/neutron/ports/', networkId)
|
var config = (params) ? { 'params' : params} : {};
|
||||||
|
return apiService.get('/api/neutron/ports/', config)
|
||||||
.error(function () {
|
.error(function () {
|
||||||
toastService.add('error', gettext('Unable to retrieve the ports.'));
|
toastService.add('error', gettext('Unable to retrieve the ports.'));
|
||||||
});
|
});
|
||||||
|
@ -81,10 +81,16 @@
|
|||||||
"func": "getPorts",
|
"func": "getPorts",
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"path": "/api/neutron/ports/",
|
"path": "/api/neutron/ports/",
|
||||||
"data": 42,
|
"data": {
|
||||||
|
params: {
|
||||||
|
network_id: 42
|
||||||
|
}
|
||||||
|
},
|
||||||
"error": "Unable to retrieve the ports.",
|
"error": "Unable to retrieve the ports.",
|
||||||
"testInput": [
|
"testInput": [
|
||||||
42
|
{
|
||||||
|
network_id: 42
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user