My openstack version is ocata.
In my computer I installed the openstacksdk (0.9.18)
, when I use it to create a openstack user like bellow:
# create openstack user
user_args = {
"default_project_id":new_project.id, # the project is created already, there I did not post here.
"email":email,
"is_enabled":True,
"name":username,
"pasword":password,
}
try:
new_user = super_conn.conn.identity.create_user(**user_args)
except Exception as e:
raise e
try:
role_user = super_conn.conn.identity.find_role(OPENSTACK_ROLE_USER) # there I find the role(user)
new_project.assign_role_to_user(super_conn.conn.session, new_user, role_user) # assign to the new user
new_project.validate_user_has_role(super_conn.conn.session, new_user, role_user)
except Exception as e:
raise e
I have debug the username
and password
in my code, my code is no mistake.
I created the new_user, and I also in openstack dashboard, checked the user and the user's project. But I can not use the username and password to login the openstack dashboard.
Whether there is something wrong with it?
the error means the credentials invalid. So, I use openstack admin user to change the created user's password, then I can login yet.
You didn't mention anything about roles for the user. Maybe the problem is lack of a role of any sort.