blob: 4e967368b7611c737f6302fd18ae37e56c55c735 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
.. -*- mode: rst -*-
.. _development-cfg:
=======================
Cfg Handler Development
=======================
The :ref:`server-plugins-generators-cfg` plugin offers multiple
handlers to handle different entries in different ways. Writing a new
Cfg handler is a relatively simple way to add significant new features
to Cfg.
Each new Cfg handler must be contained in its own module in
``Bcfg2.Server.Plugins.Cfg``, and the module and class name must be
identical. The name should start with ``Cfg``, and should clearly
indicate which of the handler types it is. A handler class may
implement more than one handler type.
Cfg Handler Types
=================
There are several different types of Cfg handlers. A new handler must
inherit either from one of these classes, or from an existing handler.
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgGenerator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgCreator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgFilter
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgInfo
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgVerifier
Cfg Handler Base Class
======================
In addition to the interfaces defined above, all Cfg handlers inherit
from CfgBaseFileMatcher.
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher
Cfg Exceptions
==============
Cfg handlers may produce the following exceptions:
.. autoexception:: Bcfg2.Server.Plugins.Cfg.CfgVerificationError
.. autoexception:: Bcfg2.Server.Plugins.Cfg.CfgCreationError
In addition, Cfg handlers may produce the following base plugin
exceptions:
.. autoexception:: Bcfg2.Server.Plugin.exceptions.PluginExecutionError
:noindex:
.. autoexception:: Bcfg2.Server.Plugin.exceptions.PluginInitError
:noindex:
Existing Cfg Handlers
=====================
Generators
----------
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgPlaintextGenerator.CfgPlaintextGenerator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgJinja2Generator.CfgJinja2Generator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenshiGenerator.CfgEncryptedGenshiGenerator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.CfgEncryptedCheetahGenerator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgEncryptedJinja2Generator.CfgEncryptedJinja2Generator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator
Creators
--------
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator
Info Handlers
-------------
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML
Verifiers
---------
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.CfgExternalCommandVerifier
Other Cfg Objects
=================
These other objects comprise the remainder of the Cfg plugin, and are
included for completeness.
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgEntrySet
.. autoclass:: Bcfg2.Server.Plugins.Cfg.Cfg
.. automethod:: Bcfg2.Server.Plugins.Cfg.get_cfg
|