from sfatables.command import Command
class List(Command):
- options = [('-L','--list')]
- help = 'List a chain'
- key='list_rule'
- matches = False
- targets = False
-
+
def __init__(self):
+ self.options = [('-L','--list')]
+ self.help = 'List a chain'
+ self.key='list_rule'
+ self.matches = False
+ self.targets = False
+
return
def get_info(self, type, xmlextension_path):
value_nodes = p.xpathEval("//rule/argument[value!='']/value")
element_nodes = p.xpathEval("//argument[value!='']/parent::rule/@element")
- print element_nodes, type, xmlextension_path
if (len(element_nodes)>1):
raise Exception("Invalid rule %s contains multiple elements."%xmlextension_path)