summaryrefslogtreecommitdiffstats
path: root/tools/yardstick-img-lxd-modify
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2016-11-24 02:24:10 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-24 02:24:10 +0000
commiteec370bc52caee7fe1633ae9f3ec8ac85ac50119 (patch)
tree9d7d1cb394c8af1880b46c3b920eef78134114a5 /tools/yardstick-img-lxd-modify
parent0e23c697e6329a57ba168cc57886b436ea87cdc4 (diff)
parent791868bdaabb08237fadae957a19c496a1892905 (diff)
Merge "Upgrade yardstick VM image from Ubuntu 14.04 to 16.04"
Diffstat (limited to 'tools/yardstick-img-lxd-modify')
-rwxr-xr-xtools/yardstick-img-lxd-modify7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/yardstick-img-lxd-modify b/tools/yardstick-img-lxd-modify
index 31194554c..4ca4eb489 100755
--- a/tools/yardstick-img-lxd-modify
+++ b/tools/yardstick-img-lxd-modify
@@ -32,21 +32,22 @@ die() {
exit 1
}
-test $# -eq 1 || die "no image specific script as argument"
+test $# -eq 1 -o $# -eq 2 || die "no image specific script as argument"
test $(id -u) -eq 0 || die "should invoke using sudo"
cmd=$1
+RELEASE=$2
test -x $cmd
mountdir="/mnt/yardstick"
workspace=${WORKSPACE:-"/tmp/workspace/yardstick"}
host=${HOST:-"cloud-images.ubuntu.com"}
-release=${RELEASE:-"trusty"}
+release=${RELEASE:-"xenial"}
image_path="${release}/current/${release}-server-cloudimg-amd64-root.tar.gz"
image_url=${IMAGE_URL:-"https://${host}/${image_path}"}
md5sums_path="${release}/current/MD5SUMS"
md5sums_url=${MD5SUMS_URL:-"https://${host}/${md5sums_path}"}
-imgfile="${workspace}/yardstick-${release}-server.tar.gz"
+imgfile="${workspace}/yardstick-image.tar.gz"
filename=$(basename $image_url)
# download and checksum base image, conditionally if local copy is outdated