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.


Any help is appreciated.




--
Thanks,
Regards,
AB

Reply via email to