Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > b50d8ee6d7871fcc13c0677a9364ed59 > files > 354

bcfg2-doc-1.3.0-1.fc17.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Cfg Handler Development &mdash; Bcfg2 1.3.0 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.3.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="Bcfg2 1.3.0 documentation" href="../index.html" />
    <link rel="up" title="Bcfg2 Plugin development" href="plugins.html" />
    <link rel="next" title="Developing for Packages" href="packages.html" />
    <link rel="prev" title="Bcfg2 Plugin development" href="plugins.html" />
 
<link rel="stylesheet" href="../_static/bcfg2.css" type=""/>

  </head>
  <body>

<div style="text-align: left; padding: 10px 10px 15px 15px">
<a href="../index.html"><img src="../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a>
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="packages.html" title="Developing for Packages"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="plugins.html" title="Bcfg2 Plugin development"
             accesskey="P">previous</a> |</li>
	<li><a href="../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../contents.html">documentation </a> &raquo;</li>

          <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="index.html" >Bcfg2 Development</a> &raquo;</li>
          <li><a href="plugins.html" accesskey="U">Bcfg2 Plugin development</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="cfg-handler-development">
<span id="development-cfg"></span><h1>Cfg Handler Development<a class="headerlink" href="#cfg-handler-development" title="Permalink to this headline">¶</a></h1>
<p>The <a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> 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.</p>
<p>Each new Cfg handler must be contained in its own module in
<tt class="docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg</span></tt>, and the module and class name must be
identical.  The name should start with <tt class="docutils literal"><span class="pre">Cfg</span></tt>, and should clearly
indicate which of the handler types it is.  A handler class may
implement more than one handler type.</p>
<div class="section" id="cfg-handler-types">
<h2>Cfg Handler Types<a class="headerlink" href="#cfg-handler-types" title="Permalink to this headline">¶</a></h2>
<p>There are several different types of Cfg handlers.  A new handler must
inherit either from one of these classes, or from an existing handler.</p>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgGenerator</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher</span></tt></a></p>
<p>CfgGenerators generate the initial content of a file. Every
valid <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet" title="Bcfg2.Server.Plugins.Cfg.CfgEntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgEntrySet</span></tt></a> must have at
least one file handled by a CfgGenerator.  Moreover, each
CfgEntrySet must have one unambiguously best handler for each
client. See <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a> for more
details on how the best handler is chosen.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgGenerator.get_data">
<tt class="descname">get_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgGenerator.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator.get_data" title="Permalink to this definition">¶</a></dt>
<dd><p>get_data() returns the initial data of a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to generate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to generate data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCreator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgCreator</tt><big>(</big><em>fname</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgCreator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher</span></tt></a></p>
<p>CfgCreator handlers create static entry data if no generator
was found to generate any.  A CfgCreator runs at most once per
client, writes its data to disk as a static file, and is not
called on subsequent runs by the same client.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCreator.__specific__">
<tt class="descname">__specific__</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.__specific__" title="Permalink to this definition">¶</a></dt>
<dd><p>CfgCreators generally store their configuration in a single XML
file, and are thus not specific</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCreator.create_data">
<tt class="descname">create_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgCreator.create_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.create_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Create new data for the given entry and write it to disk
using <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data" title="Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data"><tt class="xref py py-func docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to create data for.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to create data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">string - The contents of the entry</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreationError" title="Bcfg2.Server.Plugins.Cfg.CfgCreationError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreationError</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCreator.experimental">
<tt class="descname">experimental</tt><em class="property"> = True</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.experimental" title="Permalink to this definition">¶</a></dt>
<dd><p>The CfgCreator interface is experimental at this time</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCreator.get_filename">
<tt class="descname">get_filename</tt><big>(</big><em>host=None</em>, <em>group=None</em>, <em>prio=0</em>, <em>ext=''</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgCreator.get_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.get_filename" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the filename where the new data will be written.  If
<tt class="docutils literal"><span class="pre">host</span></tt> is given, it will be host-specific.  It will be
group-specific if <tt class="docutils literal"><span class="pre">group</span></tt> and <tt class="docutils literal"><span class="pre">prio</span></tt> are given.  If
neither <tt class="docutils literal"><span class="pre">host</span></tt> nor <tt class="docutils literal"><span class="pre">group</span></tt> is given, the filename will be
non-specific.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>host</strong> (<em>bool</em>) &#8211; The file applies to the given host</li>
<li><strong>group</strong> (<em>string</em>) &#8211; The file applies to the given group</li>
<li><strong>prio</strong> (<em>string</em>) &#8211; The file has the given priority relative to other
objects that also apply to the same group.
<tt class="docutils literal"><span class="pre">group</span></tt> must also be specified.</li>
<li><strong>ext</strong> &#8211; An extension to add after the specificity (e.g.,
&#8216;.crypt&#8217;, to signal that an encrypted file has
been created)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the filename</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data">
<tt class="descname">write_data</tt><big>(</big><em>data</em>, <em>host=None</em>, <em>group=None</em>, <em>prio=0</em>, <em>ext=''</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgCreator.write_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the new data to disk.  If <tt class="docutils literal"><span class="pre">host</span></tt> is given, it is
written as a host-specific file, or as a group-specific file
if <tt class="docutils literal"><span class="pre">group</span></tt> and <tt class="docutils literal"><span class="pre">prio</span></tt> are given.  If neither <tt class="docutils literal"><span class="pre">host</span></tt> nor
<tt class="docutils literal"><span class="pre">group</span></tt> is given, it will be written as a non-specific file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>string</em>) &#8211; The data to write</li>
<li><strong>host</strong> (<em>bool</em>) &#8211; The data applies to the given host</li>
<li><strong>group</strong> (<em>string</em>) &#8211; The data applies to the given group</li>
<li><strong>prio</strong> (<em>string</em>) &#8211; The data has the given priority relative to other
objects that also apply to the same group.
<tt class="docutils literal"><span class="pre">group</span></tt> must also be specified.</li>
<li><strong>ext</strong> &#8211; An extension to add after the specificity (e.g.,
&#8216;.crypt&#8217;, to signal that an encrypted file has
been created)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">None</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreationError" title="Bcfg2.Server.Plugins.Cfg.CfgCreationError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreationError</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgFilter">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgFilter</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher</span></tt></a></p>
<p>CfgFilters modify the initial content of a file after it has
been generated by a <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgFilter.modify_data">
<tt class="descname">modify_data</tt><big>(</big><em>entry</em>, <em>metadata</em>, <em>data</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgFilter.modify_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgFilter.modify_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Return new data for the entry, based on the initial data
produced by the <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to filter data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to filter data for.</li>
<li><strong>data</strong> (<em>string</em>) &#8211; The initial contents of the entry produced by the
CfgGenerator</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the new contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfo">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgInfo</tt><big>(</big><em>fname</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher</span></tt></a></p>
<p>CfgInfo handlers provide metadata (owner, group, paranoid,
etc.) for a file entry.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfo.__specific__">
<tt class="descname">__specific__</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfo.__specific__" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether or not the files handled by this handler are permitted
to have specificity indicators in their filenames &#8211; e.g.,
<tt class="docutils literal"><span class="pre">.H_client.example.com</span></tt> or <tt class="docutils literal"><span class="pre">.G10_foogroup</span></tt>.  By default
CfgInfo handlers do not allow specificities</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfo._set_info">
<tt class="descname">_set_info</tt><big>(</big><em>entry</em>, <em>info</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgInfo._set_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfo._set_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Helper function to assign a dict of info attributes to an
entry object.  <tt class="docutils literal"><span class="pre">entry</span></tt> is modified in-place.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to bind the info to</li>
<li><strong>info</strong> (<em>dict</em>) &#8211; A dict of attribute: value pairs</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfo.bind_info_to_entry">
<tt class="descname">bind_info_to_entry</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgInfo.bind_info_to_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfo.bind_info_to_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Assign the appropriate attributes to the entry, modifying
it in place.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to bind the info to</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to get info for</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgVerifier">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgVerifier</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgVerifier"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgVerifier" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher</span></tt></a></p>
<p>CfgVerifier handlers validate entry data once it has been
generated, filtered, and info applied.  Validation can be enabled
or disabled in the configuration.  Validation can apply to the
contents of an entry, the attributes on it (e.g., owner, group,
etc.), or both.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgVerifier.verify_entry">
<tt class="descname">verify_entry</tt><big>(</big><em>entry</em>, <em>metadata</em>, <em>data</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgVerifier.verify_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgVerifier.verify_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform entry contents. validation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to validate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.  Info attributes have
been bound to the entry, but the text data has
not been set.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to validate data for.</li>
<li><strong>data</strong> (<em>string</em>) &#8211; The contents of the entry</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">None</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgVerificationError" title="Bcfg2.Server.Plugins.Cfg.CfgVerificationError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgVerificationError</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="cfg-handler-base-class">
<h2>Cfg Handler Base Class<a class="headerlink" href="#cfg-handler-base-class" title="Permalink to this headline">¶</a></h2>
<p>In addition to the interfaces defined above, all Cfg handlers inherit
from CfgBaseFileMatcher.</p>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgBaseFileMatcher</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgBaseFileMatcher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.SpecificData" title="Bcfg2.Server.Plugin.helpers.SpecificData"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.SpecificData</span></tt></a>, <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.base.Debuggable" title="Bcfg2.Server.Plugin.base.Debuggable"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.base.Debuggable</span></tt></a></p>
<p>CfgBaseFileMatcher is the parent class for all Cfg handler
objects.</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">param name:</th><td class="field-body">The full path to the file</td>
</tr>
<tr class="field-even field"><th class="field-name">type name:</th><td class="field-body">string</td>
</tr>
<tr class="field-odd field"><th class="field-name">param specific:</th><td class="field-body">A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</td>
</tr>
<tr class="field-even field"><th class="field-name">type specific:</th><td class="field-body">Bcfg2.Server.Plugin.helpers.Specificity</td>
</tr>
<tr class="field-odd field"><th class="field-name">param encoding:</th><td class="field-body">The encoding to use for data in this file</td>
</tr>
<tr class="field-even field"><th class="field-name">type encoding:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</div></blockquote>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__">
<tt class="descname">__basenames__</tt><em class="property"> = []</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__" title="Permalink to this definition">¶</a></dt>
<dd><p>The set of filenames handled by this handler.  If
<tt class="docutils literal"><span class="pre">__basenames__</span></tt> is the empty list, then the basename of each
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet" title="Bcfg2.Server.Plugins.Cfg.CfgEntrySet"><tt class="xref py py-class docutils literal"><span class="pre">CfgEntrySet</span></tt></a> is used &#8211; i.e., the name of the directory
that contains the file is used for the basename.</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__extensions__">
<tt class="descname">__extensions__</tt><em class="property"> = []</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__extensions__" title="Permalink to this definition">¶</a></dt>
<dd><p>This handler only handles files with the listed extensions
(which come <em>after</em> <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__specific__" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__specific__"><tt class="xref py py-attr docutils literal"><span class="pre">CfgBaseFileMatcher.__specific__</span></tt></a>
indicators).</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__ignore__">
<tt class="descname">__ignore__</tt><em class="property"> = []</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__ignore__" title="Permalink to this definition">¶</a></dt>
<dd><p>This handler ignores all files with the listed extensions.  A
file that is ignored by a handler will not be handled by any
other handlers; that is, a file is ignored if any handler
ignores it.  Ignoring a file is not simply a means to defer
handling of that file to another handler.</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__specific__">
<tt class="descname">__specific__</tt><em class="property"> = True</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__specific__" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether or not the files handled by this handler are permitted
to have specificity indicators in their filenames &#8211; e.g.,
<tt class="docutils literal"><span class="pre">.H_client.example.com</span></tt> or <tt class="docutils literal"><span class="pre">.G10_foogroup</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__priority__">
<tt class="descname">__priority__</tt><em class="property"> = 0</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__priority__" title="Permalink to this definition">¶</a></dt>
<dd><p>Cfg handlers are checked in ascending order of priority to see
if they handle a given event.  If this explicit priority is not
set, then <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgPlaintextGenerator.CfgPlaintextGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgPlaintextGenerator.CfgPlaintextGenerator"><tt class="xref py py-class docutils literal"><span class="pre">CfgPlaintextGenerator.CfgPlaintextGenerator</span></tt></a>
would match against nearly every other sort of generator file
if it comes first.  It&#8217;s not necessary to set <tt class="docutils literal"><span class="pre">__priority__</span></tt>
on handlers where <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__specific__" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__specific__"><tt class="xref py py-attr docutils literal"><span class="pre">CfgBaseFileMatcher.__specific__</span></tt></a> is
False, since they don&#8217;t have a potentially open-ended regex</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.deprecated">
<tt class="descname">deprecated</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.deprecated" title="Permalink to this definition">¶</a></dt>
<dd><p>Flag to indicate a deprecated handler.</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.experimental">
<tt class="descname">experimental</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.experimental" title="Permalink to this definition">¶</a></dt>
<dd><p>Flag to indicate an experimental handler.</p>
</dd></dl>

<dl class="classmethod">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.get_regex">
<em class="property">classmethod </em><tt class="descname">get_regex</tt><big>(</big><em>basenames</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgBaseFileMatcher.get_regex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.get_regex" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a compiled regular expression to match filenames (not
full paths) that this handler handles.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>basename</strong> (<em>string</em>) &#8211; The base filename to use if
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__"><tt class="xref py py-attr docutils literal"><span class="pre">CfgBaseFileMatcher.__basenames__</span></tt></a>
is not defined (i.e., the name of the
directory that contains the files the regex
will be applied to)</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">compiled regex</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.handles">
<em class="property">classmethod </em><tt class="descname">handles</tt><big>(</big><em>event</em>, <em>basename=None</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgBaseFileMatcher.handles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.handles" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if this handler handles the file described by
<tt class="docutils literal"><span class="pre">event</span></tt>.  This is faster than just applying
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.get_regex" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.get_regex"><tt class="xref py py-func docutils literal"><span class="pre">CfgBaseFileMatcher.get_regex()</span></tt></a>
because it tries to do non-regex matching first.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The FAM event to check</li>
<li><strong>basename</strong> (<em>string</em>) &#8211; The base filename to use if
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__"><tt class="xref py py-attr docutils literal"><span class="pre">CfgBaseFileMatcher.__basenames__</span></tt></a>
is not defined (i.e., the name of the
directory that contains the files the regex
will be applied to)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">bool - True if this handler handles the file listed
in the event, False otherwise.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.ignore">
<em class="property">classmethod </em><tt class="descname">ignore</tt><big>(</big><em>event</em>, <em>basename=None</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgBaseFileMatcher.ignore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.ignore" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if this handler ignores the file described by
<tt class="docutils literal"><span class="pre">event</span></tt>.  See
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__ignore__" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__ignore__"><tt class="xref py py-attr docutils literal"><span class="pre">CfgBaseFileMatcher.__ignore__</span></tt></a>
for more information on how ignoring files works.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The FAM event to check</li>
<li><strong>basename</strong> (<em>string</em>) &#8211; The base filename to use if
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__" title="Bcfg2.Server.Plugins.Cfg.CfgBaseFileMatcher.__basenames__"><tt class="xref py py-attr docutils literal"><span class="pre">CfgBaseFileMatcher.__basenames__</span></tt></a>
is not defined (i.e., the name of the
directory that contains the files the regex
will be applied to)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">bool - True if this handler handles the file listed
in the event, False otherwise.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="cfg-exceptions">
<h2>Cfg Exceptions<a class="headerlink" href="#cfg-exceptions" title="Permalink to this headline">¶</a></h2>
<p>Cfg handlers may produce the following exceptions:</p>
<dl class="exception">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgVerificationError">
<em class="property">exception </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgVerificationError</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgVerificationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgVerificationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Raised by
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgVerifier.verify_entry" title="Bcfg2.Server.Plugins.Cfg.CfgVerifier.verify_entry"><tt class="xref py py-func docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgVerifier.verify_entry()</span></tt></a> when an
entry fails verification</p>
</dd></dl>

<dl class="exception">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCreationError">
<em class="property">exception </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgCreationError</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgCreationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCreationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Raised by
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.create_data" title="Bcfg2.Server.Plugins.Cfg.CfgCreator.create_data"><tt class="xref py py-func docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreator.create_data()</span></tt></a> when data
creation fails</p>
</dd></dl>

<p>In addition, Cfg handlers may produce the following base plugin
exceptions:</p>
<dl class="exception">
<dt>
<em class="property">exception </em><tt class="descclassname">Bcfg2.Server.Plugin.exceptions.</tt><tt class="descname">PluginExecutionError</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugin/exceptions.html#PluginExecutionError"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Error raised in case of
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.base.Plugin" title="Bcfg2.Server.Plugin.base.Plugin"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.base.Plugin</span></tt></a> execution errors.</p>
</dd></dl>

<dl class="exception">
<dt>
<em class="property">exception </em><tt class="descclassname">Bcfg2.Server.Plugin.exceptions.</tt><tt class="descname">PluginInitError</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugin/exceptions.html#PluginInitError"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Error raised in cases of
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.base.Plugin" title="Bcfg2.Server.Plugin.base.Plugin"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.base.Plugin</span></tt></a> initialization errors.</p>
</dd></dl>

</div>
<div class="section" id="global-variables">
<h2>Global Variables<a class="headerlink" href="#global-variables" title="Permalink to this headline">¶</a></h2>
<dl class="data">
<dt id="Bcfg2.Server.Plugins.Cfg.SETUP">
<tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">SETUP</tt><em class="property"> = None</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.SETUP" title="Permalink to this definition">¶</a></dt>
<dd><p>SETUP contains a reference to the
<tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Options.OptionParser</span></tt> created by the Bcfg2 core for
parsing command-line and config file options.
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.Cfg" title="Bcfg2.Server.Plugins.Cfg.Cfg"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.Cfg</span></tt></a> stores it in a module global
so that the handler objects can access it, because there is no other
facility for passing a setup object from a
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.GroupSpool" title="Bcfg2.Server.Plugin.helpers.GroupSpool"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.GroupSpool</span></tt></a> to its
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a> objects and thence to
the EntrySet children.</p>
</dd></dl>

<dl class="data">
<dt id="Bcfg2.Server.Plugins.Cfg.CFG">
<tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CFG</tt><em class="property"> = None</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CFG" title="Permalink to this definition">¶</a></dt>
<dd><p>CFG is a reference to the <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.Cfg" title="Bcfg2.Server.Plugins.Cfg.Cfg"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.Cfg</span></tt></a>
plugin object created by the Bcfg2 core.  This is provided so that
the handler objects can access it as necessary, since the existing
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.GroupSpool" title="Bcfg2.Server.Plugin.helpers.GroupSpool"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.GroupSpool</span></tt></a> and
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a> classes have no
facility for passing it otherwise.</p>
</dd></dl>

</div>
<div class="section" id="existing-cfg-handlers">
<h2>Existing Cfg Handlers<a class="headerlink" href="#existing-cfg-handlers" title="Permalink to this headline">¶</a></h2>
<div class="section" id="generators">
<h3>Generators<a class="headerlink" href="#generators" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPlaintextGenerator.CfgPlaintextGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgPlaintextGenerator.</tt><tt class="descname">CfgPlaintextGenerator</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPlaintextGenerator.html#CfgPlaintextGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPlaintextGenerator.CfgPlaintextGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a></p>
<p>CfgPlaintextGenerator is a
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a> that handles plain
text (i.e., non-templated) <a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a>
files. The base Generator class already implements this
functionality, so CfgPlaintextGenerator doesn&#8217;t need to do
anything itself.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.</tt><tt class="descname">CfgGenshiGenerator</tt><big>(</big><em>fname</em>, <em>spec</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.html#CfgGenshiGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a></p>
<p>The CfgGenshiGenerator allows you to use the <a class="reference external" href="http://genshi.edgewall.org">Genshi</a> templating system to generate
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> files.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator.get_data">
<tt class="descname">get_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.html#CfgGenshiGenerator.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator.get_data" title="Permalink to this definition">¶</a></dt>
<dd><p>get_data() returns the initial data of a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to generate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to generate data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.html#CfgGenshiGenerator.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator.pyerror_re">
<tt class="descname">pyerror_re</tt><em class="property"> = &lt;_sre.SRE_Pattern object at 0x9657fc0&gt;</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator.pyerror_re" title="Permalink to this definition">¶</a></dt>
<dd><p>Error-handling in Genshi is pretty obtuse.  This regex is used
to extract the first line of the code block that raised an
exception in a Genshi template so we can provide a decent error
message that actually tells the end user where an error
occurred.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.</tt><tt class="descname">CfgCheetahGenerator</tt><big>(</big><em>fname</em>, <em>spec</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.html#CfgCheetahGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a></p>
<p>The CfgCheetahGenerator allows you to use the <a class="reference external" href="http://www.cheetahtemplate.org/">Cheetah</a> templating system to generate
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> files.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator.get_data">
<tt class="descname">get_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.html#CfgCheetahGenerator.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator.get_data" title="Permalink to this definition">¶</a></dt>
<dd><p>get_data() returns the initial data of a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to generate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to generate data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator.settings">
<tt class="descname">settings</tt><em class="property"> = {'useStackFrames': False}</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator.settings" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="xref py py-class docutils literal"><span class="pre">Cheetah.Template.Template</span></tt> compiler settings</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.</tt><tt class="descname">CfgEncryptedGenerator</tt><big>(</big><em>fname</em>, <em>spec</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.html#CfgEncryptedGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a></p>
<p>CfgEncryptedGenerator lets you encrypt your plaintext
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> files on the server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator.get_data">
<tt class="descname">get_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.html#CfgEncryptedGenerator.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator.get_data" title="Permalink to this definition">¶</a></dt>
<dd><p>get_data() returns the initial data of a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to generate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to generate data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.html#CfgEncryptedGenerator.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenshiGenerator.CfgEncryptedGenshiGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenshiGenerator.</tt><tt class="descname">CfgEncryptedGenshiGenerator</tt><big>(</big><em>fname</em>, <em>spec</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenshiGenerator.html#CfgEncryptedGenshiGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenshiGenerator.CfgEncryptedGenshiGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenshiGenerator.CfgGenshiGenerator</span></tt></a></p>
<p>CfgEncryptedGenshiGenerator lets you encrypt your Genshi
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> files on the server</p>
</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.CfgEncryptedCheetahGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.</tt><tt class="descname">CfgEncryptedCheetahGenerator</tt><big>(</big><em>fname</em>, <em>spec</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgEncryptedCheetahGenerator.html#CfgEncryptedCheetahGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.CfgEncryptedCheetahGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCheetahGenerator.CfgCheetahGenerator</span></tt></a>, <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.CfgEncryptedGenerator</span></tt></a></p>
<p>CfgEncryptedCheetahGenerator lets you encrypt your Cheetah
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> files on the server</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.CfgEncryptedCheetahGenerator.get_data">
<tt class="descname">get_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgEncryptedCheetahGenerator.html#CfgEncryptedCheetahGenerator.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.CfgEncryptedCheetahGenerator.get_data" title="Permalink to this definition">¶</a></dt>
<dd><p>get_data() returns the initial data of a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to generate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to generate data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.CfgEncryptedCheetahGenerator.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgEncryptedCheetahGenerator.html#CfgEncryptedCheetahGenerator.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEncryptedCheetahGenerator.CfgEncryptedCheetahGenerator.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.</tt><tt class="descname">CfgAuthorizedKeysGenerator</tt><big>(</big><em>fname</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.html#CfgAuthorizedKeysGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a>, <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.StructFile" title="Bcfg2.Server.Plugin.helpers.StructFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.StructFile</span></tt></a></p>
<p>The CfgAuthorizedKeysGenerator generates authorized_keys files
based on an XML specification of which SSH keypairs should granted
access.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.category">
<tt class="descname">category</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.html#CfgAuthorizedKeysGenerator.category"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.category" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the metadata category that generated keys are
specific to</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.experimental">
<tt class="descname">experimental</tt><em class="property"> = True</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.experimental" title="Permalink to this definition">¶</a></dt>
<dd><p>This handler is experimental, in part because it depends upon
the (experimental) CfgPrivateKeyCreator handler</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.get_data">
<tt class="descname">get_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.html#CfgAuthorizedKeysGenerator.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.get_data" title="Permalink to this definition">¶</a></dt>
<dd><p>get_data() returns the initial data of a file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to generate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to generate data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.html#CfgAuthorizedKeysGenerator.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgAuthorizedKeysGenerator.CfgAuthorizedKeysGenerator.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="creators">
<h3>Creators<a class="headerlink" href="#creators" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.</tt><tt class="descname">CfgPrivateKeyCreator</tt><big>(</big><em>fname</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.html#CfgPrivateKeyCreator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator" title="Bcfg2.Server.Plugins.Cfg.CfgCreator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreator</span></tt></a>, <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.StructFile" title="Bcfg2.Server.Plugin.helpers.StructFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.StructFile</span></tt></a></p>
<p>The CfgPrivateKeyCreator creates SSH keys on the fly.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgCreator.__specific__">
<tt class="descclassname">CfgCreator.</tt><tt class="descname">__specific__</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgCreator.__specific__" title="Permalink to this definition">¶</a></dt>
<dd><p>CfgCreators generally store their configuration in a single XML
file, and are thus not specific</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.Index">
<tt class="descname">Index</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.html#CfgPrivateKeyCreator.Index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.Index" title="Permalink to this definition">¶</a></dt>
<dd><p>Index() is called by <tt class="xref py py-func docutils literal"><span class="pre">HandleEvent()</span></tt> every time the
data changes, and parses the data into usable data as
required.</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.category">
<tt class="descname">category</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.html#CfgPrivateKeyCreator.category"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.category" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the metadata category that generated keys are
specific to</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.create_data">
<tt class="descname">create_data</tt><big>(</big><em>entry</em>, <em>metadata</em>, <em>return_pair=False</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.html#CfgPrivateKeyCreator.create_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.create_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Create data for the given entry on the given client</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to create data for.  This
will not be modified</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to create data for</li>
<li><strong>return_pair</strong> (<em>bool</em>) &#8211; Return a tuple of <tt class="docutils literal"><span class="pre">(public</span> <span class="pre">key,</span> <span class="pre">private</span>
<span class="pre">key)</span></tt> instead of just the private key.
This is used by
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator" title="Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator</span></tt></a>
to create public keys as requested.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">string - The private key data</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">tuple - Tuple of <tt class="docutils literal"><span class="pre">(public</span> <span class="pre">key,</span> <span class="pre">private</span> <span class="pre">key)</span></tt>, if
<tt class="docutils literal"><span class="pre">return_pair</span></tt> is set to True</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.get_specificity">
<tt class="descname">get_specificity</tt><big>(</big><em>metadata</em>, <em>spec=None</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.html#CfgPrivateKeyCreator.get_specificity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.get_specificity" title="Permalink to this definition">¶</a></dt>
<dd><p>Get config settings for key generation specificity
(per-host or per-group).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to create data for</li>
<li><strong>spec</strong> (<em>lxml.etree._Element</em>) &#8211; The key specification to follow when creating the
keys. This should be an XML document that only
contains key specification data that applies to
the given client metadata, and may be obtained by
doing <tt class="docutils literal"><span class="pre">self.XMLMatch(metadata)</span></tt></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">dict - A dict of specificity arguments suitable for
passing to
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data" title="Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data"><tt class="xref py py-func docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data()</span></tt></a>
or
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.get_filename" title="Bcfg2.Server.Plugins.Cfg.CfgCreator.get_filename"><tt class="xref py py-func docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreator.get_filename()</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.html#CfgPrivateKeyCreator.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.passphrase">
<tt class="descname">passphrase</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.html#CfgPrivateKeyCreator.passphrase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator.passphrase" title="Permalink to this definition">¶</a></dt>
<dd><p>The passphrase used to encrypt private keys</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.</tt><tt class="descname">CfgPublicKeyCreator</tt><big>(</big><em>fname</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPublicKeyCreator.html#CfgPublicKeyCreator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator" title="Bcfg2.Server.Plugins.Cfg.CfgCreator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreator</span></tt></a>, <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.StructFile" title="Bcfg2.Server.Plugin.helpers.StructFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.StructFile</span></tt></a></p>
<p>The CfgPublicKeyCreator creates SSH public keys on the fly. It is
invoked by <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator" title="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator"><tt class="xref py py-class docutils literal"><span class="pre">CfgPrivateKeyCreator.CfgPrivateKeyCreator</span></tt></a> to
handle the creation of the public key, and can also call
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator" title="Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator"><tt class="xref py py-class docutils literal"><span class="pre">CfgPrivateKeyCreator.CfgPrivateKeyCreator</span></tt></a> to trigger the
creation of a keypair when a public key is created.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgCreator.__specific__">
<tt class="descclassname">CfgCreator.</tt><tt class="descname">__specific__</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgCreator.__specific__" title="Permalink to this definition">¶</a></dt>
<dd><p>CfgCreators generally store their configuration in a single XML
file, and are thus not specific</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator.create_data">
<tt class="descname">create_data</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPublicKeyCreator.html#CfgPublicKeyCreator.create_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator.create_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Create new data for the given entry and write it to disk
using <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data" title="Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data"><tt class="xref py py-func docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreator.write_data()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to create data for.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to create data for.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">string - The contents of the entry</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgCreationError" title="Bcfg2.Server.Plugins.Cfg.CfgCreationError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgCreationError</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgPublicKeyCreator.html#CfgPublicKeyCreator.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="filters">
<h3>Filters<a class="headerlink" href="#filters" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCatFilter.CfgCatFilter">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgCatFilter.</tt><tt class="descname">CfgCatFilter</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.html#CfgCatFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCatFilter.CfgCatFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgFilter" title="Bcfg2.Server.Plugins.Cfg.CfgFilter"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgFilter</span></tt></a></p>
<p>CfgCatFilter appends lines to and remove lines from plaintext
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> files</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCatFilter.CfgCatFilter.deprecated">
<tt class="descname">deprecated</tt><em class="property"> = True</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCatFilter.CfgCatFilter.deprecated" title="Permalink to this definition">¶</a></dt>
<dd><p>.cat files are deprecated</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgCatFilter.CfgCatFilter.modify_data">
<tt class="descname">modify_data</tt><big>(</big><em>entry</em>, <em>metadata</em>, <em>data</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.html#CfgCatFilter.modify_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgCatFilter.CfgCatFilter.modify_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Return new data for the entry, based on the initial data
produced by the <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to filter data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to filter data for.</li>
<li><strong>data</strong> (<em>string</em>) &#8211; The initial contents of the entry produced by the
CfgGenerator</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the new contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.CfgDiffFilter">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.</tt><tt class="descname">CfgDiffFilter</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgDiffFilter.html#CfgDiffFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.CfgDiffFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgFilter" title="Bcfg2.Server.Plugins.Cfg.CfgFilter"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgFilter</span></tt></a></p>
<p>CfgDiffFilter applies diffs to plaintext
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> files</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.CfgDiffFilter.deprecated">
<tt class="descname">deprecated</tt><em class="property"> = True</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.CfgDiffFilter.deprecated" title="Permalink to this definition">¶</a></dt>
<dd><p>.diff files are deprecated</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.CfgDiffFilter.modify_data">
<tt class="descname">modify_data</tt><big>(</big><em>entry</em>, <em>metadata</em>, <em>data</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgDiffFilter.html#CfgDiffFilter.modify_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.CfgDiffFilter.modify_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Return new data for the entry, based on the initial data
produced by the <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to filter data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to filter data for.</li>
<li><strong>data</strong> (<em>string</em>) &#8211; The initial contents of the entry produced by the
CfgGenerator</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">string - the new contents of the entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="info-handlers">
<h3>Info Handlers<a class="headerlink" href="#info-handlers" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgDefaultInfo</tt><big>(</big><em>defaults</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgDefaultInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgInfo" title="Bcfg2.Server.Plugins.Cfg.CfgInfo"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgInfo</span></tt></a></p>
<p><a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.Cfg" title="Bcfg2.Server.Plugins.Cfg.Cfg"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.Cfg</span></tt></a> handler that supplies a
default set of file metadata</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo.bind_info_to_entry">
<tt class="descname">bind_info_to_entry</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgDefaultInfo.bind_info_to_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo.bind_info_to_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Assign the appropriate attributes to the entry, modifying
it in place.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to bind the info to</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to get info for</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgInfoXML.</tt><tt class="descname">CfgInfoXML</tt><big>(</big><em>path</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.html#CfgInfoXML"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgInfo" title="Bcfg2.Server.Plugins.Cfg.CfgInfo"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgInfo</span></tt></a></p>
<p>CfgInfoXML handles <tt class="file docutils literal"><span class="pre">info.xml</span></tt> files for
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfo.__specific__">
<tt class="descclassname">CfgInfo.</tt><tt class="descname">__specific__</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfo.__specific__" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether or not the files handled by this handler are permitted
to have specificity indicators in their filenames &#8211; e.g.,
<tt class="docutils literal"><span class="pre">.H_client.example.com</span></tt> or <tt class="docutils literal"><span class="pre">.G10_foogroup</span></tt>.  By default
CfgInfo handlers do not allow specificities</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML.bind_info_to_entry">
<tt class="descname">bind_info_to_entry</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.html#CfgInfoXML.bind_info_to_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML.bind_info_to_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Assign the appropriate attributes to the entry, modifying
it in place.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to bind the info to</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to get info for</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.html#CfgInfoXML.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.</tt><tt class="descname">CfgLegacyInfo</tt><big>(</big><em>path</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgLegacyInfo.html#CfgLegacyInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgInfo" title="Bcfg2.Server.Plugins.Cfg.CfgInfo"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgInfo</span></tt></a></p>
<p>CfgLegacyInfo handles <tt class="file docutils literal"><span class="pre">info</span></tt> and <tt class="file docutils literal"><span class="pre">:info</span></tt> files for
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgInfo.__specific__">
<tt class="descclassname">CfgInfo.</tt><tt class="descname">__specific__</tt><em class="property"> = False</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgInfo.__specific__" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether or not the files handled by this handler are permitted
to have specificity indicators in their filenames &#8211; e.g.,
<tt class="docutils literal"><span class="pre">.H_client.example.com</span></tt> or <tt class="docutils literal"><span class="pre">.G10_foogroup</span></tt>.  By default
CfgInfo handlers do not allow specificities</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.bind_info_to_entry">
<tt class="descname">bind_info_to_entry</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgLegacyInfo.html#CfgLegacyInfo.bind_info_to_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.bind_info_to_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Assign the appropriate attributes to the entry, modifying
it in place.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to bind the info to</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to get info for</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.deprecated">
<tt class="descname">deprecated</tt><em class="property"> = True</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.deprecated" title="Permalink to this definition">¶</a></dt>
<dd><p>CfgLegacyInfo is deprecated.  Use
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML" title="Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML</span></tt></a> instead.</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgLegacyInfo.html#CfgLegacyInfo.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.metadata">
<tt class="descname">metadata</tt><em class="property"> = None</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo.metadata" title="Permalink to this definition">¶</a></dt>
<dd><p>The set of info metadata stored in the file</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="verifiers">
<h3>Verifiers<a class="headerlink" href="#verifiers" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.CfgExternalCommandVerifier">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.</tt><tt class="descname">CfgExternalCommandVerifier</tt><big>(</big><em>name</em>, <em>specific</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.html#CfgExternalCommandVerifier"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.CfgExternalCommandVerifier" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgVerifier" title="Bcfg2.Server.Plugins.Cfg.CfgVerifier"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgVerifier</span></tt></a></p>
<p>Invoke an external script to verify
<a class="reference internal" href="../server/plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a> file contents</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<em>string</em>) &#8211; The full path to the file</li>
<li><strong>specific</strong> (<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><em>Bcfg2.Server.Plugin.helpers.Specificity</em></a>) &#8211; A
<a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.Specificity" title="Bcfg2.Server.Plugin.helpers.Specificity"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.Specificity</span></tt></a>
object describing what clients this file
applies to.</li>
<li><strong>encoding</strong> (<em>string</em>) &#8211; The encoding to use for data in this file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.CfgExternalCommandVerifier.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.html#CfgExternalCommandVerifier.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.CfgExternalCommandVerifier.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle a FAM event.  Note that the SpecificData object
itself has no FAM, so this must be produced by a parent object
(e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; The event that applies to this file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginExecutionError" title="Bcfg2.Server.Plugin.exceptions.PluginExecutionError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginExecutionError</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.CfgExternalCommandVerifier.verify_entry">
<tt class="descname">verify_entry</tt><big>(</big><em>entry</em>, <em>metadata</em>, <em>data</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.html#CfgExternalCommandVerifier.verify_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgExternalCommandVerifier.CfgExternalCommandVerifier.verify_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform entry contents. validation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The entry to validate data for. <tt class="docutils literal"><span class="pre">entry</span></tt> should
not be modified in-place.  Info attributes have
been bound to the entry, but the text data has
not been set.</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to validate data for.</li>
<li><strong>data</strong> (<em>string</em>) &#8211; The contents of the entry</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">None</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgVerificationError" title="Bcfg2.Server.Plugins.Cfg.CfgVerificationError"><tt class="xref py py-exc docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgVerificationError</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
</div>
<div class="section" id="other-cfg-objects">
<h2>Other Cfg Objects<a class="headerlink" href="#other-cfg-objects" title="Permalink to this headline">¶</a></h2>
<p>These other objects comprise the remainder of the Cfg plugin, and are
included for completeness.</p>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.DEFAULT_INFO">
<tt class="descclassname">Cfg.</tt><tt class="descname">DEFAULT_INFO</tt><em class="property"> = &lt;Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo object at 0x9a9f28c&gt;</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.DEFAULT_INFO" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">CfgEntrySet</tt><big>(</big><em>basename</em>, <em>path</em>, <em>entry_type</em>, <em>encoding</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.EntrySet" title="Bcfg2.Server.Plugin.helpers.EntrySet"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.EntrySet</span></tt></a>, <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.base.Debuggable" title="Bcfg2.Server.Plugin.base.Debuggable"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.base.Debuggable</span></tt></a></p>
<p>Handle a collection of host- and group-specific Cfg files with
multiple different Cfg handlers in a single directory.</p>
<p>EntrySets deal with a collection of host- and group-specific
files (e.g., <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.SpecificData" title="Bcfg2.Server.Plugin.helpers.SpecificData"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.SpecificData</span></tt></a>
objects) in a single directory. EntrySets are usually used as part
of <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.GroupSpool" title="Bcfg2.Server.Plugin.helpers.GroupSpool"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.GroupSpool</span></tt></a> objects.</p>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.bind_entry">
<tt class="descname">bind_entry</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.bind_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.bind_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the single best fully-bound entry from the set of
available entries for the specified client.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to bind the info to</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to get info for</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">lxml.etree._Element - the fully-bound entry</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.bind_info_to_entry">
<tt class="descname">bind_info_to_entry</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.bind_info_to_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.bind_info_to_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Bind entry metadata to the entry with the best CfgInfo
handler</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; The abstract entry to bind the info to. This
will be modified in place</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to get info for</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.build_filename">
<tt class="descname">build_filename</tt><big>(</big><em>specific</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.build_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.build_filename" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a filename for pulled file data</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.entry_init">
<tt class="descname">entry_init</tt><big>(</big><em>event</em>, <em>hdlr</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.entry_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.entry_init" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle the creation of a file on the filesystem and the
creation of a Cfg handler object in this CfgEntrySet to track
it.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; An event that applies to a file handled by this
CfgEntrySet</li>
<li><strong>hdlr</strong> (<em>class</em>) &#8211; The Cfg handler class to be used to create an
object for the file described by <tt class="docutils literal"><span class="pre">event</span></tt></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">None</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.SpecificityError" title="Bcfg2.Server.Plugin.exceptions.SpecificityError"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.SpecificityError</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.get_handlers">
<tt class="descname">get_handlers</tt><big>(</big><em>metadata</em>, <em>handler_type</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.get_handlers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.get_handlers" title="Permalink to this definition">¶</a></dt>
<dd><p>Get all handlers of the given type for the given metadata.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The metadata to get all handlers for.</li>
<li><strong>handler_type</strong> (<em>type</em>) &#8211; The type of Cfg handler to get</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list of Cfg handler classes</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.get_matching">
<tt class="descname">get_matching</tt><big>(</big><em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.get_matching"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.get_matching" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a list of all entries that apply to the given client.
This gets all matching entries; for example, there could be an
entry that applies to all clients, multiple group-specific
entries, and a client-specific entry, all of which would be
returned by get_matching().  You can use <tt class="xref py py-func docutils literal"><span class="pre">best_matching()</span></tt>
to get the single best matching entry.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; The client metadata to get matching entries for</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list &#8211; all matching <tt class="docutils literal"><span class="pre">entry_type</span></tt> objects (see the
constructor docs for more details)</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.handle_event">
<tt class="descname">handle_event</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.handle_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.handle_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Dispatch a FAM event to <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.entry_init" title="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.entry_init"><tt class="xref py py-func docutils literal"><span class="pre">entry_init()</span></tt></a> or the
appropriate child handler object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> (<a class="reference internal" href="fam.html#Bcfg2.Server.FileMonitor.Event" title="Bcfg2.Server.FileMonitor.Event"><em>Bcfg2.Server.FileMonitor.Event</em></a>) &#8211; An event that applies to a file handled by this
CfgEntrySet</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.handlers">
<tt class="descname">handlers</tt><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.handlers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.handlers" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of Cfg handler classes. Loading the handlers must
be done at run-time, not at compile-time, or it causes a
circular import and Bad Things Happen.</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.list_accept_choices">
<tt class="descname">list_accept_choices</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.list_accept_choices"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.list_accept_choices" title="Permalink to this definition">¶</a></dt>
<dd><p>return a list of candidate pull locations</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.CfgEntrySet.write_update">
<tt class="descname">write_update</tt><big>(</big><em>specific</em>, <em>new_entry</em>, <em>log</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#CfgEntrySet.write_update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet.write_update" title="Permalink to this definition">¶</a></dt>
<dd><p>Write pulled data to the filesystem</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Cfg.Cfg">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Cfg.</tt><tt class="descname">Cfg</tt><big>(</big><em>core</em>, <em>datastore</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#Cfg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.Cfg" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.helpers.GroupSpool" title="Bcfg2.Server.Plugin.helpers.GroupSpool"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.GroupSpool</span></tt></a>, <tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.interfaces.PullTarget</span></tt></p>
<p>The Cfg plugin provides a repository to describe configuration
file contents for clients. In its simplest form, the Cfg repository is
just a directory tree modeled off of the directory tree on your client
machines.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>core</strong> (<a class="reference internal" href="core.html#module-Bcfg2.Server.Core" title="Bcfg2.Server.Core"><em>Bcfg2.Server.Core</em></a>) &#8211; The Bcfg2.Server.Core initializing the plugin</li>
<li><strong>datastore</strong> (<em>string</em>) &#8211; The path to the Bcfg2 repository on the
filesystem</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="plugins.html#Bcfg2.Server.Plugin.exceptions.PluginInitError" title="Bcfg2.Server.Plugin.exceptions.PluginInitError"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.exceptions.PluginInitError</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugin.base.Cfg.Debuggable.__rmi__">
<tt class="descclassname">Debuggable.</tt><tt class="descname">__rmi__</tt><em class="property"> = ['toggle_debug', 'set_debug']</em><a class="headerlink" href="#Bcfg2.Server.Plugin.base.Cfg.Debuggable.__rmi__" title="Permalink to this definition">¶</a></dt>
<dd><p>List of names of methods to be exposed as XML-RPC functions</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.Cfg.es_child_cls">
<tt class="descname">es_child_cls</tt><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.Cfg.es_child_cls" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">SpecificData</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Cfg.Cfg.es_cls">
<tt class="descname">es_cls</tt><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.Cfg.es_cls" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgEntrySet" title="Bcfg2.Server.Plugins.Cfg.CfgEntrySet"><tt class="xref py py-class docutils literal"><span class="pre">CfgEntrySet</span></tt></a></p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Cfg.Cfg.has_generator">
<tt class="descname">has_generator</tt><big>(</big><em>entry</em>, <em>metadata</em><big>)</big><a class="reference internal" href="../_modules/Bcfg2/Server/Plugins/Cfg.html#Cfg.has_generator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Cfg.Cfg.has_generator" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if the given entry can be generated for the
given metadata; False otherwise</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry</strong> (<em>lxml.etree._Element</em>) &#8211; Determine if a
<a class="reference internal" href="#Bcfg2.Server.Plugins.Cfg.CfgGenerator" title="Bcfg2.Server.Plugins.Cfg.CfgGenerator"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Cfg.CfgGenerator</span></tt></a>
object exists that handles this (abstract) entry</li>
<li><strong>metadata</strong> (<em>Bcfg2.Server.Plugins.Metadata.ClientMetadata</em>) &#8211; Determine if a CfgGenerator has data that
applies to this client metadata</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">bool</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Cfg Handler Development</a><ul>
<li><a class="reference internal" href="#cfg-handler-types">Cfg Handler Types</a></li>
<li><a class="reference internal" href="#cfg-handler-base-class">Cfg Handler Base Class</a></li>
<li><a class="reference internal" href="#cfg-exceptions">Cfg Exceptions</a></li>
<li><a class="reference internal" href="#global-variables">Global Variables</a></li>
<li><a class="reference internal" href="#existing-cfg-handlers">Existing Cfg Handlers</a><ul>
<li><a class="reference internal" href="#generators">Generators</a></li>
<li><a class="reference internal" href="#creators">Creators</a></li>
<li><a class="reference internal" href="#filters">Filters</a></li>
<li><a class="reference internal" href="#info-handlers">Info Handlers</a></li>
<li><a class="reference internal" href="#verifiers">Verifiers</a></li>
</ul>
</li>
<li><a class="reference internal" href="#other-cfg-objects">Other Cfg Objects</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="plugins.html"
                        title="previous chapter">Bcfg2 Plugin development</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="packages.html"
                        title="next chapter">Developing for Packages</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/development/cfg.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="packages.html" title="Developing for Packages"
             >next</a> |</li>
        <li class="right" >
          <a href="plugins.html" title="Bcfg2 Plugin development"
             >previous</a> |</li>
	<li><a href="../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../contents.html">documentation </a> &raquo;</li>

          <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="index.html" >Bcfg2 Development</a> &raquo;</li>
          <li><a href="plugins.html" >Bcfg2 Plugin development</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Narayan Desai.
      Last updated on Mar 20, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>