aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-03-23 15:16:20 +0800
committerYingjun Li <yingjun.li@huawei.com>2017-03-23 08:43:49 +0000
commit75f9e9b73de0b507fb790613c2cebbc8fa35e293 (patch)
treed78f9fa48098ed80f89cb562a5fa5d56e5cd54f0
parent6eead084e4ab0cd49d98f0da2b19258ed9f3ec6b (diff)
fix pyyaml bug
package_prepare should run before generate_conf to ensure pyyaml is installed. otherwise generate_conf will fail when pyyaml is not installed before. Change-Id: I181225637969f3602ce34984e4710a2610e8cd18 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com> (cherry picked from commit a6346420a0e0d2f4564d8ecc030146cae098a7f4)
-rwxr-xr-xopera/openo_connect.py4
-rwxr-xr-xprepare.sh2
2 files changed, 5 insertions, 1 deletions
diff --git a/opera/openo_connect.py b/opera/openo_connect.py
index 9412f72..7dcc55c 100755
--- a/opera/openo_connect.py
+++ b/opera/openo_connect.py
@@ -95,7 +95,11 @@ def get_vnfm_ip(msb_ip):
if i["type"] == "jujuvnfm":
vnfm_url = i["url"]
break
+
ip = re.compile("\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}")
+ if len(re.findall(ip, vnfm_url)) == 0:
+ raise RaiseError("vnfm ip not find")
+
vnfm_ip = re.findall(ip, vnfm_url)[0]
return vnfm_ip
diff --git a/prepare.sh b/prepare.sh
index 07e74c1..9cd8f62 100755
--- a/prepare.sh
+++ b/prepare.sh
@@ -53,7 +53,7 @@ function network_prepare()
function prepare_env()
{
- generate_conf
package_prepare
+ generate_conf
network_prepare
}