From 15687f1938dd5faa68eccfdcacc45fb4b0644b45 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Thu, 1 Jun 2017 17:34:12 +0200 Subject: qemu testbed: use the prototype name to get the right buildroot image --- rumba/testbeds/qemu.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'rumba/testbeds/qemu.py') diff --git a/rumba/testbeds/qemu.py b/rumba/testbeds/qemu.py index 894bee5..b7ebef9 100644 --- a/rumba/testbeds/qemu.py +++ b/rumba/testbeds/qemu.py @@ -43,21 +43,6 @@ class Testbed(mod.Testbed): self.qemu_logs_dir = os.getcwd() if qemu_logs_dir is None \ else qemu_logs_dir self.boot_processes = [] - - # Download the proper buildroot image, if not provided explicitely - url_prefix = "https://bitbucket.org/vmaffione/rina-images/downloads/" - if not bzimage: - bzimage = 'irati.bzImage' - if not os.path.exists(bzimage): - print("Downloading %s" % (url_prefix + bzimage)) - wget.download(url_prefix + bzimage) - print("\n") - if not initramfs: - initramfs = 'irati.rootfs.cpio' - if not os.path.exists(initramfs): - print("Downloading %s" % (url_prefix + initramfs)) - wget.download(url_prefix + initramfs) - print("\n") self.bzimage = bzimage self.initramfs = initramfs @@ -130,6 +115,23 @@ class Testbed(mod.Testbed): raise Exception('Not authenticated') logger.info("swapping in") + + # Download the proper buildroot images, if the user did not specify + # local images + url_prefix = "https://bitbucket.org/vmaffione/rina-images/downloads/" + if not self.bzimage: + self.bzimage = '%s.bzImage' % (experiment.prototype_name()) + if not os.path.exists(self.bzimage): + logger.info("Downloading %s" % (url_prefix + self.bzimage)) + wget.download(url_prefix + self.bzimage) + print("\n") + if not self.initramfs: + self.initramfs = '%s.rootfs.cpio' % (experiment.prototype_name()) + if not os.path.exists(self.initramfs): + logger.info("Downloading %s" % (url_prefix + self.initramfs)) + wget.download(url_prefix + self.initramfs) + print("\n") + logger.info('Setting up interfaces.') # Building bridges and taps -- cgit v1.2.3