forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5907696
commit 9485c3b
Showing
4 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/sonic-yang-models/tests/yang_model_tests/tests/ldap.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"LDAP_TABLE": { | ||
"desc": "Configure LDAP global fields." | ||
}, | ||
"LDAP_INVALID_TIMEOUT_TEST": { | ||
"desc": "LDAP global configuration with invalid timeout value in LDAP table.", | ||
"eStr": "LDAP timeout must be 1..60" | ||
}, | ||
"LDAP_SERVER_TEST" : { | ||
"desc": "LDAP server configuration in LDAP_SERVER table." | ||
}, | ||
"LDAP_SERVER_INVALID_PRIORITY_TEST": { | ||
"desc": "LDAP server configuration with invalid priority value in LDAP_SERVER table.", | ||
"eStr": "LDAP server priority must be 1..8" | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
src/sonic-yang-models/tests/yang_model_tests/tests_config/ldap.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"LDAP_TABLE": { | ||
"sonic-system-ldap:sonic-system-ldap": { | ||
"sonic-system-ldap:LDAP": { | ||
"global":{ | ||
"bind_dn": "test_bind", | ||
"bind_password": "secret", | ||
"bind_timeout": "5", | ||
"version": "3", | ||
"base_dn": "test_base", | ||
"port": "389", | ||
"timeout": "5" | ||
} | ||
} | ||
} | ||
}, | ||
"LDAP_INVALID_TIMEOUT_TEST": { | ||
"sonic-system-ldap:sonic-system-ldap": { | ||
"sonic-system-ldap:LDAP": { | ||
"global": { | ||
"bind_dn": "test_bind", | ||
"bind_password": "secret", | ||
"bind_timeout": "5", | ||
"version": "3", | ||
"base_dn": "test_base", | ||
"port": "389", | ||
"timeout": 150 | ||
} | ||
} | ||
} | ||
}, | ||
"LDAP_SERVER_TEST": { | ||
"sonic-system-ldap:sonic-system-ldap": { | ||
"sonic-system-ldap:LDAP_SERVER": { | ||
"LDAP_SERVER_LIST": [ | ||
{ | ||
"hostname": "192.168.1.1", | ||
"priority": 1 | ||
}, | ||
{ | ||
"hostname": "ldap_server_1", | ||
"priority": 2 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"LDAP_SERVER_INVALID_PRIORITY_TEST": { | ||
"sonic-system-ldap:sonic-system-ldap": { | ||
"sonic-system-ldap:LDAP_SERVER": { | ||
"LDAP_SERVER_LIST": [ | ||
{ | ||
"hostname": "192.168.1.1", | ||
"priority": 70 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |