summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugin.py
Commit message (Collapse)AuthorAgeFilesLines
* made GroupSpool more forgiving of changed events on files it doesn't know ↵Chris St. Pierre2012-01-261-20/+39
| | | | about (#992)
* fixed Pkgmgr bcfg2-lint plugin (#1082)Chris St. Pierre2012-01-251-0/+3
|
* added toggle_debug back to Packages (#1091)Chris St. Pierre2012-01-231-11/+20
|
* Since XMLSrc doesn't return anything from Cache(), don't bother looking at ↵Calen Pennington2012-01-171-5/+3
| | | | the results
* cherry-picked a2cc392 Switch to shallow rather than deep copies to improve ↵Chris St. Pierre2012-01-131-4/+3
| | | | performance
* merged branch rules_regexChris St. Pierre2012-01-131-0/+49
|\
| * added SimpleConfig plugin for easy config files; made Packages and Rules use ↵Chris St. Pierre2011-12-301-0/+49
| | | | | | | | SimpleConfig; made regex in rules off by default, but configurable in rules.conf
* | added __str__ and __repr__ to FileBacked plugins to make bcfg2-info ↵Chris St. Pierre2012-01-121-0/+9
| | | | | | | | showclient Properties output prettier
* | fixed logging in GroupPatternsChris St. Pierre2012-01-091-2/+0
| |
* | added logger object to FileBacked pluginsChris St. Pierre2012-01-091-1/+3
|/
* Improve code readability.Raul Cuza2011-12-091-1/+2
|
* Add a number of features to SSHbase:Chris St. Pierre2011-10-271-17/+22
| | | | | | | * Support for group-specific host keys * Support for fully static host- and group-specific ssh_known_hosts * (Support for totally generic host keys and ssh_known_hosts, too, but that's pretty useless.) * Support for info.xml, info, and :info files; only info.xml is likely to be useful, with the <Path> directive
* Don't cache StructFile entriesHolger Weiß2011-10-201-8/+4
| | | | | | Re-parse the contents of a StructFile each time they are requested, instead of caching them. This makes sure that any group membership changes are taken into account when <Group> tags are parsed.
* * Added support for yum libraries (if available and configured). ThisChris St. Pierre2011-10-071-3/+5
| | | | | | | | | | | | | | | | | | can dramatically reduce memory usage, and fixed several bugs: * #1014 (Package plugin can't resolve dependencies for rpms with Require: tags for full paths that aren't Provided explicitly) * #991 (Dependency Resolution difference between Package and yum) * #996 (Packages high memory usage) * Added support for Yum package groups when using yum libraries (#1039) * Fixed #911 (bcfg2 output for wrong package version with Packages is misleading) * YUMng turns down the Yum debug level itself depending on the debug/verbosity level requested by bcfg2 so you don't have to reduce the Yum debug level on a global basis * Added support for Pulp repositories, including registering Pulp consumers and binding to repositories * Added ability to disable magic OS groups
* fixed issue with bogus filenames in Bundler in a more generic way for all ↵Chris St. Pierre2011-10-051-3/+2
| | | | DirectoryBacked plugins
* fixed previous commit so that SingleXMLFileBacked plugins use xinclude, and ↵Chris St. Pierre2011-09-191-18/+27
| | | | GroupPatterns uses SingleXMLFileBacked correctly
* made all XMLFileBacked plugins (e.g., GroupPatterns) support XIncludeChris St. Pierre2011-09-191-4/+25
|
* added Defaults pluginChris St. Pierre2011-09-191-4/+4
|
* Plugin.py: Add filename to error message (Reported by Kioob on IRC)Sol Jerome2011-08-311-1/+2
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* fixed logic with selecting correct rule from previous commitChris St. Pierre2011-08-311-2/+2
|
* added regex support to RulesChris St. Pierre2011-08-311-10/+25
|
* Plugin.py: Deal with more vim temporary filesSol Jerome2011-08-171-1/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Filter for ignored files earlier to eliminate traceback.Mike McCallister2011-08-171-5/+5
| | | | | | | | Ignored files (like Vim swap files) were being picked up by the File Monitor and were causing tracebacks because they are invalid XML. Now check for such ignored file patterns before doing any other processing. (cherry picked from commit c266631eb36e117bad0f297506dc301ee9cc0487)
* Be a little more conservative in handling "changed" events.Mike McCallister2011-08-091-17/+44
| | | | | | | | | Previously, if we got a "changed" event for a path we weren't monitoring, we would log a warning and ignore it. Now, we log the warning, but treat it like a "created" event so we know about the file/directory going forward. This situation shouldn't occur, but this new logic will handle it a little better. (cherry picked from commit 29701f299632ea343d7b58af4d3b7a143ced0078)
* fixed info.xml XMLSrc fixChris St. Pierre2011-08-031-1/+1
|
* Merge branch 'master' of https://github.com/mikemccllstr/bcfg2Sol Jerome2011-08-021-13/+16
|\
| * Fix error that occurs when deleting and re-creating the same directory.Mike McCallister2011-07-291-13/+16
| | | | | | | | | | | | | | FileMonitor never forgets about directories you've asked it to watch, so we should never remove them from self.handles. Otherwise, once deleted and readded, events will arrive with a requestID we don't have a handle for.
* | split up XMLSrc parsers used for Rules and info.xmlChris St. Pierre2011-08-011-5/+18
|/
* Fixed problem with recent DirectoryBacked changes that caused a traceback on ↵Mike McCallister2011-07-261-3/+12
| | | | Properties initialization.
* Rewrote DirectoryBacked so it handles files contained in an arbitrary ↵Mike McCallister2011-07-261-37/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory layout. Previously, DirectoryBacked (and as a result Bundler, Deps, Rules, Base, Pkgmgr, and others) only recognized XML files contained in the top-level plugin directory, for example: Deps/foo.xml Deps/subdir/foo.xml # <--- Ignored Bundler/bar.xml Bundler/subdir/baz.xml # <--- Ignored Now it can support the following as well: Deps/debian-lenny/foo.xml Deps/debian-squeeze/foo.xml Bundler/group-a/bar.xml Bundler/group-b/baz.xml Note that the directories and filenames do not factor into the semantic meaning of the configuration specification. The contents of foo.xml must stand alone, as if they were in the same single-level directory as before. In the case of Deps, Rules, Pkgmgr, and Svcmgr, you must use Groups and priorities within the XML files as needed to ensure that Bcfg2 can correctly resolve the configuration for your hosts. For example, prior to this change you would use a single file like the following: Deps/foo.xml: <Dependencies priority="0"> <Group name="debian-lenny"> <Package name="foo"> <Path name="/etc/foo.conf"/> </Package> </Group> <Group name="debian-squeeze"> <Package name="foo"> <Path name="/etc/foo.conf"/> <Path name="/etc/bar.conf"/> </Package> </Group> </Dependencies> Now you can use a pair of files in separate directories like the following. Note how the groups within each file prevent there from being two sources for a single package: Deps/debian-lenny/foo.xml: <Dependencies priority="0"> <Group name="debian-lenny"> <Package name="foo"> <Path name="/etc/foo.conf"/> </Package> </Group> </Dependencies> Deps/debian-squeeze/foo.xml: <Dependencies priority="0"> <Group name="debian-squeeze"> <Package name="foo"> <Path name="/etc/foo.conf"/> <Path name="/etc/bar.conf"/> </Package> </Group> </Dependencies> In the case of Bundler, individual filenames must remain unique throughout the directory hierarchy, and they must match the bundle name.
* Added docstring to explain what 'datastore' argument contains.Mike McCallister2011-07-231-0/+5
|
* Created a new method to return a sorted list of plugins by type.Mike McCallister2011-07-221-0/+5
| | | | | | | | | | | | | | | | | | | | Replaced many list comprehensions in Core.py with a new method named plugins_by_type(), which does the same thing with an added twist: this new method also sorts the list of plugins by a new field named sort_order. It also uses the name of the plugin where the sort_order values are the same. This lets us control the processing sequence of plugins that need to build on the results of a plugin that runs prior to them. The immediate example is Deps, which should run after Packages has generated the full list of packages to be installed. Prior to this commit, it was impossible to control the order in which they ran. A future commit will (hopefully) take advantage of this capability. This commit also splits the Core.validate_data() method into two: one for validate_structures() and one for validate_goals(), instead of passing in a base class and using if logic. This approach seemed a little clearer to me.
* made info.xml files understand <Path> tags to better set permissions on ↵Chris St. Pierre2011-07-191-11/+14
| | | | altsrc'd files
* prevent KeyErrors when directories get changed by rsyncTorsten Rehn2011-07-041-1/+1
| | | | This wasn't originally anticipated, but if a repository is updated via rsync, HandleEvent() receives 'changed' actions for directories as well. Directories aren't present in self.entries and consequently caused KeyErrors.
* New Info attribute: "sensitive"Holger Weiß2011-06-291-2/+4
| | | | | | The contents/diffs of <Path>s which are marked as "sensitive" are now omitted from the reports transmitted to the server, so that they won't end up in the statistics database.
* Handle :info file removalHolger Weiß2011-06-261-1/+1
| | | | | Handle the removal of :info files in the same way as the removal of info files (without leading colon) is handled.
* change error to debugChris St. Pierre2011-06-161-2/+1
|
* fixed bugs with handling of negate in new StructFile.Match()Chris St. Pierre2011-06-151-2/+4
|
* bug fixesChris St. Pierre2011-06-151-8/+12
|
* made StructFile.Match() work with Group/Client tags inside other tagsChris St. Pierre2011-06-151-43/+37
|
* PY3K: Finish server-side code fixesSol Jerome2011-06-141-0/+3
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugin: Fix nasty list comprehension bugSol Jerome2011-06-141-2/+2
| | | | | | | It appears as though Python 2 kept around variables assigned within a list comprehensions which caused this to go unnoticed. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugins: Handle builtin file type for PY3KSol Jerome2011-05-031-2/+5
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugins: Fix import and indent errorsSol Jerome2011-04-261-0/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugins: Add full PY3K compatibilitySol Jerome2011-04-261-9/+18
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* added Client tag to StructFile; made PropertyFile inherit from StructFileChris St. Pierre2011-04-141-11/+23
|
* PY3K + PEP8 fixes for remaining filesSol Jerome2011-04-071-1/+1
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* Plugins: PY3K + PEP8 fixesSol Jerome2011-04-061-33/+69
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* EntrySet: Add generic ignore support for files named \*.genshi_include, ↵Narayan Desai2011-01-221-1/+1
| | | | enabling splitting of genshi templates (Resolves Ticket #897)
* Cfg: pull file permissions defaults uniformly (Resolves Ticket #958) (Patch ↵Narayan Desai2011-01-221-4/+4
| | | | from unidentified openid user)