diff --git a/src/cisco_gnmi/cli.py b/src/cisco_gnmi/cli.py index bacfa8d..0ef42ab 100644 --- a/src/cisco_gnmi/cli.py +++ b/src/cisco_gnmi/cli.py @@ -113,6 +113,12 @@ def gnmi_subscribe(): default="SAMPLE", choices=proto.gnmi_pb2.SubscriptionMode.keys(), ) + parser.add_argument( + "-req_mode", + help="SubscriptionList.Mode mode for Subscriptions. Defaults to STREAM.", + default="STREAM", + choices=proto.gnmi_pb2.SubscriptionList.Mode.keys(), + ) parser.add_argument( "-suppress_redundant", help="Suppress redundant information in Subscription.", @@ -159,6 +165,8 @@ def gnmi_subscribe(): kwargs["sample_interval"] = args.interval * int(1e9) if args.mode: kwargs["sub_mode"] = args.mode + if args.req_mode: + kwargs["request_mode"] = args.req_mode if args.suppress_redundant: kwargs["suppress_redundant"] = args.suppress_redundant if args.heartbeat_interval: