

def _setup_ack(self, reply):
    ' Gets called when the tunnel request is acknowledged by the other side '
    if (reply and (reply.data['tunnel_id'] != self.id)):
        self._update_id(reply.data['tunnel_id'])
    if reply:
        self.status = CalvinTunnel.STATUS.WORKING
        if self.up_handler:
            self.up_handler()
    else:
        self.status = CalvinTunnel.STATUS.TERMINATED
        if self.down_handler:
            self.down_handler()

dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/calvin_proto.py CalvinTunnel._setup_ack/original