[Yum-devel] FlexiTrigger

seth vidal skvidal at phy.duke.edu
Sat Jul 24 05:28:21 UTC 2004


On Mon, 2004-07-19 at 18:24 +1000, Menno Smits wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> 
> Find attached my initial attempt at a generic "do stuff based on current
> program state and an XML configuration file" class :). I've called the
> class FlexiTrigger but am open to better names ... (XTrigger?)
> 
> On instantation the class takes in the XML configuration file and the
> name of a Python module containing functions for condition evaluation
> and action application. These functions correspond to the content of
> <type> elements in the <condition> and <action> elements in the
> configuration file.
> 
> An example of basic functionality is shown at the bottom of
> FlexiTrigger.py (uses triggers.xml and yumfuncs.py). Obviously the
> pkgdata dictionary is nothing like the actual data structure that would
> be used with yum. This doesn't really matter this structure is simply
> passed around by FlexiTrigger and never actually examined. Only the
> functions in yumfuncs.py need to understand the structure.
> 
> There's still plenty for me to tidy up (see all the TODO's). I'm just
> releasing what I've got now to make sure I'm not missing anything
> obvious. Feedback please?
> 


Looks pretty good so far. Sorry for the silence, I've been at OLS and
vacation so I've been a bit busy. :)

Can you give me a larger test example for this code?

Thanks
-sv





More information about the Yum-devel mailing list