Comment 2 for bug 1450414

Revision history for this message
BaoLiang Cui (cuibl) wrote :

>what auth_url are you providing when making the call?
->why do you ask this question? When I made the call. I didn' use the auth_url.

 before I executed [neutron --os-token $token --os-url http://controller:9696 net-list], I got token and set it to $token.
 I got token by the next
 [root@compute01 ~l]# token=`curl -si -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"domain":{"name":"Default"},"name":"admin","password":"fnst1234"}}}}}' -H "Content-type: application/json" http://controller:35357/v3/auth/tokens| awk '/X-Subject-Token/ {print $2}'`

In fact,When I read the code of /usr/lib/python2.6/site-packages/neutronclient/shell.py, I found the problem :
On juno neutronclient,it does not support to get authentication only with os-token and os-url because no matter whether we set os-token or not, it woud try to get token by username and password. but in my call I didn't set the username and password, so it failed.

however, on icehouse neutronclient, this problem does not exist.