Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions meraki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
)
from meraki.rest_session import *

__version__ = '2.1.2'
__api_version__ = '1.65.0'
__version__ = '2.2.0'
__api_version__ = '1.68.0'


class DashboardAPI(object):
Expand Down
55 changes: 50 additions & 5 deletions meraki/aio/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def updateNetworkApplianceFirewallSettings(self, networkId: str, **kwargs):

def getNetworkAppliancePorts(self, networkId: str):
"""
**List per-port VLAN settings for all ports of a MX.**
**List per-port VLAN settings for all ports of a secure router or security appliance.**
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-ports

- networkId (string): Network ID
Expand All @@ -889,7 +889,7 @@ def getNetworkAppliancePorts(self, networkId: str):

def getNetworkAppliancePort(self, networkId: str, portId: str):
"""
**Return per-port VLAN settings for a single MX port.**
**Return per-port VLAN settings for a single secure router or security appliance port.**
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-port

- networkId (string): Network ID
Expand All @@ -910,7 +910,7 @@ def getNetworkAppliancePort(self, networkId: str, portId: str):

def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs):
"""
**Update the per-port VLAN settings for a single MX port.**
**Update the per-port VLAN settings for a single secure router or security appliance port.**
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-port

- networkId (string): Network ID
Expand Down Expand Up @@ -1984,6 +1984,50 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw



def connectNetworkApplianceUmbrellaAccount(self, networkId: str, api: dict):
"""
**Connect a Cisco Umbrella account to this network**
https://developer.cisco.com/meraki/api-v1/#!connect-network-appliance-umbrella-account

- networkId (string): Network ID
- api (object): Umbrella API credentials
"""

kwargs = locals()

metadata = {
'tags': ['appliance', 'configure', 'umbrella', 'account'],
'operation': 'connectNetworkApplianceUmbrellaAccount'
}
networkId = urllib.parse.quote(str(networkId), safe='')
resource = f'/networks/{networkId}/appliance/umbrella/account/connect'

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

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



def disconnectNetworkApplianceUmbrellaAccount(self, networkId: str):
"""
**Disconnect Umbrella account from this network**
https://developer.cisco.com/meraki/api-v1/#!disconnect-network-appliance-umbrella-account

- networkId (string): Network ID
"""

metadata = {
'tags': ['appliance', 'configure', 'umbrella', 'account'],
'operation': 'disconnectNetworkApplianceUmbrellaAccount'
}
networkId = urllib.parse.quote(str(networkId), safe='')
resource = f'/networks/{networkId}/appliance/umbrella/account/disconnect'

return self._session.post(metadata, resource)



def getNetworkApplianceUplinksUsageHistory(self, networkId: str, **kwargs):
"""
**Get the sent and received bytes for each uplink of a network.**
Expand Down Expand Up @@ -2014,7 +2058,7 @@ def getNetworkApplianceUplinksUsageHistory(self, networkId: str, **kwargs):

def getNetworkApplianceVlans(self, networkId: str):
"""
**List the VLANs for a Cisco Secure Router network**
**List the VLANs for a Security Appliance network**
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vlans

- networkId (string): Network ID
Expand Down Expand Up @@ -2047,6 +2091,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
- mask (integer): Mask used for the subnet of all bound to the template networks. Applicable only for template network.
- ipv6 (object): IPv6 configuration on the VLAN
- 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'
- dhcpRelayServerIps (array): The IPs (IPv4) of the DHCP servers that DHCP requests should be relayed to. CIDR/subnet notation and hostnames are not supported.
- 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'
- 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
- dhcpBootOptionsEnabled (boolean): Use DHCP boot options specified in other properties
Expand Down Expand Up @@ -2074,7 +2119,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
networkId = urllib.parse.quote(str(networkId), safe='')
resource = f'/networks/{networkId}/appliance/vlans'

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

return self._session.post(metadata, resource, payload)
Expand Down
2 changes: 1 addition & 1 deletion meraki/aio/api/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def getNetworkClientsOverview(self, networkId: str, **kwargs):
- 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.
- resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 7200, 86400, 604800, 2592000. The default is 604800.
- resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 7200, 86400, 604800, 2629746. The default is 604800.
"""

kwargs.update(locals())
Expand Down
Loading
Loading