From a1f2be15e901981efbaeaacc9a331342c1d3911e Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 5 Jun 2018 15:54:18 +0200 Subject: storyboard: Bind and register server name for Ouroboros In case the experiment is done with the Ouroboros prototype, the name needs to be bound and registered on the node. --- rumba/prototypes/ouroboros.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'rumba/prototypes/ouroboros.py') diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 653f564..51f3629 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -248,6 +248,34 @@ class Experiment(mod.Experiment): logger.info("Killing IRMd...") subprocess.check_call('sudo killall -15 irmd'.split()) + def bind_program(self, node, program, name): + """ + Bind a program to a certain name on a certain node. + + :param node: The node + :param program: The binary name + :param name: Name to bind to + """ + node.execute_command('irm b prog %s name %s' % (program, name)) + + def register_name(self, node, name, layers): + """ + Bind a program to a certain name on a certain node. + + :param node: The node + :param name: Name to register + :param layers: Layers to register in. If it is None, + then it registers in all layers. + """ + cmd = 'irm r n %s ' % name + if layers is None: + cmd += 'layer \'*\'' + else: + for layer in layers: + cmd += 'layer %s ' % layer + + node.execute_command(cmd) + def destroy_dif(self, dif): for ipcp in dif.ipcps: ipcp.node.execute_command('irm i d n ' + ipcp.name) -- cgit v1.2.3