/** * @param projectId * @return { "total":{quota object}, "left":{quota object} } */ @RequestMapping(method = RequestMethod.GET) public JsonObject getAllQuota(@RequestHeader(value = "project-id") String projectId) throws VimException, PluginException { JsonObject result = new JsonObject(); result.add( "total", gson.fromJson(gson.toJson(quotaManagement.getAllQuota(projectId)), JsonObject.class)); result.add( "left", gson.fromJson(gson.toJson(quotaManagement.getLeftQuota(projectId)), JsonObject.class)); return result; } }