Skip to content

Commit ded7154

Browse files
davidpil2002nmoray
authored andcommitted
Add LDAP feature CLI support (sonic-net#3022)
- What I did Add LDAP CLI - How I did it created the CLI by using YANG model generator, the YANG model can be found in the LDAP HLD: sonic-net/SONiC#1487 - How to verify it Manually: you can use configurations command like"config ldap global " or "show ldap global" (more examples in the HLD.) Auto: 1.There are unitest of each policy including good & bad flow in this commit, that should pass.
1 parent 024b343 commit ded7154

File tree

8 files changed

+789
-4
lines changed

8 files changed

+789
-4
lines changed

config/aaa.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ def trace(option):
119119

120120

121121
@click.command()
122-
@click.argument('auth_protocol', nargs=-1, type=click.Choice(["radius", "tacacs+", "local", "default"]))
122+
@click.argument('auth_protocol', nargs=-1, type=click.Choice(["ldap", "radius", "tacacs+", "local", "default"]))
123123
def login(auth_protocol):
124-
"""Switch login authentication [ {radius, tacacs+, local} | default ]"""
124+
"""Switch login authentication [ {ldap, radius, tacacs+, local} | default ]"""
125125
if len(auth_protocol) is 0:
126126
click.echo('Argument "auth_protocol" is required')
127127
return
@@ -140,9 +140,9 @@ def login(auth_protocol):
140140
val2 = auth_protocol[1]
141141
good_ap = False
142142
if val == 'local':
143-
if val2 == 'radius' or val2 == 'tacacs+':
143+
if val2 == 'radius' or val2 == 'tacacs+' or val2 == 'ldap':
144144
good_ap = True
145-
elif val == 'radius' or val == 'tacacs+':
145+
elif val == 'radius' or val == 'tacacs+' or val == 'ldap':
146146
if val2 == 'local':
147147
good_ap = True
148148
if good_ap == True:

0 commit comments

Comments
 (0)