X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfatables%2Fruntime.py;h=0a73482afada6920c53d75fcae7b679c0c3ee69e;hb=e57b7150dee76d42fc15f9477a3045e5171c8878;hp=dc9e7cbf3aaa036d3dd5b7014c219b3667d2db01;hpb=342b9b05015e6a009d9dbccf559ae66334298b1f;p=sfa.git diff --git a/sfatables/runtime.py b/sfatables/runtime.py index dc9e7cbf..0a73482a 100644 --- a/sfatables/runtime.py +++ b/sfatables/runtime.py @@ -7,7 +7,6 @@ import libxml2 from optparse import OptionParser from sfatables import commands, matches, targets -from sfatables.xmlextension import Xmlextension from sfatables.globals import * from sfatables.commands.List import * from sfatables.xmlrule import * @@ -22,6 +21,9 @@ class SFATablesRules: return + def set_context(self, request_context): + return + def apply(self, rspec): intermediate_rspec = rspec for rule in self.sorted_rule_list: @@ -29,7 +31,8 @@ class SFATablesRules: if (rule.terminal): break - return intermediate_rspec + final_rspec = XMLRule().wrap_up(intermediate_rspec) + return final_rspec def main(): incoming = SFATablesRules('INCOMING') @@ -37,8 +40,6 @@ def main(): rspec = open(sys.argv[1]).read() - - print "%d rules loaded for INCOMING chain\n"%len(incoming.sorted_rule_list) print "%d rules loaded for OUTGOING chain\n"%len(outgoing.sorted_rule_list)