Table of Contents

Class: RuleBase daxfi/Rule.py

Class that define a firewall rule.

A firewall rule is described with a DOM object.

Methods   
__cmp__
__init__
__str__
copy
createRuleCommand
geAction
getDom
getRuleNumber
setDom
setRuleNumber
toxml
  __cmp__ 
__cmp__ ( self,  other )

Compare two rules.

  __init__ 
__init__ (
        self,
        dom=None,
        rn='-1',
        )

Create a new rule.

dom

The DOM that describes the rule.

rn

The optional rule number (useful for 'insert'-like rules).

  __str__ 
__str__ ( self )

Print this rule.

  copy 
copy ( self )

Return a copy of itself.

  createRuleCommand 
createRuleCommand ( self )

Return a string that is the command to run this rule.

By default, just return the list of attributes of the DOM object. This method must be override in the Rule class that inherits from this class.

  geAction 
geAction ( self )

Get the action name.

Return the action name, one of the values in xml_commands.

  getDom 
getDom ( self )

Get the DOM.

  getRuleNumber 
getRuleNumber ( self )

Get the rule number.

  setDom 
setDom ( self,  o )

Set the DOM.

  setRuleNumber 
setRuleNumber ( self,  rn )

Set the rule number.

  toxml 
toxml ( self )

Return a pretty XML string for this rule.


Table of Contents

This document was automatically generated on Sat Sep 1 13:50:21 2001 by HappyDoc version r1_5