Users¶
Wraps the chef user account. In order to modify users in chef you will need server admin privledges. Server admins are supported in chef 12.4.1 and above. If you are using an older version of chef server you will have to use the pivotal user (not recommended) to be able to modify users. More info on chef server admins can be found in the chef server admins documentation.
Supported Operations¶
API Reference¶
-
class
pastry.resources.users.
Users
[source]¶ Provides access to the chef users resource
-
classmethod
create
(user)[source]¶ Creates a new chef user on the server
The user hash should be in the form:
{ 'username': <username>, 'display_name': <display_name>, 'first_name': <first name>, 'middle_name': <middle name>, # optional 'last_name': <last name>, 'email': <email>, 'password': <password> }
Parameters: user (hash) – The user to create Returns: The username and url Return type: hash
-
classmethod
delete
(username)[source]¶ Deletes a user from the chef server
Parameters: username – The User’s username Returns: The deleted user’s name Return type: hash
-
classmethod
exists
(username)[source]¶ Checks if a user exists on the chef server
Parameters: username – The User’s username Returns: If the user exists Return type: boolean
-
classmethod
get
(username)[source]¶ Fetches a user from the chef server
Parameters: username (string) – The User’s username Returns: The chef user Return type: hash
-
classmethod
index
()[source]¶ Fetches all of the users on the chef server
Returns: All the chef users with a url for each user Return type: hash
-
classmethod