(no commit message)
[sfa.git] / sfatables / commands / Add.py
index d8bd9a7..ef2b26e 100644 (file)
@@ -1,6 +1,8 @@
 import os, time
 from sfatables.command import Command
 
+import sfatables.globals
+
 class Add(Command):
     options = [('-A','--add')]
     help = 'Add a rule to a chain'
@@ -11,6 +13,15 @@ class Add(Command):
         return
 
     def call(self, command_options, match_options, target_options):
-        # Override this function
+        filename = match_dir + "/"+match_options.name+".xml"
+        xmldoc = libxml2.parseFile(filename)
+    
+        p = self.xmldoc.xpathNewContext()
+
+        context = p.xpathEval("//rule/argument[name='user-hrn']")
+        pdb.set_trace()
+
+
+
         return True