Skip to content

Commit 5589a34

Browse files
updated w/ release 1.0.0b18
1 parent 9ef7a05 commit 5589a34

7 files changed

Lines changed: 99 additions & 11 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.0b17'
23+
__version__ = '1.0.0b18'
2424

2525
class DashboardAPI(object):
2626
"""

meraki/aio/api/appliance.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,44 @@ def deleteNetworkApplianceStaticRoute(self, networkId: str, staticRouteId: str):
841841

842842
return self._session.delete(metadata, resource)
843843

844+
def getNetworkApplianceTrafficShaping(self, networkId: str):
845+
"""
846+
**Display the traffic shaping settings for an MX network**
847+
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping
848+
849+
- networkId (string): (required)
850+
"""
851+
852+
metadata = {
853+
'tags': ['appliance', 'configure', 'trafficShaping'],
854+
'operation': 'getNetworkApplianceTrafficShaping'
855+
}
856+
resource = f'/networks/{networkId}/appliance/trafficShaping'
857+
858+
return self._session.get(metadata, resource)
859+
860+
def updateNetworkApplianceTrafficShaping(self, networkId: str, **kwargs):
861+
"""
862+
**Update the traffic shaping settings for an MX network**
863+
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-traffic-shaping
864+
865+
- networkId (string): (required)
866+
- globalBandwidthLimits (object): Global per-client bandwidth limit
867+
"""
868+
869+
kwargs.update(locals())
870+
871+
metadata = {
872+
'tags': ['appliance', 'configure', 'trafficShaping'],
873+
'operation': 'updateNetworkApplianceTrafficShaping'
874+
}
875+
resource = f'/networks/{networkId}/appliance/trafficShaping'
876+
877+
body_params = ['globalBandwidthLimits', ]
878+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
879+
880+
return self._session.put(metadata, resource, payload)
881+
844882
def getNetworkApplianceTrafficShapingCustomPerformanceClasses(self, networkId: str):
845883
"""
846884
**List all custom performance classes for an MX network**

meraki/aio/api/networks.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,20 +780,24 @@ def getNetworkMerakiAuthUsers(self, networkId: str):
780780

781781
def createNetworkMerakiAuthUser(self, networkId: str, email: str, name: str, password: str, authorizations: list, **kwargs):
782782
"""
783-
**Create a user configured with Meraki Authentication for a network (currently only 802.1X RADIUS users can be created, and currently, organizations have a 50,000 user cap)**
783+
**Create a user configured with Meraki Authentication for a network (currently supports 802.1X and Splash Guest users, and currently, organizations have a 50,000 user cap)**
784784
https://developer.cisco.com/meraki/api-v1/#!create-network-meraki-auth-user
785785
786786
- networkId (string): (required)
787787
- email (string): Email address of the user
788788
- name (string): Name of the user
789789
- password (string): The password for this user account
790790
- authorizations (array): Authorization zones and expiration dates for the user.
791-
- accountType (string): Authorization type for user (currently we only support 802.1X account types, which is the default)
791+
- accountType (string): Authorization type for user. Can be either 'Guest' or '802.1X'. Defaults to '802.1X'.
792792
- emailPasswordToUser (boolean): Whether or not Meraki should email the password to user. Default is false.
793793
"""
794794

795795
kwargs.update(locals())
796796

