def set_segment_redundancy(alarm):
    '\n    Set lost_redundancy to segment when redundant object is down\n    :param alarm:\n    :return:\n    '
    if alarm.root:
        return
    mo = alarm.managed_object
    seg = mo.segment
    if (seg.is_redundant and (not seg.lost_redundancy)):
        u = mo.data.uplinks
        if (len(u) > 1):
            logger.info('[%s] Redundancy lost for %s', alarm.id, seg.name)
            seg.set_lost_redundancy(True)
Set lost_redundancy to segment when redundant object is down
:param alarm:
:return:
def set_segment_redundancy(alarm):
    '\n    Set lost_redundancy to segment when redundant object is down\n    :param alarm:\n    :return:\n    '
    if alarm.root:
        return
    mo = alarm.managed_object
    seg = mo.segment
    if (seg.is_redundant and (not seg.lost_redundancy)):
        u = mo.data.uplinks
        if (len(u) > 1):
            logger.info('[%s] Redundancy lost for %s', alarm.id, seg.name)
            seg.set_lost_redundancy(True)