Skip to content

Commit d824e7c

Browse files
committed
Add version in CLI help
1 parent 9eab4b0 commit d824e7c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cisco_gnmi/cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import argparse
3535
from getpass import getpass
3636
from google.protobuf import json_format, text_format
37-
from . import ClientBuilder, proto
37+
from . import ClientBuilder, proto, __version__
3838
from google.protobuf.internal import enum_type_wrapper
3939
import sys
4040

@@ -52,6 +52,8 @@ def main():
5252
usage="""
5353
cisco-gnmi <rpc> [<args>]
5454
55+
Version {version}
56+
5557
Supported RPCs:
5658
{supported_rpcs}
5759
@@ -62,7 +64,8 @@ def main():
6264
6365
See <rpc> --help for RPC options.
6466
""".format(
65-
supported_rpcs="\n".join(list(rpc_map.keys()))
67+
version=__version__,
68+
supported_rpcs="\n".join(sorted(list(rpc_map.keys())))
6669
),
6770
)
6871
parser.add_argument("rpc", help="gNMI RPC to perform against network element.")

0 commit comments

Comments
 (0)