Skip to content

Commit 128462a

Browse files
author
Shuotian Cheng
authored
[config]: Add --policer option for mirror session (#537)
Signed-off-by: Shu0T1an ChenG <[email protected]>
1 parent 38da7f3 commit 128462a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

config/main.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,8 @@ def mirror_session():
530530
@click.argument('ttl', metavar='<ttl>', required=True)
531531
@click.argument('gre_type', metavar='[gre_type]', required=False)
532532
@click.argument('queue', metavar='[queue]', required=False)
533-
def add(session_name, src_ip, dst_ip, dscp, ttl, gre_type, queue):
533+
@click.option('--policer')
534+
def add(session_name, src_ip, dst_ip, dscp, ttl, gre_type, queue, policer):
534535
"""
535536
Add mirror session
536537
"""
@@ -544,6 +545,9 @@ def add(session_name, src_ip, dst_ip, dscp, ttl, gre_type, queue):
544545
"ttl": ttl
545546
}
546547

548+
if policer is not None:
549+
session_info['policer'] = policer
550+
547551
if gre_type is not None:
548552
session_info['gre_type'] = gre_type
549553

0 commit comments

Comments
 (0)