(no commit message)
authorSapan Bhatia <sapanb@cs.princeton.edu>
Tue, 27 Oct 2009 04:38:15 +0000 (04:38 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Tue, 27 Oct 2009 04:38:15 +0000 (04:38 +0000)
sfatables/processors/legacy-restrict-to-nodes.xsl
sfatables/test.sfarspec

index b761a29..6548ceb 100644 (file)
@@ -16,7 +16,7 @@
     rspec. The current rspec refers to dns names, not sfa names for nodes.-->
     <xsl:template match="NodeSpec">
             <xsl:choose>
-                <xsl:when test="ends-with(@name,$whitelist_suffix) and not($blacklist_suffix and ends-with(@name,$blacklist_suffix))">
+                <xsl:when test="(not($whitelist_suffix) or contains(@name,$whitelist_suffix)) and (not($blacklist_suffix) or not(contains(@name,$blacklist_suffix)))">
                     <xsl:copy-of select="."/>
                 </xsl:when>
                 <xsl:otherwise/>
index a634adf..641095e 100644 (file)
@@ -3,14 +3,14 @@
 <RSpec>
      <request-context><sfa><user><hrn>plc.princeton.sapanb</hrn></user></sfa></request-context>
      <match-context><argument><name>user-hrn</name><value>plc.princeton.sapanb</value></argument></match-context>
-     <target-context><argument><name>blacklist</name><value>plc.princeton</value></argument></target-context>
+     <target-context><argument><name>blacklist-dns-suffix</name><value>bing</value></argument></target-context>
      <request>
-        <nodespec>
+        <NodeSpec name="boobar">
             <node name="plc.princeton.planetlab-01"/>
             <node name="plc.princeton.planetlab-02"/>
             <node name="plc.princeton.planetlab-03"/>
             <node name="plc.princeton.planetlab-04"/>
             <node name="plc.tp.planetlab3"/>
-        </nodespec>
+        </NodeSpec>
     </request>
 </RSpec>