Tweaks to xmlrule and exec.py
authorSapan Bhatia <sapanb@cs.princeton.edu>
Wed, 16 Sep 2009 00:17:50 +0000 (00:17 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Wed, 16 Sep 2009 00:17:50 +0000 (00:17 +0000)
sfatables/exec.py
sfatables/xmlrule.py

index 303723e..4afcb48 100644 (file)
@@ -34,12 +34,11 @@ def main():
 
     rspec = """
 <rspec>
 
     rspec = """
 <rspec>
-    <context-input>
+    <request-context>
         <sfa><user><hrn>plc.princeton.sapan</hrn></user></sfa>
         <sfa><user><hrn>plc.princeton.sapan</hrn></user></sfa>
-    </context-input>
+    </request-context>
 
 
-    <sfatables-input>
-        <rule>
+    <sfatables-rule>
             <argument>
                 <name>hrn</name>
                 <value>plc</value>
             <argument>
                 <name>hrn</name>
                 <value>plc</value>
@@ -52,8 +51,7 @@ def main():
                 <name>blacklist</name>
                 <value>plc.tp</value>
             </argument>
                 <name>blacklist</name>
                 <value>plc.tp</value>
             </argument>
-        </rule>
-    </sfatables-input>
+    </sfatables-rule>
     <request>
         <nodespec>
             <node name="plc.princeton.planetlab-01"/>
     <request>
         <nodespec>
             <node name="plc.princeton.planetlab-01"/>
index 9c43e0f..92a06e2 100644 (file)
@@ -41,8 +41,6 @@ class XMLRule:
         return stylesheet_result
 
     def match(self, rspec):
         return stylesheet_result
 
     def match(self, rspec):
-        import pdb
-        pdb.set_trace()
         match_result = self.apply_processor('match',rspec,"//result/@verdict") 
         return (match_result=='True')
 
         match_result = self.apply_processor('match',rspec,"//result/@verdict") 
         return (match_result=='True')