Merge "Angular LI:Make sure we always get all limits"

This commit is contained in:
Jenkins 2016-07-26 23:02:02 +00:00 committed by Gerrit Code Review
commit 7ae9c6317e
4 changed files with 11 additions and 5 deletions

View File

@ -167,8 +167,8 @@ class Limits(generic.View):
The following get parameters may be passed in the GET
request:
:param reserved: This may be set to "true" but it's not
clear what the result of that is.
:param reserved: Take into account the reserved limits. Reserved limits
may be instances in the rebuild process for example.
The result is an object with limits as properties.
"""

View File

@ -223,7 +223,7 @@
novaAPI.getAvailabilityZones().then(onGetAvailabilityZones, noop),
novaAPI.getFlavors(true, true).then(onGetFlavors, noop),
novaAPI.getKeypairs().then(onGetKeypairs, noop),
novaAPI.getLimits().then(onGetNovaLimits, noop),
novaAPI.getLimits(true).then(onGetNovaLimits, noop),
securityGroup.query().then(onGetSecurityGroups, noop),
serviceCatalog.ifTypeEnabled('network').then(getNetworks, noop),
serviceCatalog.ifTypeEnabled('volume').then(getVolumes, noop),

View File

@ -181,8 +181,9 @@
* }
* @returns {Object} The result of the API call
*/
function getLimits() {
return apiService.get('/api/nova/limits/')
function getLimits(reserved) {
var params = { params: {reserved: reserved }};
return apiService.get('/api/nova/limits/', params)
.error(function () {
toastService.add('error', gettext('Unable to retrieve the limits.'));
});

View File

@ -86,6 +86,11 @@
"func": "getLimits",
"method": "get",
"path": "/api/nova/limits/",
"data": {
"params": {
"reserved": undefined
}
},
"error": "Unable to retrieve the limits."
},
{