Sophie

Sophie

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

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>Tips for Bcfg2 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 Development" href="index.html" />
    <link rel="next" title="Bcfg2 unit testing" href="unit-testing.html" />
    <link rel="prev" title="Testing" href="testing.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="unit-testing.html" title="Bcfg2 unit testing"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="testing.html" title="Testing"
             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">Bcfg2 Development</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="tips-for-bcfg2-development">
<span id="development-tips"></span><h1>Tips for Bcfg2 Development<a class="headerlink" href="#tips-for-bcfg2-development" title="Permalink to this headline">ΒΆ</a></h1>
<ol class="arabic simple">
<li>Focus on either the client or server code. This focuses the development process down to the precise pieces of code that matter for the task at hand.<ul>
<li>If you are developing a client driver, then write up a small configuration specification that includes the needed characteristics.</li>
<li>If you are working on the server, run <tt class="docutils literal"><span class="pre">bcfg2-info</span></tt> and use to assess the code.</li>
</ul>
</li>
<li>Use the python interpreter. One of python&#8217;s most appealing features is interactive use of the interpreter.<ul>
<li>If you are developing for the client-side, run <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-i</span> <span class="pre">/usr/sbin/bcfg2</span></tt> with the appropriate bcfg2 options. This will cause the python interpreter to continue running, leaving all variables intact. This can be used to examine data state in a convenient fashion.</li>
<li>If you are developing for the server side, use <tt class="docutils literal"><span class="pre">bcfg2-info</span></tt> and the &#8220;debug&#8221; option. This will leave you at a python interpreter prompt, with the server core loaded in the variable &#8220;bcore&#8221;.</li>
</ul>
</li>
<li>Use <tt class="docutils literal"><span class="pre">pylint</span></tt> obsessively. It raises a lot of style-related warnings which can be ignored, but most all of the errors are legitimate.</li>
<li>If you are doing anything with Regular Expressions, <a class="reference external" href="http://kodos.sourceforge.net">Kodos</a> and <a class="reference external" href="http://re-try.appspot.com">re-try</a> are your friends.</li>
</ol>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="testing.html"
                        title="previous chapter">Testing</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="unit-testing.html"
                        title="next chapter">Bcfg2 unit testing</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/development/tips.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="unit-testing.html" title="Bcfg2 unit testing"
             >next</a> |</li>
        <li class="right" >
          <a href="testing.html" title="Testing"
             >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> 
      </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>