Openstack User Methods

These methods allow you to manage OpenStack users for your account.

This functionality is not available through the OpenStack Identity API.

openstack.user.create()

Create a new OpenStack user.

Parameters:
  • username (String) – 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.
  • password (String) – User password.
  • description (String, Optional) – Description of the user Ensure this value has at most 255 characters.
  • email (String) – The email address of the user Must be a valid email address. Ensure this value has at most 255 characters.
  • enabled (Boolean) – If the user is enabled or not after being created.
Returns:

a dictionary as described in openstack.user.info().

The user name must be unique for your account - if not it returns ApiErrorNotUnique.

User name can only contain numbers, letters, dots, dashes and underscores, and can’t start with a dot. “@<account-name>” will be appended to the user name for use in the Horizon control panel and OpenStack APIs.

openstack.user.delete()

Delete an OpenStack user.

Parameters:username (String) – 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.
Returns:A dictionary as described in job.status().
openstack.user.disable()

Disable a OpenStack user.

A disabled user can’t login to any OpenStack projects or use the OpenStack APIs.

Ensure that openstack.sync_users() is called in order to affect the change in the cloud.

Parameters:username (String) – 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.
openstack.user.enable()

Enable an OpenStack user.

Ensure that openstack.sync_users() is called in order to affect the change in the cloud.

Parameters:username (String) – 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.
openstack.user.info()

Information for an existing OpenStack user.

Parameters:username (String) – 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.
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
openstack.user.list()

List all existing OpenStack users for an account.

Returns:a list of dictionaries where each dictionary is as described in openstack.user.info().

The returned user name must be prepended to ‘@<account-name>’ 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).

openstack.user.set_password()

Set a new password for an existing OpenStack user.

Parameters:
  • username (String) – 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.
  • password (String) – User new password.
Returns:

A dictionary as described in job.status().

Previous topic

Openstack Project Methods

Next topic

Partner Account Methods

This Page