From a4ed514a82727f251955e4287dff408f587963dc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 23:35:58 +0100 Subject: [PATCH] begin the "how to write a type" part Signed-off-by: Nico Schottelius --- doc/man/to_check/cdist-type.text | 44 +++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index db77d345..50df4d13 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -1,18 +1,34 @@ -cdist-types(7) -=============== +cdist-type(7) +============== Nico Schottelius NAME ---- -cdist-types - Functionality bundled +cdist-type - Functionality bundled + + +SYNOPSIS +-------- +Other languages name this module or class DESCRIPTION ----------- +Types are the main component of cdist and define functionality. If you +use cdist, you'll write a type for every functionality you would like +to use. + + + +Was man mit cdist type machen kann..... + A cdist type describes some kind of functionality, starting from simple stuff like copying files until complex user auth/ldap/ kerberos infrastructure -designs. The name of every type is prefixed with two underscores (__), because +designs. The name of every type is prefixed with two underscores (__) by convention. + + +, because types will be executed and the two underscores prevent collisions with real binaries (like "file"). In general, types should be written independent of hosts (as in reusable @@ -37,6 +53,26 @@ Every time a type is used, a new object is created of the specific type, with a type specific unique id that stores the parameters +HOW TO WRITE A NEW TYPE +----------------------- +A type consists of + +- parameter (required) +- manifest (optional) +- gencode (optional) +- explorer (optional) + +Types are stored below conf/type/. Their name should always be prefixed with +two underscores (__) to prevent collisions with other binaries in $PATH. + +To begin a new type from a template, execute "cdist-type-template __NAME". + + +DEFINING PARAMETERS +------------------- +Every type consists of optional and + + HOW TO WRITE A NEW TYPE (TODO) ------------------------------ Assume you want to create the new type named "coffee", which creates