mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
Delete created profiles at end of test run
This commit is contained in:
@@ -264,4 +264,17 @@ class CloudSDK:
|
||||
#print(radius_profile)
|
||||
#print(ssid_profile)
|
||||
radius_profile_id = radius_profile['id']
|
||||
return radius_profile_id
|
||||
return radius_profile_id
|
||||
|
||||
def delete_profile(cloudSDK_url, bearer, profile_id):
|
||||
url = cloudSDK_url + "/portal/profile?profileId="+profile_id
|
||||
payload = {}
|
||||
headers = {
|
||||
'Authorization': 'Bearer ' + bearer
|
||||
}
|
||||
del_profile = requests.request("DELETE", url, headers=headers, data=payload)
|
||||
status_code = del_profile.status_code
|
||||
if status_code is 200:
|
||||
return("SUCCESS")
|
||||
else:
|
||||
return ("ERROR")
|
||||
|
||||
Reference in New Issue
Block a user