On Nov 16, 2014, at 10:51 PM, Alka Beniwal <beniwala...@gmail.com> wrote:
> Hi, > I am developing a code to retrieve total usage of resources in > OpenStack.For that i am using NovaApi extension SimpleTenantUsageExtension. > > *Code*- > SimpleTenantUsageApi > simpleTenantUsageApi=novaApi.getSimpleTenantUsageExtensionForZone(zone).get(); > SimpleTenantUsage > simpleTenantUsage=simpleTenantUsageApi.get("894f600a8bf0tyty37895d"); > Double totalLocalGbUsage=simpleTenantUsage.getTotalLocalGbUsage(); > Double totalMemoryMbUsage=simpleTenantUsage.getTotalMemoryMbUsage(); > Double totalVcpusUsage=simpleTenantUsage.getTotalVcpusUsage(); > where 894f600a8bf0tyty37895d is Admin Project id. > > > > *Error-* > org.jclouds.http.HttpResponseException: command: GET > http://controller:8774/v2/ 894f600a8bf0tyty37895d/os-simple-tenant-usage > HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: > [{"badRequest": {"message": "The server could not comply with the request > since it is either malformed or otherwise incorrect.", "code": 400}}] > > > I am getting output by using same thing with curl command in terminal but > in Eclipse its not working. Are you saying you get the same error when you try it with curl? If so, the problem may be with your OpenStack setup. If not, there may be a bug here. Please go through the guide on how to report a bug [1] so we can get a better idea of what the problem is. Thanks, Everett [1] http://jclouds.apache.org/reference/report-a-bug/