aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-05-03 11:26:18 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-05-03 11:26:18 +0200
commitbf9a98603c8fc8dd8f15a7d54ffb2111fc6428a9 (patch)
treea465775369733dfde1407a26920eec5f6bacea2d /examples
parenta86cba38549283d8263a399ef7f731cf8bed023e (diff)
parent32d53fa835918353128152a54e8f8539a89f4388 (diff)
downloadrumba-bf9a98603c8fc8dd8f15a7d54ffb2111fc6428a9.tar.gz
rumba-bf9a98603c8fc8dd8f15a7d54ffb2111fc6428a9.zip
Merge branch 'master' of gitlab.com:arcfire/rumba
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/jfed-rlite.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/examples/jfed-rlite.py b/examples/jfed-rlite.py
new file mode 100755
index 0000000..ce058eb
--- /dev/null
+++ b/examples/jfed-rlite.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+
+from rumba.model import *
+
+import rumba.testbeds.jfed as jfed
+import rumba.prototypes.rlite as rlite
+
+import rumba.log as log
+
+import argparse
+
+
+description = "Script to run rlite on jfed"
+epilog = "2017 H2020 ARCFIRE"
+
+argparser = argparse.ArgumentParser(description = description,
+ epilog = epilog)
+argparser.add_argument('--user', type = str, default = 'vmaffio',
+ help = "jFed username")
+argparser.add_argument('--cert', type = str,
+ help = "Absolute path to certificate (.pem) file"
+ " to be used with jFed",
+ default = '/home/vmaffione/Downloads/vmaffio-jfed.pem')
+argparser.add_argument('--expname', type = str, default = 'pinocchio',
+ help = "Name of the experiment within the jFed testbed")
+
+args = argparser.parse_args()
+
+log.set_logging_level('DEBUG')
+
+n1 = NormalDIF("n1")
+
+e1 = ShimEthDIF("e1")
+
+a = Node("a",
+ difs = [n1, e1],
+ dif_registrations = {n1 : [e1]})
+
+b = Node("b",
+ difs = [e1, n1],
+ dif_registrations = {n1 : [e1]})
+
+tb = jfed.Testbed(exp_name = args.expname,
+ cert_file = args.cert,
+ username = args.user)
+
+exp = rlite.Experiment(tb, nodes = [a, b])
+
+exp.swap_in()
+exp.install_prototype()
+exp.bootstrap_prototype()