Re: problems when writing a iptable test module, may be silly..

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

 



On Fri, 2011-04-29 at 08:50 -0400, seth vidal wrote:
> On Fri, 2011-04-29 at 16:21 +0800, kirsten wrote:
> > So it is..
> > 
> > Module found now. But it comes with "InvalidMethodException". I will
> > trying to debug it.
> > 
> > On Fri, 2011-04-29 at 09:56 +0200, Jan-Frode Myklebust wrote:
> > > On Fri, Apr 29, 2011 at 03:46:07PM +0800, kirsten wrote:
> > > > "slave2" is a hostname defined in /etc/hosts, will that be a problem?
> > > 
> > > Ok, then it's supposed to be a string, and you need to quote it:
> > > 
> > > -    def ip(self, sourceip=slave2):
> > > +    def ip(self, sourceip="slave2"):
> > > 
> > > -    def ipreset(self, sourceip=slave2):
> > > +    def ipreset(self, sourceip="slave2"):
> > > 
> > > 
> > >   -jf
> > 
> 
> just by eyeballing the code you have
> from func.minion.modules.iptables import *
> 
> and then you're using:
> iptables.methods()
> 
> I suspect that's the invalid method it can't find b/c you've imported
> the methods w/o the namespace of iptables being included in them.
> 
> 
> but paste the invalidmethod exception and it will be clearer.
> 
> -sv
> 
> 
I changed "ip" to "ipchange" and "port" to "portchange". It still had
the problem:

[root@overlord modules]# func slave1 call fwtest ipchange 172.31.31.14
{'slave1': ['REMOTE_ERROR'
            'func.minion.codes.InvalidMethodException',
            '',
            ' File
"/usr/lib/python2.7/site-packages/func/minion/server.py", line 324, in
_dispatch\n   return self.get_dispatch_method(method)(*params)\n   File
"/usr/lib/python2.7/site-packages/func/minion/server.py", line 162, in
get_dispatch_method\n   raise codes.InvalidMethodException\n']}

_______________________________________________
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