aboutsummaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-07-08 11:03:22 +0800
committerzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-07-08 11:03:22 +0800
commit3a4f1304b228c559536f7c0d7fa052d7e61b6a56 (patch)
treee30d2887a467fcc33ca41d743b8dae2c91f7cbfa /func
parent5dbf3c4e2f6ef48676de10b4394de4a45456810d (diff)
Add some UT test cases and fix pep8 errors for fetchimg
JIRA:QTIP-89 Change-Id: I623cd6e48d90996b0199f9b31f86c8844b4d5ceb Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
Diffstat (limited to 'func')
-rw-r--r--func/fetchimg.py58
1 files changed, 28 insertions, 30 deletions
diff --git a/func/fetchimg.py b/func/fetchimg.py
index 1c621a3b..6cae426e 100644
--- a/func/fetchimg.py
+++ b/func/fetchimg.py
@@ -1,30 +1,28 @@
-##############################################################################
-# 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
-
-
-class FetchImg:
-
- def __init__(self):
- print 'Fetching Image!'
- print 'Fetching QTIP_VM Image'
-
- def download(self):
- time.sleep(2)
- os.system(
- 'mkdir -p Temp_Img && wget http://artifacts.opnfv.org/qtip/QTIP_CentOS.qcow2 -P Temp_Img')
-
- filepath = './Temp_Img/QTIP_CentOS.qcow2'
- while not os.path.isfile(filepath):
- time.sleep(10)
- print 'Download Completed!'
+##############################################################################
+# 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
+
+
+class FetchImg:
+
+ def __init__(self):
+ print 'Fetching Image!'
+ print 'Fetching QTIP_VM Image'
+
+ @staticmethod
+ def download():
+ time.sleep(2)
+ os.system(
+ 'mkdir -p Temp_Img && wget http://artifacts.opnfv.org/qtip/QTIP_CentOS.qcow2 -P Temp_Img')
+
+ filepath = './Temp_Img/QTIP_CentOS.qcow2'
+ while not os.path.isfile(filepath):
+ time.sleep(10)
+ print 'Download Completed!'