797+
if 'accountType' in kwargs:
798+
options = ['Guest', '802.1X']
799+
assert kwargs['accountType'] in options, f'''"accountType" cannot be "{kwargs['accountType']}", & must be set to one of: {options}'''
800+
797801
metadata = {
798802
'tags': ['networks', 'configure', 'merakiAuthUsers'],
799803
'operation': 'createNetworkMerakiAuthUser'

meraki/aio/api/wireless.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs):
134134
(indoor or outdoor) will be assigned to the device. Assigning an RF profile will clear ALL manually configured overrides
135135
on the device (channel width, channel, power).
136136
137+
- twoFourGhzSettings (object): Manual radio settings for 2.4 GHz.
138+
- fiveGhzSettings (object): Manual radio settings for 5 GHz.
137139
"""
138140

139141
kwargs.update(locals())
@@ -144,7 +146,7 @@ def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs):
144146
}
145147
resource = f'/devices/{serial}/wireless/radio/settings'
146148

147-
body_params = ['rfProfileId', ]
149+
body_params = ['rfProfileId', 'twoFourGhzSettings', 'fiveGhzSettings', ]
148150
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
149151

150152
return self._session.put(metadata, resource, payload)
@@ -1072,7 +1074,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
10721074
- encryptionMode (string): The psk encryption mode for the SSID ('wep' or 'wpa'). This param is only valid if the authMode is 'psk'
10731075
- psk (string): The passkey for the SSID. This param is only valid if the authMode is 'psk'
10741076
- wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 only', 'WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only')
1075-
- splashPage (string): The type of splash page for the SSID ('None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth' or 'Sponsored guest'). This attribute is not supported for template children.
1077+
- splashPage (string): The type of splash page for the SSID ('None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth', 'Sponsored guest' or 'Cisco ISE'). This attribute is not supported for template children.
10761078
- radiusServers (array): The RADIUS 802.1X servers to be used for authentication. This param is only valid if the authMode is 'open-with-radius', '8021x-radius' or 'ipsk-with-radius'
10771079
- radiusProxyEnabled (boolean): If true, Meraki devices will proxy RADIUS messages through the Meraki cloud to the configured RADIUS auth and accounting servers.
10781080
- 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.
@@ -1120,7 +1122,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
11201122
options = ['WPA1 only', 'WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode', 'WPA3 only']
11211123
assert kwargs['wpaEncryptionMode'] in options, f'''"wpaEncryptionMode" cannot be "{kwargs['wpaEncryptionMode']}", & must be set to one of: {options}'''
11221124
if 'splashPage' in kwargs:
1123-
options = ['None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth', 'Sponsored guest']
1125+
options = ['None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth', 'Sponsored guest', 'Cisco ISE']
11241126
assert kwargs['splashPage'] in options, f'''"splashPage" cannot be "{kwargs['splashPage']}", & must be set to one of: {options}'''
11251127
if 'radiusFailoverPolicy' in kwargs:
11261128
options = ['Deny access', 'Allow access']

meraki/api/appliance.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,44 @@ def deleteNetworkApplianceStaticRoute(self, networkId: str, staticRouteId: str):
841841

842842
return self._session.delete(metadata, resource)
843843

844+
def getNetworkApplianceTrafficShaping(self, networkId: str):
845+
"""
846+
**Display the traffic shaping settings for an MX network**
847+
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping
848+
849+
- networkId (string): (required)
850+
"""
851+
852+
metadata = {
853+
'tags': ['appliance', 'configure', 'trafficShaping'],
854+
'operation': 'getNetworkApplianceTrafficShaping'
855+
}
856+
resource = f'/networks/{networkId}/appliance/trafficShaping'
857+
858+
return self._session.get(metadata, resource)
859+
860+
def updateNetworkApplianceTrafficShaping(self, networkId: str, **kwargs):
861+
"""
862+
**Update the traffic shaping settings for an MX network**
863+
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-traffic-shaping
864+
865+
- networkId (string): (required)
866+
- globalBandwidthLimits (object): Global per-client bandwidth limit
867+
"""
868+
869+
kwargs.update(locals())
870+
871+
metadata = {
872+
'tags': ['appliance', 'configure', 'trafficShaping'],
873+
'operation': 'updateNetworkApplianceTrafficShaping'
874+
}
875+
resource = f'/networks/{networkId}/appliance/trafficShaping'
876+
877+
body_params = ['globalBandwidthLimits', ]
878+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
879+
880+
return self._session.put(metadata, resource, payload)
881+
844882
def getNetworkApplianceTrafficShapingCustomPerformanceClasses(self, networkId: str):
845883
"""
846884
**List all custom performance classes for an MX network**

meraki/api/networks.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,20 +780,24 @@ def getNetworkMerakiAuthUsers(self, networkId: str):
780780

