Example #1
0
def lisp_ddt_show_delegations_lookup(eid_str):
    eid, eid_exact, group, group_exact = \
        lispconfig.lisp_get_lookup_string(eid_str)

    output = "<br>"

    #
    # Do lookup in DDT-cache.
    #
    ddt_entry = lisp.lisp_ddt_cache_lookup(eid, group, eid_exact)
    if (ddt_entry == None):
        banner = "DDT entry not found for non-authoritative EID" 
        output += "{} {}".format(lisp.lisp_print_sans(banner), 
            lisp.lisp_print_cour(eid_str))
        return(output + "<br>")
    #endif

    if (ddt_entry.is_auth_prefix()):
        if (group.is_null()):
            neg_prefix = lisp.lisp_ddt_compute_neg_prefix(eid, ddt_entry,
                lisp.lisp_ddt_cache)
            neg_prefix = lisp.lisp_print_cour(neg_prefix.print_prefix()),
        else:
            gneg_prefix = lisp.lisp_ddt_compute_neg_prefix(group, ddt_entry, 
                lisp.lisp_ddt_cache)
            neg_prefix = lisp.lisp_ddt_compute_neg_prefix(eid, ddt_entry,
                ddt_entry.source_cache)
            neg_prefix = lisp.lisp_print_cour( \
                "(" + neg_prefix.print_prefix() + ", ")
            gneg_prefix = lisp.lisp_print_cour( \
                gneg_prefix.print_prefix() + ")")
            neg_prefix += gneg_prefix
        #endif

        output += "{} {} {} {} {} {}".format( \
            lisp.lisp_print_sans("DDT authoritative-prefix entry"),
            lisp.lisp_print_cour(ddt_entry.print_eid_tuple()),
            lisp.lisp_print_sans("found for EID"),
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans("<br><br>Computed negative-prefix"),
            neg_prefix)
    else:
        output += "{} {} {} {} {} {}".format( \
            lisp.lisp_print_sans("DDT entry"),
            lisp.lisp_print_cour(ddt_entry.print_eid_tuple()),
            lisp.lisp_print_sans("found for EID"),
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans(", delegation-type"),
            lisp.lisp_print_cour(ddt_entry.print_referral_type()))
    #endif
    return(output + "<br>")
Example #2
0
def oOoooo0O0Oo(eid_str):
    o00ooO, OO0OO0O00oO0, oO, I1Ii1I1 = lispconfig.lisp_get_lookup_string(
        eid_str)
    if 28 - 28: O0 * Oo0Ooo - OOooOOo % iIii1I11I1II1 * Ii1I - i11iIiiIii
    if 7 - 7: Oo0Ooo + oO0o - I1Ii111 % Ii1I + I1ii11iIi11i
    ooo0OOOoo = "<br>"
    if 45 - 45: I1Ii111 / iIii1I11I1II1 + OoOoOO00 * OoO0O00 * OOooOOo.iII111i
    iI = lisp.lisp_referral_cache_lookup(o00ooO, oO, OO0OO0O00oO0)
    if (iI == None):
        ooo0OOOoo += "{} {}".format(
            lisp.lisp_print_sans("Lookup not found for"),
            lisp.lisp_print_cour(eid_str))
    else:
        O0O0Oooo0o = lisp.lisp_print_elapsed(iI.uptime)
        ooo0OOOoo += "{}{}{}{}{}{}".format(
            lisp.lisp_print_sans("{} match lookup for ".format(
                "Exact" if OO0OO0O00oO0 else "Longest")),
            # iII111i + oO0o - I1IiiI . ooOoO0o
            # Ii1I - O0 % oO0o * OOooOOo + I1IiiI
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans(" found "),
            lisp.lisp_print_cour(iI.print_eid_tuple()),
            lisp.lisp_print_sans(", referral-type {}".format(
                lisp.lisp_print_cour(iI.print_referral_type()))),
            # oO0o % ooOoO0o / I1Ii111 + iIii1I11I1II1 . OoooooooOO . I1IiiI
            lisp.lisp_print_sans(" with uptime {}".format(
                lisp.lisp_print_cour(O0O0Oooo0o))))
        if 71 - 71: IiII * II111iiii * oO0o
        if 56 - 56: I1IiiI
    ooo0OOOoo += "<br>"
    return (ooo0OOOoo)
    if 54 - 54: I1Ii111 / OOooOOo.oO0o % iII111i
    if 57 - 57: i11iIiiIii.I1ii11iIi11i - Ii1I - oO0o + OoOoOO00
    if 63 - 63: OoOoOO00 * iII111i
    if 69 - 69: O0.OoO0O00
    if 49 - 49: I1IiiI - I11i
    if 74 - 74:
        iIii1I11I1II1 * I1ii11iIi11i + OoOoOO00 / i1IIi / II111iiii.Oo0Ooo
    if 62 - 62: OoooooooOO * I1IiiI
