(no commit message)
[sfa.git] / sfatables / commands / Add.py
1 import os, time
2 from sfatables.command import Command
3
4 import sfatables.globals
5
6 class Add(Command):
7     options = [('-A','--add')]
8     help = 'Add a rule to a chain'
9     matches = True
10     targets = True
11
12     def __init__(self):
13         return
14
15     def call(self, command_options, match_options, target_options):
16         filename = match_dir + "/"+match_options.name+".xml"
17         xmldoc = libxml2.parseFile(filename)
18     
19         p = self.xmldoc.xpathNewContext()
20
21         context = p.xpathEval("//rule/argument[name='user-hrn']")
22         pdb.set_trace()
23
24
25
26         return True
27