diff --git a/bcfg2/plugins/DebAutoPkg.py b/bcfg2/plugins/DebAutoPkg.py new file mode 100644 index 00000000..77fd3877 --- /dev/null +++ b/bcfg2/plugins/DebAutoPkg.py @@ -0,0 +1,26 @@ +# -*- mode: python; coding: utf-8 -*- +# +# DebAutoPkg.py +# ------------- +# Copyright : (c) 2008, Jeremie Dimino +# Licence : BSD3 + +'''Plugin fournissant une régle par défault pour les paquets''' + +__all__ = ["DebAutoPkg"] + +import Bcfg2.Server.Plugin + +class DebAutoPkg(Bcfg2.Server.Plugin.GeneratorPlugin): + __name__ = 'Python' + __version__ = '1.0' + __author__ = 'dimino@crans.org' + + def HandlesEntry(self, entry): + # Ce plugin fournit une règle pour toute entrée de type + # "Package" + return entry.tag == 'Package' + + def HandleEntry(self, entry, metadata): + entry.attrib['version'] = 'auto' + entry.attrib['type'] = 'deb'