summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-09-21 12:47:29 -0400
committerDan Radez <dradez@redhat.com>2016-09-21 12:47:29 -0400
commit83f46bda07b272f3188329527030d3f2e16dc335 (patch)
tree968f5052f1ba68ba155599248cea7166cd6d9f46 /lib
parent4523fd8c90acf923a526cae390922c1dbcd6220e (diff)
removing unused bash parser functions
Change-Id: I694e057544097d59b9974fe6fc9ad269a5b180b6 Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/parse-functions.sh40
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/parse-functions.sh b/lib/parse-functions.sh
index ef388f44..87453ea3 100755
--- a/lib/parse-functions.sh
+++ b/lib/parse-functions.sh
@@ -10,46 +10,6 @@
# Parser functions used by OPNFV Apex
-##translates yaml into variables
-##params: filename, prefix (ex. "config_")
-##usage: parse_yaml opnfv_ksgen_settings.yml "config_"
-parse_yaml() {
- local prefix=$2
- local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
- sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
- -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
- awk -F$fs '{
- indent = length($1)/2;
- vname[indent] = $2;
- for (i in vname) {if (i > indent) {delete vname[i]}}
- if (length($3) > 0) {
- vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")}
- printf("%s%s%s=%s\n", "'$prefix'",vn, $2, $3);
- }
- }'
-}
-
-##parses variable from a string with '='
-##and removes global prefix
-##params: string, prefix
-##usage: parse_setting_var 'deploy_myvar=2' 'deploy_'
-parse_setting_var() {
- local mystr=$1
- local prefix=$2
- if echo $mystr | grep -E "^.+\=" > /dev/null; then
- echo $(echo $mystr | grep -Eo "^.+\=" | tr -d '=' | sed 's/^'"$prefix"'//')
- else
- return 1
- fi
-}
-##parses value from a string with '='
-##params: string
-##usage: parse_setting_value
-parse_setting_value() {
- local mystr=$1
- echo $(echo $mystr | grep -Eo "\=.*$" | tr -d '=')
-}
-
##parses network settings yaml into globals
parse_network_settings() {
local output parse_ext