Merge pull request #1174 from opensourcerouting/show_route_defpy

Refactor the 'show ip route' commands using DEFPY
This commit is contained in:
Donald Sharp 2017-10-27 10:00:57 -04:00 committed by GitHub
commit e2e7a81d58
3 changed files with 183 additions and 710 deletions

View File

@ -51,6 +51,7 @@ enum { IFLA_VRF_UNSPEC, IFLA_VRF_TABLE, __IFLA_VRF_MAX };
*/ */
#define VRF_CMD_HELP_STR "Specify the VRF\nThe VRF name\n" #define VRF_CMD_HELP_STR "Specify the VRF\nThe VRF name\n"
#define VRF_ALL_CMD_HELP_STR "Specify the VRF\nAll VRFs\n" #define VRF_ALL_CMD_HELP_STR "Specify the VRF\nAll VRFs\n"
#define VRF_FULL_CMD_HELP_STR "Specify the VRF\nThe VRF name\nAll VRFs\n"
/* /*
* Pass some OS specific data up through * Pass some OS specific data up through

View File

@ -188,8 +188,6 @@ def process_file(fn, ofd, dumpfd, all_defun):
for entry in filedata['data']: for entry in filedata['data']:
if entry['type'] == 'DEFPY' or (all_defun and entry['type'].startswith('DEFUN')): if entry['type'] == 'DEFPY' or (all_defun and entry['type'].startswith('DEFUN')):
cmddef = entry['args'][2] cmddef = entry['args'][2]
for i in cmddef:
assert i.startswith('"') and i.endswith('"')
cmddef = ''.join([i[1:-1] for i in cmddef]) cmddef = ''.join([i[1:-1] for i in cmddef])
graph = clippy.Graph(cmddef) graph = clippy.Graph(cmddef)

File diff suppressed because it is too large Load Diff