Example #3
0
def oOO00O(eid_str):
    OOOoo0OO, oO0o0, iI1Ii11iIiI1, OO0Oooo0oOO0O = lispconfig.lisp_get_lookup_string(
        eid_str)
    if 62 - 62: I1IiiI
    if 100 - 100: Ii1I - O0 % oO0o * OOooOOo + I1IiiI
    Oo0O0oooo = "<br>"
    if 33 - 33: I1Ii111 + iII111i * oO0o / iIii1I11I1II1 - I1IiiI
    O0oO = lisp.lisp_referral_cache_lookup(OOOoo0OO, iI1Ii11iIiI1, oO0o0)
    if (O0oO == None):
        Oo0O0oooo += "{} {}".format(
            lisp.lisp_print_sans("Lookup not found for"),
            lisp.lisp_print_cour(eid_str))
    else:
        OO0ooOOO0OOO = lisp.lisp_print_elapsed(O0oO.uptime)
        Oo0O0oooo += "{}{}{}{}{}{}".format(
            lisp.lisp_print_sans("{} match lookup for ".format(
                "Exact" if oO0o0 else "Longest")),
            # ooOoO0o / iII111i + II111iiii % O0
            # OoO0O00
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans(" found "),
            lisp.lisp_print_cour(O0oO.print_eid_tuple()),
            lisp.lisp_print_sans(", referral-type {}".format(
                lisp.lisp_print_cour(O0oO.print_referral_type()))),
            # oO0o / I11i / I11i
            lisp.lisp_print_sans(" with uptime {}".format(
                lisp.lisp_print_cour(OO0ooOOO0OOO))))
        if 87 - 87: Oo0Ooo.I1IiiI - II111iiii + O0 / Oo0Ooo / oO0o
        if 25 - 25: I1IiiI.I1IiiI - OoOoOO00 % OoOoOO00 - i11iIiiIii / I1Ii111
    Oo0O0oooo += "<br>"
    return (Oo0O0oooo)
    if 51 - 51: Oo0Ooo / OoOoOO00.OOooOOo * o0oOOo0O0Ooo + OoO0O00 * IiII
    if 73 - 73: OoO0O00 + OoooooooOO - O0 - Ii1I - II111iiii
    if 99 - 99: ooOoO0o.Ii1I + I1Ii111 + OoooooooOO % o0oOOo0O0Ooo
    if 51 - 51: iIii1I11I1II1
    if 34 - 34: oO0o + I1IiiI - oO0o
    if 17 - 17: II111iiii % iII111i + I11i - iII111i / OOooOOo + ooOoO0o
    if 59 - 59: OOooOOo % OoOoOO00.Ii1I * I1ii11iIi11i % I11i
