Skip to content

Commit 519579a

Browse files
Merge pull request #322 from meraki/develop
Develop v2.2.0
2 parents a764256 + 5cb615f commit 519579a

18 files changed

Lines changed: 1195 additions & 40 deletions

meraki/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
)
4747
from meraki.rest_session import *
4848

49-
__version__ = '2.1.2'
50-
__api_version__ = '1.65.0'
49+
__version__ = '2.2.0'
50+
__api_version__ = '1.68.0'
5151

5252

5353
class DashboardAPI(object):

meraki/aio/api/appliance.py

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ def updateNetworkApplianceFirewallSettings(self, networkId: str, **kwargs):
870870

871871
def getNetworkAppliancePorts(self, networkId: str):
872872
"""
873-
**List per-port VLAN settings for all ports of a MX.**
873+
**List per-port VLAN settings for all ports of a secure router or security appliance.**
874874
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-ports
875875
876876
- networkId (string): Network ID
@@ -889,7 +889,7 @@ def getNetworkAppliancePorts(self, networkId: str):
889889

890890
def getNetworkAppliancePort(self, networkId: str, portId: str):
891891
"""
892-
**Return per-port VLAN settings for a single MX port.**
892+
**Return per-port VLAN settings for a single secure router or security appliance port.**
893893
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-port
894894
895895
- networkId (string): Network ID
@@ -910,7 +910,7 @@ def getNetworkAppliancePort(self, networkId: str, portId: str):
910910

911911
def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs):
912912
"""
913-
**Update the per-port VLAN settings for a single MX port.**
913+
**Update the per-port VLAN settings for a single secure router or security appliance port.**
914914
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-port
915915
916916
- networkId (string): Network ID
@@ -1984,6 +1984,50 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw
19841984

19851985

19861986

1987+
def connectNetworkApplianceUmbrellaAccount(self, networkId: str, api: dict):
1988+
"""
1989+
**Connect a Cisco Umbrella account to this network**
1990+
https://developer.cisco.com/meraki/api-v1/#!connect-network-appliance-umbrella-account
1991+
1992+
- networkId (string): Network ID
1993+
- api (object): Umbrella API credentials
1994+
"""
1995+
1996+
kwargs = locals()
1997+
1998+
metadata = {
1999+
'tags': ['appliance', 'configure', 'umbrella', 'account'],
2000+
'operation': 'connectNetworkApplianceUmbrellaAccount'
2001+
}
2002+
networkId = urllib.parse.quote(str(networkId), safe='')
2003+
resource = f'/networks/{networkId}/appliance/umbrella/account/connect'
2004+
2005+
body_params = ['api', ]
2006+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
2007+
2008+
return self._session.post(metadata, resource, payload)
2009+
2010+
2011+
2012+
def disconnectNetworkApplianceUmbrellaAccount(self, networkId: str):
2013+
"""
2014+
**Disconnect Umbrella account from this network**
2015+
https://developer.cisco.com/meraki/api-v1/#!disconnect-network-appliance-umbrella-account
2016+
2017+
- networkId (string): Network ID
2018+
"""
2019+
2020+
metadata = {
2021+
'tags': ['appliance', 'configure', 'umbrella', 'account'],
2022+
'operation': 'disconnectNetworkApplianceUmbrellaAccount'
2023+
}
2024+
networkId = urllib.parse.quote(str(networkId), safe='')
2025+
resource = f'/networks/{networkId}/appliance/umbrella/account/disconnect'
2026+
2027+
return self._session.post(metadata, resource)
2028+
2029+
2030+
19872031
def getNetworkApplianceUplinksUsageHistory(self, networkId: str, **kwargs):
19882032
"""
19892033
**Get the sent and received bytes for each uplink of a network.**
@@ -2014,7 +2058,7 @@ def getNetworkApplianceUplinksUsageHistory(self, networkId: str, **kwargs):
20142058

20152059
def getNetworkApplianceVlans(self, networkId: str):
20162060
"""
2017-
**List the VLANs for a Cisco Secure Router network**
2061+
**List the VLANs for a Security Appliance network**
20182062
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vlans
20192063
20202064
- networkId (string): Network ID
@@ -2047,6 +2091,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
20472091
- mask (integer): Mask used for the subnet of all bound to the template networks. Applicable only for template network.
20482092
- ipv6 (object): IPv6 configuration on the VLAN
20492093
- dhcpHandling (string): The appliance's handling of DHCP requests on this VLAN. One of: 'Run a DHCP server', 'Relay DHCP to another server' or 'Do not respond to DHCP requests'
2094+
- dhcpRelayServerIps (array): The IPs (IPv4) of the DHCP servers that DHCP requests should be relayed to. CIDR/subnet notation and hostnames are not supported.
20502095
- dhcpLeaseTime (string): The term of DHCP leases if the appliance is running a DHCP server on this VLAN. One of: '30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week'
20512096
- mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above
20522097
- dhcpBootOptionsEnabled (boolean): Use DHCP boot options specified in other properties
@@ -2074,7 +2119,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
20742119
networkId = urllib.parse.quote(str(networkId), safe='')
20752120
resource = f'/networks/{networkId}/appliance/vlans'
20762121

2077-
body_params = ['id', 'name', 'subnet', 'applianceIp', 'groupPolicyId', 'templateVlanType', 'cidr', 'mask', 'ipv6', 'dhcpHandling', 'dhcpLeaseTime', 'mandatoryDhcp', 'dhcpBootOptionsEnabled', 'dhcpBootNextServer', 'dhcpBootFilename', 'dhcpOptions', ]
2122+
body_params = ['id', 'name', 'subnet', 'applianceIp', 'groupPolicyId', 'templateVlanType', 'cidr', 'mask', 'ipv6', 'dhcpHandling', 'dhcpRelayServerIps', 'dhcpLeaseTime', 'mandatoryDhcp', 'dhcpBootOptionsEnabled', 'dhcpBootNextServer', 'dhcpBootFilename', 'dhcpOptions', ]
20782123
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
20792124

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

meraki/aio/api/networks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def getNetworkClientsOverview(self, networkId: str, **kwargs):
363363
- t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today.
364364
- t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
365365
- 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.
366-
- resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 7200, 86400, 604800, 2592000. The default is 604800.
366+
- resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 7200, 86400, 604800, 2629746. The default is 604800.
367367
"""
368368

369369
kwargs.update(locals())

0 commit comments

Comments
 (0)