mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 11:57:49 +00:00
cloud: Add framework to modify rf profile.
But not tested or enabled at this point. Evidently bugs in cloud keep it from working if you change the mode, for instance. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
207
libs/EXAMPLE-JSON-OBJECTS.txt
Normal file
207
libs/EXAMPLE-JSON-OBJECTS.txt
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
#RF Profile looks like this (as of Feb 10, 2021)
|
||||||
|
# Default RF profile is 10 currently.
|
||||||
|
{
|
||||||
|
"childProfileIds": [],
|
||||||
|
"createdTimestamp": 0,
|
||||||
|
"customerId": 2,
|
||||||
|
"details": {
|
||||||
|
"model_type": "RfConfiguration",
|
||||||
|
"profileType": "rf",
|
||||||
|
"rfConfigMap": {
|
||||||
|
"is2dot4GHz": {
|
||||||
|
"activeScanSettings": {
|
||||||
|
"enabled": true,
|
||||||
|
"model_type": "ActiveScanSettings",
|
||||||
|
"scanDurationMillis": 65,
|
||||||
|
"scanFrequencySeconds": 10
|
||||||
|
},
|
||||||
|
"autoChannelSelection": false,
|
||||||
|
"beaconInterval": 100,
|
||||||
|
"bestApEnabled": null,
|
||||||
|
"bestApSettings": {
|
||||||
|
"dropInSnrPercentage": 20,
|
||||||
|
"minLoadFactor": 50,
|
||||||
|
"mlComputed": true,
|
||||||
|
"model_type": "RadioBestApSettings"
|
||||||
|
},
|
||||||
|
"channelBandwidth": "is20MHz",
|
||||||
|
"channelHopSettings": {
|
||||||
|
"model_type": "ChannelHopSettings",
|
||||||
|
"noiseFloorThresholdInDB": -75,
|
||||||
|
"noiseFloorThresholdTimeInSeconds": 180,
|
||||||
|
"nonWifiThresholdInPercentage": 50,
|
||||||
|
"nonWifiThresholdTimeInSeconds": 180,
|
||||||
|
"obssHopMode": "NON_WIFI"
|
||||||
|
},
|
||||||
|
"clientDisconnectThresholdDb": -90,
|
||||||
|
"eirpTxPower": 18,
|
||||||
|
"forceScanDuringVoice": "disabled",
|
||||||
|
"managementRate": "auto",
|
||||||
|
"maxNumClients": 100,
|
||||||
|
"mimoMode": "twoByTwo",
|
||||||
|
"minAutoCellSize": -65,
|
||||||
|
"model_type": "RfElementConfiguration",
|
||||||
|
"multicastRate": "auto",
|
||||||
|
"neighbouringListApConfig": {
|
||||||
|
"maxAps": 25,
|
||||||
|
"minSignal": -85,
|
||||||
|
"model_type": "NeighbouringAPListConfiguration"
|
||||||
|
},
|
||||||
|
"perimeterDetectionEnabled": true,
|
||||||
|
"probeResponseThresholdDb": -90,
|
||||||
|
"radioMode": "modeN",
|
||||||
|
"radioType": "is2dot4GHz",
|
||||||
|
"rf": "TipWlan-rf",
|
||||||
|
"rtsCtsThreshold": 65535,
|
||||||
|
"rxCellSizeDb": -90
|
||||||
|
},
|
||||||
|
"is5GHz": {
|
||||||
|
"activeScanSettings": {
|
||||||
|
"enabled": true,
|
||||||
|
"model_type": "ActiveScanSettings",
|
||||||
|
"scanDurationMillis": 65,
|
||||||
|
"scanFrequencySeconds": 10
|
||||||
|
},
|
||||||
|
"autoChannelSelection": false,
|
||||||
|
"beaconInterval": 100,
|
||||||
|
"bestApEnabled": null,
|
||||||
|
"bestApSettings": {
|
||||||
|
"dropInSnrPercentage": 30,
|
||||||
|
"minLoadFactor": 40,
|
||||||
|
"mlComputed": true,
|
||||||
|
"model_type": "RadioBestApSettings"
|
||||||
|
},
|
||||||
|
"channelBandwidth": "is80MHz",
|
||||||
|
"channelHopSettings": {
|
||||||
|
"model_type": "ChannelHopSettings",
|
||||||
|
"noiseFloorThresholdInDB": -75,
|
||||||
|
"noiseFloorThresholdTimeInSeconds": 180,
|
||||||
|
"nonWifiThresholdInPercentage": 50,
|
||||||
|
"nonWifiThresholdTimeInSeconds": 180,
|
||||||
|
"obssHopMode": "NON_WIFI"
|
||||||
|
},
|
||||||
|
"clientDisconnectThresholdDb": -90,
|
||||||
|
"eirpTxPower": 18,
|
||||||
|
"forceScanDuringVoice": "disabled",
|
||||||
|
"managementRate": "auto",
|
||||||
|
"maxNumClients": 100,
|
||||||
|
"mimoMode": "twoByTwo",
|
||||||
|
"minAutoCellSize": -65,
|
||||||
|
"model_type": "RfElementConfiguration",
|
||||||
|
"multicastRate": "auto",
|
||||||
|
"neighbouringListApConfig": {
|
||||||
|
"maxAps": 25,
|
||||||
|
"minSignal": -85,
|
||||||
|
"model_type": "NeighbouringAPListConfiguration"
|
||||||
|
},
|
||||||
|
"perimeterDetectionEnabled": true,
|
||||||
|
"probeResponseThresholdDb": -90,
|
||||||
|
"radioMode": "modeAC",
|
||||||
|
"radioType": "is5GHz",
|
||||||
|
"rf": "TipWlan-rf",
|
||||||
|
"rtsCtsThreshold": 65535,
|
||||||
|
"rxCellSizeDb": -90
|
||||||
|
},
|
||||||
|
"is5GHzL": {
|
||||||
|
"activeScanSettings": {
|
||||||
|
"enabled": true,
|
||||||
|
"model_type": "ActiveScanSettings",
|
||||||
|
"scanDurationMillis": 65,
|
||||||
|
"scanFrequencySeconds": 10
|
||||||
|
},
|
||||||
|
"autoChannelSelection": false,
|
||||||
|
"beaconInterval": 100,
|
||||||
|
"bestApEnabled": null,
|
||||||
|
"bestApSettings": {
|
||||||
|
"dropInSnrPercentage": 30,
|
||||||
|
"minLoadFactor": 40,
|
||||||
|
"mlComputed": true,
|
||||||
|
"model_type": "RadioBestApSettings"
|
||||||
|
},
|
||||||
|
"channelBandwidth": "is80MHz",
|
||||||
|
"channelHopSettings": {
|
||||||
|
"model_type": "ChannelHopSettings",
|
||||||
|
"noiseFloorThresholdInDB": -75,
|
||||||
|
"noiseFloorThresholdTimeInSeconds": 180,
|
||||||
|
"nonWifiThresholdInPercentage": 50,
|
||||||
|
"nonWifiThresholdTimeInSeconds": 180,
|
||||||
|
"obssHopMode": "NON_WIFI"
|
||||||
|
},
|
||||||
|
"clientDisconnectThresholdDb": -90,
|
||||||
|
"eirpTxPower": 18,
|
||||||
|
"forceScanDuringVoice": "disabled",
|
||||||
|
"managementRate": "auto",
|
||||||
|
"maxNumClients": 100,
|
||||||
|
"mimoMode": "twoByTwo",
|
||||||
|
"minAutoCellSize": -65,
|
||||||
|
"model_type": "RfElementConfiguration",
|
||||||
|
"multicastRate": "auto",
|
||||||
|
"neighbouringListApConfig": {
|
||||||
|
"maxAps": 25,
|
||||||
|
"minSignal": -85,
|
||||||
|
"model_type": "NeighbouringAPListConfiguration"
|
||||||
|
},
|
||||||
|
"perimeterDetectionEnabled": true,
|
||||||
|
"probeResponseThresholdDb": -90,
|
||||||
|
"radioMode": "modeAC",
|
||||||
|
"radioType": "is5GHzL",
|
||||||
|
"rf": "TipWlan-rf",
|
||||||
|
"rtsCtsThreshold": 65535,
|
||||||
|
"rxCellSizeDb": -90
|
||||||
|
},
|
||||||
|
"is5GHzU": {
|
||||||
|
"activeScanSettings": {
|
||||||
|
"enabled": true,
|
||||||
|
"model_type": "ActiveScanSettings",
|
||||||
|
"scanDurationMillis": 65,
|
||||||
|
"scanFrequencySeconds": 10
|
||||||
|
},
|
||||||
|
"autoChannelSelection": false,
|
||||||
|
"beaconInterval": 100,
|
||||||
|
"bestApEnabled": null,
|
||||||
|
"bestApSettings": {
|
||||||
|
"dropInSnrPercentage": 30,
|
||||||
|
"minLoadFactor": 40,
|
||||||
|
"mlComputed": true,
|
||||||
|
"model_type": "RadioBestApSettings"
|
||||||
|
},
|
||||||
|
"channelBandwidth": "is80MHz",
|
||||||
|
"channelHopSettings": {
|
||||||
|
"model_type": "ChannelHopSettings",
|
||||||
|
"noiseFloorThresholdInDB": -75,
|
||||||
|
"noiseFloorThresholdTimeInSeconds": 180,
|
||||||
|
"nonWifiThresholdInPercentage": 50,
|
||||||
|
"nonWifiThresholdTimeInSeconds": 180,
|
||||||
|
"obssHopMode": "NON_WIFI"
|
||||||
|
},
|
||||||
|
"clientDisconnectThresholdDb": -90,
|
||||||
|
"eirpTxPower": 18,
|
||||||
|
"forceScanDuringVoice": "disabled",
|
||||||
|
"managementRate": "auto",
|
||||||
|
"maxNumClients": 100,
|
||||||
|
"mimoMode": "twoByTwo",
|
||||||
|
"minAutoCellSize": -65,
|
||||||
|
"model_type": "RfElementConfiguration",
|
||||||
|
"multicastRate": "auto",
|
||||||
|
"neighbouringListApConfig": {
|
||||||
|
"maxAps": 25,
|
||||||
|
"minSignal": -85,
|
||||||
|
"model_type": "NeighbouringAPListConfiguration"
|
||||||
|
},
|
||||||
|
"perimeterDetectionEnabled": true,
|
||||||
|
"probeResponseThresholdDb": -90,
|
||||||
|
"radioMode": "modeAC",
|
||||||
|
"radioType": "is5GHzU",
|
||||||
|
"rf": "TipWlan-rf",
|
||||||
|
"rtsCtsThreshold": 65535,
|
||||||
|
"rxCellSizeDb": -90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": 10,
|
||||||
|
"lastModifiedTimestamp": 0,
|
||||||
|
"model_type": "Profile",
|
||||||
|
"name": "TipWlan-rf",
|
||||||
|
"profileType": "rf"
|
||||||
|
}
|
||||||
|
|
@@ -763,6 +763,44 @@ class CloudSDK:
|
|||||||
self.check_response("PUT", response, headers, data_str, url)
|
self.check_response("PUT", response, headers, data_str, url)
|
||||||
return profile['id']
|
return profile['id']
|
||||||
|
|
||||||
|
# General usage: get the default profile, modify it accordingly, pass it back to here
|
||||||
|
# Not tested yet.
|
||||||
|
def create_rf_profile(self, cloudSDK_url, bearer, customer_id, template, name, new_prof):
|
||||||
|
print("create-rf-profile, template: %s"%(template))
|
||||||
|
|
||||||
|
url = cloudSDK_url + "/portal/profile"
|
||||||
|
headers = {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Authorization': 'Bearer ' + bearer
|
||||||
|
}
|
||||||
|
data_str = json.dumps(profile)
|
||||||
|
response = requests.request("POST", url, headers=headers, data=data_str)
|
||||||
|
self.check_response("POST", response, headers, data_str, url)
|
||||||
|
ssid_profile = response.json()
|
||||||
|
return ssid_profile['id']
|
||||||
|
|
||||||
|
# Not tested yet.
|
||||||
|
def create_or_update_rf_profile(self, cloudSDK_url, bearer, customer_id, template, name,
|
||||||
|
new_prof):
|
||||||
|
# First, see if profile of this name already exists.
|
||||||
|
profile = self.get_customer_profile_by_name(cloudSDK_url, bearer, customer_id, name)
|
||||||
|
if profile == None:
|
||||||
|
# create one then
|
||||||
|
return self.create_rf_profile(cloudSDK_url, bearer, customer_id, template, name, new_prof)
|
||||||
|
|
||||||
|
# Update then.
|
||||||
|
print("Update existing ssid profile, name: %s"%(name))
|
||||||
|
|
||||||
|
url = cloudSDK_url + "/portal/profile"
|
||||||
|
headers = {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Authorization': 'Bearer ' + bearer
|
||||||
|
}
|
||||||
|
data_str = json.dumps(new_profile)
|
||||||
|
response = requests.request("PUT", url, headers=headers, data=data_str)
|
||||||
|
self.check_response("PUT", response, headers, data_str, url)
|
||||||
|
return profile['id']
|
||||||
|
|
||||||
def create_radius_profile(self, cloudSDK_url, bearer, customer_id, template, name, subnet_name, subnet, subnet_mask,
|
def create_radius_profile(self, cloudSDK_url, bearer, customer_id, template, name, subnet_name, subnet, subnet_mask,
|
||||||
region, server_name, server_ip, secret, auth_port):
|
region, server_name, server_ip, secret, auth_port):
|
||||||
print("Create-radius-profile called, template: %s"%(template))
|
print("Create-radius-profile called, template: %s"%(template))
|
||||||
|
@@ -78,3 +78,8 @@ Testbed 12 (Basic, wf188n)
|
|||||||
--default-ap-profile TipWlan-2-Radios --sdk-base-url https://wlan-portal-svc-ben-testbed.cicd.lab.wlan.tip.build \
|
--default-ap-profile TipWlan-2-Radios --sdk-base-url https://wlan-portal-svc-ben-testbed.cicd.lab.wlan.tip.build \
|
||||||
--skip-radius --skip-wpa --verbose --testbed "NOLA-12" --ssid-5g-wpa2 Default-SSID-5gl --psk-5g-wpa2 12345678 \
|
--skip-radius --skip-wpa --verbose --testbed "NOLA-12" --ssid-5g-wpa2 Default-SSID-5gl --psk-5g-wpa2 12345678 \
|
||||||
--ssid-2g-wpa2 Default-SSID-2g --psk-2g-wpa2 12345678
|
--ssid-2g-wpa2 Default-SSID-2g --psk-2g-wpa2 12345678
|
||||||
|
|
||||||
|
# Query an ssid
|
||||||
|
./query_sdk.py --testrail-user-id NONE --model wf188n --sdk-base-url https://wlan-portal-svc-ben-testbed.cicd.lab.wlan.tip.build \
|
||||||
|
--sdk-user-id support@example.com --sdk-user-password support --equipment_id 3 --type profile --cmd get --object_id 11
|
||||||
|
|
||||||
|
@@ -51,7 +51,13 @@ def main():
|
|||||||
help="Allow over-riding the 2g-wpa SSID value.")
|
help="Allow over-riding the 2g-wpa SSID value.")
|
||||||
|
|
||||||
parser.add_argument("--mode", dest="mode", choices=['bridge', 'nat', 'vlan'], type=str,
|
parser.add_argument("--mode", dest="mode", choices=['bridge', 'nat', 'vlan'], type=str,
|
||||||
help="Mode of AP Profile [bridge/nat/vlan]")
|
help="Mode of AP Profile [bridge/nat/vlan]", required=True)
|
||||||
|
|
||||||
|
# Not implemented yet.
|
||||||
|
#parser.add_argument("--rf-mode", type=str,
|
||||||
|
# choices=["modeN", "modeAC", "modeGN", "modeX", "modeA", "modeB", "modeG", "modeAB"],
|
||||||
|
# help="Allow over-riding the 2g-wpa SSID value.")
|
||||||
|
|
||||||
|
|
||||||
reporting = Reporting(reports_root=os.getcwd() + "/reports/")
|
reporting = Reporting(reports_root=os.getcwd() + "/reports/")
|
||||||
|
|
||||||
@@ -189,7 +195,8 @@ def main():
|
|||||||
# Radius Profile needs to be set here
|
# Radius Profile needs to be set here
|
||||||
# obj.create_radius_profile(radius_name, rid, key)
|
# obj.create_radius_profile(radius_name, rid, key)
|
||||||
pass
|
pass
|
||||||
ap_object.create_ssid_profiles(ssid_template=ssid_template, skip_eap=True, mode=args.mode)
|
ap_object.create_ssid_profiles(ssid_template=ssid_template, skip_eap=True, skip_wpa=args.skip_wpa,
|
||||||
|
skip_wpa2=args.skip_wpa2, mode=args.mode)
|
||||||
|
|
||||||
print("Create AP with equipment-id: ", equipment_id)
|
print("Create AP with equipment-id: ", equipment_id)
|
||||||
ap_object.create_ap_profile(eq_id=equipment_id, fw_model=fw_model, mode=args.mode)
|
ap_object.create_ap_profile(eq_id=equipment_id, fw_model=fw_model, mode=args.mode)
|
||||||
|
Reference in New Issue
Block a user