Skip to content

Commit 3b883ec

Browse files
TKIPisalegacycipherGitHub Action
andauthored
Automatically regenerated library. (#228)
Co-authored-by: GitHub Action <support@meraki.com>
1 parent 51a886b commit 3b883ec

5 files changed

Lines changed: 127 additions & 73 deletions

File tree

meraki/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
USE_ITERATOR_FOR_GET_PAGES,
4646
)
4747

48-
__version__ = '1.37.3'
48+
__version__ = '1.38.0'
4949

5050

5151
class DashboardAPI(object):

meraki/aio/api/organizations.py

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,12 +1998,17 @@ def deleteOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInI
19981998

19991999

20002000

2001-
def getOrganizationFirmwareUpgrades(self, organizationId: str, **kwargs):
2001+
def getOrganizationFirmwareUpgrades(self, organizationId: str, total_pages=1, direction='next', **kwargs):
20022002
"""
20032003
**Get firmware upgrade information for an organization**
20042004
https://developer.cisco.com/meraki/api-v1/#!get-organization-firmware-upgrades
20052005
20062006
- organizationId (string): Organization ID
2007+
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
2008+
- direction (string): direction to paginate, either "next" (default) or "prev" page
2009+
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
2010+
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
2011+
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
20072012
- status (array): Optional parameter to filter the upgrade by status.
20082013
- productTypes (array): Optional parameter to filter the upgrade by product type.
20092014
"""
@@ -2017,7 +2022,7 @@ def getOrganizationFirmwareUpgrades(self, organizationId: str, **kwargs):
20172022
organizationId = urllib.parse.quote(str(organizationId), safe='')
20182023
resource = f'/organizations/{organizationId}/firmware/upgrades'
20192024

2020-
query_params = ['status', 'productTypes', ]
2025+
query_params = ['perPage', 'startingAfter', 'endingBefore', 'status', 'productTypes', ]
20212026
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
20222027

20232028
array_params = ['status', 'productTypes', ]
@@ -2026,7 +2031,7 @@ def getOrganizationFirmwareUpgrades(self, organizationId: str, **kwargs):
20262031
params[f'{k.strip()}[]'] = kwargs[f'{k}']
20272032
params.pop(k.strip())
20282033

2029-
return self._session.get(metadata, resource, params)
2034+
return self._session.get_pages(metadata, resource, params, total_pages, direction)
20302035

20312036

20322037

