mirror of
https://github.com/sileht/bird-lg.git
synced 2024-11-22 06:54:43 +01:00
remove temporaly as name
This commit is contained in:
parent
28a20b4675
commit
820e3860ef
5
lg.py
5
lg.py
|
@ -259,7 +259,8 @@ def show_route_for_detail(hosts, proto):
|
||||||
|
|
||||||
ASNAME_CACHE = {}
|
ASNAME_CACHE = {}
|
||||||
def get_as_name(_as):
|
def get_as_name(_as):
|
||||||
if True or not ASNAME_CACHE.has_key(_as):
|
return "AS%s" % _as
|
||||||
|
if not ASNAME_CACHE.has_key(_as):
|
||||||
whois_answer = whois_command("as%s" % _as)
|
whois_answer = whois_command("as%s" % _as)
|
||||||
as_name = re.search('as-name: (.*)', whois_answer)
|
as_name = re.search('as-name: (.*)', whois_answer)
|
||||||
if as_name:
|
if as_name:
|
||||||
|
@ -289,7 +290,7 @@ def show_bgpmap(data):
|
||||||
if _as == previous_as:
|
if _as == previous_as:
|
||||||
continue
|
continue
|
||||||
if not nodes.has_key(_as):
|
if not nodes.has_key(_as):
|
||||||
nodes[_as] = pydot.Node(_as, style="filled", fillcolor=(first and "#F5A9A9" or "white"))
|
nodes[_as] = pydot.Node(_as, label=_as, style="filled", fillcolor=(first and "#F5A9A9" or "white"))
|
||||||
graph.add_node(nodes[_as])
|
graph.add_node(nodes[_as])
|
||||||
|
|
||||||
edge_tuple = (nodes[previous_as], nodes[_as])
|
edge_tuple = (nodes[previous_as], nodes[_as])
|
||||||
|
|
Loading…
Reference in a new issue