Skip to content

Commit ffaf455

Browse files
doc updates
1 parent b520532 commit ffaf455

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

jc/parsers/route_print.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
r"""jc - JSON Convert `route print` command output parser
22
3+
See also: the `route` command parser
4+
35
Usage (cli):
46
57
$ route print | jc --route-print
@@ -26,42 +28,45 @@
2628
"netmask": string,
2729
"gateway": string,
2830
"interface": string,
29-
"metric": integer,
30-
"metric_set_to_default": boolean # if metric="Default"
31+
"metric": integer, # [0]
32+
"metric_set_to_default": boolean # [1]
3133
}
3234
],
3335
"persistent_routes": [
3436
{
3537
"network_address": string,
3638
"netmask": string,
3739
"gateway_address": string,
38-
"metric": integer
39-
"metric_set_to_default": boolean # if metric="Default"
40+
"metric": integer # [0]
41+
"metric_set_to_default": boolean # [1]
4042
}
4143
]
4244
},
4345
"ipv6_route_table": {
4446
"active_routes": [
4547
{
4648
"interface": integer,
47-
"metric": integer,
48-
"metric_set_to_default": boolean, # if metric="Default"
49+
"metric": integer, # [0]
50+
"metric_set_to_default": boolean, # [1]
4951
"network_destination": string,
5052
"gateway": string
5153
}
5254
],
5355
"persistent_routes": [
5456
{
5557
"interface": integer,
56-
"metric": integer,
57-
"metric_set_to_default": boolean, # if metric="Default"
58+
"metric": integer, # [0]
59+
"metric_set_to_default": boolean, # [1]
5860
"network_destination": string,
5961
"gateway": string
6062
}
6163
]
6264
}
6365
}
6466
67+
[0] Null/None if "metric" = "Default"
68+
[1] True if "metric" = "Default"
69+
6570
Examples:
6671
6772
$ route print | jc --route-print -p
@@ -173,9 +178,10 @@
173178
class info():
174179
"""Provides parser metadata (version, author, etc.)"""
175180
version = '1.0'
176-
description = '`route-print` command parser'
181+
description = '`route print` command parser'
177182
author = 'joehacksalot'
178183
author_email = 'joehacksalot@gmail.com'
184+
details = 'See also: `route` command parser'
179185
compatible = ['win32']
180186
magic_commands = ['route print']
181187
tags = ['command']

0 commit comments

Comments
 (0)