Skip to content

Commit 27c3071

Browse files
author
Shiyue Cheng
committed
Small fix for bind/unbind networks, and added spacing for IDE documentation
1 parent fb4b62d commit 27c3071

72 files changed

Lines changed: 325 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

meraki/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,15 @@ class DashboardAPI(object):
9393
- print_console (boolean): if output log used, output to console too?
9494
- simulate (boolean): simulate POST/PUT/DELETE calls to prevent changes?
9595
"""
96+
9697
def __init__(self, api_key=None, base_url=DEFAULT_BASE_URL, single_request_timeout=DEFAULT_SINGLE_REQUEST_TIMEOUT,
9798
wait_on_rate_limit=DEFAULT_WAIT_ON_RATE_LIMIT, maximum_retries=MAXIMUM_RETRIES, output_log=OUTPUT_LOG,
9899
log_file_prefix=LOG_FILE_PREFIX, print_console=PRINT_TO_CONSOLE, simulate=SIMULATE_API_CALLS):
99100
# Check API key
100101
api_key = api_key or os.environ.get(API_KEY_ENVIRONMENT_VARIABLE)
101102
if not api_key:
102103
raise APIKeyError()
103-
104+
104105
# Configure logging
105106
self._logger = logging.getLogger(__name__)
106107
self._log_file = f'{log_file_prefix}_log__{datetime.now():%Y-%m-%d_%H-%M-%S}.txt'

meraki/api/action_batches.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def createOrganizationActionBatch(self, organizationId: str, actions: list, **kw
77
"""
88
**Create an action batch**
99
https://api.meraki.com/api_docs#create-an-action-batch
10+
1011
- organizationId (string)
1112
- actions (array): A set of changes to make as part of this action (<a href='https://developer.cisco.com/meraki/api/#/rest/guides/action-batches/'>more details</a>)
1213
- confirmed (boolean): Set to true for immediate execution. Set to false if the action should be previewed before executing. This property cannot be unset once it is true. Defaults to false.
@@ -30,6 +31,7 @@ def getOrganizationActionBatches(self, organizationId: str):
3031
"""
3132
**Return the list of action batches in the organization**
3233
https://api.meraki.com/api_docs#return-the-list-of-action-batches-in-the-organization
34+
3335
- organizationId (string)
3436
"""
3537

