'Create a new user account.
:param email: User\'s mail address.
:type email: ``str``
:param password: User\'s password.
:type password: ``str``
:param name: User\'s name.
:type name: ``str``
:param description: Optional description.
:type description: ``str``
:param domain_id: ID of the domain to add the user to (optional).
:type domain_id: ``str``
:param default_project_id: ID of the default user project (optional).
:type default_project_id: ``str``
:param enabled: True to enable user after creation.
:type enabled: ``bool``
:return: Created user.
:rtype: :class:`.OpenStackIdentityUser`'

def create_user(self, email, password, name, description=None, domain_id=None, default_project_id=None, enabled=True):

    data = {'email': email, 'password': password, 'name': name, 'enabled': enabled}
    if description:
        data['description'] = description
    if domain_id:
        data['domain_id'] = domain_id
    if default_project_id:
        data['default_project_id'] = default_project_id
    data = json.dumps({'user': data})
    response = self.authenticated_request('/v3/users', data=data, method='POST')
    user = self._to_user(data=response.object['user'])
    return user
