information that sfatables is requesting. But for now, we just return
the basic information needed in a dict.
"""
- base_context = {'sfa':{'user':{'hrn':user_hrn}, 'slice':{'hrn':slice_hrn}}}
+ base_context = {
+ 'sfa': {'user': {'hrn': user_hrn}, 'slice': {'hrn': slice_hrn}}}
return base_context
- def run_sfatables(chain, hrn, origin_hrn, rspec, context_callback = None ):
+ def run_sfatables(chain, hrn, origin_hrn, rspec, context_callback=None):
"""
Run the rspec through sfatables
@param chain Name of rule chain
@param origin_hrn Original caller's hrn
@param rspec Incoming rspec
@param context_callback Callback used to generate the request context
-
+
@return rspec
"""
if not context_callback:
return newrspec
except:
-
- from sfa.util.logging import logger
- def run_sfatables (, rspec, ____):
- logger.warning("Cannot import sfatables.runtime, please install package sfa-sfatables")
+
+ from sfa.util.sfalogging import logger
+
+ def run_sfatables(_, __, ___, rspec, ____=None):
+ logger.warning(
+ "Cannot import sfatables.runtime, please install package sfa-sfatables")
return rspec