Skip to content

Commit

Permalink
WIFI-13443: Add: Schema Validation (#913)
Browse files Browse the repository at this point in the history
* Added Schema Validation.

Signed-off-by: jitendracandela <[email protected]>

* Added schema_validation/base.txt

Signed-off-by: jitendracandela <[email protected]>

* Modified static commit-id in base.txt and sub-suites in schema_validation.

Signed-off-by: jitendracandela <[email protected]>

* Updated base.text commit-id to check scenario of no new firmware found.

Signed-off-by: jitendracandela <[email protected]>

* Add: Schema Validation through AP Terminal (State Messages)

Signed-off-by: jitendracandela <[email protected]>

* Modified: Schema Validation using AP State Messages.

Signed-off-by: jitendracandela <[email protected]>

* Add/Modify: Marker and Description to Schema Validation test plan.

Signed-off-by: jitendracandela <[email protected]>

* Modify: Allure reporting for Schema Validation through AP Terminal testcase.

Signed-off-by: jitendracandela <[email protected]>

* Modify Schema Validation reporting.

Signed-off-by: jitendracandela <[email protected]>

* Modify: Fail message in allure for schema validation.

Signed-off-by: jitendracandela <[email protected]>

* Add: --commit-id parameter in CLI and modified schema validation through Github test case.

Signed-off-by: jitendracandela <[email protected]>

* Remove unused function from schema validation.

Signed-off-by: jitendracandela <[email protected]>

* Modify: Allure reporting for schema validation. Fix: bug in schema_validation through github.

Signed-off-by: jitendracandela <[email protected]>

* Modify: Schema Validation through GitHub.

Signed-off-by: jitendracandela <[email protected]>

* Modify: Schema Validation Testplan.

Signed-off-by: jitendracandela <[email protected]>

* Moved SV files from test/ -> basic/

Signed-off-by: jitendracandela <[email protected]>

* Added ow_sanity_lf marker to Schema Validation tests.

Signed-off-by: jitendracandela <[email protected]>

* Modified schema validation code to handle cases where 'properties' or 'items' are missing from schema.

Signed-off-by: jitendracandela <[email protected]>

* Modified the Schema Validation through Github to bypass wlan-ap repo and directly fetch latest commit from wlan-ucentral-schema repo.

Signed-off-by: jitendracandela <[email protected]>

* Modified Schema Validation through github to not report properties key missing when patternProperties or  key present.

Signed-off-by: jitendracandela <[email protected]>

* Increased time before fetching state message and added additional checks.

Signed-off-by: jitendracandela <[email protected]>

---------

Co-authored-by: jitendracandela <[email protected]>
  • Loading branch information
YashSaxenaCT and jitendracandela authored Jun 6, 2024
1 parent 628bc2b commit df016b2
Show file tree
Hide file tree
Showing 6 changed files with 1,263 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ def pytest_addoption(parser):
default=False,
help="Select the port for AP Up Down tests"
)
parser.addoption(
"--commit-id",
default=None,
help="Used to pass the full SHA of a commit-id."
)


@pytest.fixture(scope="session")
Expand Down Expand Up @@ -176,6 +181,13 @@ def selected_port(request):
yield current_port


@pytest.fixture(scope="session")
def commit_id(request):
"""yields the commit-id option selection"""
commit_id = request.config.getoption("--commit-id")
yield commit_id


