Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions meraki/controllers/switch_ports_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,49 @@ def update_device_switch_port(self,

# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body)

def get_device_switch_port_statuses(self,
serial):
"""Does a GET request to /devices/{serial}/switchPortStatuses.

List the switch port statuses for a switch

Args:
serial (string): TODO: type description here. Example:

Returns:
mixed: Response from the API. Successful operation

Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.

"""

# Validate required parameters
self.validate_parameters(serial=serial)

# Prepare query URL
_url_path = '/devices/{serial}/switchPortStatuses'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'serial': serial
})
_query_builder = Configuration.base_uri
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)

# Prepare headers
_headers = {
'accept': 'application/json'
}

# Prepare and execute request
_request = self.http_client.get(_query_url, headers=_headers)
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
self.validate_response(_context)

# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body)