Example #4
0
def o000O0o(eid_str):
    iI1iII1, oO0OOoo0OO, O0ii1ii1ii, oooooOoo0ooo = lispconfig.lisp_get_lookup_string(
        eid_str)
    if 6 - 6: I11i - Ii1I + iIii1I11I1II1 - I1Ii111 - i11iIiiIii
    if 79 - 79: OoOoOO00 - O0 * OoO0O00 + OoOoOO00 % O0 * O0
    oOOo0 = "<br>"
    if 54 - 54: O0 - IiII % OOooOOo
    if 77 - 77: OoOoOO00 / I1IiiI / OoO0O00 + OoO0O00.OOooOOo
    if 38 - 38: I1Ii111
    if 7 - 7: O0.iII111i % I1ii11iIi11i - I1IiiI - iIii1I11I1II1
    Oo0o0000o0o0 = lisp.lisp_ddt_cache_lookup(iI1iII1, O0ii1ii1ii, oO0OOoo0OO)
    if (Oo0o0000o0o0 == None):
        I111IIIiIii = "DDT entry not found for non-authoritative EID"
        oOOo0 += "{} {}".format(lisp.lisp_print_sans(I111IIIiIii),
                                lisp.lisp_print_cour(eid_str))
        return (oOOo0 + "<br>")
        if 85 - 85: I1ii11iIi11i % iII111i % ooOoO0o
        if 82 - 82: i11iIiiIii - iII111i * OoooooooOO / I11i
    if (Oo0o0000o0o0.is_auth_prefix()):
        if (O0ii1ii1ii.is_null()):
            i1oOo = lisp.lisp_ddt_compute_neg_prefix(iI1iII1, Oo0o0000o0o0,
                                                     lisp.lisp_ddt_cache)
            i1oOo = lisp.lisp_print_cour(i1oOo.print_prefix()),
        else:
            oOO00Oo = lisp.lisp_ddt_compute_neg_prefix(O0ii1ii1ii,
                                                       Oo0o0000o0o0,
                                                       lisp.lisp_ddt_cache)
            i1oOo = lisp.lisp_ddt_compute_neg_prefix(iI1iII1, Oo0o0000o0o0,
                                                     Oo0o0000o0o0.source_cache)
            i1oOo = lisp.lisp_print_cour("(" + i1oOo.print_prefix() + ", ")
            if 6 - 6: oO0o
            oOO00Oo = lisp.lisp_print_cour(oOO00Oo.print_prefix() + ")")
            if 68 - 68: OoOoOO00 - OoO0O00
            i1oOo += oOO00Oo
            if 28 - 28: OoO0O00.OOooOOo / OOooOOo + Oo0Ooo.I1ii11iIi11i
            if 1 - 1: iIii1I11I1II1 / II111iiii
        oOOo0 += "{} {} {} {} {} {}".format(
            lisp.lisp_print_sans("DDT authoritative-prefix entry"),
            # I11i . OoooooooOO
            lisp.lisp_print_cour(Oo0o0000o0o0.print_eid_tuple()),
            lisp.lisp_print_sans("found for EID"),
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans("<br><br>Computed negative-prefix"),
            i1oOo)
    else:
        oOOo0 += "{} {} {} {} {} {}".format(
            lisp.lisp_print_sans("DDT entry"),
            # o0oOOo0O0Ooo % iII111i * O0
            lisp.lisp_print_cour(Oo0o0000o0o0.print_eid_tuple()),
            lisp.lisp_print_sans("found for EID"),
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans(", delegation-type"),
            lisp.lisp_print_cour(Oo0o0000o0o0.print_referral_type()))
        if 87 - 87: i11iIiiIii
    return (oOOo0 + "<br>")
    if 93 - 93: I1ii11iIi11i - OoO0O00 % i11iIiiIii.iII111i / iII111i - I1Ii111
    if 9 - 9:
        I1ii11iIi11i / Oo0Ooo - I1IiiI / OoooooooOO / iIii1I11I1II1 - o0oOOo0O0Ooo
    if 91 - 91: iII111i % i1IIi % iIii1I11I1II1
    if 20 - 20: OOooOOo % Ii1I / Ii1I + Ii1I
    if 45 - 45: oO0o - IiII - OoooooooOO - OoO0O00.II111iiii / O0
    if 51 - 51: O0 + iII111i
    if 8 - 8: oO0o * OoOoOO00 - Ii1I - OoO0O00 * OOooOOo % I1IiiI
