B `3/@sGdddZdS)cseZdZfddZedddZedddZeddd Zedd d Zed d dZ ed ddZ ed ddZ ed ddZ ed ddZ ed ddZed ddZed ddZd"edd d!ZZS)#AsyncCellularGatewaycst||_dS)N)super__init___session)selfsession) __class__y/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki/aio/api/cellularGateway.pyrs zAsyncCellularGateway.__init__)serialcCs*dddgdd}d|d}|j||S)z **Show the LAN Settings of a MG** https://developer.cisco.com/meraki/api-v1/#!get-device-cellular-gateway-lan - serial (string): (required) cellularGateway configurelangetDeviceCellularGatewayLan)tags operationz /devices/z/cellularGateway/lan)rget)rr metadataresourcerrr rs  z0AsyncCellularGateway.getDeviceCellularGatewayLanc sV|tdddgdd}d|d}dd gfd d |D}|j|||S) af **Update the LAN Settings for a single MG.** https://developer.cisco.com/meraki/api-v1/#!update-device-cellular-gateway-lan - serial (string): (required) - reservedIpRanges (array): list of all reserved IP ranges for a single MG - fixedIpAssignments (array): list of all fixed IP assignments for a single MG r r r updateDeviceCellularGatewayLan)rrz /devices/z/cellularGateway/lanZreservedIpRangesZfixedIpAssignmentscs&i|]\}}|kr||qSr)strip).0kv) body_paramsrr -szGAsyncCellularGateway.updateDeviceCellularGatewayLan..)updatelocalsitemsrput)rr kwargsrrpayloadr)rr rs  z3AsyncCellularGateway.updateDeviceCellularGatewayLancCs*dddgdd}d|d}|j||S)z **Returns the port forwarding rules for a single MG.** https://developer.cisco.com/meraki/api-v1/#!get-device-cellular-gateway-port-forwarding-rules - serial (string): (required) r r portForwardingRules+getDeviceCellularGatewayPortForwardingRules)rrz /devices/z$/cellularGateway/portForwardingRules)rr)rr rrrrr r"3s  z@AsyncCellularGateway.getDeviceCellularGatewayPortForwardingRulesc sT|tdddgdd}d|d}dgfd d |D}|j|||S) a **Updates the port forwarding rules for a single MG.** https://developer.cisco.com/meraki/api-v1/#!update-device-cellular-gateway-port-forwarding-rules - serial (string): (required) - rules (array): An array of port forwarding params r r r!.updateDeviceCellularGatewayPortForwardingRules)rrz /devices/z$/cellularGateway/portForwardingRulesrulescs&i|]\}}|kr||qSr)r)rrr)rrr rWszWAsyncCellularGateway.updateDeviceCellularGatewayPortForwardingRules..)rrrrr)rr rrrr r)rr r#Es  zCAsyncCellularGateway.updateDeviceCellularGatewayPortForwardingRules) networkIdcCs*dddgdd}d|d}|j||S)z **Return the connectivity testing destinations for an MG network** https://developer.cisco.com/meraki/api-v1/#!get-network-cellular-gateway-connectivity-monitoring-destinations - networkId (string): (required) r r "connectivityMonitoringDestinations;getNetworkCellularGatewayConnectivityMonitoringDestinations)rrz /networks/z3/cellularGateway/connectivityMonitoringDestinations)rr)rr%rrrrr r']s  zPAsyncCellularGateway.getNetworkCellularGatewayConnectivityMonitoringDestinationsc sT|tdddgdd}d|d}dgfd d |D}|j|||S) aH **Update the connectivity testing destinations for an MG network** https://developer.cisco.com/meraki/api-v1/#!update-network-cellular-gateway-connectivity-monitoring-destinations - networkId (string): (required) - destinations (array): The list of connectivity monitoring destinations r r r&>updateNetworkCellularGatewayConnectivityMonitoringDestinations)rrz /networks/z3/cellularGateway/connectivityMonitoringDestinations destinationscs&i|]\}}|kr||qSr)r)rrr)rrr rszgAsyncCellularGateway.updateNetworkCellularGatewayConnectivityMonitoringDestinations..)rrrrr)rr%rrrr r)rr r(os  zSAsyncCellularGateway.updateNetworkCellularGatewayConnectivityMonitoringDestinationscCs*dddgdd}d|d}|j||S)z **List common DHCP settings of MGs** https://developer.cisco.com/meraki/api-v1/#!get-network-cellular-gateway-dhcp - networkId (string): (required) r r dhcpgetNetworkCellularGatewayDhcp)rrz /networks/z/cellularGateway/dhcp)rr)rr%rrrrr r+s  z2AsyncCellularGateway.getNetworkCellularGatewayDhcpc sX|tdddgdd}d|d}dd d gfd d |D}|j|||S) av **Update common DHCP settings of MGs** https://developer.cisco.com/meraki/api-v1/#!update-network-cellular-gateway-dhcp - networkId (string): (required) - dhcpLeaseTime (string): DHCP Lease time for all MG of the network. It can be '30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week'. - dnsNameservers (string): DNS name servers mode for all MG of the network. It can take 4 different values: 'upstream_dns', 'google_dns', 'opendns', 'custom'. - dnsCustomNameservers (array): list of fixed IP representing the the DNS Name servers when the mode is 'custom' r r r* updateNetworkCellularGatewayDhcp)rrz /networks/z/cellularGateway/dhcpZ dhcpLeaseTimeZdnsNameserversZdnsCustomNameserverscs&i|]\}}|kr||qSr)r)rrr)rrr rszIAsyncCellularGateway.updateNetworkCellularGatewayDhcp..)rrrrr)rr%rrrr r)rr r,s   z5AsyncCellularGateway.updateNetworkCellularGatewayDhcpcCs*dddgdd}d|d}|j||S)z **Return the subnet pool and mask configured for MGs in the network.** https://developer.cisco.com/meraki/api-v1/#!get-network-cellular-gateway-subnet-pool - networkId (string): (required) r r subnetPool#getNetworkCellularGatewaySubnetPool)rrz /networks/z/cellularGateway/subnetPool)rr)rr%rrrrr r.s  z8AsyncCellularGateway.getNetworkCellularGatewaySubnetPoolc sV|tdddgdd}d|d}dd gfd d |D}|j|||S) a **Update the subnet pool and mask configuration for MGs in the network.** https://developer.cisco.com/meraki/api-v1/#!update-network-cellular-gateway-subnet-pool - networkId (string): (required) - mask (integer): Mask used for the subnet of all MGs in this network. - cidr (string): CIDR of the pool of subnets. Each MG in this network will automatically pick a subnet from this pool. r r r-&updateNetworkCellularGatewaySubnetPool)rrz /networks/z/cellularGateway/subnetPoolmaskZcidrcs&i|]\}}|kr||qSr)r)rrr)rrr rszOAsyncCellularGateway.updateNetworkCellularGatewaySubnetPool..)rrrrr)rr%rrrr r)rr r/s  z;AsyncCellularGateway.updateNetworkCellularGatewaySubnetPoolcCs*dddgdd}d|d}|j||S)z **Returns the uplink settings for your MG network.** https://developer.cisco.com/meraki/api-v1/#!get-network-cellular-gateway-uplink - networkId (string): (required) r r uplinkgetNetworkCellularGatewayUplink)rrz /networks/z/cellularGateway/uplink)rr)rr%rrrrr r2s  z4AsyncCellularGateway.getNetworkCellularGatewayUplinkc sT|tdddgdd}d|d}dgfd d |D}|j|||S) a  **Updates the uplink settings for your MG network.** https://developer.cisco.com/meraki/api-v1/#!update-network-cellular-gateway-uplink - networkId (string): (required) - bandwidthLimits (object): The bandwidth settings for the 'cellular' uplink r r r1"updateNetworkCellularGatewayUplink)rrz /networks/z/cellularGateway/uplinkZbandwidthLimitscs&i|]\}}|kr||qSr)r)rrr)rrr rszKAsyncCellularGateway.updateNetworkCellularGatewayUplink..)rrrrr)rr%rrrr r)rr r3s  z7AsyncCellularGateway.updateNetworkCellularGatewayUplinknext)organizationIdc  s|tddddgdd}d|d}d d d d d dgfdd|D}d d dg}xF|D]:\} } | |krd|| || d<|| qdW|j|||||S)a( **List the uplink status of every Meraki MG cellular gateway in the organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-uplink-statuses - organizationId (string): (required) - total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - networkIds (array): A list of network IDs. The returned devices will be filtered to only include these networks. - serials (array): A list of serial numbers. The returned devices will be filtered to only include these serials. - iccids (array): A list of ICCIDs. The returned devices will be filtered to only include these ICCIDs. r Zmonitorr1Zstatuses,getOrganizationCellularGatewayUplinkStatuses)rrz/organizations/z /cellularGateway/uplink/statusesZperPageZ startingAfterZ endingBeforeZ networkIdsZserialsZiccidscs&i|]\}}|kr||qSr)r)rrr) query_paramsrr r!szUAsyncCellularGateway.getOrganizationCellularGatewayUplinkStatuses..z[])rrrrpoprZ get_pages) rr6Z total_pages directionrrrparamsZ array_paramsrrr)r8r r7s     zAAsyncCellularGateway.getOrganizationCellularGatewayUplinkStatuses)r4r5)__name__ __module__ __qualname__rstrrrr"r#r'r(r+r,r.r/r2r3r7 __classcell__rr)rr rs rN)rrrrr