diff options
Diffstat (limited to 'rumba/prototypes/ouroboros.py')
-rw-r--r-- | rumba/prototypes/ouroboros.py | 28 |
1 files changed, 28 insertions, 0 deletions
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) |