781781
def createNetworkMerakiAuthUser(self, networkId: str, email: str, name: str, password: str, authorizations: list, **kwargs):
782782
"""
783-
**Create a user configured with Meraki Authentication for a network (currently only 802.1X RADIUS users can be created, and currently, organizations have a 50,000 user cap)**
783+
**Create a user configured with Meraki Authentication for a network (currently supports 802.1X and Splash Guest users, and currently, organizations have a 50,000 user cap)**
784784
https://developer.cisco.com/meraki/api-v1/#!create-network-meraki-auth-user
785785
786786
- networkId (string): (required)
787787
- email (string): Email address of the user
788788
- name (string): Name of the user
789789
- password (string): The password for this user account
790790
- authorizations (array): Authorization zones and expiration dates for the user.
791-
- accountType (string): Authorization type for user (currently we only support 802.1X account types, which is the default)
791+
- accountType (string): Authorization type for user. Can be either 'Guest' or '802.1X'. Defaults to '802.1X'.
792792
- emailPasswordToUser (boolean): Whether or not Meraki should email the password to user. Default is false.
793793
"""
794794

795795
kwargs.update(locals())
796796

797+
if 'accountType' in kwargs:
798+
options = ['Guest', '802.1X']
799+
assert kwargs['accountType'] in options, f'''"accountType" cannot be "{kwargs['accountType']}", & must be set to one of: {options}'''
800+
797801
metadata = {
798802
'tags': ['networks', 'configure', 'merakiAuthUsers'],
799803
'operation': 'createNetworkMerakiAuthUser'

meraki/api/wireless.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs):
134134
(indoor or outdoor) will be assigned to the device. Assigning an RF profile will clear ALL manually configured overrides
135135
on the device (channel width, channel, power).
136136
137+
- twoFourGhzSettings (object): Manual radio settings for 2.4 GHz.
138+
- fiveGhzSettings (object): Manual radio settings for 5 GHz.
137139
"""
138140

139141
kwargs.update(locals())
@@ -144,7 +146,7 @@ def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs):
144146
}
145147
resource = f'/devices/{serial}/wireless/radio/settings'
146148

147-
body_params = ['rfProfileId', ]
149+
body_params = ['rfProfileId', 'twoFourGhzSettings', 'fiveGhzSettings', ]
148150
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
149151

150152
return self._session.put(metadata, resource, payload)
@@ -1072,7 +1074,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
10721074
- encryptionMode (string): The psk encryption mode for the SSID ('wep' or 'wpa'). This param is only valid if the authMode is 'psk'
10731075
- psk (string): The passkey for the SSID. This param is only valid if the authMode is 'psk'
10741076
- wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 only', 'WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode' or 'WPA3 only')
1075-
- splashPage (string): The type of splash page for the SSID ('None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth' or 'Sponsored guest'). This attribute is not supported for template children.
1077+
- splashPage (string): The type of splash page for the SSID ('None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth', 'Sponsored guest' or 'Cisco ISE'). This attribute is not supported for template children.
10761078
- radiusServers (array): The RADIUS 802.1X servers to be used for authentication. This param is only valid if the authMode is 'open-with-radius', '8021x-radius' or 'ipsk-with-radius'
10771079
- radiusProxyEnabled (boolean): If true, Meraki devices will proxy RADIUS messages through the Meraki cloud to the configured RADIUS auth and accounting servers.
10781080
- 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.
@@ -1120,7 +1122,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
11201122
options = ['WPA1 only', 'WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode', 'WPA3 only']
11211123
assert kwargs['wpaEncryptionMode'] in options, f'''"wpaEncryptionMode" cannot be "{kwargs['wpaEncryptionMode']}", & must be set to one of: {options}'''
11221124
if 'splashPage' in kwargs:
1123-
options = ['None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth', 'Sponsored guest']
1125+
options = ['None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth', 'Sponsored guest', 'Cisco ISE']
11241126
assert kwargs['splashPage'] in options, f'''"splashPage" cannot be "{kwargs['splashPage']}", & must be set to one of: {options}'''
11251127
if 'radiusFailoverPolicy' in kwargs:
11261128
options = ['Deny access', 'Allow access']

0 commit comments

Comments
 (0)