<div dir="ltr"><div>Hitting an issue with icehouse when using python & the keystone api to create a new user.  Have tried both v2.0 and v3 of the api, both failing with the same error. Specifically, the latter part of the exception indicates the value of the domain given in the users.create method isn't being passed on (or so it seems) causing the sql insert to fail.  While I am not passing a domain name when using v2.0 I am when using v3.  <br>
<br></div>Has anyone come up against this before and can offer any advice?<br><div><br>  File "/usr/lib/python2.7/dist-packages/keystoneclient/session.py", line 251, in request<br>    raise exceptions.from_response(resp, method, url)<br>
keystoneclient.apiclient.exceptions.InternalServerError: An unexpected error prevented the server from fulfilling your request. (OperationalError) (1048, "Column 'domain_id' cannot be null") 'INSERT INTO user (id, name, domain_id, password, enabled, extra, default_project_id) VALUES (%s, %s, %s, %s, %s, %s, %s)' ('25119086c00543e9b2237176c8413b9d', 'foo', None, '$6$rounds=40000$CIv4ypG0UQkAU45i$39Y3MbfILnU1KbJtNcuCpIdhL/7cHxWomv6YKDapMx1zTM7Trdzu3rQC.2zWQyNIRrekNMFhaoNttdyHlF5Ca0', 1, '{"email": "<a href="mailto:foo@email.com">foo@email.com</a>"}', 'default') (HTTP 500)<br>
<div><div><div><br><br>#Snippet of V3 code<br>from keystoneclient.v3 import client<br>keystone = client.Client(user_domain_name = "Default",<br>                            username="admin",<br>                            password="xxxxxxxx",<br>
                            project_name="admin",<br>                            auth_url="<a href="http://server:5000/v3/">http://server:5000/v3/</a>")<br><br>keystone.users.create(domain='Default',<br>
                                   name="foo",<br>                                   password="bar",<br>                                   email="<a href="mailto:foo@email.com">foo@email.com</a>",<br>
                                   enabled=True)<br><br></div><div># Snippet of v2 code<br></div><div>from keystoneclient.v2_0 import client<br>keystone = client.Client(username="admin",<br>                                   password="xxxxxxxx",<br>
                                   project_name="admin",<br>                                   auth_url="<a href="http://server:5000/v2.0/">http://server:5000/v2.0/</a>")<br><br>keystone.users.create( name="foo",<br>
                                   password="bar",<br>                                   email="<a href="mailto:foo@email.com">foo@email.com</a>",<br>                                   enabled=True)<br>
<br></div></div></div></div></div>