aboutsummaryrefslogtreecommitdiffstats
path: root/opera
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-03-20 10:59:42 +0800
committerYingjun Li <yingjun.li@huawei.com>2017-03-21 17:34:14 +0000
commit82e695eeef37a9745bfbcda6e553823a4fc36fbd (patch)
treee08187a225be67e845ce8cd463f63dba1ae78605 /opera
parent30a31341d6ff1b4dcd6ca6fd3d55496d7d65d762 (diff)
Add delay when upload csar package fail
There is occasional failure when upload csar package. Add 10 second 10 retries to workaroud this problem. Change-Id: I0d081699d744bc2a3f93d23fa5afea48f426beff Signed-off-by: Harry Huang <huangxiangyu5@huawei.com> (cherry picked from commit f809fd6d07d3447af62297377f963e1c6e4556e3)
Diffstat (limited to 'opera')
-rwxr-xr-xopera/openo_connect.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/opera/openo_connect.py b/opera/openo_connect.py
index efaa882..9412f72 100755
--- a/opera/openo_connect.py
+++ b/opera/openo_connect.py
@@ -165,9 +165,11 @@ def upload_csar(msb_ip, package):
files = {'file': open(package, 'rb')}
res = requests.post(csar_url, files=files)
if res.status_code != 200:
- retry = 5
+ retry = 10
while retry != 0:
+ time.sleep(5)
delete_csars(msb_ip)
+ time.sleep(5)
retry_res = requests.post(csar_url, files=files)
if retry_res.status_code == 200:
break