Comment 2 for bug 1301275

Revision history for this message
wanghong (w-wanghong) wrote : Re: strip the name of keystone objects

An example of creating user:
curl -i -H "X-Auth-Token:admin" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/users -d '{"user":{"name":" test "}}'

{"user": {"name": "test", "links": {"self": "http://192.168.70.108:5000/v3/users/292a99153cae4b70ade647b8ea90e9b4"}, "enabled": true, "id": "292a99153cae4b70ade647b8ea90e9b4", "domain_id": "default"}}

And another example of creating domain:
curl -i -H "X-Auth-Token:admin" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/domains -d '{"domain":{"name":" test "}}'

{"domain": {"enabled": true, "id": "c9326fb776e44ac2bfa404957e92d89c", "links": {"self": "http://192.168.70.108:5000/v3/domains/c9326fb776e44ac2bfa404957e92d89c"}, "name": " test "}}

Please note the *name* parameter in request and response body. " test " will be stripped when creating user, but it does not when creating domain.