Re: modules configuration files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-10-27 at 13:40 +0100, Krzysztof A. Adamski wrote:

> You have to create Config class inside your module and decribe the
> configuration file. Try adding something like this to your module:
> 
> class Config(BaseConfig):
>     jboss_home=Option('some default value')
>     jboss_instance=Option('default')
>     jboss_interface=Option('127.0.0.1')
> 
> You can import all needed objects (BaseConfig, Option) from
> certmaster.config module.

I add this piece of code to my class:

class Config(BaseConfig):
    jboss_home=Option('/var/lib/jboss')
    jboss_instance=Option('default')
    jboss_interface=Option('127.0.0.1') 


and I leave the jboss class's version method:

    def version(self):
	print self.options.jboss_home
	print self.options.jboss_instance
        return self.options

but I got the same error:

[root@sboing minion]# func "sboing.byte-code.lan" call jboss version
{'sboing.byte-code.lan': ['REMOTE_ERROR',
                          'exceptions.AttributeError',
                          "'Config' object has no attribute
'jboss_home'",
                          '  File
"/usr/lib/python2.5/site-packages/func/minion/server.py", line 136, in
__call__\n    rc = self.__method(*args)\n   File
"/usr/lib/python2.5/site-packages/func/minion/modules/jboss.py", line
180, in version\n    print self.options.jboss_home\n']}


thanks
luca

-- 
Today is Prickle-Prickle, the 12nd day of The Aftermath in the YOLD 3174

Government's Law:
	There is an exception to all laws.

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux