summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugin.py
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* Plugin.Version: define parameters for commit_dataTim Laszlo2010-12-181-1/+1
|
* Plugin.py: Reverted broken regexTim Laszlo2010-10-211-2/+2
|
* web reports: new skinTim Laszlo2010-10-141-2/+2
|
* Some docstrings addedFabian Affolter2010-07-161-9/+15
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5967 ce84e21b-d406-0410-9b95-82705330c041
* Fix broken regex match for owner and mtimeTim Laszlo2010-07-081-2/+2
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5963 ce84e21b-d406-0410-9b95-82705330c041
* Add the ability to specify important entries via info/info.xmlSol Jerome2010-06-221-3/+8
| | | | | | | | | | | | We currently have 'important' entries specified only inside the code for various client tools. This provides no room for growing that list outside of adding things to the code itself. With this change, users can now specify important entries via an additional attribute in their info.xml files. Signed-off-by: Sol Jerome <sol.jerome@gmail.com> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5957 ce84e21b-d406-0410-9b95-82705330c041
* Updated files to match PEP 257 Fabian Affolter2010-06-211-67/+68
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5951 ce84e21b-d406-0410-9b95-82705330c041
* Slight change to error messageTim Laszlo2010-06-161-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5943 ce84e21b-d406-0410-9b95-82705330c041
* Reduce select timeouts to 2sTim Laszlo2010-06-161-1/+1
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5942 ce84e21b-d406-0410-9b95-82705330c041
* ThreadedStatistics: load/save data on startup/shutdownTim Laszlo2010-06-161-4/+82
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5941 ce84e21b-d406-0410-9b95-82705330c041
* Added ThreadedStatistics plugin class. Migrated DBStats to use ↵Tim Laszlo2010-06-071-0/+31
| | | | | | ThreadedStatistics. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5889 ce84e21b-d406-0410-9b95-82705330c041
* Core: Allow the specification of plugin conflicts (Fix for Ticket #875)Sol Jerome2010-04-241-0/+1
| | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
* Fix traceback in bcfg2-admin init by using os.makedirs()Sol Jerome2010-02-051-11/+1
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5713 ce84e21b-d406-0410-9b95-82705330c041
* Plugin.py: Fix docstring for GroupSpoolSol Jerome2010-01-081-1/+1
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5667 ce84e21b-d406-0410-9b95-82705330c041
* Info: Fix regex for paranoid options in info files [bugfix]Sol Jerome2009-12-211-1/+1
| | | | | | Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5629 ce84e21b-d406-0410-9b95-82705330c041
* Plugin: add a per-plugin runtime debugging infrastructureNarayan Desai2009-11-201-1/+9
| | | | git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5585 ce84e21b-d406-0410-9b95-82705330c041
* POSIX: Remove support for old-style posix entriesSol Jerome2009-11-191-3/+0
| | | | | | | | | | | This commit forces the user to specify <Path> entries on the server side while still maintaining compatibility with old clients via the POSIXCompat plugin. Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5582 ce84e21b-d406-0410-9b95-82705330c041
* Plugin.py: Fix Cfg conflicts (Reported by Thorsten Lockert on irc)Sol Jerome2009-11-191-1/+1
| | | | | | | | | Since a Path can now be a file/directory/other type, we need to make sure that we only bind files for Cfg entries. Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5581 ce84e21b-d406-0410-9b95-82705330c041