1# Load sfatables rules only once, not on every request.
2# Set request context based on the context requested by the match/target.
+3# Remember the element type at run time
<RSpec>
<request>
- <nodespec>
+ <nodespec name="foobar">
<node name="plc.princeton.planetlab-01"/>
<node name="plc.princeton.planetlab-02"/>
<node name="plc.princeton.planetlab-03"/>
<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.tp</value></argument></target-context>
+ <target-context><argument><name>blacklist</name><value>plc.princeton</value></argument></target-context>
<request>
<nodespec>
<node name="plc.princeton.planetlab-01"/>
# then target(target_args, rspec)
# else rspec
+ import pdb
if (self.match(rspec)):
return (True,self.wrap_up(self.target(rspec)))
else: