Bugfix: Error when create pod.yaml file 73/34573/3
authorxudan <xudan16@huawei.com>
Thu, 11 May 2017 01:43:30 +0000 (21:43 -0400)
committerxudan <xudan16@huawei.com>
Thu, 11 May 2017 03:15:47 +0000 (23:15 -0400)
JIRA: DOVETAIL-426

1. ImportError: No module named netaddr
2. rm: cannot remove '/home/opnfv/dovetail/userconfig/*': No such file or directory

Change-Id: I81ad703667c798589855fdafc1668644e9a342b9
Signed-off-by: xudan <xudan16@huawei.com>
jjb/dovetail/dovetail-run.sh

index cee9e59..3ad67b6 100755 (executable)
@@ -54,6 +54,7 @@ cd ${releng_repo}/modules
 sudo virtualenv venv
 source venv/bin/activate
 sudo pip install -e ./ >/dev/null
+sudo pip install netaddr
 
 if [[ ${INSTALLER_TYPE} == compass ]]; then
     options="-u root -p root"
@@ -66,7 +67,7 @@ fi
 
 pod_file_dir="/home/opnfv/dovetail/userconfig"
 if [ -d ${pod_file_dir} ]; then
-    sudo rm -r ${pod_file_dir}/*
+    sudo rm -rf ${pod_file_dir}/*
 else
     sudo mkdir -p ${pod_file_dir}
 fi