@@ -3563,39 +3568,6 @@ def getOrganizationUplinksStatuses(self, organizationId: str, total_pages=1, dir
35633568

35643569

35653570

3566-
def getOrganizationUplinksLossAndLatency(self, organizationId: str, **kwargs):
3567-
"""
3568-
**Return the uplink loss and latency for every MX in the organization from at latest 2 minutes ago**
3569-
https://developer.cisco.com/meraki/api-v1/#!get-organization-uplinks-loss-and-latency
3570-
3571-
- organizationId (string): Organization ID
3572-
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 60 days from today.
3573-
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 5 minutes after t0. The latest possible time that t1 can be is 2 minutes into the past.
3574-
- timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 5 minutes. The default is 5 minutes.
3575-
- uplink (string): Optional filter for a specific WAN uplink. Valid uplinks are wan1, wan2, wan3, cellular. Default will return all uplinks.
3576-
- ip (string): Optional filter for a specific destination IP. Default will return all destination IPs.
3577-
"""
3578-
3579-
kwargs.update(locals())
3580-
3581-
if 'uplink' in kwargs:
3582-
options = ['cellular', 'wan1', 'wan2', 'wan3']
3583-
assert kwargs['uplink'] in options, f'''"uplink" cannot be "{kwargs['uplink']}", & must be set to one of: {options}'''
3584-
3585-
metadata = {
3586-
'tags': ['organizations', 'monitor', 'uplinksLossAndLatency'],
3587-
'operation': 'getOrganizationUplinksLossAndLatency'
3588-
}
3589-
organizationId = urllib.parse.quote(str(organizationId), safe='')
3590-
resource = f'/organizations/{organizationId}/uplinksLossAndLatency'
3591-
3592-
query_params = ['t0', 't1', 'timespan', 'uplink', 'ip', ]
3593-
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
3594-
3595-
return self._session.get(metadata, resource, params)
3596-
3597-
3598-
35993571
def getOrganizationWebhooksAlertTypes(self, organizationId: str, **kwargs):
36003572
"""
36013573
**Return a list of alert types to be used with managing webhook alerts**

meraki/aio/api/sm.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,34 @@ def getNetworkSmDeviceDeviceProfiles(self, networkId: str, deviceId: str):
428428

429429

430430

431+
def installNetworkSmDeviceApps(self, networkId: str, deviceId: str, appIds: list, **kwargs):
432+
"""
433+
**Install applications on a device**
434+
https://developer.cisco.com/meraki/api-v1/#!install-network-sm-device-apps
435+
436+
- networkId (string): Network ID
437+
- deviceId (string): Device ID
438+
- appIds (array): ids of applications to be installed
439+
- force (boolean): By default, installation of an app which is believed to already be present on the device will be skipped. If you'd like to force the installation of the app, set this parameter to true.
440+
"""
441+
442+
kwargs.update(locals())
443+
444+
metadata = {
445+
'tags': ['sm', 'configure', 'devices'],
446+
'operation': 'installNetworkSmDeviceApps'
447+
}
448+
networkId = urllib.parse.quote(str(networkId), safe='')
449+
deviceId = urllib.parse.quote(str(deviceId), safe='')
450+
resource = f'/networks/{networkId}/sm/devices/{deviceId}/installApps'
451+
452+
body_params = ['appIds', 'force', ]
453+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
454+
455+
return self._session.post(metadata, resource, payload)
456+
457+
458+
431459
def getNetworkSmDeviceNetworkAdapters(self, networkId: str, deviceId: str):
432460
"""
433461
**List the network adapters of a device**
@@ -585,6 +613,33 @@ def unenrollNetworkSmDevice(self, networkId: str, deviceId: str):
585613

586614

587615

616+
def uninstallNetworkSmDeviceApps(self, networkId: str, deviceId: str, appIds: list):
617+
"""
618+
**Uninstall applications on a device**
619+
https://developer.cisco.com/meraki/api-v1/#!uninstall-network-sm-device-apps
620+
621+
- networkId (string): Network ID
622+
- deviceId (string): Device ID
623+
- appIds (array): ids of applications to be uninstalled
624+
"""
625+
626+
kwargs = locals()
627+
628+
metadata = {
629+
'tags': ['sm', 'configure', 'devices'],
630+
'operation': 'uninstallNetworkSmDeviceApps'
631+
}
632+
networkId = urllib.parse.quote(str(networkId), safe='')
633+
deviceId = urllib.parse.quote(str(deviceId), safe='')
634+
resource = f'/networks/{networkId}/sm/devices/{deviceId}/uninstallApps'
635+
636+
body_params = ['appIds', ]
637+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
638+
639+
return self._session.post(metadata, resource, payload)
640+
641+
642+
588643
def getNetworkSmDeviceWlanLists(self, networkId: str, deviceId: str):
589644
"""
590645
**List the saved SSID names on a device**

meraki/api/organizations.py

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,12 +1998,17 @@ def deleteOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInI
19981998

19991999

20002000

2001-
def getOrganizationFirmwareUpgrades(self, organizationId: str, **kwargs):
2001+
def getOrganizationFirmwareUpgrades(self, organizationId: str, total_pages=1, direction='next', **kwargs):
20022002
"""
20032003
**Get firmware upgrade information for an organization**
20042004
https://developer.cisco.com/meraki/api-v1/#!get-organization-firmware-upgrades
20052005
20062006
- organizationId (string): Organization ID
2007+
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
2008+
- direction (string): direction to paginate, either "next" (default) or "prev" page
2009+
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
2010+
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
2011+
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
20072012
- status (array): Optional parameter to filter the upgrade by status.
20082013
- productTypes (array): Optional parameter to filter the upgrade by product type.
20092014
"""
@@ -2017,7 +2022,7 @@ def getOrganizationFirmwareUpgrades(self, organizationId: str, **kwargs):
20172022
organizationId = urllib.parse.quote(str(organizationId), safe='')
20182023
resource = f'/organizations/{organizationId}/firmware/upgrades'
20192024

2020-
query_params = ['status', 'productTypes', ]
2025+
query_params = ['perPage', 'startingAfter', 'endingBefore', 'status', 'productTypes', ]
20212026
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
20222027

20232028
array_params = ['status', 'productTypes', ]
@@ -2026,7 +2031,7 @@ def getOrganizationFirmwareUpgrades(self, organizationId: str, **kwargs):
20262031
params[f'{k.strip()}[]'] = kwargs[f'{k}']
20272032
params.pop(k.strip())
20282033

2029-
return self._session.get(metadata, resource, params)
2034+
return self._session.get_pages(metadata, resource, params, total_pages, direction)
20302035

20312036

20322037

@@ -3563,39 +3568,6 @@ def getOrganizationUplinksStatuses(self, organizationId: str, total_pages=1, dir
35633568

35643569

35653570

3566-
def getOrganizationUplinksLossAndLatency(self, organizationId: str, **kwargs):
3567-
"""
3568-
**Return the uplink loss and latency for every MX in the organization from at latest 2 minutes ago**
3569-
https://developer.cisco.com/meraki/api-v1/#!get-organization-uplinks-loss-and-latency
3570-
3571-
- organizationId (string): Organization ID
3572-
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 60 days from today.
3573-
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 5 minutes after t0. The latest possible time that t1 can be is 2 minutes into the past.
3574-
- timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 5 minutes. The default is 5 minutes.
3575-
- uplink (string): Optional filter for a specific WAN uplink. Valid uplinks are wan1, wan2, wan3, cellular. Default will return all uplinks.
3576-
- ip (string): Optional filter for a specific destination IP. Default will return all destination IPs.
3577-
"""
3578-
3579-
kwargs.update(locals())
3580-
3581-
if 'uplink' in kwargs:
3582-
options = ['cellular', 'wan1', 'wan2', 'wan3']
3583-
assert kwargs['uplink'] in options, f'''"uplink" cannot be "{kwargs['uplink']}", & must be set to one of: {options}'''
3584-
3585-
metadata = {
3586-
'tags': ['organizations', 'monitor', 'uplinksLossAndLatency'],
3587-
'operation': 'getOrganizationUplinksLossAndLatency'
3588-
}
3589-
organizationId = urllib.parse.quote(str(organizationId), safe='')
3590-
resource = f'/organizations/{organizationId}/uplinksLossAndLatency'
3591-
3592-
query_params = ['t0', 't1', 'timespan', 'uplink', 'ip', ]
3593-
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
3594-
3595-
return self._session.get(metadata, resource, params)
3596-
3597-
3598-
35993571
def getOrganizationWebhooksAlertTypes(self, organizationId: str, **kwargs):
36003572
"""
36013573
**Return a list of alert types to be used with managing webhook alerts**

meraki/api/sm.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,34 @@ def getNetworkSmDeviceDeviceProfiles(self, networkId: str, deviceId: str):
428428

429429

430430

431+
def installNetworkSmDeviceApps(self, networkId: str, deviceId: str, appIds: list, **kwargs):
432+
"""
433+
**Install applications on a device**
434+
https://developer.cisco.com/meraki/api-v1/#!install-network-sm-device-apps
435+
436+
- networkId (string): Network ID
437+
- deviceId (string): Device ID
438+
- appIds (array): ids of applications to be installed
439+
- force (boolean): By default, installation of an app which is believed to already be present on the device will be skipped. If you'd like to force the installation of the app, set this parameter to true.
440+
"""
441+
442+
kwargs.update(locals())
443+
444+
metadata = {
445+
'tags': ['sm', 'configure', 'devices'],
446+
'operation': 'installNetworkSmDeviceApps'
447+
}
448+
networkId = urllib.parse.quote(str(networkId), safe='')
449+
deviceId = urllib.parse.quote(str(deviceId), safe='')
450+
resource = f'/networks/{networkId}/sm/devices/{deviceId}/installApps'
451+
452+
body_params = ['appIds', 'force', ]
453+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
454+
455+
return self._session.post(metadata, resource, payload)
456+
457+
458+
431459
def getNetworkSmDeviceNetworkAdapters(self, networkId: str, deviceId: str):
432460
"""
433461
**List the network adapters of a device**
@@ -585,6 +613,33 @@ def unenrollNetworkSmDevice(self, networkId: str, deviceId: str):
585613

586614

587615

616+
def uninstallNetworkSmDeviceApps(self, networkId: str, deviceId: str, appIds: list):
617+
"""
618+
**Uninstall applications on a device**
619+
https://developer.cisco.com/meraki/api-v1/#!uninstall-network-sm-device-apps
620+
621+
- networkId (string): Network ID
622+
- deviceId (string): Device ID
623+
- appIds (array): ids of applications to be uninstalled
624+
"""
625+
626+
kwargs = locals()
627+
628+
metadata = {
629+
'tags': ['sm', 'configure', 'devices'],
630+
'operation': 'uninstallNetworkSmDeviceApps'
631+
}
632+
networkId = urllib.parse.quote(str(networkId), safe='')
633+
deviceId = urllib.parse.quote(str(deviceId), safe='')
634+
resource = f'/networks/{networkId}/sm/devices/{deviceId}/uninstallApps'
635+
636+
body_params = ['appIds', ]
637+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
638+
639+
return self._session.post(metadata, resource, payload)
640+
641+
642+
588643
def getNetworkSmDeviceWlanLists(self, networkId: str, deviceId: str):
589644
"""
590645
**List the saved SSID names on a device**

0 commit comments

Comments
 (0)