@@ -45,6 +47,7 @@ def getOrganizationActionBatch(self, organizationId: str, actionBatchId: str):
4547
"""
4648
**Return an action batch**
4749
https://api.meraki.com/api_docs#return-an-action-batch
50+
4851
- organizationId (string)
4952
- actionBatchId (string)
5053
"""
@@ -61,6 +64,7 @@ def deleteOrganizationActionBatch(self, organizationId: str, actionBatchId: str)
6164
"""
6265
**Delete an action batch**
6366
https://api.meraki.com/api_docs#delete-an-action-batch
67+
6468
- organizationId (string)
6569
- actionBatchId (string)
6670
"""
@@ -77,6 +81,7 @@ def updateOrganizationActionBatch(self, organizationId: str, actionBatchId: str,
7781
"""
7882
**Update an action batch**
7983
https://api.meraki.com/api_docs#update-an-action-batch
84+
8085
- organizationId (string)
8186
- actionBatchId (string)
8287
- confirmed (boolean): A boolean representing whether or not the batch has been confirmed. This property cannot be unset once it is true.

meraki/api/admins.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def getOrganizationAdmins(self, organizationId: str):
77
"""
88
**List the dashboard administrators in this organization**
99
https://api.meraki.com/api_docs#list-the-dashboard-administrators-in-this-organization
10+
1011
- organizationId (string)
1112
"""
1213

@@ -22,6 +23,7 @@ def createOrganizationAdmin(self, organizationId: str, email: str, name: str, or
2223
"""
2324
**Create a new dashboard administrator**
2425
https://api.meraki.com/api_docs#create-a-new-dashboard-administrator
26+
2527
- organizationId (string)
2628
- email (string): The email of the dashboard administrator. This attribute can not be updated.
2729
- name (string): The name of the dashboard administrator
@@ -51,6 +53,7 @@ def updateOrganizationAdmin(self, organizationId: str, id: str, **kwargs):
5153
"""
5254
**Update an administrator**
5355
https://api.meraki.com/api_docs#update-an-administrator
56+
5457
- organizationId (string)
5558
- id (string)
5659
- name (string): The name of the dashboard administrator
@@ -80,6 +83,7 @@ def deleteOrganizationAdmin(self, organizationId: str, id: str):
8083
"""
8184
**Revoke all access for a dashboard administrator within this organization**
8285
https://api.meraki.com/api_docs#revoke-all-access-for-a-dashboard-administrator-within-this-organization
86+
8387
- organizationId (string)
8488
- id (string)
8589
"""

meraki/api/alert_settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def getNetworkAlertSettings(self, networkId: str):
77
"""
88
**Return the alert configuration for this network**
99
https://api.meraki.com/api_docs#return-the-alert-configuration-for-this-network
10+
1011
- networkId (string)
1112
"""
1213

@@ -22,6 +23,7 @@ def updateNetworkAlertSettings(self, networkId: str, **kwargs):
2223
"""
2324
**Update the alert configuration for this network**
2425
https://api.meraki.com/api_docs#update-the-alert-configuration-for-this-network
26+
2527
- networkId (string)
2628
- defaultDestinations (object): The network_wide destinations for all alerts on the network.
2729
- alerts (array): Alert-specific configuration for each type. Only alerts that pertain to the network can be updated.

meraki/api/api_usage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def getOrganizationApiRequests(self, organizationId: str, total_pages=1, directi
77
"""
88
**List the API requests made by an organization**
99
https://api.meraki.com/api_docs#list-the-api-requests-made-by-an-organization
10+
1011
- organizationId (string)
1112
- total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages
1213
- direction (string): direction to paginate, either "next" (default) or "prev" page

meraki/api/bluetooth_clients.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def getNetworkBluetoothClients(self, networkId: str, total_pages=1, direction='n
77
"""
88
**List the Bluetooth clients seen by APs in this network**
99
https://api.meraki.com/api_docs#list-the-bluetooth-clients-seen-by-aps-in-this-network
10+
1011
- networkId (string)
1112
- total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages
1213
- direction (string): direction to paginate, either "next" (default) or "prev" page
@@ -36,6 +37,7 @@ def getNetworkBluetoothClient(self, networkId: str, bluetoothClientId: str, **kw
3637
"""
3738
**Return a Bluetooth client. Bluetooth clients can be identified by their ID or their MAC.**
3839
https://api.meraki.com/api_docs#return-a-bluetooth-client
40+
3941
- networkId (string)
4042
- bluetoothClientId (string)
4143
- includeConnectivityHistory (boolean): Include the connectivity history for this client

meraki/api/cameras.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def generateNetworkCameraSnapshot(self, networkId: str, serial: str, **kwargs):
77
"""
88
**Generate a snapshot of what the camera sees at the specified time and return a link to that image.**
99
https://api.meraki.com/api_docs#generate-a-snapshot-of-what-the-camera-sees-at-the-specified-time-and-return-a-link-to-that-image
10+
1011
- networkId (string)
1112
- serial (string)
1213
- timestamp (string): [optional] The snapshot will be taken from this time on the camera. The timestamp is expected to be in ISO 8601 format. If no timestamp is specified, we will assume current time.
@@ -29,6 +30,7 @@ def getNetworkCameraVideoLink(self, networkId: str, serial: str, **kwargs):
2930
"""
3031
**Returns video link to the specified camera. If a timestamp is supplied, it links to that timestamp.**
3132
https://api.meraki.com/api_docs#returns-video-link-to-the-specified-camera
33+
3234
- networkId (string)
3335
- serial (string)
3436
- timestamp (string): [optional] The video link will start at this timestamp. The timestamp is in UNIX Epoch time (milliseconds). If no timestamp is specified, we will assume current time.

meraki/api/clients.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def getDeviceClients(self, serial: str, **kwargs):
77
"""
88
**List the clients of a device, up to a maximum of a month ago. The usage of each client is returned in kilobytes. If the device is a switch, the switchport is returned; otherwise the switchport field is null.**
99
https://api.meraki.com/api_docs#list-the-clients-of-a-device-up-to-a-maximum-of-a-month-ago
10+
1011
- serial (string)
1112
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
1213
- timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day.
@@ -29,6 +30,7 @@ def getNetworkClients(self, networkId: str, total_pages=1, direction='next', **k
2930
"""
3031
**List the clients that have used this network in the timespan**
3132
https://api.meraki.com/api_docs#list-the-clients-that-have-used-this-network-in-the-timespan
33+
3234
- networkId (string)
3335
- total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages
3436
- direction (string): direction to paginate, either "next" (default) or "prev" page
@@ -57,6 +59,7 @@ def provisionNetworkClients(self, networkId: str, **kwargs):
5759
"""
5860
**Provisions a client with a name and policy. Clients can be provisioned before they associate to the network.**
5961
https://api.meraki.com/api_docs#provisions-a-client-with-a-name-and-policy
62+
6063
- networkId (string)
6164
- mac (string): The MAC address of the client. Required.
6265
- name (string): The display name for the client. Optional. Limited to 255 bytes.
@@ -81,6 +84,7 @@ def getNetworkClient(self, networkId: str, clientId: str):
8184
"""
8285
**Return the client associated with the given identifier. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
8386
https://api.meraki.com/api_docs#return-the-client-associated-with-the-given-identifier
87+
8488
- networkId (string)
8589
- clientId (string)
8690
"""
@@ -97,6 +101,7 @@ def getNetworkClientEvents(self, networkId: str, clientId: str, total_pages=1, d
97101
"""
98102
**Return the events associated with this client. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
99103
https://api.meraki.com/api_docs#return-the-events-associated-with-this-client
104+
100105
- networkId (string)
101106
- clientId (string)
102107
- total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages
@@ -124,6 +129,7 @@ def getNetworkClientLatencyHistory(self, networkId: str, clientId: str, **kwargs
124129
"""
125130
**Return the latency history for a client. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP. The latency data is from a sample of 2% of packets and is grouped into 4 traffic categories: background, best effort, video, voice. Within these categories the sampled packet counters are bucketed by latency in milliseconds.**
126131
https://api.meraki.com/api_docs#return-the-latency-history-for-a-client
132+
127133
- networkId (string)
128134
- clientId (string)
129135
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 791 days from today.
@@ -149,6 +155,7 @@ def getNetworkClientPolicy(self, networkId: str, clientId: str):
149155
"""
150156
**Return the policy assigned to a client on the network. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
151157
https://api.meraki.com/api_docs#return-the-policy-assigned-to-a-client-on-the-network
158+
152159
- networkId (string)
153160
- clientId (string)
154161
"""
@@ -165,6 +172,7 @@ def updateNetworkClientPolicy(self, networkId: str, clientId: str, **kwargs):
165172
"""
166173
**Update the policy assigned to a client on the network. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
167174
https://api.meraki.com/api_docs#update-the-policy-assigned-to-a-client-on-the-network
175+
168176
- networkId (string)
169177
- clientId (string)
170178
- devicePolicy (string): The group policy (Whitelisted, Blocked, Normal, Group policy)
@@ -188,6 +196,7 @@ def getNetworkClientSplashAuthorizationStatus(self, networkId: str, clientId: st
188196
"""
189197
**Return the splash authorization for a client, for each SSID they've associated with through splash. Only enabled SSIDs with Click-through splash enabled will be included. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
190198
https://api.meraki.com/api_docs#return-the-splash-authorization-for-a-client-for-each-ssid-theyve-associated-with-through-splash
199+
191200
- networkId (string)
192201
- clientId (string)
193202
"""
@@ -204,6 +213,7 @@ def updateNetworkClientSplashAuthorizationStatus(self, networkId: str, clientId:
204213
"""
205214
**Update a client's splash authorization. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
206215
https://api.meraki.com/api_docs#update-a-clients-splash-authorization
216+
207217
- networkId (string)
208218
- clientId (string)
209219
- ssids (object): The target SSIDs. Each SSID must be enabled and must have Click-through splash enabled. For each SSID where isAuthorized is true, the expiration time will automatically be set according to the SSID's splash frequency.
@@ -226,6 +236,7 @@ def getNetworkClientTrafficHistory(self, networkId: str, clientId: str, total_pa
226236
"""
227237
**Return the client's network traffic data over time. Usage data is in kilobytes. This endpoint requires detailed traffic analysis to be enabled on the Network-wide > General page. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
228238
https://api.meraki.com/api_docs#return-the-clients-network-traffic-data-over-time
239+
229240
- networkId (string)
230241
- clientId (string)
231242
- total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages
@@ -253,6 +264,7 @@ def getNetworkClientUsageHistory(self, networkId: str, clientId: str):
253264
"""
254265
**Return the client's daily usage history. Usage data is in kilobytes. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP.**
255266
https://api.meraki.com/api_docs#return-the-clients-daily-usage-history
267+
256268
- networkId (string)
257269
- clientId (string)
258270
"""

meraki/api/config_templates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def getOrganizationConfigTemplates(self, organizationId: str):
77
"""
88
**List the configuration templates for this organization**
99
https://api.meraki.com/api_docs#list-the-configuration-templates-for-this-organization
10+
1011
- organizationId (string)
1112
"""
1213

@@ -22,6 +23,7 @@ def deleteOrganizationConfigTemplate(self, organizationId: str, configTemplateId
2223
"""
2324
**Remove a configuration template**
2425
https://api.meraki.com/api_docs#remove-a-configuration-template
26+
2527
- organizationId (string)
2628
- configTemplateId (string)
2729
"""

meraki/api/connectivity_monitoring_destinations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def getNetworkConnectivityMonitoringDestinations(self, networkId: str):
77
"""
88
**Return the connectivity testing destinations for an MX network**
99
https://api.meraki.com/api_docs#return-the-connectivity-testing-destinations-for-an-mx-network
10+
1011
- networkId (string)
1112
"""
1213

@@ -22,6 +23,7 @@ def updateNetworkConnectivityMonitoringDestinations(self, networkId: str, **kwar
2223
"""
2324
**Update the connectivity testing destinations for an MX network**
2425
https://api.meraki.com/api_docs#update-the-connectivity-testing-destinations-for-an-mx-network
26+
2527
- networkId (string)
2628
- destinations (array): The list of connectivity monitoring destinations
2729
"""

0 commit comments

Comments
 (0)