aboutsummaryrefslogtreecommitdiffstats
path: root/osdf
diff options
context:
space:
mode:
authorPatel, Ankitkumar <ankit@research.att.com>2018-05-30 16:56:02 -0400
committerPatel, Ankitkumar <ankit@research.att.com>2018-05-30 16:57:20 -0400
commitc31743af590754408eda42837198b23c56474ccd (patch)
treee99d572de74f1e81cbb9354da59112b906a9316b /osdf
parente0833e0345df370b1d82c462caabbc36a0c341f4 (diff)
Fixed the config dir and default policy scope2.0.0-ONAP2.0.0-ONAP
Fixed the config dir and default policy scope Issue-ID: OPTFRA-247 Change-Id: Ie15aaaa7ac6357ddc9fc0dc262591e844001d927 Signed-off-by: Patel, Ankitkumar <ankit@research.att.com>
Diffstat (limited to 'osdf')
-rw-r--r--osdf/adapters/policy/interface.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/osdf/adapters/policy/interface.py b/osdf/adapters/policy/interface.py
index dbbf122..95bfacc 100644
--- a/osdf/adapters/policy/interface.py
+++ b/osdf/adapters/policy/interface.py
@@ -57,7 +57,8 @@ def get_by_scope(rest_client, req, config_local, type_service):
references = config_local.get('references', {})
pscope = config_local.get('policy_info', {}).get(type_service, {}).get('policy_scope', {})
service_name = dot_notation(req, references.get('service_name', {}).get('value', None))
- primary_scope = pscope['{}_scope'.format(service_name.lower() if service_name else "default")]
+ primary_scope = pscope['{}_scope'.format(service_name.lower() if pscope.get(service_name + "_scope", None)
+ else "default")]
for sec_scope in pscope.get('secondary_scopes', []):
policies, scope_fields = [], []
for field in sec_scope: