-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONiC YANG model for RADIUS. (#12749)
#### Why I did it Added SONiC YANG model for RADIUS. Fixes #12477 #### How I did it Added the RADIUS and RADIUS_SERVER tables for global and per RADIUS server configuration. RADIUS statistics reside in COUNTERS_DB and are not part of the configuration. These are not a part of this PR. #### How to verify it Compiled sonic_yang_mgmt-1.0-py3-none-any.whl. #### Description for the changelog SONiC YANG model for RADIUS.
- Loading branch information
Showing
6 changed files
with
427 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
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
36 changes: 36 additions & 0 deletions
36
src/sonic-yang-models/tests/yang_model_tests/tests/radius.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,36 @@ | ||
{ | ||
"RADIUS_TEST": { | ||
"desc": "RADIUS global configuration in the RADIUS table." | ||
}, | ||
"RADIUS_INVALID_SRC_IP_TEST": { | ||
"desc": "Radius global configuration with invalid Src IP value in RADIUS table.", | ||
"eStr": "InvalidValue" | ||
}, | ||
"RADIUS_INVALID_TIMEOUT_TEST": { | ||
"desc": "Radius global configuration with invalid timeout in RADIUS table.", | ||
"eStr": "RADIUS timeout must be 1..60." | ||
}, | ||
"RADIUS_SERVER_TEST" : { | ||
"desc": "Radius server configuration in RADIUS_SERVER table." | ||
}, | ||
"RADIUS_SERVER_INVALID_PRIORITY_TEST": { | ||
"desc": "Radius server configuration with invalid priority value in RADIUS_SERVER table.", | ||
"eStr": "RADIUS priority must be 1..64." | ||
}, | ||
"RADIUS_SERVER_INVALID_TIMEOUT_TEST" : { | ||
"desc": "Radius server configuration with invalid timeout value in RADIUS_SERVER table.", | ||
"eStr": "RADIUS timeout must be 1..60." | ||
}, | ||
"RADIUS_SERVER_INVALID_RETRANSMIT_TEST" : { | ||
"desc": "Radius server configuration with invalid retransmit value in RADIUS_SERVER table.", | ||
"eStr": "RADIUS retransmit must be 0..10." | ||
}, | ||
"RADIUS_SERVER_INVALID_AUTH_TYPE_TEST" : { | ||
"desc": "Radius server configuration with invalid auth type in RADIUS_SERVER table.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"RADIUS_SERVER_INVALID_VRF_TEST" : { | ||
"desc": "Radius server configuration with invalid VRF in RADIUS_SERVER table.", | ||
"eStr": "Invalid VRF name" | ||
} | ||
} |
139 changes: 139 additions & 0 deletions
139
src/sonic-yang-models/tests/yang_model_tests/tests_config/radius.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,139 @@ | ||
{ | ||
"RADIUS_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS": { | ||
"global": { | ||
"auth_type": "chap", | ||
"timeout": 5, | ||
"passkey": "brcm123" | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"RADIUS_INVALID_SRC_IP_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS": { | ||
"global": { | ||
"auth_type": "chap", | ||
"src_ip": "INVALID" | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"RADIUS_INVALID_TIMEOUT_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS": { | ||
"global": { | ||
"auth_type": "chap", | ||
"timeout": 70 | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"RADIUS_SERVER_TEST": { | ||
"sonic-port:sonic-port": { | ||
"sonic-port:PORT": { | ||
"PORT_LIST": [ | ||
{ | ||
"admin_status": "up", | ||
"alias": "eth8", | ||
"description": "Ethernet8", | ||
"lanes": "65", | ||
"mtu": 9000, | ||
"name": "Ethernet0", | ||
"speed": 25000 | ||
} | ||
] | ||
} | ||
}, | ||
|
||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS_SERVER": { | ||
"RADIUS_SERVER_LIST": [ | ||
{ | ||
"ipaddress": "192.168.1.1", | ||
"priority": 5, | ||
"timeout": 6, | ||
"auth_type": "chap", | ||
"passkey": "brcm123", | ||
"src_intf": "Ethernet0", | ||
"vrf": "default" | ||
}, | ||
{ | ||
"ipaddress": "10.10.10.10", | ||
"priority": 2, | ||
"timeout": 15, | ||
"auth_type": "pap", | ||
"passkey": "sonic_123", | ||
"vrf": "mgmt" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"RADIUS_SERVER_INVALID_PRIORITY_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS_SERVER": { | ||
"RADIUS_SERVER_LIST": [ | ||
{ | ||
"ipaddress": "192.168.1.1", | ||
"priority": 70 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"RADIUS_SERVER_INVALID_TIMEOUT_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS_SERVER": { | ||
"RADIUS_SERVER_LIST": [ | ||
{ | ||
"ipaddress": "192.168.1.1", | ||
"timeout": 70 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"RADIUS_SERVER_INVALID_RETRANSMIT_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS_SERVER": { | ||
"RADIUS_SERVER_LIST": [ | ||
{ | ||
"ipaddress": "192.168.1.1", | ||
"retransmit": 20 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"RADIUS_SERVER_INVALID_AUTH_TYPE_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS_SERVER": { | ||
"RADIUS_SERVER_LIST": [ | ||
{ | ||
"ipaddress": "192.168.1.1", | ||
"auth_type": "123" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"RADIUS_SERVER_INVALID_VRF_TEST": { | ||
"sonic-system-radius:sonic-system-radius": { | ||
"sonic-system-radius:RADIUS_SERVER": { | ||
"RADIUS_SERVER_LIST": [ | ||
{ | ||
"ipaddress": "192.168.1.1", | ||
"vrf": "Vrf1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.