To create a new OpenStack user using the Python SDK, we first need to define the properties of the user. A Python dictionary is used to define the properties of the user.
A new OpenStack user can be created by simply invoking the create_user() and passing the Python dictionary to the function:
def create_user(conn):
user_parameters = {
"default_project_id":"demo",
"email":"[email protected]",
"is_enabled":True,
"name":"packtpub1",
"pasword":"secret",
}
conn.identity.create_user(**user_parameters)