Skip to content

Commit

Permalink
Automatically regenerated library to version 1.54.0. (#274)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Action <support@meraki.com>
  • Loading branch information
TKIPisalegacycipher and GitHub Action authored Jan 6, 2025
1 parent 3747bd8 commit 458b038
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 4 deletions.
2 changes: 1 addition & 1 deletion meraki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
)
from meraki.rest_session import *

__version__ = '1.53.0'
__version__ = '1.54.0'


class DashboardAPI(object):
Expand Down
72 changes: 72 additions & 0 deletions meraki/aio/api/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,78 @@ def getOrganizationDevicesAvailabilitiesChangeHistory(self, organizationId: str,



def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str):
"""
**Migrate devices to another controller or management mode**
https://developer.cisco.com/meraki/api-v1/#!create-organization-devices-controller-migration
- organizationId (string): Organization ID
- serials (array): A list of Meraki Serials to migrate
- target (string): The controller or management mode to which the devices will be migrated
"""

kwargs = locals()

if 'target' in kwargs:
options = ['wirelessController']
assert kwargs['target'] in options, f'''"target" cannot be "{kwargs['target']}", & must be set to one of: {options}'''

metadata = {
'tags': ['organizations', 'configure', 'devices', 'controller', 'migrations'],
'operation': 'createOrganizationDevicesControllerMigration'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/devices/controller/migrations'

body_params = ['serials', 'target', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def getOrganizationDevicesControllerMigrations(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**Retrieve device migration statuses in an organization**
https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-controller-migrations
- organizationId (string): Organization ID
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- serials (array): A list of Meraki Serials for which to retrieve migrations
- networkIds (array): Filter device migrations by network IDs
- target (string): Filter device migrations by target destination
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100.
- 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.
- 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.
"""

kwargs.update(locals())

if 'target' in kwargs:
options = ['wirelessController']
assert kwargs['target'] in options, f'''"target" cannot be "{kwargs['target']}", & must be set to one of: {options}'''

metadata = {
'tags': ['organizations', 'configure', 'devices', 'controller', 'migrations'],
'operation': 'getOrganizationDevicesControllerMigrations'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/devices/controller/migrations'

query_params = ['serials', 'networkIds', 'target', 'perPage', 'startingAfter', 'endingBefore', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['serials', 'networkIds', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def bulkUpdateOrganizationDevicesDetails(self, organizationId: str, serials: list, details: list):
"""
**Updating device details (currently only used for Catalyst devices)**
Expand Down
47 changes: 47 additions & 0 deletions meraki/aio/api/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2729,3 +2729,50 @@ def getOrganizationSwitchPortsTopologyDiscoveryByDevice(self, organizationId: st

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def getOrganizationSwitchPortsUsageHistoryByDeviceByInterval(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**List the historical usage and traffic data of switchports in an organization.**
https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-usage-history-by-device-by-interval
- organizationId (string): Organization ID
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
- 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 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated.
- interval (integer): The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided.
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 50. Default is 10.
- 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.
- 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.
- configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp.
- mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match.
- macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses.
- name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match.
- networkIds (array): Optional parameter to filter items to switches in one of the provided networks.
- portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles.
- serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match.
- serials (array): Optional parameter to filter items to switches that have one of the provided serials.
"""

kwargs.update(locals())

metadata = {
'tags': ['switch', 'monitor', 'ports', 'usage', 'history', 'byDevice', 'byInterval'],
'operation': 'getOrganizationSwitchPortsUsageHistoryByDeviceByInterval'
}
organizationId = urllib.parse.quote(str(organizationId), safe='')
resource = f'/organizations/{organizationId}/switch/ports/usage/history/byDevice/byInterval'

query_params = ['t0', 't1', 'timespan', 'interval', 'perPage', 'startingAfter', 'endingBefore', 'configurationUpdatedAfter', 'mac', 'macs', 'name', 'networkIds', 'portProfileIds', 'serial', 'serials', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['macs', 'networkIds', 'portProfileIds', 'serials', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)

3 changes: 2 additions & 1 deletion meraki/aio/api/wireless.py
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
- radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds).
- radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5).
- radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds.
- radiusRadsec (object): The current settings for RADIUS RADSec
- radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server.
- radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access')
- radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin')
Expand Down Expand Up @@ -1760,7 +1761,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
number = urllib.parse.quote(str(number), safe='')
resource = f'/networks/{networkId}/wireless/ssids/{number}'

body_params = ['name', 'enabled', 'localAuth', 'authMode', 'enterpriseAdminAccess', 'encryptionMode', 'psk', 'wpaEncryptionMode', 'dot11w', 'dot11r', 'splashPage', 'splashGuestSponsorDomains', 'oauth', 'localRadius', 'ldap', 'activeDirectory', 'radiusServers', 'radiusProxyEnabled', 'radiusTestingEnabled', 'radiusCalledStationId', 'radiusAuthenticationNasId', 'radiusServerTimeout', 'radiusServerAttemptsLimit', 'radiusFallbackEnabled', 'radiusCoaEnabled', 'radiusFailoverPolicy', 'radiusLoadBalancingPolicy', 'radiusAccountingEnabled', 'radiusAccountingServers', 'radiusAccountingInterimInterval', 'radiusAttributeForGroupPolicies', 'ipAssignmentMode', 'useVlanTagging', 'concentratorNetworkId', 'secondaryConcentratorNetworkId', 'disassociateClientsOnVpnFailover', 'vlanId', 'defaultVlanId', 'apTagsAndVlanIds', 'walledGardenEnabled', 'walledGardenRanges', 'gre', 'radiusOverride', 'radiusGuestVlanEnabled', 'radiusGuestVlanId', 'minBitrate', 'bandSelection', 'perClientBandwidthLimitUp', 'perClientBandwidthLimitDown', 'perSsidBandwidthLimitUp', 'perSsidBandwidthLimitDown', 'lanIsolationEnabled', 'visible', 'availableOnAllAps', 'availabilityTags', 'mandatoryDhcpEnabled', 'adultContentFilteringEnabled', 'dnsRewrite', 'speedBurst', 'namedVlans', ]
body_params = ['name', 'enabled', 'localAuth', 'authMode', 'enterpriseAdminAccess', 'encryptionMode', 'psk', 'wpaEncryptionMode', 'dot11w', 'dot11r', 'splashPage', 'splashGuestSponsorDomains', 'oauth', 'localRadius', 'ldap', 'activeDirectory', 'radiusServers', 'radiusProxyEnabled', 'radiusTestingEnabled', 'radiusCalledStationId', 'radiusAuthenticationNasId', 'radiusServerTimeout', 'radiusServerAttemptsLimit', 'radiusFallbackEnabled', 'radiusRadsec', 'radiusCoaEnabled', 'radiusFailoverPolicy', 'radiusLoadBalancingPolicy', 'radiusAccountingEnabled', 'radiusAccountingServers', 'radiusAccountingInterimInterval', 'radiusAttributeForGroupPolicies', 'ipAssignmentMode', 'useVlanTagging', 'concentratorNetworkId', 'secondaryConcentratorNetworkId', 'disassociateClientsOnVpnFailover', 'vlanId', 'defaultVlanId', 'apTagsAndVlanIds', 'walledGardenEnabled', 'walledGardenRanges', 'gre', 'radiusOverride', 'radiusGuestVlanEnabled', 'radiusGuestVlanId', 'minBitrate', 'bandSelection', 'perClientBandwidthLimitUp', 'perClientBandwidthLimitDown', 'perSsidBandwidthLimitUp', 'perSsidBandwidthLimitDown', 'lanIsolationEnabled', 'visible', 'availableOnAllAps', 'availabilityTags', 'mandatoryDhcpEnabled', 'adultContentFilteringEnabled', 'dnsRewrite', 'speedBurst', 'namedVlans', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.put(metadata, resource, payload)
Expand Down
36 changes: 36 additions & 0 deletions meraki/api/batch/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,42 @@ def updateOrganizationConfigTemplate(self, organizationId: str, configTemplateId



def createOrganizationDevicesControllerMigration(self, organizationId: str, serials: list, target: str):
"""
**Migrate devices to another controller or management mode**
https://developer.cisco.com/meraki/api-v1/#!create-organization-devices-controller-migration
- organizationId (string): Organization ID
- serials (array): A list of Meraki Serials to migrate
- target (string): The controller or management mode to which the devices will be migrated
"""

kwargs = locals()

if 'target' in kwargs:
options = ['wirelessController']
assert kwargs['target'] in options, f'''"target" cannot be "{kwargs['target']}", & must be set to one of: {options}'''

metadata = {
'tags': ['organizations', 'configure', 'devices', 'controller', 'migrations'],
'operation': 'createOrganizationDevicesControllerMigration'
}
resource = f'/organizations/{organizationId}/devices/controller/migrations'

body_params = ['serials', 'target', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "mr/actions/migrate",
"body": payload
}
return action






def bulkUpdateOrganizationDevicesDetails(self, organizationId: str, serials: list, details: list):
"""
**Updating device details (currently only used for Catalyst devices)**
Expand Down
3 changes: 2 additions & 1 deletion meraki/api/batch/wireless.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
- radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds).
- radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5).
- radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds.
- radiusRadsec (object): The current settings for RADIUS RADSec
- radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server.
- radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access')
- radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin')
Expand Down Expand Up @@ -791,7 +792,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
}
resource = f'/networks/{networkId}/wireless/ssids/{number}'

body_params = ['name', 'enabled', 'localAuth', 'authMode', 'enterpriseAdminAccess', 'encryptionMode', 'psk', 'wpaEncryptionMode', 'dot11w', 'dot11r', 'splashPage', 'splashGuestSponsorDomains', 'oauth', 'localRadius', 'ldap', 'activeDirectory', 'radiusServers', 'radiusProxyEnabled', 'radiusTestingEnabled', 'radiusCalledStationId', 'radiusAuthenticationNasId', 'radiusServerTimeout', 'radiusServerAttemptsLimit', 'radiusFallbackEnabled', 'radiusCoaEnabled', 'radiusFailoverPolicy', 'radiusLoadBalancingPolicy', 'radiusAccountingEnabled', 'radiusAccountingServers', 'radiusAccountingInterimInterval', 'radiusAttributeForGroupPolicies', 'ipAssignmentMode', 'useVlanTagging', 'concentratorNetworkId', 'secondaryConcentratorNetworkId', 'disassociateClientsOnVpnFailover', 'vlanId', 'defaultVlanId', 'apTagsAndVlanIds', 'walledGardenEnabled', 'walledGardenRanges', 'gre', 'radiusOverride', 'radiusGuestVlanEnabled', 'radiusGuestVlanId', 'minBitrate', 'bandSelection', 'perClientBandwidthLimitUp', 'perClientBandwidthLimitDown', 'perSsidBandwidthLimitUp', 'perSsidBandwidthLimitDown', 'lanIsolationEnabled', 'visible', 'availableOnAllAps', 'availabilityTags', 'mandatoryDhcpEnabled', 'adultContentFilteringEnabled', 'dnsRewrite', 'speedBurst', 'namedVlans', ]
body_params = ['name', 'enabled', 'localAuth', 'authMode', 'enterpriseAdminAccess', 'encryptionMode', 'psk', 'wpaEncryptionMode', 'dot11w', 'dot11r', 'splashPage', 'splashGuestSponsorDomains', 'oauth', 'localRadius', 'ldap', 'activeDirectory', 'radiusServers', 'radiusProxyEnabled', 'radiusTestingEnabled', 'radiusCalledStationId', 'radiusAuthenticationNasId', 'radiusServerTimeout', 'radiusServerAttemptsLimit', 'radiusFallbackEnabled', 'radiusRadsec', 'radiusCoaEnabled', 'radiusFailoverPolicy', 'radiusLoadBalancingPolicy', 'radiusAccountingEnabled', 'radiusAccountingServers', 'radiusAccountingInterimInterval', 'radiusAttributeForGroupPolicies', 'ipAssignmentMode', 'useVlanTagging', 'concentratorNetworkId', 'secondaryConcentratorNetworkId', 'disassociateClientsOnVpnFailover', 'vlanId', 'defaultVlanId', 'apTagsAndVlanIds', 'walledGardenEnabled', 'walledGardenRanges', 'gre', 'radiusOverride', 'radiusGuestVlanEnabled', 'radiusGuestVlanId', 'minBitrate', 'bandSelection', 'perClientBandwidthLimitUp', 'perClientBandwidthLimitDown', 'perSsidBandwidthLimitUp', 'perSsidBandwidthLimitDown', 'lanIsolationEnabled', 'visible', 'availableOnAllAps', 'availabilityTags', 'mandatoryDhcpEnabled', 'adultContentFilteringEnabled', 'dnsRewrite', 'speedBurst', 'namedVlans', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
Expand Down
Loading

0 comments on commit 458b038

Please sign in to comment.