On Feb 3, 2014, at 9:23 PM, Shital Patil <[email protected]> wrote:
> 4- I am able to access openstack using curl Can you show us exactly the curl command you’re using to auth? e.g. curl -s -X POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens -d ‘json goes here' -H "Content-type: application/json” Can you show us the exact log output from jclouds? e.g. >> "{"auth":{"passwordCredentials":{"username":"shital.patil","password":"shital123"},"tenantName":"Shital >> Patil"}}" >> POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens HTTP/1.1 >> Accept: application/json >> Content-Type: application/json >> Content-Length: 111 > I have noticed that json object sent to openstack through java code using > jclouds for authentication is same as one sent using curl. Am I missing some > jars? or should I try any newer build of examples? I’ve done my best to reproduce the problem. I created a user and tenant exactly as you have in your cloud. I’m using OpenStack Havana and jclouds 1.7.0. Connecting via curl works. curl -s -X POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens -d '{"auth": {"passwordCredentials": {"username":"shital.patil", "password":"shital123"}, "tenantName":"Shital Patil"}}' -H "Content-type: application/json” Connecting via jclouds works (logging turned on). >> "{"auth":{"passwordCredentials":{"username":"shital.patil","password":"shital123"},"tenantName":"Shital >> Patil"}}" >> POST http://xxx.xxx.xxx.xxx:5000/v2.0/tokens HTTP/1.1 >> Accept: application/json >> Content-Type: application/json >> Content-Length: 111 If you’re JSON matches exactly like mine does above, it should work for you too. HTH, Everett
