summaryrefslogtreecommitdiffstats
path: root/doc/development
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development')
-rw-r--r--doc/development/cfg.txt9
-rw-r--r--doc/development/core.txt4
-rw-r--r--doc/development/fam.txt5
-rw-r--r--doc/development/plugins.txt20
-rw-r--r--doc/development/setup.txt6
-rw-r--r--doc/development/submitting-patches.txt144
-rw-r--r--doc/development/unit-testing.txt5
7 files changed, 166 insertions, 27 deletions
diff --git a/doc/development/cfg.txt b/doc/development/cfg.txt
index 6533e0d7a..a4360559f 100644
--- a/doc/development/cfg.txt
+++ b/doc/development/cfg.txt
@@ -58,7 +58,6 @@ exceptions:
Global Variables
================
-.. autodata:: Bcfg2.Server.Plugins.Cfg.SETUP
.. autodata:: Bcfg2.Server.Plugins.Cfg.CFG
Existing Cfg Handlers
@@ -81,18 +80,11 @@ Creators
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgPrivateKeyCreator.CfgPrivateKeyCreator
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgPublicKeyCreator.CfgPublicKeyCreator
-Filters
--------
-
-.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgCatFilter.CfgCatFilter
-.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgDiffFilter.CfgDiffFilter
-
Info Handlers
-------------
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgInfoXML.CfgInfoXML
-.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgLegacyInfo.CfgLegacyInfo
Verifiers
---------
@@ -105,6 +97,5 @@ Other Cfg Objects
These other objects comprise the remainder of the Cfg plugin, and are
included for completeness.
-.. autoattribute:: Bcfg2.Server.Plugins.Cfg.DEFAULT_INFO
.. autoclass:: Bcfg2.Server.Plugins.Cfg.CfgEntrySet
.. autoclass:: Bcfg2.Server.Plugins.Cfg.Cfg
diff --git a/doc/development/core.txt b/doc/development/core.txt
index 886a5538b..3953d3402 100644
--- a/doc/development/core.txt
+++ b/doc/development/core.txt
@@ -59,7 +59,7 @@ Builtin Core
The builtin server core consists of the core implementation
(:class:`Bcfg2.Server.BuiltinCore.Core`) and the XML-RPC server
-implementation (:mod:`Bcfg2.SSLServer`).
+implementation (:mod:`Bcfg2.Server.SSLServer`).
Core
~~~~
@@ -69,7 +69,7 @@ Core
XML-RPC Server
~~~~~~~~~~~~~~
-.. automodule:: Bcfg2.SSLServer
+.. automodule:: Bcfg2.Server.SSLServer
Multiprocessing Core
--------------------
diff --git a/doc/development/fam.txt b/doc/development/fam.txt
index c2c3b14f5..e967aaf68 100644
--- a/doc/development/fam.txt
+++ b/doc/development/fam.txt
@@ -56,11 +56,6 @@ Pseudo
.. automodule:: Bcfg2.Server.FileMonitor.Pseudo
-Fam
----
-
-.. automodule:: Bcfg2.Server.FileMonitor.Fam
-
Gamin
-----
diff --git a/doc/development/plugins.txt b/doc/development/plugins.txt
index 3f2a888ac..e4f16b84d 100644
--- a/doc/development/plugins.txt
+++ b/doc/development/plugins.txt
@@ -128,13 +128,15 @@ The two attributes you need to know about are:
of the caching mode. See :ref:`server-caching` for a description of
each mode.
* :attr:`Bcfg2.Server.Core.metadata_cache`: A dict-like
- :class:`Bcfg2.Cache.Cache` object that stores the cached data.
+ :class:`Bcfg2.Server.Cache.Cache` object that stores the cached
+ data.
:class:`Bcfg2.Server.Plugin.base.Plugin` objects have access to the
:class:`Bcfg2.Server.Core` object as ``self.core``. In general,
-you'll be interested in the :func:`Bcfg2.Cache.Cache.expire` method;
-if called with no arguments, it expires all cached data; if called
-with one string argument, it expires cached data for the named client.
+you'll be interested in the :func:`Bcfg2.Server.Cache.Cache.expire`
+method; if called with no arguments, it expires all cached data; if
+called with one string argument, it expires cached data for the named
+client.
It's important, therefore, that your Connector plugin can either track
when changes are made to the group membership it reports, and expire
@@ -163,7 +165,7 @@ Tracking Execution Time
.. versionadded:: 1.3.0
Statistics can and should track execution time statistics using
-:mod:`Bcfg2.Statistics`. This module tracks execution time for the
+:mod:`Bcfg2.Server.Statistics`. This module tracks execution time for the
server core and for plugins, and exposes that data via ``bcfg2-admin
perf``. This data can be invaluable for locating bottlenecks or other
performance issues.
@@ -184,13 +186,13 @@ This will track the execution time of ``do_something``.
More granular usage is possible by using :func:`time.time` to manually
determine the execution time of a given event and calling
-:func:`Bcfg2.Statistics.Statistics.add_value` with an appropriate
+:func:`Bcfg2.Server.Statistics.Statistics.add_value` with an appropriate
statistic name.
-Bcfg2.Statistics
-^^^^^^^^^^^^^^^^
+Bcfg2.Server.Statistics
+^^^^^^^^^^^^^^^^^^^^^^^
-.. automodule:: Bcfg2.Statistics
+.. automodule:: Bcfg2.Server.Statistics
Plugin Helper Classes
---------------------
diff --git a/doc/development/setup.txt b/doc/development/setup.txt
index 05ad4157f..42aa0b023 100644
--- a/doc/development/setup.txt
+++ b/doc/development/setup.txt
@@ -1,4 +1,5 @@
.. -*- mode: rst -*-
+.. vim: ft=rst
.. _development-setup:
@@ -12,6 +13,11 @@ Checking Out a Copy of the Code
git clone https://github.com/Bcfg2/bcfg2.git
+.. note::
+
+ The URL above is read-only. If you are planning on submitting patches
+ upstream, please see :ref:`development-submitting-patches`.
+
* Add :file:`bcfg2/src/sbin` to your :envvar:`PATH` environment variable
* Add :file:`bcfg2/src/lib` to your :envvar:`PYTHONPATH` environment variable
diff --git a/doc/development/submitting-patches.txt b/doc/development/submitting-patches.txt
new file mode 100644
index 000000000..04492e6e1
--- /dev/null
+++ b/doc/development/submitting-patches.txt
@@ -0,0 +1,144 @@
+.. -*- mode: rst -*-
+.. vim: ft=rst
+
+.. _development-submitting-patches:
+
+==================
+Submitting Patches
+==================
+
+The purpose of this document is to assist those who may be less familiar
+with git in submitting patches upstream. While git is powerful, it can
+be somewhat confusing to those who don't use it regularly (and even
+those who do).
+
+.. note::
+
+ We prefer more in-depth commit messages than those
+ given below which are purely for brevity in this guide. See
+ http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
+ for more about creating proper git commit messages.
+
+.. _Github: https://github.com/
+
+`Github`_
+=========
+
+These steps outline one way of submitting patches via `Github`_. First,
+you will want to `fork <https://github.com/Bcfg2/bcfg2/fork>`_ the
+upstream Bcfg2 repository.
+
+Create a local branch
+---------------------
+
+Once you have forked the upstream repository, you should clone a local
+copy (where <YOUR USERNAME> is your github username).
+
+::
+
+ git clone git@github.com:<YOUR USERNAME>/bcfg2.git
+
+Create a local feature/bugfix branch off the appropriate upstream
+branch. For example, let's say we want to submit a bugfix for
+:program:`bcfg2-info` against the 1.2.x series. We can create a
+``fix-bcfg2-info`` branch which is a copy of the ``maint-1.2`` branch.
+
+::
+
+ git branch fix-bcfg2-info maint-1.2
+ git checkout fix-bcfg2-info
+
+Commit changes to your local branch
+-----------------------------------
+
+Next make whatever changes need to be made and commit them to the
+``fix-bcfg2-info`` branch.
+
+::
+
+ git add src/sbin/bcfg2-info
+ git commit -m "Fix bcfg2-info bug"
+
+Now you need to push your ``fix-bcfg2-info`` branch to github.
+
+::
+
+ git push origin fix-bcfg2-info
+
+Submit pull request
+-------------------
+
+Next, submit a pull request against the proper branch (in this case,
+https://github.com/username/bcfg2/pull/new/fix-bcfg2-info -- again,
+username is your github username). At the top of the pull request, you can
+edit the upstream branch you are targetting so that you create the pull
+request against the proper upstream branch (in this case, ``maint-1.2``).
+
+All that's left to do is to write up a description of your pull request
+and click **Send pull request**. Since your local branch is specific to
+this fix, you can add additional commits if needed and push them. They
+will automatically be added to the pull request.
+
+Remove local branch
+-------------------
+
+Once we have merged your pull request, you can safely delete your local
+feature/bugfix branch. To do so, you must first checkout a different branch.
+
+::
+
+ git checkout master # switch to a different branch
+ git branch -d fix-bcfg2-info # delete your local copy of fix-bcfg2-info
+ git push origin :fix-bcfg2-info # delete fix-bcfg2-info from github
+
+Mailing List
+============
+
+The following lists the steps needed to use git's facilities for
+emailing patches to the mailing list.
+
+Commit changes to your local clone
+----------------------------------
+
+For example, let's say we want to fix a big in :program:`bcfg2-info`.
+For the 1.2.x series.
+
+::
+
+ git clone https://github.com/Bcfg2/bcfg2.git
+ git checkout maint-1.2
+ # make changes
+ git add src/sbin/bcfg2-info
+ git commit -m "Fix bcfg2-info bug"
+
+Setup git for gmail (optional)
+------------------------------
+
+If you would like to use the GMail SMTP server, you can add the following
+to your ~/.gitconfig file as per the :manpage:`git-send-email(1)` manpage.
+
+::
+
+ [sendemail]
+ smtpencryption = tls
+ smtpserver = smtp.gmail.com
+ smtpuser = yourname@gmail.com
+ smtpserverport = 587
+
+Format patches
+--------------
+
+Use git to create patches formatted for email with the following.
+
+::
+
+ git format-patch --cover-letter -M origin/maint-1.2 -o outgoing/
+
+
+Send emails to the mailing list
+-------------------------------
+
+Edit ``outgoing/0000-*`` and then send your emails to the mailing list
+(bcfg-dev@lists.mcs.anl.gov)::
+
+ git send-email outgoing/*
diff --git a/doc/development/unit-testing.txt b/doc/development/unit-testing.txt
index 7311f49d7..8007e8c75 100644
--- a/doc/development/unit-testing.txt
+++ b/doc/development/unit-testing.txt
@@ -1,4 +1,5 @@
.. -*- mode: rst -*-
+.. vim: ft=rst
.. _development-unit-testing:
@@ -13,7 +14,7 @@ You will first need to install the `Python Mock Module`_ and `Python
Nose`_ modules. You can then run the existing tests with the
following:
-.. code-block: bash
+.. code-block: sh
cd testsuite
nosetests
@@ -123,7 +124,7 @@ writing tests for the base :class:`Bcfg2.Server.Plugin.base.Plugin`
class, which all Bcfg2 :ref:`server-plugins-index` inherit from via
the :mod:`Plugin interfaces <Bcfg2.Server.Plugin.interfaces>`,
yielding several levels of often-multiple inheritance. To make this
-easier, our unit tests adhere to several design considerations:
+easier, our unit tests adhere to several design considerations.
Inherit Tests
-------------