diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-02-22 12:00:05 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-02-22 12:00:05 +0800 |
commit | b6c58ae677f7a0ba3ec8bca99d6a88f4326e2065 (patch) | |
tree | 0c5f4bf444c232cff81d5f885c42ec2e69618b49 /lcm/lcm/pub/utils | |
parent | 33e38547c8345726d995318c46655ec5ffc81184 (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.py | 6 |
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 |