summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'upstream/master' into removefixJonathan Billings2011-04-254-107/+117
|\
| * unexpanded vcs keywords raise warning, not errorChris St. Pierre2011-04-251-2/+2
| |
| * Various bcfg2-lint fixes:Chris St. Pierre2011-04-254-105/+115
| | | | | | | | | | | | | | | | * check for all plugins before referencing them, since in --stdin mode even plugins like Bundler may not be instantiated * formatting fixes * made Bundles plugin work with or without genshi installed * fixed name of plugin in example bcfg2-lint.conf
* | Fix the bcfg2 client -r optionJonathan Billings2011-04-251-2/+2
|/ | | | | | | The man page for 'bcfg2' says to use -r 'all', 'Service' or 'Package', but the code only responded to -r 'all', 'service' or 'package'. Update the client to allow 'all', 'service', 'Service', 'package' and 'Package'.
* Misc. bcfg2-lint fixes and tweaks:Chris St. Pierre2011-04-213-6/+4
| | | | | | * fixed bcfg2-lint bug with older pythons * made bcfg2-lint silent by default on success * adjusted bcfg2-lint defaults and alerting levels to work better out-of-the-box
* Lots of cleanup for bcfg2-repo-validate rewrite:Chris St. Pierre2011-04-212-15/+19
| | | | | | | | | * Changed all references to bcfg2-repo-validate in the documentation to bcfg2-lint * Wrote man pages for bcfg2-lint and bcfg2-lint.conf * Cleaned up straggling references to bcfg2-repo-validate in Makefiles, spec files, and the POSIX tool * A few minor bug fixes
* fixed duplicate group detection in MetadataChris St. Pierre2011-04-201-2/+1
|
* short-circuit Pkgmgr lint checks if Pkgmgr plugin not enabledChris St. Pierre2011-04-201-0/+4
|
* Rewrote bcfg2-repo-validate as bcfg2-lint, which uses a pluginChris St. Pierre2011-04-209-2/+743
| | | | | | | | | interface to be lots more flexible and extensible. Added several more tests. If bcfg2-lint is run as bcfg2-repo-validate, it roughly emulates the functionality of that program. TODO: Need to figure out correct way to symlink bcfg2-repo-validate to bcfg2-lint on install.
* Add basic support for systemd services.Jeffrey C. Ollie2011-04-191-0/+59
| | | | | | | | To use, add "Systemd" to the "drivers" option in the "client" section of bcfg2.conf on the client. Then, define services on the server like this: <Service name="rabbitmq-server" status="on" reload="restart" type="systemd"/>
* Reports: Fix import error (Reported by emias on IRC)Sol Jerome2011-04-191-1/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* fixed PropertyFile.Index() to populate .data as a side effectChris St. Pierre2011-04-141-1/+37
|
* added Client tag to StructFile; made PropertyFile inherit from StructFileChris St. Pierre2011-04-142-19/+25
|
* A property file can now have a matching .xsd file (e.g.,Chris St. Pierre2011-04-131-0/+2
| | | | | | | | "Properties/foo.xml" and "Properties/foo.xsd") which specifies a schema for that property file. bcfg2-repo-validate will check the property file against its schema. Updated bcfg2-repo-validate man page with several new options.
* VCS: Initial commit (#754)Sol Jerome2011-04-131-0/+137
| | | | | | | | | Preliminary support for version control checkouts onto the client. This client tool is still fairly picky and has some known problems (incorrect git index file, for one). All the abstraction libraries left quite a bit to be desired. Also, none were packaged in popular distributions. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Tools: Skip Installation for mode='manual' services (#965)Sol Jerome2011-04-126-0/+30
| | | | | | | | | This allows for verification of specified services, but skips installation completely when mode is set to manual. This means that incorrect services will still show up in reports, but they won't be modified in an automated way. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Init: Fix SyntaxError (Reported by emias on IRC)Sol Jerome2011-04-121-10/+3
| | | | | | | | Python < 2.6 uses the '0600' format for specifying the mode while 2.6 and later allow the use of '0o600'. Since python 3 forces the latter, we can use the stat module to maintain compatibility with both. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Editor: Add missing comma (Reported by emias)Sol Jerome2011-04-121-1/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* added next() method to Reports BatchFetch iterator for compatibility with ↵Chris St. Pierre2011-04-121-0/+4
| | | | pre-3.0 versions of python
* Reports: Use the newer DATABASES option in settings.pyTim Laszlo2011-04-111-19/+28
|
* Reports: delete orphaned Reasons after the purge command is runTim Laszlo2011-04-111-0/+2
|
* Added two flags to bcfg2-repo-validate:Chris St. Pierre2011-04-111-0/+6
| | | | | | | | | * --schema allows you to specify a custom path to the XML Schema files * --stdin allows you to specify a list of files on stdin and bcfg2-repo-validate will only validate those files. This is particularly useful to speed up validation checks in post-commit hooks (or similar).
* PY3K + PEP8 fixes for remaining filesSol Jerome2011-04-079-121/+185
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Client: PY3K + PEP8 fixesSol Jerome2011-04-076-50/+88
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* bcfg2-admin: PY3K + PEP8 fixesSol Jerome2011-04-0614-180/+296
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Hostbase: PY3K + PEP8 fixesSol Jerome2011-04-061-35/+44
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugins: PY3K + PEP8 fixesSol Jerome2011-04-0617-201/+328
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Reports: Fix deprecated 'raise' usageSol Jerome2011-04-062-7/+7
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Reports: PY3K + PEP8 fixesSol Jerome2011-04-0611-224/+345
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* APT: Catch apt-python initialization failures (#1001)Sol Jerome2011-04-061-1/+5
| | | | | | | This still needs to be fixed in apt-python, but we can at least give the user a smarter failure and disable the client tool properly here. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* sensible defaults for the Django module admin email addressesChris St. Pierre2011-04-052-2/+2
|
* Proxy: Fix for Python 2.7 xmlrpclib Transport class (Patch from Gordon Messmer)Sol Jerome2011-04-031-6/+12
| | | | | | | | Something changed in Python 2.7 with respect to the xmlrpclib.Transport api such that you need to store the authentication headers in self.extra_headers so that they are sent to the server properly. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Fixed previous commit. Decorators are hard, let's go shopping.Chris St. Pierre2011-03-301-2/+2
|
* Use self.log.info() instead of 'print' to produce stats forChris St. Pierre2011-03-301-6/+10
| | | | 'bcfg2-admin reports purge' to make purge honor -q flag.
* add ability to ignore a debian ServiceJoe Digilio2011-03-252-0/+8
|
* Add error checking to make sure gpg-pubkeys have all needed informationJack Neely2011-03-171-0/+8
| | | | (cherry picked from commit 81fce09fb9671c652703c37a5f9b48d020a34307)
* Convert hostbase/reports files to unix file formatsSol Jerome2011-03-173-75/+75
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* In TGenshi templates, the "name" variable is set to the destination path of ↵Chris St. Pierre2011-03-161-4/+5
| | | | the file. If an altsrc attribute was used, then "name" is set to the altsrc value; otherwise, it is set to the "name" attribute of the original <Path> tag used to declare the file. In the new Genshi handler functionality of Cfg, this had not been ported over; "name" was always the original name of the file, even if altsrc was specified. Fixed that bug.
* Cfg: Fix unicode traceback (Resolves #993)Sol Jerome2011-03-071-7/+25
| | | | | | | | If the Cfg plugin handled a file containing a character which isn't contained in the encoding specified, it resulted in a traceback. This now fails gracefully and suggests use of an alternate encoding. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Better handling of backup files in paranoid mode (Patch from mkd ticket #995)Sol Jerome2011-03-061-3/+4
| | | | | | | | | | | | | | | | | | | | 1. Client removes only one excess backup copy at every configfile change, even if there are more backup copies eligible for deletion. Moreover, lowering the max_copies parameter could cause client to never remove any excess files from there. 2. Space character in backup file names is mildly annoying - datetime.isoformat() will put a 'T' there instead. 3. More robust handling of 'paranoid' attribute values from info.xml (paranoid='True' should also be allowed - currently only paranoid='true' works as expected). A simple patch (attached) addresses all these issues. /mkd Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* fixed handling of group- and host-specific .genshi templates in Cfg ↵Chris St. Pierre2011-03-041-1/+1
| | | | (non-greedy matching)
* APT/YUMng: Remove stray punctuationSol Jerome2011-03-012-2/+2
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Bundler: Add support for genshi .xml bundlesSol Jerome2011-02-261-3/+20
| | | | | | | This commit modifies the Bundler plugin to allow for genshi templates with .xml file extensions via the xml namespace (Resolves ticket #861). Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* YUMng: Fix handling of gpg-pubkey packages by yum 3.2.20 on SLESChris St. Pierre2011-02-241-1/+6
|
* Service: Allow services that are both supervised and custom (Ticket #979)Chris St. Pierre2011-02-241-4/+2
|
* Cfg: Create info.xml files by default with bcfg2-admin pullSol Jerome2011-02-211-17/+9
| | | | | | | Using info.xml files allows the user to validate permissions with the info schema. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* POSIX: Implement recursive attribute for nonexistent PathsSol Jerome2011-02-211-6/+30
| | | | | | | | The POSIX client tool now has the ability to recursively remove the contents of a specified directory provided there are no other managed entries under the directory. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Reports: Disable template loading from Python eggsSol Jerome2011-02-211-1/+0
| | | | | | | | | | | | This does not appear to work with the default settings for some distributions. Here is what happens on Ubuntu: [error] /usr/lib/pymodules/python2.6/django/template/loader.py:64: UserWarning: Your TEMPLATE_LOADERS setting includes 'django.template.loaders.eggs.load_template_source', but your Python installation doesn't support that type of template loading. Consider removing that line from TEMPLATE_LOADERS. This appears to be disabled in django by default as per http://docs.djangoproject.com/en/dev/ref/templates/api/#loading-templates. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* SMF: Reports current service status when using the Solaris SMF driver. ↵Sol Jerome2011-02-141-0/+1
| | | | | | | | (Resolves #988) Patch made available in ticket report. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* DBStats: use clients_xml classTim Laszlo2011-02-101-1/+1
|