(self, enable=True)
Enable or disable the iptable rule
Enable or disable the iptable rule
Enable or disable the iptable rule
def modip(self, enable=True):
        """
        Enable or disable the iptable rule
        """
        to_exec = self.iptable.format(self.config['source_port'].value, self.config['dest_port'].value)
        if enable:
            util.init_app(to_exec)
        else:
            util.init_app(to_exec.replace('-A', '-D'))
def modip ( self , enable = True ) : to_exec = self . iptable . format ( self . config [ 'source_port' ] . value , self . config [ 'dest_port' ] . value ) if enable : util . init_app ( to_exec ) else : util . init_app ( to_exec . replace ( '-A' , '-D' ) )