aboutsummaryrefslogtreecommitdiff
path: root/rumba/testbeds/qemu.py
diff options
context:
space:
mode:
authorVincenzo Maffione <v.maffione@gmail.com>2017-06-01 17:34:12 +0200
committerVincenzo Maffione <v.maffione@gmail.com>2017-06-01 17:34:12 +0200
commit15687f1938dd5faa68eccfdcacc45fb4b0644b45 (patch)
treeced4dcf6ee058cf08d03264dbc201cfed5e98e5f /rumba/testbeds/qemu.py
parentd1b49132f669cf1df4367103ebad63029793a127 (diff)
downloadrumba-15687f1938dd5faa68eccfdcacc45fb4b0644b45.tar.gz
rumba-15687f1938dd5faa68eccfdcacc45fb4b0644b45.zip
qemu testbed: use the prototype name to get the right buildroot image
Diffstat (limited to 'rumba/testbeds/qemu.py')
-rw-r--r--rumba/testbeds/qemu.py32
1 files changed, 17 insertions, 15 deletions
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