From 1ca7ed2c89c7cd6fdc84b62c79a1b19221e8b9b8 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 21 Mar 2013 16:49:48 -0400 Subject: doc: fixed example Reporting config --- doc/reports/dynamic.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/reports/dynamic.txt b/doc/reports/dynamic.txt index 14eff6f54..b3028e9e1 100644 --- a/doc/reports/dynamic.txt +++ b/doc/reports/dynamic.txt @@ -56,7 +56,7 @@ Install Be sure to include the specified fields included in the example ``bcfg2.conf`` file. These can be specified in either ``/etc/bcfg2.conf``, if it is readable by the webserver user, or ``/etc/bcfg2-web.conf``. Any -database supported by `Django `_ can be used. +database supported by `Django `_ can be used. As of version 1.3, `South `_ is used to control schema changes. If your database is not supported by South, any updates will need to be applied manually. Sqlite is configured by default. @@ -78,11 +78,11 @@ databases. After configuring your database be sure to run `bcfg2-admin reports init` to create the schema. -To enable statistics collection in the bcfg2-server, add +To enable statistics collection in the bcfg2-server, add :ref:`server-plugins-statistics-reporting` to the **plugins** line in your ``bcfg2.conf`` and restart the bcfg2-server. A report collecting -daemon should be run to import the collected statistics into the backend. -Please see the section :ref:`Report Collector ` for more +daemon should be run to import the collected statistics into the backend. +Please see the section :ref:`Report Collector ` for more information. Detailed installation instructions can be found :ref:`here @@ -155,7 +155,7 @@ http://localhost/bcfg2 and see the new reports. Upgrading ============ -1. Convert database config +1. Convert database config Run `tools/upgrade/1.3/migrate_configs.py` @@ -186,14 +186,14 @@ Upgrading Configuring =========== -Most of the configuration is handled through the ``/etc/bcfg2.conf`` or alternatively -``/etc/bcfg2-web.conf``. +Most of the configuration is handled through the ``/etc/bcfg2.conf`` +or alternatively ``/etc/bcfg2-web.conf``. An example using the defaults is listed below:: [database] engine = sqlite3 - name = '/var/lib/bcfg2/etc/bcfg2.sqlite' + name = /var/lib/bcfg2/etc/bcfg2.sqlite user = password = host = @@ -262,7 +262,7 @@ reporting Statistics Transports --------------------- -A transport is required to pass the data collected from the bcfg2-server +A transport is required to pass the data collected from the bcfg2-server to the bcfg2-report-collector. At the time of this writing two transports are available: @@ -273,7 +273,7 @@ are available: Future transports will allow multiple servers to pass data to a single or multiple bcfg2-report-collector processes. New installations default to and should use the -LocalFilesystem transport. Upgrades will use DirectStore by default in the 1.3 +LocalFilesystem transport. Upgrades will use DirectStore by default in the 1.3 release. .. Note:: @@ -295,7 +295,7 @@ An example configuration with the default values:: redis_port = 6379 redis_db = 0 -bcfg2-admin commands operate slightly differently in this mode. Instead of querying the +bcfg2-admin commands operate slightly differently in this mode. Instead of querying the database directly, rpc commands are issued to the report collectors. This only affects the minestruct and pull commands. -- cgit v1.2.3-1-g7c22 From 9444a7f8e7f304b05a979675d2e9b2c71757f9d2 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 22 Mar 2013 08:57:28 -0400 Subject: doc: write and use proper sphinx docs for MetadataQuery/ClientMetadata classes --- doc/server/plugins/grouping/metadata.txt | 71 ++------------------------------ 1 file changed, 4 insertions(+), 67 deletions(-) (limited to 'doc') diff --git a/doc/server/plugins/grouping/metadata.txt b/doc/server/plugins/grouping/metadata.txt index f4c5cbcb3..fe0d2683e 100644 --- a/doc/server/plugins/grouping/metadata.txt +++ b/doc/server/plugins/grouping/metadata.txt @@ -233,6 +233,8 @@ the href is supposed to be a URL.) For instance: +.. code-block:: xml + @@ -270,74 +272,9 @@ A special client metadata class is available to :ref:`server-plugins-generators-cfg-genshi` and :ref:`server-plugins-generators-cfg-cheetah`. -+------------+------------------------------------------------+---------------+ -| Attribute | Description | Value | -+============+================================================+===============+ -| hostname | Client hostname | String | -+------------+------------------------------------------------+---------------+ -| profile | Client profile | String | -+------------+------------------------------------------------+---------------+ -| aliases | Client aliases | List | -+------------+------------------------------------------------+---------------+ -| addresses | Adresses this client is known by | List | -+------------+------------------------------------------------+---------------+ -| groups | Groups this client is a member of | List | -+------------+------------------------------------------------+---------------+ -| categories | Categories of this clients groups | List | -+------------+------------------------------------------------+---------------+ -| uuid | uuid identifier for this client | String | -+------------+------------------------------------------------+---------------+ -| password | bcfg password for this client | String | -+------------+------------------------------------------------+---------------+ -| connectors | connector plugins known to this client | List | -+------------+------------------------------------------------+---------------+ -| query | `MetadataQuery`_ object | MetadataQuery | -+------------+------------------------------------------------+---------------+ - - -+-----------------------------+------------------------------------------------+-------------------+ -| Method | Description | Value | -+=============================+================================================+===================+ -| inGroup(group) | True if this client is a memnber of 'group' | Boolean | -+-----------------------------+------------------------------------------------+-------------------+ -| group_in_category(category) | Returns the group in 'category' if the client | String | -| | is a member of 'category', otherwise '' | | -+-----------------------------+------------------------------------------------+-------------------+ +.. autoclass:: Bcfg2.Server.Plugins.Metadata.ClientMetadata MetadataQuery ------------- -This class provides query methods for the metadata of all clients -known to the Bcfg2 server. Note that ``*by_groups()`` and -``*by_profiles()`` behave differently; for a client to be included in -the return value of a ``by_groups()`` method, it must be a member of -*all* groups listed in the argument; for a client to be included in -the return value of a ``by_profiles()`` method, it must have any group -listed as its profile group. - -+------------------------------+------------------------------------------------+-------------------+ -| Method | Description | Value | -+==============================+================================================+===================+ -| by_name(client) | Get ClientMetadata object for 'client' | ClientMetadata | -+------------------------------+------------------------------------------------+-------------------+ -| by_groups(groups) | Get ClientMetadata object for clients in all | List of | -| | listed groups | ClientMetadata | -+------------------------------+------------------------------------------------+-------------------+ -| by_profiles(client) | Get ClientMetadata objects for clients whose | List of | -| | profile matches any listed profile group | ClientMetadata | -+------------------------------+------------------------------------------------+-------------------+ -| names_by_groups(groups) | Get the names of all clients in all listed | List of strings | -| | groups | | -+------------------------------+------------------------------------------------+-------------------+ -| names_by_profiles(profiles) | Get the names of clients whose profile matches | List of strings | -| | any listed profile group | | -+------------------------------+------------------------------------------------+-------------------+ -| all_clients() | All known client hostnames | List of strings | -+------------------------------+------------------------------------------------+-------------------+ -| all_groups() | All known group names | List of strings | -+------------------------------+------------------------------------------------+-------------------+ -| all_groups_in_category(cat) | The names of all groups in category 'cat' | List of strings | -+------------------------------+------------------------------------------------+-------------------+ -| all() | Get ClientMetadata for all clients | List of | -| | | ClientMetadata | -+------------------------------+------------------------------------------------+-------------------+ +.. autoclass:: Bcfg2.Server.Plugins.Metadata.MetadataQuery -- cgit v1.2.3-1-g7c22