.. meta:: :description: This documentation will guide you through the use of the Memset API. .. index:: double: Methods; openstack.user .. _openstack.user: Openstack User Methods ---------------------- These methods allow you to manage OpenStack users for your account. This functionality is not available through the OpenStack Identity API. .. function:: openstack.user.create Create a new OpenStack user. :param username: The username Username can only contain numbers, letters, dots, dashes and underscores, and can't start with a dot. Ensure this value has at most 50 characters. :type username: String :param password: User password. :type password: String :param description: Description of the user Ensure this value has at most 255 characters. :type description: String, Optional :param email: The email address of the user Must be a valid email address. Ensure this value has at most 255 characters. :type email: String :param enabled: If the user is enabled or not after being created. :type enabled: Boolean :returns: a dictionary as described in :func:`openstack.user.info`. The user name must be unique for your account - if not it returns :class:`ApiErrorNotUnique`. User name can only contain numbers, letters, dots, dashes and underscores, and can't start with a dot. "@" will be appended to the user name for use in the Horizon control panel and OpenStack APIs. .. function:: openstack.user.delete Delete an OpenStack user. :param username: The username Username can only contain numbers, letters, dots, dashes and underscores, and can't start with a dot. Ensure this value has at most 50 characters. :type username: String :returns: A dictionary as described in :func:`job.status`. .. function:: openstack.user.disable Disable a OpenStack user. A disabled user can't login to any OpenStack projects or use the OpenStack APIs. Ensure that :func:`openstack.sync_users` is called in order to affect the change in the cloud. :param username: The username Username can only contain numbers, letters, dots, dashes and underscores, and can't start with a dot. Ensure this value has at most 50 characters. :type username: String .. function:: openstack.user.enable Enable an OpenStack user. Ensure that :func:`openstack.sync_users` is called in order to affect the change in the cloud. :param username: The username Username can only contain numbers, letters, dots, dashes and underscores, and can't start with a dot. Ensure this value has at most 50 characters. :type username: String .. function:: openstack.user.info Information for an existing OpenStack user. :param username: The username Username can only contain numbers, letters, dots, dashes and underscores, and can't start with a dot. Ensure this value has at most 50 characters. :type username: String :returns: a dictionary with the following keys: **username** String: Name of the user. **description** String: Description of the user **email** String: Email address of the user **enabled**: Boolean: If the user is enabled or not. **projects** List of Dictionaries: The OpenStack projects that this user has access to described as a dictionary with the following keys: **name** String: The name of the project **id** String: The id of the project .. function:: openstack.user.list List all existing OpenStack users for an account. :returns: a list of dictionaries where each dictionary is as described in :func:`openstack.user.info`. The returned user name must be prepended to '@' to get the keystone username for authentication purposes in the Horizon control panel or OpenStack APIs (e.g. the username *alice* for account *aliciaa* would be *alice@aliciaa*). .. function:: openstack.user.set_password Set a new password for an existing OpenStack user. :param username: The username Username can only contain numbers, letters, dots, dashes and underscores, and can't start with a dot. Ensure this value has at most 50 characters. :type username: String :param password: User new password. :type password: String :returns: A dictionary as described in :func:`job.status`.