Nodes¶
The groups module adds support for chef nodes.
Supported Operations¶
Exists Check if a node exists Get Acl Fetch a node’s acl Set Permission Set a permission for a node
API Reference¶
-
class
pastry.resources.nodes.
Nodes
[source]¶ Provides access to the chef nodes
-
classmethod
exists
(nodename)[source]¶ Checks if a node exists on the chef server
Parameters: nodename (string) – The Node’s nodename Returns: If the node exists Return type: boolean
-
classmethod
get_acl
(nodename)[source]¶ Gets the access control list for the node
Parameters: nodename (string) – The Node’s nodename Returns: The acl for the node Return type: hash
-
classmethod
set_permission
(nodename, permission, actors)[source]¶ Grants the specified actors a permission on the node. Chef only supports setting one permission at a time.
The actors hash should be in the form:
{ 'actors': <list of usernames> 'groups': <list of groupnames> }
Parameters: - nodename (string) – The Node’s nodename
- permission (string) – One of: create, read, update, delete, grant
- actors (hash) – The set of actors to grant this permission to
Returns: empty hash
Type: hash
-
classmethod