aboutsummaryrefslogtreecommitdiff
path: root/rumba/prototypes/irati.py
diff options
context:
space:
mode:
Diffstat (limited to 'rumba/prototypes/irati.py')
-rw-r--r--rumba/prototypes/irati.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py
index b951d58..4619785 100644
--- a/rumba/prototypes/irati.py
+++ b/rumba/prototypes/irati.py
@@ -38,8 +38,10 @@ import rumba.log as log
logger = log.get_logger(__name__)
-# An experiment over the IRATI implementation
class Experiment(mod.Experiment):
+ """
+ Represents an IRATI experiment.
+ """
@staticmethod
def make_executor(node, packages, testbed):
@@ -62,6 +64,16 @@ class Experiment(mod.Experiment):
def __init__(self, testbed, nodes=None,
git_repo='https://github.com/IRATI/stack',
git_branch='arcfire', installpath=None, varpath=None):
+ """
+ Initializes the experiment class.
+
+ :param testbed: The testbed to run the experiment on.
+ :param nodes: The list of nodes.
+ :param git_repo: The git repository to use for installation.
+ :param git_branch: The branch of the git repository to use.
+ :param installpath: The installation path of IRATI.
+ :param varpath: The /var path of IRATI.
+ """
mod.Experiment.__init__(self,
testbed,
nodes,
@@ -94,7 +106,6 @@ class Experiment(mod.Experiment):
return os.path.join(self._conf_dir, path)
def install(self):
- """Installs IRATI on the nodes."""
packages = ["g++", "gcc", "libtool", "linux-headers-$(uname -r)",
"autoconf", "automake", "protobuf-compiler",
@@ -117,7 +128,6 @@ class Experiment(mod.Experiment):
m_processing.call_in_parallel(names, args, executors)
def bootstrap_network(self):
- """Creates the network by enrolling and configuring the nodes"""
for node in self.nodes:
self.process_node(node)
self.enroll_nodes()
@@ -135,12 +145,6 @@ class Experiment(mod.Experiment):
logger.info("IPCPs created and enrolled on all nodes")
def process_node(self, node):
- """
- Installs the configuration and boots up rina on a node
- :type node: mod.Node
- :param node:
- :return:
- """
name = node.name
vlans = []
@@ -200,7 +204,6 @@ class Experiment(mod.Experiment):
ssh.execute_commands(self.testbed, node.ssh_config, cmds)
def enroll_nodes(self):
- """Runs the enrollments one by one, respecting dependencies"""
logger.info("Starting enrollment phase.")
time.sleep(5)
for enrollment_list in self.enrollments:
@@ -237,7 +240,6 @@ class Experiment(mod.Experiment):
return dif.name
def write_conf(self):
- """Write the configuration files"""
# Constants and initializations
ipcmconfs = dict()
difconfs = dict()