Skip to content
Merged
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
2 changes: 1 addition & 1 deletion meraki/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.0.1"
__version__ = "3.0.2"
54 changes: 54 additions & 0 deletions meraki/aio/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
- dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from
- dhcpBootFilename (string): DHCP boot option for boot filename
- dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties.
- vrf (object): VRF configuration on the VLAN
- uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions.
"""

Expand Down Expand Up @@ -2534,6 +2535,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
"dhcpBootNextServer",
"dhcpBootFilename",
"dhcpOptions",
"vrf",
"uplinks",
]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
Expand Down Expand Up @@ -2640,6 +2642,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs):
- 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
- 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
- vrf (object): VRF configuration on the VLAN
- uplinks (array): Per-uplink NAT exception override configuration on the VLAN. Applicable only for networks that support NAT exceptions.
"""

Expand Down Expand Up @@ -2690,6 +2693,7 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs):
"mask",
"ipv6",
"mandatoryDhcp",
"vrf",
"uplinks",
]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
Expand Down Expand Up @@ -3628,6 +3632,56 @@ def getOrganizationApplianceFirewallMulticastForwardingByNetwork(

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

def getOrganizationApplianceRoutingVrfsSettings(self, organizationId: str):
"""
**Return the VRF setting for an organization.**
https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-routing-vrfs-settings

- organizationId (string): Organization ID
"""

metadata = {
"tags": ["appliance", "configure", "routing", "vrfs", "settings"],
"operation": "getOrganizationApplianceRoutingVrfsSettings",
}
organizationId = urllib.parse.quote(str(organizationId), safe="")
resource = f"/organizations/{organizationId}/appliance/routing/vrfs/settings"

return self._session.get(metadata, resource)

def updateOrganizationApplianceRoutingVrfsSettings(self, organizationId: str, enabled: bool, **kwargs):
"""
**Update the VRF setting for an organization.**
https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-routing-vrfs-settings

- organizationId (string): Organization ID
- enabled (boolean): Boolean indicating whether VRFs are enabled for the organization.
"""

kwargs = locals()

metadata = {
"tags": ["appliance", "configure", "routing", "vrfs", "settings"],
"operation": "updateOrganizationApplianceRoutingVrfsSettings",
}
organizationId = urllib.parse.quote(str(organizationId), safe="")
resource = f"/organizations/{organizationId}/appliance/routing/vrfs/settings"

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

if self._session._validate_kwargs:
all_params = [] + body_params
invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"]
if invalid and self._session._logger:
self._session._logger.warning(
f"updateOrganizationApplianceRoutingVrfsSettings: ignoring unrecognized kwargs: {invalid}"
)

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

def getOrganizationApplianceSecurityEvents(self, organizationId: str, total_pages=1, direction="next", **kwargs):
"""
**List the security events for an organization**
Expand Down
75 changes: 75 additions & 0 deletions meraki/aio/api/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,37 @@ def blinkDeviceLeds(self, serial: str, **kwargs):

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

def updateDeviceCellularGeolocations(self, serial: str, enabled: bool, **kwargs):
"""
**Update the enablement of the geolocation feature for a device**
https://developer.cisco.com/meraki/api-v1/#!update-device-cellular-geolocations

- serial (string): Serial
- enabled (boolean): Required parameter for the state to update the geolocation settings to (true to enable, false to disable)
"""

kwargs = locals()

metadata = {
"tags": ["devices", "configure", "cellular", "geolocations"],
"operation": "updateDeviceCellularGeolocations",
}
serial = urllib.parse.quote(str(serial), safe="")
resource = f"/devices/{serial}/cellular/geolocations"

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

if self._session._validate_kwargs:
all_params = [] + body_params
invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"]
if invalid and self._session._logger:
self._session._logger.warning(f"updateDeviceCellularGeolocations: ignoring unrecognized kwargs: {invalid}")

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

def getDeviceCellularSims(self, serial: str):
"""
**Return the SIM and APN configurations for a cellular device.**
Expand Down Expand Up @@ -157,6 +188,50 @@ def updateDeviceCellularSims(self, serial: str, **kwargs):

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

def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, type: str, masked: list, **kwargs):
"""
**Update the cellular band masks for a device**
https://developer.cisco.com/meraki/api-v1/#!create-device-cellular-uplinks-bands-masks-update

- serial (string): Serial
- slot (string): Required parameter for the SIM slot to update the cellular band mask for
- type (string): Required parameter for the signal type to update the cellular band mask for
- masked (array): Required parameter for the band identifiers to mask for the given SIM slot and signal type. For LTE use bands identifiers like '30' and for 5G use band identifiers like 'n30'. Maximum 256 bands.
"""

kwargs = locals()

if "slot" in kwargs:
options = ["sim1", "sim2", "sim3"]
assert kwargs["slot"] in options, f'''"slot" cannot be "{kwargs["slot"]}", & must be set to one of: {options}'''
if "type" in kwargs:
options = ["5GNSA", "5GSA", "LTE"]
assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}'''

metadata = {
"tags": ["devices", "configure", "cellular", "uplinks", "bands", "masks", "update"],
"operation": "createDeviceCellularUplinksBandsMasksUpdate",
}
serial = urllib.parse.quote(str(serial), safe="")
resource = f"/devices/{serial}/cellular/uplinks/bands/masks/update"

body_params = [
"slot",
"type",
"masked",
]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

if self._session._validate_kwargs:
all_params = [] + body_params
invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"]
if invalid and self._session._logger:
self._session._logger.warning(
f"createDeviceCellularUplinksBandsMasksUpdate: ignoring unrecognized kwargs: {invalid}"
)

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

def getDeviceClients(self, serial: str, **kwargs):
"""
**List the clients of a device, up to a maximum of a month ago**
Expand Down
Loading
Loading