Delete created profiles at end of test run

This commit is contained in:
bealler
2021-01-26 16:40:47 -05:00
parent c29efe2d65
commit 822931bcdc
3 changed files with 93 additions and 19 deletions

View File

@@ -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")