From: Alex Yang Date: Fri, 17 Mar 2017 00:57:39 +0000 (+0800) Subject: use local cirros image in post-deploy script X-Git-Tag: 1.0.0~14^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=9896291cd4f04519acc33ceeb5f9149174b2eb81;p=daisy.git use local cirros image in post-deploy script In daisy building job, cirros image is packed in daisy image file. And it would be copied to /var/lib/daisy/images/ directory after daisy installed. The post-deploy script can use it locally. Change-Id: I45adbdd8b7c87b574367820076f6019638310ed8 Signed-off-by: Alex Yang --- diff --git a/deploy/post/execute.py b/deploy/post/execute.py index b9665e10..288e949b 100644 --- a/deploy/post/execute.py +++ b/deploy/post/execute.py @@ -64,7 +64,7 @@ def _prepare_cirros(): url = 'http://download.cirros-cloud.net' version = '0.3.5' name = 'cirros-{}-x86_64-disk.img'.format(version) - img = os.path.join(os.path.abspath(os.path.dirname(__file__)), name) + img = os.path.join("/var/lib/daisy/images", name) if not os.path.isfile(img): cmd = "wget %(url)s/%(version)s/%(name)s -O %(path)s" % { 'url': url,