From: Anil-Kumar Vengalil <Anil-Kumar.Vengalil@sophia.inria.fr>
Date: Thu, 3 Dec 2009 21:20:59 +0000 (+0000)
Subject: connecting SM to FORWARD rule chain
X-Git-Tag: sfa-0.9-7~208
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=16ea94ee08c92c3978ca2463a4d7967bfbeec55d;p=sfa.git

connecting SM to FORWARD rule chain
---

diff --git a/sfa/methods/create_slice.py b/sfa/methods/create_slice.py
index 4192cc08..d192a35b 100644
--- a/sfa/methods/create_slice.py
+++ b/sfa/methods/create_slice.py
@@ -54,7 +54,10 @@ class create_slice(Method):
         sfa_aggregate_type = Config().get_aggregate_rspec_type()
         rspec_manager = __import__("sfa.rspecs.aggregates.rspec_manager_"+sfa_aggregate_type, fromlist = ["sfa.rspecs.aggregates"])
         #Filter the incoming rspec using sfatables
-        incoming_rules = SFATablesRules('INCOMING')
+        if self.api.interface in ['slicemgr']:
+           incoming_rules = SFATablesRules('FORWARD-INCOMING')
+	elif self.api.interface in ['aggregate']:
+           incoming_rules = SFATablesRules('INCOMING')
 	if incoming_rules.sorted_rule_list:
            #incoming_rules.set_slice(hrn) # This is a temporary kludge. Eventually, we'd like to fetch the context requested by the match/target
 
@@ -62,7 +65,6 @@ class create_slice(Method):
            request_context = rspec_manager.fetch_context(hrn, Credential(string=caller_cred).get_gid_caller().get_hrn(), contexts)
            incoming_rules.set_context(request_context)
            rspec = incoming_rules.apply(requested_rspec)
-
 	else:	
 	   rspec = requested_rspec