summaryrefslogtreecommitdiffstats
path: root/func/fetchimg.py
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2016-09-27 13:33:13 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-27 13:33:13 +0000
commit2ac37969827ee55a32dc5fdd337cdeebf0bceb46 (patch)
treec23b8d3820cfec24b7395b601a874973051239e9 /func/fetchimg.py
parent2d705000187bc5a786cff591966b0b6907105856 (diff)
parent1a2b55736da4d18758f81444933181e380202f60 (diff)
Merge "code refactor: run_qtip.sh"
Diffstat (limited to 'func/fetchimg.py')
-rw-r--r--func/fetchimg.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/func/fetchimg.py b/func/fetchimg.py
deleted file mode 100644
index 1ed3def6..00000000
--- a/func/fetchimg.py
+++ /dev/null
@@ -1,35 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Dell Inc and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-import os
-import time
-
-IMGSTORE = "/home/opnfv/imgstore"
-
-
-class FetchImg:
-
- def __init__(self):
- print 'Fetching Image!'
-
- @staticmethod
- def download():
- time.sleep(2)
- os.system('mkdir -p Temp_Img')
- filepath = './Temp_Img/QTIP_CentOS.qcow2'
- imgstorepath = IMGSTORE + "/QTIP_CentOS.qcow2"
- if os.path.isfile(imgstorepath):
- os.system("ln -s %s %s" % (imgstorepath, filepath))
- print "QTIP_CentOS.qcow2 exists locally. Skipping the download and using the file from IMG store"
- else:
- print 'Fetching QTIP_CentOS.qcow2'
- os.system('wget http://artifacts.opnfv.org/qtip/QTIP_CentOS.qcow2 -P Temp_Img')
-
- while not os.path.isfile(filepath):
- time.sleep(10)
- print 'Download Completed!'