Skip to content
Merged
Prev Previous commit
Next Next commit
Implemented delete wlan to wlan class. Added delete wlan url.
  • Loading branch information
Collin-Koss committed Jun 26, 2023
commit 814f483fa2a352114d9f49829f2f1f25314377a5
16 changes: 16 additions & 0 deletions pycentral/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,3 +848,19 @@ def create_wlan(self, conn, group_name, wlan_name, wlan_data):
path = urlJoin(urls.WLAN["CREATE"], group_name, wlan_name)
resp = conn.command(apiMethod="POST", apiPath=path, apiData=wlan_data)
return resp

def delete_wlan(self, conn, group_name, wlan_name):
"""Delete an existing WLAN

:param conn: Instance of class:`pycentral.ArubaCentralBase` to make an
API call.
:type conn: class:`pycentral.ArubaCentralBase`
:param group_name: Group name of the group or guid of the swarm or
serial number of 10x AP
:type group_name: str
:param wlan_name: Name string for new WLAN
:type wlan_name: str
"""
path = urlJoin(urls.WLAN["DELETE"], group_name, wlan_name)
resp = conn.command(apiMethod="DELETE", apiPath=path)
return resp
3 changes: 2 additions & 1 deletion pycentral/url_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class ConfigurationUrl():
}

WLAN = {
"CREATE": "/configuration/v2/wlan"
"CREATE": "/configuration/v2/wlan",
"DELETE": "/configuration/v1/wlan"
}

class LicensingUrl():
Expand Down