git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- make matches and targets loaded w/o making hem python packages
[sfa.git]
/
sfatables
/
runtime.py
diff --git
a/sfatables/runtime.py
b/sfatables/runtime.py
index
dc9e7cb
..
0a73482
100644
(file)
--- 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 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 *
from sfatables.globals import *
from sfatables.commands.List import *
from sfatables.xmlrule import *
@@
-22,6
+21,9
@@
class SFATablesRules:
return
return
+ def set_context(self, request_context):
+ return
+
def apply(self, rspec):
intermediate_rspec = rspec
for rule in self.sorted_rule_list:
def apply(self, rspec):
intermediate_rspec = rspec
for rule in self.sorted_rule_list:
@@
-29,7
+31,8
@@
class SFATablesRules:
if (rule.terminal):
break
if (rule.terminal):
break
- return intermediate_rspec
+ final_rspec = XMLRule().wrap_up(intermediate_rspec)
+ return final_rspec
def main():
incoming = SFATablesRules('INCOMING')
def main():
incoming = SFATablesRules('INCOMING')
@@
-37,8
+40,6
@@
def main():
rspec = open(sys.argv[1]).read()
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)
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)