aboutsummaryrefslogtreecommitdiff
path: root/rumba/model.py
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2017-04-12 15:56:37 +0200
committerMarco Capitani <m.capitani@nextworks.it>2017-04-12 15:56:37 +0200
commitc83ea6f4b791cd85cd248b039b353c522f2f1f3e (patch)
treecf3ffb203f0ada7bef09301aa3f3d5400b2d8c7b /rumba/model.py
parent46310717c3293054324cc6a0271d855b638df0ff (diff)
parent6d8d0d30d75b318650034470b376a57a37b57944 (diff)
downloadrumba-c83ea6f4b791cd85cd248b039b353c522f2f1f3e.tar.gz
rumba-c83ea6f4b791cd85cd248b039b353c522f2f1f3e.zip
Merge branch 'master' into master-marco
Updating with ssh changes (and other)
Diffstat (limited to 'rumba/model.py')
-rw-r--r--rumba/model.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/rumba/model.py b/rumba/model.py
index 9f6d2c2..5f4f162 100644
--- a/rumba/model.py
+++ b/rumba/model.py
@@ -125,6 +125,13 @@ class NormalDIF(DIF):
s += "\n Component %s has policy %s" % (comp, pol)
return s
+# SSH Configuration
+#
+class SSHConfig:
+ def __init__(self, hostname, port=22):
+ self.hostname = hostname
+ self.port = port
+
# A node in the experiment
#
# @difs: DIFs the node will have an IPCP in
@@ -150,7 +157,7 @@ class Node:
if bindings is None:
bindings = dict()
self.bindings = bindings
- self.full_name = name
+ self.ssh_config = SSHConfig(name)
self.ipcps = []
self._validate()
@@ -313,10 +320,11 @@ class Experiment:
@classmethod
def from_config_file(cls, testbed, filename='demo.conf'):
"""
- :type testbed: Testbed
+ :type testbed: Testbed
+ :rtype: Experiment
:param testbed: the testbed for the experiment
- :param filename: name of the .conf file
- :return: the Experiment
+ :param filename: name of the .conf file
+ :return: an Experiment object
"""
shims = {}
@@ -634,4 +642,3 @@ class Experiment:
finally:
# No matter what happens, undo the testbed (testbed-specific)
self.testbed.swap_out(self)
-