aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-04-20 14:49:31 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-04-20 14:49:31 +0200
commitdbe354e4cff7f27b19899114f380fec6c9c86e42 (patch)
tree8fe319a5c19fe046453121b8a7d2ff122bd31646
parent06b3694633bd8315d55b5d75a2ca6c20afc54651 (diff)
downloadrumba-dbe354e4cff7f27b19899114f380fec6c9c86e42.tar.gz
rumba-dbe354e4cff7f27b19899114f380fec6c9c86e42.zip
testbeds: jfed: Add support for custom image
This adds support to select a custom image, which may be handy for the IRATI prototype.
-rw-r--r--rumba/testbeds/jfed.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/rumba/testbeds/jfed.py b/rumba/testbeds/jfed.py
index 8ad173b..f51081c 100644
--- a/rumba/testbeds/jfed.py
+++ b/rumba/testbeds/jfed.py
@@ -29,7 +29,8 @@ import rumba.model as mod
class Testbed(mod.Testbed):
def __init__(self, exp_name, username, cert_file, exp_hours="2",
- proj_name="ARCFIRE", authority="wall2.ilabt.iminds.be"):
+ proj_name="ARCFIRE", authority="wall2.ilabt.iminds.be",
+ image=None):
passwd = getpass.getpass(prompt="Password for certificate file: ")
mod.Testbed.__init__(self, exp_name, username, passwd, proj_name)
self.authority = "urn:publicid:IDN+" + authority + "+authority+cm"
@@ -40,6 +41,11 @@ class Testbed(mod.Testbed):
self.rspec = self.exp_name + ".rspec"
self.manifest = self.exp_name + ".rrspec"
self.jfed_jar = "jfed_cli/experimenter-cli.jar"
+ if image is not None:
+ self.image = "urn:publicid:IDN+" + authority + \
+ "+image+GeniSlices:" + image
+ else:
+ self.image = None
if os.path.exists(self.jfed_jar) == False:
print("Couldn't find jFed CLI. Downloading.")
@@ -93,6 +99,11 @@ class Testbed(mod.Testbed):
el.appendChild(el2)
el2.setAttribute("name", "raw-pc")
+ if self.image is not None:
+ image_el = doc.createElement("disk_image")
+ image_el.setAttribute("name", self.image)
+ el2.appendChild(image_el)
+
node.ifs = 0
for ipcp in node.ipcps:
if isinstance(ipcp, mod.ShimEthIPCP):