On Sat, Dec 3, 2011 at 9:58 AM, Florian Haas <[email protected]> wrote:

>
> But as it turns out what I, putting myself into the shoes of a
> resource agent author, would expect from a resource agent seems to
> only partially agree with your expectations. :) Let me give you my
> idea of an ideal Python resource agent (all pseudocode, just hacked
> up, totally untested, errors and typos mine, don't run this at home):
>
> class MyAgent(ResourceAgent):
>  VERSION = "0.1"
>
>  # declare parameter types. Yeah, of course we can use something more
> elegant than a nested dictionary
>  PARAMS = { "foobar": { "type" : INTEGER,
>                         "required" : True,
>                         "unique" : True,
>                         "default" : "blah" }}
>
>  def start(self, timeout, **params):
>    # Do stuff to start the RA
>    ...

You mean something like he has in pidbaseagent.py :)

Rasto

-- 
Dipl.-Ing. Rastislav Levrinc
[email protected]
Linux Cluster Management Console
http://lcmc.sf.net/
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to