Skip to content

Commit 090ec54

Browse files
author
Shiyue Cheng
committed
updated w/ release 1.1.0
1 parent 395195a commit 090ec54

7 files changed

Lines changed: 15 additions & 9 deletions

File tree

meraki/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
SUPPRESS_LOGGING, SIMULATE_API_CALLS, BE_GEO_ID, MERAKI_PYTHON_SDK_CALLER
2121
)
2222

23-
__version__ = '1.0.0b19'
23+
__version__ = '1.1.0'
2424

2525
class DashboardAPI(object):
2626
"""

meraki/aio/api/switch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs):
131131
- stickyMacAllowList (array): The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
132132
- stickyMacAllowListLimit (integer): The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
133133
- stormControlEnabled (boolean): The storm control status of the switch port
134+
- flexibleStackingEnabled (boolean): For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
134135
"""
135136

136137
kwargs.update(locals())
@@ -154,7 +155,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs):
154155
}
155156
resource = f'/devices/{serial}/switch/ports/{portId}'
156157

157-
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', ]
158+
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', 'flexibleStackingEnabled', ]
158159
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
159160

160161
return self._session.put(metadata, resource, payload)
@@ -1742,6 +1743,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort(self, organizationId: str,
17421743
- stickyMacAllowList (array): The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
17431744
- stickyMacAllowListLimit (integer): The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
17441745
- stormControlEnabled (boolean): The storm control status of the switch profile port
1746+
- flexibleStackingEnabled (boolean): For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
17451747
"""
17461748

17471749
kwargs.update(locals())
@@ -1765,7 +1767,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort(self, organizationId: str,
17651767
}
17661768
resource = f'/organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/{portId}'
17671769

1768-
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', ]
1770+
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', 'flexibleStackingEnabled', ]
17691771
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
17701772

17711773
return self._session.put(metadata, resource, payload)

meraki/aio/api/wireless.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, *
13551355
- networkId (string): (required)
13561356
- number (string): (required)
13571357
- splashUrl (string): [optional] The custom splash URL of the click-through splash page. Note that the URL can be configured without necessarily being used. In order to enable the custom URL, see 'useSplashUrl'
1358-
- useSplashUrl (boolean): [optional] Boolean indicating whether the user will be redirected to the custom splash url. A custom splash URL must be set if this is true. Note that depending on your SSID's access control settings, it may not be possible to use the custom splash URL.
1358+
- useSplashUrl (boolean): [optional] Boolean indicating whether the users will be redirected to the custom splash url. A custom splash URL must be set if this is true. Note that depending on your SSID's access control settings, it may not be possible to use the custom splash URL.
13591359
"""
13601360

13611361
kwargs.update(locals())

meraki/aio/rest_session.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ async def _request(self, metadata, method, url, **kwargs):
176176
for _ in range(retries):
177177
# Make the HTTP request to the API endpoint
178178
try:
179-
self._logger.info(f'{method} {abs_url}')
179+
if self._logger:
180+
self._logger.info(f'{method} {abs_url}')
180181
response = await self._req_session.request(method, abs_url, **kwargs)
181182
reason = response.reason if response.reason else None
182183
status = response.status

meraki/api/switch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs):
131131
- stickyMacAllowList (array): The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
132132
- stickyMacAllowListLimit (integer): The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
133133
- stormControlEnabled (boolean): The storm control status of the switch port
134+
- flexibleStackingEnabled (boolean): For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
134135
"""
135136

136137
kwargs.update(locals())
@@ -154,7 +155,7 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs):
154155
}
155156
resource = f'/devices/{serial}/switch/ports/{portId}'
156157

157-
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', ]
158+
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', 'flexibleStackingEnabled', ]
158159
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
159160

160161
return self._session.put(metadata, resource, payload)
@@ -1742,6 +1743,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort(self, organizationId: str,
17421743
- stickyMacAllowList (array): The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
17431744
- stickyMacAllowListLimit (integer): The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list'
17441745
- stormControlEnabled (boolean): The storm control status of the switch profile port
1746+
- flexibleStackingEnabled (boolean): For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
17451747
"""
17461748

17471749
kwargs.update(locals())
@@ -1765,7 +1767,7 @@ def updateOrganizationConfigTemplateSwitchProfilePort(self, organizationId: str,
17651767
}
17661768
resource = f'/organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/{portId}'
17671769

1768-
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', ]
1770+
body_params = ['name', 'tags', 'enabled', 'type', 'vlan', 'voiceVlan', 'allowedVlans', 'poeEnabled', 'isolationEnabled', 'rstpEnabled', 'stpGuard', 'linkNegotiation', 'portScheduleId', 'udld', 'accessPolicyType', 'accessPolicyNumber', 'macAllowList', 'stickyMacAllowList', 'stickyMacAllowListLimit', 'stormControlEnabled', 'flexibleStackingEnabled', ]
17691771
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
17701772

17711773
return self._session.put(metadata, resource, payload)

meraki/api/wireless.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, *
13551355
- networkId (string): (required)
13561356
- number (string): (required)
13571357
- splashUrl (string): [optional] The custom splash URL of the click-through splash page. Note that the URL can be configured without necessarily being used. In order to enable the custom URL, see 'useSplashUrl'
1358-
- useSplashUrl (boolean): [optional] Boolean indicating whether the user will be redirected to the custom splash url. A custom splash URL must be set if this is true. Note that depending on your SSID's access control settings, it may not be possible to use the custom splash URL.
1358+
- useSplashUrl (boolean): [optional] Boolean indicating whether the users will be redirected to the custom splash url. A custom splash URL must be set if this is true. Note that depending on your SSID's access control settings, it may not be possible to use the custom splash URL.
13591359
"""
13601360

13611361
kwargs.update(locals())

meraki/rest_session.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ def request(self, metadata, method, url, **kwargs):
157157
try:
158158
if response:
159159
response.close()
160-
self._logger.info(f'{method} {abs_url}')
160+
if self._logger:
161+
self._logger.info(f'{method} {abs_url}')
161162
response = self._req_session.request(method, abs_url, allow_redirects=False, **kwargs)
162163
reason = response.reason if response.reason else ''
163164
status = response.status_code

0 commit comments

Comments
 (0)