Sophie

Sophie

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

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>Properties &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="Plugins" href="../index.html" />
    <link rel="next" title="PuppetENC" href="puppetenc.html" />
    <link rel="prev" title="test" href="../generators/examples/genshi/test.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="puppetenc.html" title="PuppetENC"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../generators/examples/genshi/test.html" title="test"
             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" >The Bcfg2 Server</a> &raquo;</li>
          <li><a href="../index.html" accesskey="U">Plugins</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="properties">
<span id="server-plugins-connectors-properties"></span><h1>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h1>
<p>The Properties plugin is a connector plugin that adds information from
XML, JSON, and YAML files into client metadata instances.</p>
<div class="section" id="enabling-properties">
<h2>Enabling Properties<a class="headerlink" href="#enabling-properties" title="Permalink to this headline">¶</a></h2>
<p>First, <tt class="docutils literal"><span class="pre">mkdir</span> <span class="pre">/var/lib/bcfg2/Properties</span></tt>. Each property file goes in
this directory. Each will automatically be cached by the server, and
reread/reparsed upon changes. Add <strong>Properties</strong> to your <tt class="docutils literal"><span class="pre">plugins</span></tt>
line in <tt class="docutils literal"><span class="pre">/etc/bcfg2.conf</span></tt>.</p>
</div>
<div class="section" id="data-structures">
<h2>Data Structures<a class="headerlink" href="#data-structures" title="Permalink to this headline">¶</a></h2>
<p>Properties adds a new dictionary to client metadata instances that maps
property file names to PropertyFile instances.</p>
<p>A property file can be one of three types:</p>
<ul class="simple">
<li>If the filename ends with <tt class="docutils literal"><span class="pre">.xml</span></tt>, it will be parsed as XML and
handled by <a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.XMLPropertyFile" title="Bcfg2.Server.Plugins.Properties.XMLPropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.XMLPropertyFile</span></tt></a>.
See <a class="reference internal" href="#xml-property-files">XML Property Files</a> below.</li>
<li>If the filename ends with <tt class="docutils literal"><span class="pre">.json</span></tt> and JSON libraries are installed
(either <tt class="docutils literal"><span class="pre">json</span></tt> or <tt class="docutils literal"><span class="pre">simplejson</span></tt>, although <tt class="docutils literal"><span class="pre">json</span></tt> is highly
recommended), it will be parsed as <a class="reference external" href="http://www.json.org/">JSON</a>
and handled by
<a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.JSONPropertyFile" title="Bcfg2.Server.Plugins.Properties.JSONPropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.JSONPropertyFile</span></tt></a>.  See
<a class="reference internal" href="#json-property-files">JSON Property Files</a> below.</li>
<li>If the filename ends with <tt class="docutils literal"><span class="pre">.yaml</span></tt> or <tt class="docutils literal"><span class="pre">.yml</span></tt> and PyYAML is
installed, it will be parsed as <a class="reference external" href="http://www.yaml.org/">YAML</a> and
handled by
<a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.YAMLPropertyFile" title="Bcfg2.Server.Plugins.Properties.YAMLPropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.YAMLPropertyFile</span></tt></a>.  See
<a class="reference internal" href="#yaml-property-files">YAML Property Files</a> below.</li>
</ul>
<p>The XML interface is undoubtably the most powerful, as it natively
supports schemas to check the data validity, client- and
group-specific data, and data encryption.</p>
</div>
<div class="section" id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<div class="section" id="common-interface">
<h3>Common Interface<a class="headerlink" href="#common-interface" title="Permalink to this headline">¶</a></h3>
<p>Different data types have different interfaces, but there are some
usage patterns common to all properties files.</p>
<p>Specific property files can be referred to in templates as
<tt class="docutils literal"><span class="pre">metadata.Properties[&lt;filename&gt;]</span></tt>.</p>
<p>The data in property files is accessible via different attributes:</p>
<table border="1" class="docutils">
<colgroup>
<col width="41%" />
<col width="59%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Data Type</th>
<th class="head">Data Attribute</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>XML</td>
<td><tt class="docutils literal"><span class="pre">xdata</span></tt></td>
</tr>
<tr class="row-odd"><td>JSON</td>
<td><tt class="docutils literal"><span class="pre">json</span></tt></td>
</tr>
<tr class="row-even"><td>YAML</td>
<td><tt class="docutils literal"><span class="pre">yaml</span></tt></td>
</tr>
</tbody>
</table>
<p>For instance, in a <a class="reference internal" href="../generators/cfg.html#server-plugins-generators-cfg-genshi"><em>Genshi template</em></a>, you might do:</p>
<div class="highlight-python"><pre>{% for item in metadata.Properties['foo.json'].json %}\
${item}
{% end %}\