@pytest.fixture(scope="session")
def num_stations(request):
"""yields the testbed option selection"""
Expand Down
Empty file.
238 changes: 238 additions & 0 deletions tests/e2e/basic/schema_validation/master-config-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
{
"uuid": 2,
"radios": [
{
"band": "5G",
"channel": 36,
"channel-mode": "HE",
"channel-width": 80,
"country": "US"
},
{
"band": "2G",
"channel": 11,
"channel-mode": "HE",
"channel-width": 20,
"country": "US"
}
],
"interfaces": [
{
"name": "WAN",
"role": "upstream",
"services": [ "lldp", "ssh" ],
"ethernet": [
{
"select-ports": [
"WAN*"
]
}
],
"ipv4": {
"addressing": "dynamic"
},
"ssids": [
{
"name": "multi-psk-1",
"role": "downstream",
"wifi-bands": [
"2G", "5G"
],
"bss-mode": "ap",
"encryption": {
"proto": "psk",
"key": "OpenWifi",
"ieee80211w": "optional"
},
"multi-psk": [
{
"key": "wpassidkey300",
"vlan-id": 300
},
{
"key": "wpassidkey400",
"vlan-id": 400
}
]
},{
"name": "roaming-ratelimit-2",
"wifi-bands": [
"5G",
"2G"
],
"bss-mode": "ap",
"encryption": {
"proto": "psk2",
"key": "OpenWifi",
"ieee80211w": "optional"
},
"roaming": {
"message-exchange": "ds",
"generate-psk": true
},
"services": [ "wifi-steering" ],
"rate-limit": {
"ingress-rate": 50,
"egress-rate": 50
}
},
{
"name": "owe-2g-7",
"role": "downstream",
"wifi-bands": [
"2G"
],
"bss-mode": "ap",
"encryption": {
"proto": "owe",
"ieee80211w": "required"
},
"rrm": {
"reduced-neighbor-reporting": true
}
},{
"name": "owe-5g-8",
"role": "downstream",
"wifi-bands": [
"5G"
],
"bss-mode": "ap",
"encryption": {
"proto": "owe",
"ieee80211w": "required"
}, "rrm": {
"reduced-neighbor-reporting": true
}
},
{
"name": "radius-ratelimit-3",
"wifi-bands": [
"5G",
"2G"
],
"bss-mode": "ap",
"encryption": {
"proto": "wpa2",
"ieee80211w": "optional"
},
"rate-limit": {
"ingress-rate": 50,
"egress-rate": 50
},
"radius": {
"authentication": {
"host": "18.189.85.200",
"port": 1812,
"secret": "testing123"
},
"accounting": {
"host": "18.189.85.200",
"port": 1813,
"secret": "testing123"
}
}
},
{
"name": "captive-credential-4",
"services": [
"captive"
],
"wifi-bands": [
"5G",
"2G"
],
"bss-mode": "ap",
"encryption": {
"proto": "psk2",
"key": "OpenWifi",
"ieee80211w": "optional"
}, "captive": {
"auth-mode": "credentials",
"credentials": [
{
"username": "user1",
"password": "password1"
}
],
"walled-garden-fqdn": [
"*.google.com",
"telecominfraproject.com"
]
}
},
{
"bss-mode": "ap",
"encryption": {
"ieee80211w": "optional",
"proto": "psk2-radius"
},
"name": "radius-MPSK1-5",
"wifi-bands": [
"2G","5G"
],
"radius": {
"authentication": {
"host": "18.117.247.76",
"port": 1812,
"secret": "secret"
},
"accounting": {
"host": "18.117.247.76",
"port": 1813,
"secret": "secret"
}
}
}]},
{
"name": "LAN",
"role": "downstream",
"services": [ "ssh", "lldp" ],
"ethernet": [
{
"select-ports": [
"LAN*"
]
}
],
"ipv4": {
"addressing": "static",
"subnet": "192.168.1.1/24",
"dhcp": {
"lease-first": 10,
"lease-count": 100,
"lease-time": "6h"
}
}
}
],
"metrics": {
"statistics": {
"interval": 120,
"types": [ "ssids", "lldp", "clients" ]
},
"health": {
"interval": 120
},
"wifi-frames": {
"filters": [ "probe", "auth" ]
}
},
"services": {
"wifi-steering": {
"mode": "local",
"network": "upstream",
"assoc-steering": true,
"required-snr": -85,
"required-probe-snr": -80,
"required-roam-snr": -80,
"load-kick-threshold": 90
},
"lldp": {
"describe": "uCentral",
"location": "universe"
},
"ssh": {
"port": 22
}
}
}
Loading

0 comments on commit df016b2

Please sign in to comment.