Skip to content

Commit

Permalink
[config]: Add --policer option for mirror session (#537)
Browse files Browse the repository at this point in the history
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
  • Loading branch information
Shuotian Cheng authored May 22, 2019
1 parent 38da7f3 commit 128462a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ def mirror_session():
@click.argument('ttl', metavar='<ttl>', required=True)
@click.argument('gre_type', metavar='[gre_type]', required=False)
@click.argument('queue', metavar='[queue]', required=False)
def add(session_name, src_ip, dst_ip, dscp, ttl, gre_type, queue):
@click.option('--policer')
def add(session_name, src_ip, dst_ip, dscp, ttl, gre_type, queue, policer):
"""
Add mirror session
"""
Expand All @@ -544,6 +545,9 @@ def add(session_name, src_ip, dst_ip, dscp, ttl, gre_type, queue):
"ttl": ttl
}

if policer is not None:
session_info['policer'] = policer

if gre_type is not None:
session_info['gre_type'] = gre_type

Expand Down

0 comments on commit 128462a

Please sign in to comment.