-
Notifications
You must be signed in to change notification settings - Fork 829
Expand file tree
/
Copy pathdebug_quagga.py
More file actions
100 lines (80 loc) · 2.23 KB
/
debug_quagga.py
File metadata and controls
100 lines (80 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import click
from debug.main import *
###############################################################################
#
# 'debug bgp' cli stanza
#
###############################################################################
@cli.group(cls=AliasedGroup, default_if_no_args=False)
def bgp():
"""debug bgp events """
pass
@bgp.command()
def as4():
"""debug bgp AS4 actions """
command = 'sudo vtysh -c "debug bgp as4"'
run_command(command)
@bgp.command()
def events():
"""debug bgp events """
command = 'sudo vtysh -c "debug bgp events"'
run_command(command)
@bgp.command()
def filters():
"""debug bgp filters """
command = 'sudo vtysh -c "debug bgp filters"'
run_command(command)
@bgp.command()
def fsm():
"""debug bgp fsm """
command = 'sudo vtysh -c "debug bgp fsm"'
run_command(command)
@bgp.command()
def keepalives():
"""debug bgp keepalives """
command = 'sudo vtysh -c "debug bgp keepalives"'
run_command(command)
@bgp.command()
def updates():
"""debug bgp updates """
command = 'sudo vtysh -c "debug bgp updates"'
run_command(command)
@bgp.command()
def zebra():
"""debug bgp zebra messages """
command = 'sudo vtysh -c "debug bgp zebra"'
run_command(command)
###############################################################################
#
# 'debug zebra' cli stanza
#
###############################################################################
@cli.group(cls=AliasedGroup, default_if_no_args=False)
def zebra():
"""debug zebra events """
pass
@zebra.command()
def events():
"""debug zebra events """
command = 'sudo vtysh -c "debug zebra events"'
run_command(command)
@zebra.command()
def fpm():
"""debug zebra fpm events """
command = 'sudo vtysh -c "debug zebra fpm"'
run_command(command)
@zebra.command()
def kernel():
"""debug zebra's kernel-interface events """
command = 'sudo vtysh -c "debug zebra kernel"'
run_command(command)
@zebra.command()
def packet():
"""debug zebra packets """
command = 'sudo vtysh -c "debug zebra packet"'
run_command(command)
@zebra.command()
def rib():
"""debug zebra RIB events """
command = 'sudo vtysh -c "debug zebra rib"'
run_command(command)