

def port_connect(self, callback=None, port_id=None, peer_node_id=None, peer_port_id=None, peer_actor_id=None, peer_port_name=None, peer_port_dir=None, tunnel=None):
    ' Before calling this method all needed information and when requested a tunnel must be available\n            see port manager for parameters\n        '
    if tunnel:
        msg = {
            'cmd': 'PORT_CONNECT',
            'port_id': port_id,
            'peer_actor_id': peer_actor_id,
            'peer_port_name': peer_port_name,
            'peer_port_id': peer_port_id,
            'peer_port_dir': peer_port_dir,
            'tunnel_id': tunnel.id,
        }
        self.network.links[peer_node_id].send_with_reply(callback, msg)
    else:
        raise NotImplementedError()

dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/calvin_proto.py CalvinProto.port_connect/original