Sophie

Sophie

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

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>Client Metadata &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="The Bcfg2 Client" href="index.html" />
    <link rel="next" title="Agent Functionality using SSH" href="agent.html" />
    <link rel="prev" title="Bcfg2 RPM/YUM Client Drivers" href="tools/yum.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="agent.html" title="Agent Functionality using SSH"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="tools/yum.html" title="Bcfg2 RPM/YUM Client Drivers"
             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" accesskey="U">The Bcfg2 Client</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="client-metadata">
<span id="id1"></span><h1>Client Metadata<a class="headerlink" href="#client-metadata" title="Permalink to this headline">¶</a></h1>
<p>This page describes ClientMetadata objects. These are used to describe
clients in terms of a variety of parameters, group memberships, and
so forth.</p>
<div class="section" id="construction">
<h2>Construction<a class="headerlink" href="#construction" title="Permalink to this headline">¶</a></h2>
<p>ClientMetadata instances are constructed whenever the server needs
to recognize a client. This occurs in every aspect of client server
interaction:</p>
<ul class="simple">
<li>Probing</li>
<li>Configuration Generation</li>
<li>Statistics Upload</li>
</ul>
<p>This construction process spans several server plugins. The
<a class="reference internal" href="../server/plugins/grouping/metadata.html#server-plugins-grouping-metadata"><em>Metadata</em></a> is responsible for
initial instance creation, including the client hostname,
profile, and basic group memberships. After this initial creation,
Connector plugins (such as <a class="reference internal" href="../server/plugins/probes/index.html#server-plugins-probes-index"><em>Probes</em></a> or
<a class="reference internal" href="../server/plugins/connectors/properties.html#server-plugins-connectors-properties"><em>Properties</em></a>) can add additional group
memberships for clients. These memberships are merged into the instance;
that is, the new group memberships are treated as if they were included
in groups.xml. If any of these groups are defined in groups.xml,
then groups included there are included in the ClientMetadata instance
group list. At the end of this process, the ClientMetadata instance has
its complete set of group memberships. At this point, each connector
plugin has the opportunity to return an additional object which will be
placed in an attribute corresponding to the Connector name. For example,
the Probes plugin returns a dictionary of probe name to probe result
mappings for the client. This dictionary is available as the &#8220;Probes&#8221;
attribute. With this, ClientMetadata resolution is complete, and the
ClientMetadata instance can be used by the rest of the system.</p>
</div>
<div class="section" id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h2>
<p>ClientMetadata instances contain all of the information needed to
differentiate clients from one another. This data includes:</p>
<ul class="simple">
<li>hostname</li>
<li>groups</li>
<li>profile group</li>
<li>address information (if specified)</li>
</ul>
<p>ClientMetadata instances also contain a query object. This can be used
to query the metadata of other clients. Currently, several methods are
supported. In this table, we refer to the instance as meta. Each of
these is a function that must be called.</p>
<table border="1" class="docutils">
<colgroup>
<col width="55%" />
<col width="25%" />
<col width="21%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
<th class="head">Return Type</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>meta.query.names_by_groups([group list])</td>
<td>Returns names of
clients which are
members of all
groups</td>
<td>List of
client names</td>
</tr>
<tr class="row-odd"><td>meta.query.names_by_profile(profile)</td>
<td>Returns names of
clients which use
profile group</td>
<td>List of
client names</td>
</tr>
<tr class="row-even"><td>meta.query.all_clients()</td>
<td>Returns names of
all clients</td>
<td>List of
client names</td>
</tr>
<tr class="row-odd"><td>meta.query.all_groups()</td>
<td>Returns names of
all groups</td>
<td>List of
group names</td>
</tr>
<tr class="row-even"><td>meta.query.all()</td>
<td>Returns metadata
for all clients</td>
<td>List of
ClientMetadata
instances</td>
</tr>
<tr class="row-odd"><td>meta.query.by_name(name)</td>
<td>Returns metadata
for named client</td>
<td>ClientMetadata
instance</td>
</tr>
<tr class="row-even"><td>meta.query.by_groups([group list])</td>
<td>Returns metadata
for all members
of all groups</td>
<td>List of
ClientMetadata
instances</td>
</tr>
<tr class="row-odd"><td>meta.query.by_profile(profile)</td>
<td>Returns metadata
for all profile
havers</td>
<td>List of
ClientMetadata
instances</td>
</tr>
</tbody>
</table>
<p>In general, there is no substantial benefit to using name returning
versions of the query functions; metadata resolution is (in general) fast.</p>
</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="#">Client Metadata</a><ul>
<li><a class="reference internal" href="#construction">Construction</a></li>
<li><a class="reference internal" href="#contents">Contents</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="tools/yum.html"
                        title="previous chapter">Bcfg2 RPM/YUM Client Drivers</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="agent.html"
                        title="next chapter">Agent Functionality using SSH</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/client/metadata.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="agent.html" title="Agent Functionality using SSH"
             >next</a> |</li>
        <li class="right" >
          <a href="tools/yum.html" title="Bcfg2 RPM/YUM Client Drivers"
             >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 Client</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>