Example #5
0
def O0ooo0O0oo0(eid_str):
    oo0oOo, o000O0o, iI1iII1, oO0OOoo0OO = lispconfig.lisp_get_lookup_string(
        eid_str)
    if 65 - 65: Ii1I.iIii1I11I1II1 / O0 - Ii1I
    if 21 - 21: I1IiiI * iIii1I11I1II1
    oooooOoo0ooo = "<br>"
    if 6 - 6: I11i - Ii1I + iIii1I11I1II1 - I1Ii111 - i11iIiiIii
    if 79 - 79: OoOoOO00 - O0 * OoO0O00 + OoOoOO00 % O0 * O0
    if 61 - 61: II111iiii
    if 64 - 64: ooOoO0o / OoOoOO00 - O0 - I11i
    Oo0o0000o0o0 = lisp.lisp_ddt_cache_lookup(oo0oOo, iI1iII1, o000O0o)
    if (Oo0o0000o0o0 == None):
        O0oOoOOOoOO = "DDT entry not found for non-authoritative EID"
        oooooOoo0ooo += "{} {}".format(lisp.lisp_print_sans(O0oOoOOOoOO),
                                       lisp.lisp_print_cour(eid_str))
        return (oooooOoo0ooo + "<br>")
        if 38 - 38: I1Ii111
        if 7 - 7: O0.iII111i % I1ii11iIi11i - I1IiiI - iIii1I11I1II1
    if (Oo0o0000o0o0.is_auth_prefix()):
        if (iI1iII1.is_null()):
            I111IIIiIii = lisp.lisp_ddt_compute_neg_prefix(
                oo0oOo, Oo0o0000o0o0, lisp.lisp_ddt_cache)
            I111IIIiIii = lisp.lisp_print_cour(I111IIIiIii.print_prefix()),
        else:
            oO0000OOo00 = lisp.lisp_ddt_compute_neg_prefix(
                iI1iII1, Oo0o0000o0o0, lisp.lisp_ddt_cache)
            I111IIIiIii = lisp.lisp_ddt_compute_neg_prefix(
                oo0oOo, Oo0o0000o0o0, Oo0o0000o0o0.source_cache)
            I111IIIiIii = lisp.lisp_print_cour("(" +
                                               I111IIIiIii.print_prefix() +
                                               ", ")
            if 27 - 27: I1IiiI % I1IiiI
            oO0000OOo00 = lisp.lisp_print_cour(oO0000OOo00.print_prefix() +
                                               ")")
            if 1 - 1: OoO0O00 - oO0o.I11i.OoO0O00 / Oo0Ooo + I11i
            I111IIIiIii += oO0000OOo00
            if 78 - 78: O0.oO0o.II111iiii % OOooOOo
            if 49 - 49: Ii1I / OoO0O00.II111iiii
        oooooOoo0ooo += "{} {} {} {} {} {}".format(
            lisp.lisp_print_sans("DDT authoritative-prefix entry"),
            # OOooOOo + Oo0Ooo . i11iIiiIii - i1IIi / iIii1I11I1II1
            lisp.lisp_print_cour(Oo0o0000o0o0.print_eid_tuple()),
            lisp.lisp_print_sans("found for EID"),
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans("<br><br>Computed negative-prefix"),
            I111IIIiIii)
    else:
        oooooOoo0ooo += "{} {} {} {} {} {}".format(
            lisp.lisp_print_sans("DDT entry"),
            # i11iIiiIii / I11i
            lisp.lisp_print_cour(Oo0o0000o0o0.print_eid_tuple()),
            lisp.lisp_print_sans("found for EID"),
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans(", delegation-type"),
            lisp.lisp_print_cour(Oo0o0000o0o0.print_referral_type()))
        if 18 - 18: o0oOOo0O0Ooo % iII111i * O0
    return (oooooOoo0ooo + "<br>")
    if 87 - 87: i11iIiiIii
    if 93 - 93: I1ii11iIi11i - OoO0O00 % i11iIiiIii.iII111i / iII111i - I1Ii111
    if 9 - 9:
        I1ii11iIi11i / Oo0Ooo - I1IiiI / OoooooooOO / iIii1I11I1II1 - o0oOOo0O0Ooo
    if 91 - 91: iII111i % i1IIi % iIii1I11I1II1
    if 20 - 20: OOooOOo % Ii1I / Ii1I + Ii1I
    if 45 - 45: oO0o - IiII - OoooooooOO - OoO0O00.II111iiii / O0
    if 51 - 51: O0 + iII111i
