Fixing filter

Fixing function for filtering RIC:
- if RIC is denied by config, finish function and return false (denied RIC is strongest way to filter)
- l. 64 - fixing missing 0
This commit is contained in:
Florian 2017-01-08 12:21:44 +01:00 committed by GitHub
parent ac3a81686c
commit 5c09b22cce

View file

@ -47,14 +47,14 @@ def isAllowed(poc_id):
# 2.) If denied RIC, return False
if poc_id in globalVars.config.get("POC", "deny_ric"):
logging.info("RIC %s is denied by config.ini", poc_id)
allowed = 0
return False // RIC is denied - strongest way to block
# 3.) Check Range, return False if outside def. range
if globalVars.config.getint("POC", "filter_range_start") < int(poc_id) < globalVars.config.getint("POC", "filter_range_end"):
logging.info("RIC %s in between filter range", poc_id)
return True
else:
logging.info("RIC %s out of filter range", poc_id)
allowed =
allowed = 0
# 4.) Implementation for net identifiers
if globalVars.config.get("POC", "netIdent_ric"):
if poc_id in globalVars.config.get("POC", "netIdent_ric"):