{% for key, value in metadata.Properties['foo.yml'].yaml %}\
${key} = ${value}
{% end %}\

{% for el in metadata.Properties['foo.xml'].xdata.findall("Tag") %}\
${el.get("name")} = ${el.text}
{% end %}\</pre>
</div>
<p>The raw contents of a properties file as a string are available via
the <tt class="docutils literal"><span class="pre">data</span></tt> attribute, e.g., <tt class="docutils literal"><span class="pre">metadata.Properties['prop-file'].data</span></tt>.</p>
<div class="section" id="writing-to-properties-files">
<span id="server-plugins-connectors-properties-write-back"></span><h4>Writing to Properties files<a class="headerlink" href="#writing-to-properties-files" title="Permalink to this headline">¶</a></h4>
<p class="versionadded">
<span class="versionmodified">New in version 1.2.0.</span></p>
<p>If you need to make persistent changes to properties data, you can use
the <tt class="docutils literal"><span class="pre">write</span></tt> method of the
<a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Bcfg2.Server.Plugins.Properties.PropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.PropertyFile</span></tt></a> class:</p>
<div class="highlight-python"><pre>{% python
import lxml.etree
from genshi.template import TemplateError
lxml.etree.SubElement(metadata.Properties['foo.xml'],
                      "Client",
                      name=metadata.hostname)
if not metadata.Properties['foo.xml'].write():
    raise TemplateError("Failed to write changes back to foo.xml")</pre>
</div>
<p>The interface is the same for YAML or JSON data.</p>
<p>If writing XML data, the <tt class="docutils literal"><span class="pre">write</span></tt> method checks the data in the
object against its schema before writing it; see <a class="reference internal" href="#data-structures">Data Structures</a>
for details.</p>
<p>Note that use of the <tt class="docutils literal"><span class="pre">write</span></tt> method can cause race conditions if you
run more than one Bcfg2 server.  If you run more than one Bcfg2
server, you can disable Properties write-back by setting the following
in <tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">properties</span><span class="p">]</span>
<span class="n">writes_enabled</span> <span class="o">=</span> <span class="n">false</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="xml-property-files">
<h3>XML Property Files<a class="headerlink" href="#xml-property-files" title="Permalink to this headline">¶</a></h3>
<p>The data in an XML property file can be accessed with the <tt class="docutils literal"><span class="pre">xdata</span></tt>
attribute, an <tt class="xref py py-class docutils literal"><span class="pre">lxml.etree._Element</span></tt> object documented <a class="reference external" href="http://codespeak.net/lxml/tutorial.html#the-element-class">here</a>.</p>
<p>In addition to the <tt class="docutils literal"><span class="pre">xdata</span></tt> attribute that can be used to access the
raw data, the following access methods are defined:</p>
<ul>
<li><p class="first"><tt class="docutils literal"><span class="pre">Match()</span></tt> parses the Group and Client tags in the file and returns
a list of elements that apply to the client described by a set of
metadata.  For instance:</p>
<div class="highlight-python"><pre>{% python
ntp_servers = [el.text
               for el in metadata.Properties['ntp.xml'].Match(metadata)
               if el.tag == "Server"]
%}</pre>
</div>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">XMLMatch()</span></tt> parses the Group and Client tags in the file and
returns an XML document containing only the data that applies to the
client described by a set of metadata.  (The Group and Client tags
themselves are also removed, leaving only the tags and data
contained in them.)  For instance:</p>
<div class="highlight-python"><pre>{% python
ntp_servers = [el.text
               for el in metadata.Properties['ntp.xml'].XMLMatch(metadata).findall("//Server")]
%}</pre>
</div>
<p><tt class="docutils literal"><span class="pre">XMLMatch()</span></tt> can be run automatically on properties files by using
the <a class="reference internal" href="#server-plugins-connectors-properties-automatch"><em>Automatch</em></a> feature.</p>
</li>
</ul>
<p>You can also access the XML data that comprises a property file
directly in one of several ways:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">metadata.Properties['prop-file'].xdata</span></tt> is an lxml.etree._Element
object representing the top-level element in the file.</li>
<li><tt class="docutils literal"><span class="pre">metadata.Properties['prop-file'].data</span></tt> is the raw contents of the
property file as a string.</li>
<li><tt class="docutils literal"><span class="pre">metadata.Properties['prop-file'].entries</span></tt> is a list of
lxml.etree._Element objects representing the direct children of the
top-level element.  (I.e., everything directly under the
<tt class="docutils literal"><span class="pre">&lt;Properties&gt;</span></tt> tag.)</li>
</ul>
<p>The XML data in a property file is arbitrary, but a matching <tt class="docutils literal"><span class="pre">.xsd</span></tt>
file can be created to assign a schema to a property file, which will
be checked when running <tt class="docutils literal"><span class="pre">bcfg2-lint</span></tt>.  For instance, given:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">Properties</span><span class="o">/</span><span class="n">dns</span><span class="o">-</span><span class="n">config</span><span class="o">.</span><span class="n">xml</span>
<span class="n">Properties</span><span class="o">/</span><span class="n">dns</span><span class="o">-</span><span class="n">config</span><span class="o">.</span><span class="n">xsd</span>
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">dns-config.xml</span></tt> will be validated against <tt class="docutils literal"><span class="pre">dns-config.xsd</span></tt>.</p>
<p>Although Properties files are technically freeform XML, the top-level
XML tag should be <tt class="docutils literal"><span class="pre">&lt;Properties&gt;</span></tt>.</p>
</div>
<div class="section" id="json-property-files">
<h3>JSON Property Files<a class="headerlink" href="#json-property-files" title="Permalink to this headline">¶</a></h3>
<p>The data in a JSON property file can be accessed with the <tt class="docutils literal"><span class="pre">json</span></tt>
attribute, which is the loaded JSON data.  The JSON properties
interface does not provide any additional functionality beyond the
<a class="reference internal" href="#common-interface">Common Interface</a>.</p>
</div>
<div class="section" id="yaml-property-files">
<h3>YAML Property Files<a class="headerlink" href="#yaml-property-files" title="Permalink to this headline">¶</a></h3>
<p>The data in a YAML property file can be accessed with the <tt class="docutils literal"><span class="pre">yaml</span></tt>
attribute, which is the loaded YAML data.  Only a single YAML document
may be included in a file.</p>
<p>The YAML properties interface does not provide any additional
functionality beyond the <a class="reference internal" href="#common-interface">Common Interface</a>.</p>
</div>
</div>
<div class="section" id="automatch">
<span id="server-plugins-connectors-properties-automatch"></span><h2>Automatch<a class="headerlink" href="#automatch" title="Permalink to this headline">¶</a></h2>
<p class="versionadded">
<span class="versionmodified">New in version 1.3.0.</span></p>
<p>You can enable
<a class="reference internal" href="../../../development/plugins.html#Bcfg2.Server.Plugin.helpers.StructFile.XMLMatch" title="Bcfg2.Server.Plugin.helpers.StructFile.XMLMatch"><tt class="xref py py-func docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.StructFile.XMLMatch()</span></tt></a> for all XML
Property files by setting <tt class="docutils literal"><span class="pre">automatch</span></tt> to <tt class="docutils literal"><span class="pre">true</span></tt> in the
<tt class="docutils literal"><span class="pre">[properties]</span></tt> section of <tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt>.  This makes
<tt class="docutils literal"><span class="pre">metadata.Properties</span></tt> values <tt class="xref py py-class docutils literal"><span class="pre">lxml.etree._Element</span></tt> objects
that contain only matching data.  (This makes it impossible to do
<a class="reference internal" href="#server-plugins-connectors-properties-write-back"><em>Writing to Properties files</em></a> as a
side-effect.)</p>
<p>In Python terms, setting <tt class="docutils literal"><span class="pre">automatch=true</span></tt> is the same as doing the
following at the top of each template:</p>
<div class="highlight-python"><pre>{% python
for prop in metadata.Properties.values():
    prop = prop.XMLMatch(metadata)
%}</pre>
</div>
<p>The example above that describes <tt class="docutils literal"><span class="pre">XMLMatch()</span></tt> would then become
simply:</p>
<div class="highlight-python"><pre>{% python
ntp_servers = [el.text
               for el in metadata.Properties['ntp.xml'].findall("//Server")]
%}</pre>
</div>
<p>You can also enable automatch for individual Property files by setting
the attribute <tt class="docutils literal"><span class="pre">automatch=&quot;true&quot;</span></tt> on the top-level <tt class="docutils literal"><span class="pre">&lt;Property&gt;</span></tt>
tag.  Conversely, if automatch is enabled by default in
<tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt>, you can disable it for an individual Property file by
setting <tt class="docutils literal"><span class="pre">automatch=&quot;false&quot;</span></tt> on the top-level <tt class="docutils literal"><span class="pre">&lt;Property&gt;</span></tt> tag.</p>
<p>If you want to see what <tt class="docutils literal"><span class="pre">XMLMatch()</span></tt>/automatch would produce for a
given client on a given Properties file, you can use <a class="reference internal" href="../../bcfg2-info.html#server-bcfg2-info"><em>bcfg2-info</em></a>:</p>
<div class="highlight-python"><pre>bcfg2-info automatch props.xml foo.example.com</pre>
</div>
<p>If automatch is not enabled, you can force <tt class="docutils literal"><span class="pre">bcfg2-info</span></tt> to perform
it anyway with <tt class="docutils literal"><span class="pre">-f</span></tt>:</p>
<div class="highlight-python"><pre>bcfg2-info automatch -f props.xml foo.example.com</pre>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Be sure to notice that enabling automatch changes the type of the
data in <tt class="docutils literal"><span class="pre">metadata.Properties</span></tt>; with automatch disabled, the
values of the <tt class="docutils literal"><span class="pre">metadata.Properties</span></tt> dict are
<a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Bcfg2.Server.Plugins.Properties.PropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.PropertyFile</span></tt></a> objects.
With automatch enabled, they are <tt class="xref py py-class docutils literal"><span class="pre">lxml.etree._Element</span></tt>
objects.</p>
</div>
</div>
<div class="section" id="encrypted-properties-data">
<span id="server-plugins-connectors-properties-encryption"></span><h2>Encrypted Properties data<a class="headerlink" href="#encrypted-properties-data" title="Permalink to this headline">¶</a></h2>
<p class="versionadded">
<span class="versionmodified">New in version 1.3.0.</span></p>
<p>You can encrypt selected data in XML Properties files to protect that
data from other people who need access to the repository.  See
<a class="reference internal" href="../../encryption.html#server-encryption-configuration"><em>Configuring Encryption</em></a> for details on configuring
encryption passphrases.  The data is decrypted transparently
on-the-fly by the server; you never need to decrypt the data in your
templates.  Encryption is only supported on XML properties files.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This feature is <em>not</em> intended to secure the files against a
malicious attacker who has gained access to your Bcfg2 server, as
the encryption passphrases are held in plaintext in
<tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt>.  This is only intended to make it easier to use a
single Bcfg2 repository with multiple admins who should not
necessarily have access to each other&#8217;s sensitive data.</p>
</div>
<p>Properties files are encrypted on a per-element basis; that is, rather
than encrypting the whole file, only the character content of
individual elements is encrypted.  This makes it easier to track
changes to the file in a VCS, and also lets unprivileged users work
with the other data in the file.  Only character content of an element
can be encrypted; attribute content and XML elements themselves cannot
be encrypted.</p>
<p>By default, decryption is <em>strict</em>; that is, if any element cannot be
decrypted, parsing of the file is aborted.  If you wish for parsing to
continue, with unencryptable elements simply skipped, then you can set
decryption to <em>lax</em> in one of two ways:</p>
<ul class="simple">
<li>Set <tt class="docutils literal"><span class="pre">decrypt=lax</span></tt> in the <tt class="docutils literal"><span class="pre">[encryption]</span></tt> section of
<tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt> to set lax decryption on all files by default; or</li>
<li>Set the <tt class="docutils literal"><span class="pre">decrypt=&quot;lax&quot;</span></tt> attribute on the top-level <tt class="docutils literal"><span class="pre">Properties</span></tt>
tag of a Properties file to set lax decryption for a single file.</li>
</ul>
<p>Note that you could, for instance, set lax decryption by default, and
then set strict decryption on individual files.</p>
<p>To encrypt or decrypt a file, use <a class="reference internal" href="../../encryption.html#bcfg2-crypt"><em>bcfg2-crypt</em></a>.</p>
<p>See <a class="reference internal" href="../../encryption.html#server-encryption"><em>Bcfg2 Data Encryption</em></a> for more details on encryption in Bcfg2
in general.</p>
</div>
<div class="section" id="accessing-properties-contents-from-genshi-templates">
<h2>Accessing Properties contents from Genshi Templates<a class="headerlink" href="#accessing-properties-contents-from-genshi-templates" title="Permalink to this headline">¶</a></h2>
<p>Access contents of <tt class="docutils literal"><span class="pre">Properties/auth.xml</span></tt>:</p>
<div class="highlight-python"><pre>${metadata.Properties['auth.xml'].xdata.find('file').find('bcfg2.key').text}</pre>
</div>
</div>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt> contains several miscellaneous configuration options
for the Properties plugin, which can be set in the <tt class="docutils literal"><span class="pre">[properties]</span></tt>
section. Any booleans in the config file accept the values &#8220;1&#8221;, &#8220;yes&#8221;,
&#8220;true&#8221;, and &#8220;on&#8221; for True, and &#8220;0&#8221;, &#8220;no&#8221;, &#8220;false&#8221;, and &#8220;off&#8221; for
False.</p>
<p>It understands the following directives:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">automatch</span></tt>: Enable
<a class="reference internal" href="#server-plugins-connectors-properties-automatch"><em>Automatch</em></a>.  Default is
false.</li>
<li><tt class="docutils literal"><span class="pre">writes_enabled</span></tt>: Enable
<a class="reference internal" href="#server-plugins-connectors-properties-write-back"><em>Writing to Properties files</em></a>.  Default is
true.</li>
</ul>
</div>
<div class="section" id="module-Bcfg2.Server.Plugins.Properties">
<span id="module-documentation"></span><h2>Module Documentation<a class="headerlink" href="#module-Bcfg2.Server.Plugins.Properties" title="Permalink to this headline">¶</a></h2>
<p>The properties plugin maps property files into client metadata
instances.</p>
<dl class="class">
<dt id="Bcfg2.Server.Plugins.Properties.JSONPropertyFile">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Properties.</tt><tt class="descname">JSONPropertyFile</tt><big>(</big><em>name</em>, <em>fam=None</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#JSONPropertyFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.JSONPropertyFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="../../../development/plugins.html#Bcfg2.Server.Plugin.helpers.FileBacked" title="Bcfg2.Server.Plugin.helpers.FileBacked"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.FileBacked</span></tt></a>, <a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Bcfg2.Server.Plugins.Properties.PropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.PropertyFile</span></tt></a></p>
<p>Handle JSON Properties 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 to cache and monitor</li>
<li><strong>fam</strong> (<a class="reference internal" href="../../../development/fam.html#Bcfg2.Server.FileMonitor.FileMonitor" title="Bcfg2.Server.FileMonitor.FileMonitor"><em>Bcfg2.Server.FileMonitor.FileMonitor</em></a>) &#8211; The FAM object used to receive notifications of
changes</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.JSONPropertyFile.Index">
<tt class="descname">Index</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#JSONPropertyFile.Index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.JSONPropertyFile.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="method">
<dt id="Bcfg2.Server.Plugins.Properties.JSONPropertyFile.validate_data">
<tt class="descname">validate_data</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#JSONPropertyFile.validate_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.JSONPropertyFile.validate_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Verify that the data in this file is valid.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Properties.PropDirectoryBacked">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Properties.</tt><tt class="descname">PropDirectoryBacked</tt><big>(</big><em>data</em>, <em>fam</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#PropDirectoryBacked"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropDirectoryBacked" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="../../../development/plugins.html#Bcfg2.Server.Plugin.helpers.DirectoryBacked" title="Bcfg2.Server.Plugin.helpers.DirectoryBacked"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.DirectoryBacked</span></tt></a></p>
<p>A collection of properties 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>data</strong> (<em>string</em>) &#8211; The path to the data directory that will be
monitored</li>
<li><strong>fam</strong> (<a class="reference internal" href="../../../development/fam.html#Bcfg2.Server.FileMonitor.FileMonitor" title="Bcfg2.Server.FileMonitor.FileMonitor"><em>Bcfg2.Server.FileMonitor.FileMonitor</em></a>) &#8211; The FAM object used to receive notifications of
changes</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.__child__">
<tt class="descname">__child__</tt><em class="property"> = &lt;class 'Bcfg2.Server.Plugin.helpers.FileBacked'&gt;</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.__child__" title="Permalink to this definition">¶</a></dt>
<dd><p>Instead of creating children of this object with a static
object, we use <a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.property_dispatcher" title="Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.property_dispatcher"><tt class="xref py py-func docutils literal"><span class="pre">property_dispatcher()</span></tt></a> to create a
child of the appropriate subclass of <a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Bcfg2.Server.Plugins.Properties.PropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">PropertyFile</span></tt></a></p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.ignore">
<tt class="descname">ignore</tt><em class="property"> = &lt;_sre.SRE_Pattern object at 0xac23928&gt;</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.ignore" title="Permalink to this definition">¶</a></dt>
<dd><p>Ignore XML schema (<tt class="docutils literal"><span class="pre">.xsd</span></tt>) files</p>
</dd></dl>

<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.patterns">
<tt class="descname">patterns</tt><em class="property"> = &lt;_sre.SRE_Pattern object at 0xa51a0e8&gt;</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.patterns" title="Permalink to this definition">¶</a></dt>
<dd><p>Only track and include files whose names and paths match this
regex.  Created on-the-fly based on which libraries are
installed (and thus which data formats are supported).
Candidates are <tt class="docutils literal"><span class="pre">.xml</span></tt> (always supported), <tt class="docutils literal"><span class="pre">.json</span></tt>,
<tt class="docutils literal"><span class="pre">.yaml</span></tt>, and <tt class="docutils literal"><span class="pre">.yml</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.property_dispatcher">
<tt class="descname">property_dispatcher</tt><big>(</big><em>fname</em>, <em>fam</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#PropDirectoryBacked.property_dispatcher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropDirectoryBacked.property_dispatcher" title="Permalink to this definition">¶</a></dt>
<dd><p>Dispatch an event on a Properties file to the
appropriate 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"><ul class="first simple">
<li><strong>fname</strong> (<em>string</em>) &#8211; The name of the file that received the event</li>
<li><strong>fam</strong> (<a class="reference internal" href="../../../development/fam.html#Bcfg2.Server.FileMonitor.FileMonitor" title="Bcfg2.Server.FileMonitor.FileMonitor"><em>Bcfg2.Server.FileMonitor.FileMonitor</em></a>) &#8211; The file monitor the event was received by</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An object of the appropriate subclass of
<a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Bcfg2.Server.Plugins.Properties.PropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">PropertyFile</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Properties.Properties">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Properties.</tt><tt class="descname">Properties</tt><big>(</big><em>core</em>, <em>datastore</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#Properties"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.Properties" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="../../../development/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>, <a class="reference internal" href="../../../development/plugins.html#Bcfg2.Server.Plugin.interfaces.Connector" title="Bcfg2.Server.Plugin.interfaces.Connector"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.interfaces.Connector</span></tt></a></p>
<p>The properties plugin maps property files into client metadata
instances.</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="../../../development/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="../../../development/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.Properties.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.Properties.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="method">
<dt id="Bcfg2.Server.Plugins.Properties.Properties.get_additional_data">
<tt class="descname">get_additional_data</tt><big>(</big><em>metadata</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#Properties.get_additional_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.Properties.get_additional_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Return arbitrary additional data for the given
ClientMetadata object.  By convention this is usually a dict
object, but doesn&#8217;t need to be.</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</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Properties.PropertyFile">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Properties.</tt><tt class="descname">PropertyFile</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#PropertyFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Base Properties file 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"><strong>name</strong> &#8211; The filename of this properties file.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.PropertyFile._write">
<tt class="descname">_write</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#PropertyFile._write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropertyFile._write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the data in this data structure back to the property
file.</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.PropertyFile.get_additional_data">
<tt class="descname">get_additional_data</tt><big>(</big><em>metadata</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#PropertyFile.get_additional_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropertyFile.get_additional_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Get file data for inclusion in client metadata.</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.PropertyFile.validate_data">
<tt class="descname">validate_data</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#PropertyFile.validate_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropertyFile.validate_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Verify that the data in this file is valid.</p>
</dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.PropertyFile.write">
<tt class="descname">write</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#PropertyFile.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.PropertyFile.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the data in this data structure back to the property
file. This public method performs checking to ensure that
writing is possible and then calls <a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile._write" title="Bcfg2.Server.Plugins.Properties.PropertyFile._write"><tt class="xref py py-func docutils literal"><span class="pre">_write()</span></tt></a>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Properties.XMLPropertyFile">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Properties.</tt><tt class="descname">XMLPropertyFile</tt><big>(</big><em>name</em>, <em>fam=None</em>, <em>should_monitor=False</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#XMLPropertyFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.XMLPropertyFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="../../../development/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>, <a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Bcfg2.Server.Plugins.Properties.PropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.PropertyFile</span></tt></a></p>
<p>Handle XML Properties 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>filename</strong> (<em>string</em>) &#8211; The full path to the file to cache and monitor</li>
<li><strong>fam</strong> (<a class="reference internal" href="../../../development/fam.html#Bcfg2.Server.FileMonitor.FileMonitor" title="Bcfg2.Server.FileMonitor.FileMonitor"><em>Bcfg2.Server.FileMonitor.FileMonitor</em></a>) &#8211; The FAM object used to receive notifications of
changes</li>
<li><strong>should_monitor</strong> (<em>bool</em>) &#8211; Whether or not to monitor this file for
changes. It may be useful to disable
monitoring when, for instance, the file
is monitored by another object (e.g.,
an
<a class="reference internal" href="../../../development/plugins.html#Bcfg2.Server.Plugin.helpers.XMLDirectoryBacked" title="Bcfg2.Server.Plugin.helpers.XMLDirectoryBacked"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.XMLDirectoryBacked</span></tt></a>
object).</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="Bcfg2.Server.Plugins.Properties.XMLPropertyFile.__identifier__">
<tt class="descname">__identifier__</tt><em class="property"> = None</em><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.XMLPropertyFile.__identifier__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.XMLPropertyFile.Index">
<tt class="descname">Index</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#XMLPropertyFile.Index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.XMLPropertyFile.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="method">
<dt id="Bcfg2.Server.Plugins.Properties.XMLPropertyFile.validate_data">
<tt class="descname">validate_data</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#XMLPropertyFile.validate_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.XMLPropertyFile.validate_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Verify that the data in this file is valid.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="Bcfg2.Server.Plugins.Properties.YAMLPropertyFile">
<em class="property">class </em><tt class="descclassname">Bcfg2.Server.Plugins.Properties.</tt><tt class="descname">YAMLPropertyFile</tt><big>(</big><em>name</em>, <em>fam=None</em><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#YAMLPropertyFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.YAMLPropertyFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="../../../development/plugins.html#Bcfg2.Server.Plugin.helpers.FileBacked" title="Bcfg2.Server.Plugin.helpers.FileBacked"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugin.helpers.FileBacked</span></tt></a>, <a class="reference internal" href="#Bcfg2.Server.Plugins.Properties.PropertyFile" title="Bcfg2.Server.Plugins.Properties.PropertyFile"><tt class="xref py py-class docutils literal"><span class="pre">Bcfg2.Server.Plugins.Properties.PropertyFile</span></tt></a></p>
<p>Handle YAML Properties 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 to cache and monitor</li>
<li><strong>fam</strong> (<a class="reference internal" href="../../../development/fam.html#Bcfg2.Server.FileMonitor.FileMonitor" title="Bcfg2.Server.FileMonitor.FileMonitor"><em>Bcfg2.Server.FileMonitor.FileMonitor</em></a>) &#8211; The FAM object used to receive notifications of
changes</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="Bcfg2.Server.Plugins.Properties.YAMLPropertyFile.Index">
<tt class="descname">Index</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#YAMLPropertyFile.Index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.YAMLPropertyFile.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="method">
<dt id="Bcfg2.Server.Plugins.Properties.YAMLPropertyFile.validate_data">
<tt class="descname">validate_data</tt><big>(</big><big>)</big><a class="reference internal" href="../../../_modules/Bcfg2/Server/Plugins/Properties.html#YAMLPropertyFile.validate_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#Bcfg2.Server.Plugins.Properties.YAMLPropertyFile.validate_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Verify that the data in this file is valid.</p>
</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="#">Properties</a><ul>
<li><a class="reference internal" href="#enabling-properties">Enabling Properties</a></li>
<li><a class="reference internal" href="#data-structures">Data Structures</a></li>
<li><a class="reference internal" href="#usage">Usage</a><ul>
<li><a class="reference internal" href="#common-interface">Common Interface</a><ul>
<li><a class="reference internal" href="#writing-to-properties-files">Writing to Properties files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#xml-property-files">XML Property Files</a></li>
<li><a class="reference internal" href="#json-property-files">JSON Property Files</a></li>
<li><a class="reference internal" href="#yaml-property-files">YAML Property Files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#automatch">Automatch</a></li>
<li><a class="reference internal" href="#encrypted-properties-data">Encrypted Properties data</a></li>
<li><a class="reference internal" href="#accessing-properties-contents-from-genshi-templates">Accessing Properties contents from Genshi Templates</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
<li><a class="reference internal" href="#module-Bcfg2.Server.Plugins.Properties">Module Documentation</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="../generators/examples/genshi/test.html"
                        title="previous chapter">test</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="puppetenc.html"
                        title="next chapter">PuppetENC</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../../_sources/server/plugins/connectors/properties.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="puppetenc.html" title="PuppetENC"
             >next</a> |</li>
        <li class="right" >
          <a href="../generators/examples/genshi/test.html" title="test"
             >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" >The Bcfg2 Server</a> &raquo;</li>
          <li><a href="../index.html" >Plugins</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>