-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PAC and HOSTAPD YANG files. #16036
Open
shdasari
wants to merge
13
commits into
sonic-net:master
Choose a base branch
from
shdasari:pac_yang_files
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
PAC and HOSTAPD YANG files. #16036
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
dffcb08
PAC and HOSTAPD YANG files.
shdasari 13f079f
PAC and HOSTAPD YANG files.
shdasari 7f6f62f
PAC and HOSTAPD YANG files.
shdasari 79ad3ab
PAC and HOSTAPD YANG files.
shdasari c905a16
PAC and HOSTAPD YANG files.
shdasari 31fa468
Update sample_config_db.json
shdasari 13f591f
Merge branch 'master' into pac_yang_files
shdasari 5f29d64
Update sample_config_db.json
shdasari 8919f06
Update sample_config_db.json
shdasari ca2fa6a
PAC_PORT_CONFIG in sample_config_db.json
shdasari 25f71b7
Update sample_config_db.json
shdasari cc8f0f4
Update sample_config_db.json
shdasari 4b6487b
Update sample_config_db.json, YANG files.
shdasari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 5 additions & 0 deletions
5
src/sonic-yang-models/tests/yang_model_tests/tests/hostapd.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,5 @@ | ||
{ | ||
"HOSTAPD_TEST": { | ||
"desc": "HOSTAPD configuration in global configuration table." | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/sonic-yang-models/tests/yang_model_tests/tests/pac.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 @@ | ||
{ | ||
"PAC_PORT_CONFIG_TEST" : { | ||
"desc": "PAC configuration for port." | ||
}, | ||
"PAC_PORT_INVALID_REAUTH_TIMER_TEST": { | ||
"desc": "PAC configuration with invalid re-auth timer in PAC_PORT_CONFIG table.", | ||
"eStr": "reauth period value must be in range of 1-65535." | ||
}, | ||
"PAC_PORT_INVALID_MAX_USERS_TEST" : { | ||
"desc": "PAC configuration with invalid max users in PAC_PORT_CONFIG table.", | ||
"eStr": "max users per port value must be in range of 1-48." | ||
}, | ||
"MAB_PORT_CONFIG_TEST" : { | ||
"desc": "MAB configuration for port." | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/sonic-yang-models/tests/yang_model_tests/tests_config/hostapd.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,14 @@ | ||
{ | ||
"HOSTAPD_TEST": { | ||
"sonic-hostapd:sonic-hostapd": { | ||
"sonic-hostapd:HOSTAPD_GLOBAL_CONFIG": { | ||
"sonic-hostapd:HOSTAPD_GLOBAL_CONFIG_LIST": [ | ||
{ | ||
"global": "GLOBAL", | ||
"dot1x_system_auth_control": "enable" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
127 changes: 127 additions & 0 deletions
127
src/sonic-yang-models/tests/yang_model_tests/tests_config/pac.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,127 @@ | ||
{ | ||
"PAC_PORT_CONFIG_TEST": { | ||
"sonic-port:sonic-port": { | ||
"sonic-port:PORT": { | ||
"PORT_LIST": [ | ||
{ | ||
"admin_status": "up", | ||
"alias": "eth0", | ||
"description": "Ethernet0", | ||
"lanes": "65", | ||
"mtu": 9000, | ||
"name": "Ethernet0", | ||
"speed": 25000 | ||
} | ||
] | ||
} | ||
}, | ||
"sonic-pac:sonic-pac": { | ||
"sonic-pac:PAC_PORT_CONFIG": { | ||
"PAC_PORT_CONFIG_LIST": [ | ||
{ | ||
"port": "Ethernet0", | ||
"port_control_mode": "auto", | ||
"host_control_mode": "single-host", | ||
"reauth_enable": "true", | ||
"reauth_period": 30, | ||
"max_users_per_port": 25, | ||
"method_list": ["dot1x", "mab"], | ||
"priority_list": ["dot1x", "mab"], | ||
"port_pae_role": "authenticator" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"PAC_PORT_INVALID_REAUTH_TIMER_TEST": { | ||
"sonic-port:sonic-port": { | ||
"sonic-port:PORT": { | ||
"PORT_LIST": [ | ||
{ | ||
"admin_status": "up", | ||
"alias": "eth0", | ||
"description": "Ethernet0", | ||
"lanes": "65", | ||
"mtu": 9000, | ||
"name": "Ethernet0", | ||
"speed": 25000 | ||
} | ||
] | ||
} | ||
}, | ||
"sonic-pac:sonic-pac": { | ||
"sonic-pac:PAC_PORT_CONFIG": { | ||
"PAC_PORT_CONFIG_LIST": [ | ||
{ | ||
"port": "Ethernet0", | ||
"port_control_mode": "auto", | ||
"host_control_mode": "single-host", | ||
"reauth_enable": "true", | ||
"reauth_period": 65573, | ||
"max_users_per_port": 25, | ||
"port_pae_role": "none" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"PAC_PORT_INVALID_MAX_USERS_TEST": { | ||
"sonic-port:sonic-port": { | ||
"sonic-port:PORT": { | ||
"PORT_LIST": [ | ||
{ | ||
"admin_status": "up", | ||
"alias": "eth0", | ||
"description": "Ethernet0", | ||
"lanes": "65", | ||
"mtu": 9000, | ||
"name": "Ethernet0", | ||
"speed": 25000 | ||
} | ||
] | ||
} | ||
}, | ||
"sonic-pac:sonic-pac": { | ||
"sonic-pac:PAC_PORT_CONFIG": { | ||
"PAC_PORT_CONFIG_LIST": [ | ||
{ | ||
"port": "Ethernet0", | ||
"port_control_mode": "auto", | ||
"host_control_mode": "single-host", | ||
"reauth_enable": "true", | ||
"max_users_per_port": 55, | ||
"port_pae_role": "none" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"MAB_PORT_CONFIG_TEST": { | ||
"sonic-port:sonic-port": { | ||
"sonic-port:PORT": { | ||
"PORT_LIST": [ | ||
{ | ||
"admin_status": "up", | ||
"alias": "eth0", | ||
"description": "Ethernet0", | ||
"lanes": "65", | ||
"mtu": 9000, | ||
"name": "Ethernet0", | ||
"speed": 25000 | ||
} | ||
] | ||
} | ||
}, | ||
"sonic-pac:sonic-pac": { | ||
"sonic-pac:MAB_PORT_CONFIG": { | ||
"MAB_PORT_CONFIG_LIST": [ | ||
{ | ||
"port": "Ethernet0", | ||
"mab": "enable", | ||
"mab_auth_type": "eap-md5" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
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,42 @@ | ||
module sonic-hostapd { | ||
namespace "http://github.com/sonic-net/sonic-hostapd"; | ||
prefix shostapd; | ||
yang-version 1.1; | ||
|
||
description | ||
"SONiC HOSTAPD"; | ||
|
||
revision 2023-08-02 { | ||
description "Initial revision."; | ||
} | ||
|
||
container sonic-hostapd { | ||
description "HOSTAPD top level container."; | ||
|
||
container HOSTAPD_GLOBAL_CONFIG { | ||
description | ||
"Container for hostapd global config."; | ||
|
||
list HOSTAPD_GLOBAL_CONFIG_LIST { | ||
key "global"; | ||
|
||
leaf global { | ||
type enumeration { | ||
enum GLOBAL; | ||
} | ||
description | ||
"Configure dot1x/hostapd global configuration."; | ||
} | ||
|
||
leaf dot1x_system_auth_control { | ||
type enumeration { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
enum enable; | ||
enum disable; | ||
} | ||
description | ||
"Indicates whether dot1x/hostapd is enabled/disabled on the switch."; | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow the below approach for this global table as well.
https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-lldp.yang#L49