summaryrefslogtreecommitdiffstats
path: root/lcm/lcm/pub/utils
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-02-22 12:00:05 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-02-22 12:00:05 +0800
commitb6c58ae677f7a0ba3ec8bca99d6a88f4326e2065 (patch)
tree0c5f4bf444c232cff81d5f885c42ec2e69618b49 /lcm/lcm/pub/utils
parent33e38547c8345726d995318c46655ec5ffc81184 (diff)
Modify code and test case of vnflcm
Change-Id: I5b7e4ba7912e03553ac1ae662b1d03737422ca67 Issue-Id: GVNFM-12 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm/lcm/pub/utils')
-rw-r--r--lcm/lcm/pub/utils/values.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lcm/lcm/pub/utils/values.py b/lcm/lcm/pub/utils/values.py
index 4262e1da..19b198ee 100644
--- a/lcm/lcm/pub/utils/values.py
+++ b/lcm/lcm/pub/utils/values.py
@@ -25,3 +25,9 @@ def ignore_case_get(args, key, def_val=""):
def set_opt_val(param, key, val):
if val or val is False:
param[key] = val
+
+def get_none(val, def_val=""):
+ return val if val else def_val
+
+def get_boolean(val, def_val=0):
+ return 1 if val else 0