Skip to content

Commit

Permalink
tacacs management vrf changes (sonic-net#346)
Browse files Browse the repository at this point in the history
* tacacs management vrf changes

* changed -v --vrf vrfname to -m --use-mgmt-vrf and assume the vrfname as mgmt
  • Loading branch information
kannankvs authored and lguohan committed Oct 26, 2018
1 parent 404e0f8 commit 078b8b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/aaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def passkey(ctx, secret):
@click.option('-a', '--auth_type', help='Authentication type, default pap', type=click.Choice(["chap", "pap", "mschap", "login"]))
@click.option('-o', '--port', help='TCP port range is 1 to 65535, default 49', type=click.IntRange(1, 65535), default=49)
@click.option('-p', '--pri', help="Priority, default 1", type=click.IntRange(1, 64), default=1)
def add(address, timeout, key, auth_type, port, pri):
@click.option('-m', '--use-mgmt-vrf', help="Management vrf, default is no vrf", is_flag=True)
def add(address, timeout, key, auth_type, port, pri, use_mgmt_vrf):
"""Specify a TACACS+ server"""
if not is_ipaddress(address):
click.echo('Invalid ip address')
Expand All @@ -183,6 +184,8 @@ def add(address, timeout, key, auth_type, port, pri):
data['timeout'] = str(timeout)
if key is not None:
data['passkey'] = key
if use_mgmt_vrf :
data['vrf'] = "mgmt"
config_db.set_entry('TACPLUS_SERVER', address, data)
tacacs.add_command(add)

Expand Down

0 comments on commit 078b8b8

Please sign in to comment.