Example #6
0
def lisp_ms_show_site_lookup(input_str):
    eid, eid_exact, group, group_exact = \
        lispconfig.lisp_get_lookup_string(input_str)

    output = "<br>"

    #
    # Do lookup in site-cache first.
    #
    site_eid = lisp.lisp_site_eid_lookup(eid, group, eid_exact)
    if (site_eid and site_eid.is_star_g() == False):
        eid_str = site_eid.print_eid_tuple()
        registered = lisp.green("registered", True) if site_eid.registered \
            else lisp.red("not registered", True)
        output += "{} '{}' {} {} {} {} {} {}".format( \
            lisp.lisp_print_sans("Site"),
            lisp.lisp_print_cour(site_eid.site.site_name),
            lisp.lisp_print_sans("entry"),
            lisp.lisp_print_cour(eid_str),
            lisp.lisp_print_sans("found for EID"),
            lisp.lisp_print_cour(input_str),
            lisp.lisp_print_sans("site EID is"),
            lisp.lisp_print_cour(registered))
        return (output + "<br>")
    #endif

    #
    # Compute negative prefixes.
    #
    neg_prefix, gneg_prefix, action = \
        lisp.lisp_ms_compute_neg_prefix(eid, group)
    if (group.is_null()):
        neg_prefix = lisp.lisp_print_cour(neg_prefix.print_prefix())
    else:
        gneg_prefix = lisp.lisp_print_cour(gneg_prefix.print_prefix())
        neg_prefix = lisp.lisp_print_cour(neg_prefix.print_prefix())
        neg_prefix = "(" + neg_prefix + ", " + gneg_prefix + ")"
    #endif

    if (action == lisp.LISP_DDT_ACTION_NOT_AUTH):
        banner = "Site entry not found for non-authoritative EID"
        output += "{} {} {} {}".format(
            lisp.lisp_print_sans(banner), lisp.lisp_print_cour(input_str),
            lisp.lisp_print_sans("<br><br>Computed negative-prefix"),
            neg_prefix)
    #endif

    #
    # Try to find a auth-prefix in the DDT-cache.
    #
    if (action == lisp.LISP_DDT_ACTION_DELEGATION_HOLE):
        ddt_entry = lisp.lisp_ddt_cache_lookup(eid, group, False)
        if (ddt_entry == None or ddt_entry.is_auth_prefix() == False):
            banner = "Could not find Authoritative-prefix entry for"
            output += "{} {} {} {}".format(
                lisp.lisp_print_sans(banner), lisp.lisp_print_cour(input_str),
                lisp.lisp_print_sans("<br><br>Computed negative-prefix"),
                neg_prefix)
        else:
            eid_str = ddt_entry.print_eid_tuple()
            output += "{} {} {} {} {} {}".format( \
                lisp.lisp_print_sans("Authoritative-prefix entry"),
                lisp.lisp_print_cour(eid_str),
                lisp.lisp_print_sans("found for EID"),
                lisp.lisp_print_cour(input_str),
                lisp.lisp_print_sans("<br><br>Computed negative-prefix"),
                neg_prefix)
        #endif
    #endif
    return (output + "<br>")