

def __init__(self, links, tunnels, peer_node_id, tunnel_type, policy, rt_id=None, id=None):
    ' links: the calvin networks dictionary of links\n            peer_node_id: the id of the peer that we use\n            tunnel_type: what is the usage of the tunnel\n            policy: TODO not used currently\n            id: Tunnel objects on both nodes will use the same id number hence only supply if provided from other side\n        '
    super(CalvinTunnel, self).__init__()
    self.links = links
    self.tunnels = tunnels
    self.peer_node_id = peer_node_id
    self.tunnel_type = tunnel_type
    self.policy = policy
    self.rt_id = rt_id
    self.id = (id if id else calvinuuid.uuid('TUNNEL'))
    self.status = (CalvinTunnel.STATUS.WORKING if self else CalvinTunnel.STATUS.PENDING)
    if self.peer_node_id:
        if (self.peer_node_id in self.tunnels):
            self.tunnels[self.peer_node_id][self.id] = self
        else:
            self.tunnels[self.peer_node_id] = {
                self.id: self,
            }
    self.recv_handler = None
    self.down_handler = None
    self.up_handler = None

dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/calvin_proto.py CalvinTunnel.__init__/VarMisuse@105/273 `id`->`self`