From 7e9120d10db671b65df70f8433064756a34517e4 Mon Sep 17 00:00:00 2001 From: Herry Huang Date: Mon, 12 Sep 2016 19:03:40 +0800 Subject: Add ip and mac valid check functionality Add function check_input_para in /deploy/launch.sh to check whether there is invalid address in DHA and NETWORK file after function process_input_para is called. Check_input_para is defined in /deploy/deploy_parameter.sh and calls check_valid.py in /util. Exit installation when invalid address or format error is found. JIRA:COMPASS-480 Change-Id: Ib01c368db6b48cbded0045a2819d895c980c2b1b Signed-off-by: Herry Huang --- deploy/deploy_parameter.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'deploy/deploy_parameter.sh') diff --git a/deploy/deploy_parameter.sh b/deploy/deploy_parameter.sh index d8696ce8..92e3467d 100755 --- a/deploy/deploy_parameter.sh +++ b/deploy/deploy_parameter.sh @@ -111,3 +111,12 @@ function process_input_para() echo $input_file } + +function check_input_para() +{ + python ${COMPASS_DIR}/util/check_valid.py "$DHA" "$NETWORK" + if [ $? -ne 0 ];then + exit 1 + fi +} + -- cgit 1.2.3-korg