summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--osdf/adapters/policy/interface.py3
-rwxr-xr-xosdfapp.sh2
2 files changed, 3 insertions, 2 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:
diff --git a/osdfapp.sh b/osdfapp.sh
index aa0aba5..0e1846a 100755
--- a/osdfapp.sh
+++ b/osdfapp.sh
@@ -25,7 +25,7 @@ cd $(dirname $0)
LOGS=logs
mkdir -p $LOGS
-export OSDF_CONFIG_FILE=${1:-/opt/app/osdf_config.yaml} # this file may be passed by invoker
+export OSDF_CONFIG_FILE=${1:-/opt/app/config/osdf_config.yaml} # this file may be passed by invoker
[ ! -e "$OSDF_CONFIG_FILE" ] && unset OSDF_CONFIG_FILE
python osdfapp.py 2>$LOGS/err.log 1>$LOGS/out.log < /dev/null # running the app
bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#
# ============LICENSE_START=======================================================
#  Copyright (C) 2019 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
#
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "common.release" . }}-dmaap-filebeat-configmap
  namespace: {{ include "common.namespace" . }}
data:
{{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }}