Re: modules configuration files

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

 



On Sat, 2008-10-18 at 16:43 +0200, Luca Foppiano wrote:

[...]
> but right now I don't know how to read the configuration.
> I'm trying to use ConfigParser but I can't read the configuration
> through the self.options into the modules...


I added this method in my module:

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

and this is my configuration file:

[root@sboing modules]# cat /etc/func/modules/JBoss.conf
[main]
jboss_home=/usr/local/jboss-4.2.2.GA/
jboss_instance=default
jboss_interface=127.0.0.1

and, when I launch func...

[root@sboing modules]# 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
178, in version\n    print self.options.jboss_home\n']}


AFAIK my configuration is correct...bug?

Luca

-- 
Today is Prickle-Prickle, the 7th day of The Aftermath in the YOLD 3174

Communications satellite used by the military for star wars.

_______________________________________________
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