Table of Contents

Class: RuleBuilder daxfi/RuleBuilder.py

Class used to build a set of Rule objects.

The parseXMLString() method return a list of Rule objects for the given XML string.

Methods   
__init__
_modifyDom
clean
createFromDOM
getDom
getRules
getRulesWithLog
getRulesWithoutLog
parseOnly
parseXMLString
setDom
setFirewallName
setRuleClass
  __init__ 
__init__ ( self,  rc )

Initialize a RuleBuilder object; a Rule class must be provided.

  _modifyDom 
_modifyDom ( self,  o )

Modify the attributes for this rule.

This method is called by the setDom() method; it handles the first_transformation and section_transformation dictionaries to modify the DOM object so that it can be compare with the ones from other rules.

  clean 
clean ( self )

Reset the builder.

  createFromDOM 
createFromDOM ( self,  dom )

Create a set of rules from a given DOM.

  getDom 
getDom ( self )

Get the DOM.

  getRules 
getRules ( self )

Return the rules for this DOM.

  getRulesWithLog 
getRulesWithLog ( self )

Return the rules for this DOM.

Elaborate the current DOM and return a set of Rule object. For firewalls that can log and set rules with a single command.

  getRulesWithoutLog 
getRulesWithoutLog ( self )

Return the rules for this DOM, for firewalls without a log option (they need a separated LOG rule, like iptables).

  parseOnly 
parseOnly ( self,  s )

Only parse a XML string; an hack used for performance reasons.

  parseXMLString 
parseXMLString ( self,  s )

Parse a given XML string; return a list of Rule objects.

  setDom 
setDom ( self,  o )

Set the DOM we're working on.

  setFirewallName 
setFirewallName ( self,  fn )

Another hack.

  setRuleClass 
setRuleClass ( self,  rc )

An hack.


Table of Contents

This document was automatically generated on Tue Apr 16 19:50:50 2002 by HappyDoc version r1_5