B `7@s(ddlmZddlZddlZddlTddlTddlmZddlmZddl m Z ddl m Z dd l mZdd lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:dd l;mZ>dd"l?m@Z@dd#lAmBZBdd$lCmDZDdd%lEmFZFdd&lGmHZHdd'lImJZJdd(lKmLZLdd)lMmNZNdd*lOmPZPdd+lQmRZRdd,lSmTZTdd-lUmVZVdd.lWmXZXdd/lYmZZZdd0l[m\Z\dd1l]m^Z^dd2l_m`Z`dd3lambZbdd4lcmdZddd5lemfZfdd6lgmhZhdd7limjZjdd8lkmlZldd9lmmnZndd:lompZpdd;lqmrZrddlwmxZxdd?lymzZzdd@l{m|Z|ddAl}m~Z~ddBlmZddClmZddDlmZddElmZddFlmZddGlmZddHlmZddIlmZddJlmZddKlmZddLlmZddMlmZddNlmZddOlmZddPlmZddQlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZdRZGdSdTdTeZdS)U)datetimeN)*)APIUsage) ActionBatches)Admins) AlertSettings)BluetoothClients)BluetoothSettings)CameraQualityRetentionProfiles)Cameras) ChangeLog)Clients)ConfigTemplates)"ConnectivityMonitoringDestinations)ContentFilteringCategories)ContentFilteringRules)DashboardBrandingPolicies)Devices)Events)FirewalledServices) FloorPlans) GroupPolicies) HTTPServers)IntrusionSettings)Licenses)LinkAggregations)MGDHCPSettings) MGLANSettings)$MGConnectivityMonitoringDestinations)MGPortForwardingRules)MGSubnetPoolSettings)MGUplinkSettings) MRL3Firewall)MVSense) MX11NATRules)MX1ManyNATRules) MXL3Firewall)MXL7ApplicationCategories) MXL7Firewall) MXVLANPorts) MXVPNFirewall)MXCellularFirewall)MXInboundFirewall)MXPortForwardingRules)MXStaticRoutes)MXWarmSpareSettings)MalwareSettings)ManagementInterfaceSettings)MerakiAuthUsers)MonitoredMediaServers) NamedTagScope)NetFlowSettings)Networks) OpenAPISpec) Organizations)PII) RadioSettings) SAMLRoles)SM) SNMPSettings)SSIDs)SecurityEvents)SplashLoginAttempts)SplashSettings) SwitchACLs)SwitchPortSchedules) SwitchPorts)SwitchProfiles)SwitchSettings) SwitchStacks) SyslogServers)TrafficAnalysisSettings)TrafficShaping)UplinkSettings)VLANs) WebhookLogs)WirelessHealth)WirelessSettings)API_KEY_ENVIRONMENT_VARIABLEDEFAULT_BASE_URLSINGLE_REQUEST_TIMEOUTCERTIFICATE_PATHREQUESTS_PROXYWAIT_ON_RATE_LIMITNGINX_429_RETRY_WAIT_TIMEACTION_BATCH_RETRY_WAIT_TIMERETRY_4XX_ERRORRETRY_4XX_ERROR_WAIT_TIMEMAXIMUM_RETRIES OUTPUT_LOGLOG_PATHLOG_FILE_PREFIXPRINT_TO_CONSOLESUPPRESS_LOGGINGSIMULATE_API_CALLS BE_GEO_IDMERAKI_PYTHON_SDK_CALLERz0.110.6c@s@eZdZdZdeeeeee e e e e eeeeeeeefddZdS) DashboardAPIa **Creates a persistent Meraki dashboard API session** - api_key (string): API key generated in dashboard; can also be set as an environment variable MERAKI_DASHBOARD_API_KEY - base_url (string): preceding all endpoint resources - single_request_timeout (integer): maximum number of seconds for each API call - certificate_path (string): path for TLS/SSL certificate verification if behind local proxy - requests_proxy (string): proxy server and port, if needed, for HTTPS - wait_on_rate_limit (boolean): retry if 429 rate limit error encountered? - nginx_429_retry_wait_time (integer): Nginx 429 retry wait time - action_batch_retry_wait_time (integer): action batch concurrency error retry wait time - retry_4xx_error (boolean): retry if encountering other 4XX error (besides 429)? - retry_4xx_error_wait_time (integer): other 4XX error retry wait time - maximum_retries (integer): retry up to this many times when encountering 429s or other server-side errors - output_log (boolean): create an output log file? - log_path (string): path to output log; by default, working directory of script if not specified - log_file_prefix (string): log file name appended with date and timestamp - print_console (boolean): print logging output to console? - suppress_logging (boolean): disable all logging? you're on your own then! - simulate (boolean): simulate POST/PUT/DELETE calls to prevent changes? - be_geo_id (string): optional partner identifier for API usage tracking; can also be set as an environment variable BE_GEO_ID - caller (string): optional identifier for API usage tracking; can also be set as an environment variable MERAKI_PYTHON_SDK_CALLER NcCs|ptjt}|st|p(tjd}|p8tjd}|stt|_|j tj tj ddd}| r| ddkr| d7} | |dt d d |_t}tj|jd }||||| r|js|j||r| tj|j|n|r$|js$|j|nd|_t|j||||||||| | | |||d |_t|j|_t|j|_t|j|_t|j|_t|j|_ t!|j|_"t#|j|_$t%|j|_&t'|j|_(t)|j|_*t+|j|_,t-|j|_.t/|j|_0t1|j|_2t3|j|_4t5|j|_6t7|j|_8t9|j|_:t;|j|_t?|j|_@tA|j|_BtC|j|_DtE|j|_FtG|j|_HtI|j|_JtK|j|_LtM|j|_NtO|j|_PtQ|j|_RtS|j|_TtU|j|_VtW|j|_XtY|j|_Zt[|j|_\t]|j|_^t_|j|_`ta|j|_btc|j|_dte|j|_ftg|j|_hti|j|_jtk|j|_ltm|j|_nto|j|_ptq|j|_rts|j|_ttu|j|_vtw|j|_xty|j|_zt{|j|_|t}|j|_~t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_t|j|_dS) Nrbrcz(%(name)12s: %(levelname)8s > %(message)sz%Y-%m-%d %H:%M:%S)fmtdatefmt/Z_log__z%Y-%m-%d_%H-%M-%Sz.log)filename)loggerapi_keybase_urlsingle_request_timeoutcertificate_pathrequests_proxywait_on_rate_limitnginx_429_retry_wait_timeaction_batch_retry_wait_timeretry_4xx_errorretry_4xx_error_wait_timemaximum_retriessimulate be_geo_idcaller)osenvirongetrQZ APIKeyErrorlogging getLogger__name__Z_loggersetLevelDEBUG FormatterrnowZ _log_file StreamHandler FileHandler setFormatter hasHandlers addHandlerINFOZ RestSession_sessionrZ api_usagerZaction_batchesrZadminsrZalert_settingsr Zbluetooth_clientsr Zbluetooth_settingsr Z!camera_quality_retention_profilesr Zcamerasr Z change_logrZclientsrZconfig_templatesrZ$connectivity_monitoring_destinationsrZcontent_filtering_categoriesrZcontent_filtering_rulesrZdashboard_branding_policiesrZdevicesreventsrZfirewalled_servicesrZ floor_plansrZgroup_policiesrZ http_serversrZintrusion_settingsrZlicensesrZlink_aggregationsrZmg_dhcp_settingsrZmg_lan_settingsrZ'mg_connectivity_monitoring_destinationsr Zmg_port_forwarding_rulesr!Zmg_subnet_pool_settingsr"Zmg_uplink_settingsr#Zmr_l3_firewallr$Zmv_senser%Zmx_1_1_nat_rulesr&Zmx_1_many_nat_rulesr'Zmx_l3_firewallr(Zmx_l7_application_categoriesr)Zmx_l7_firewallr*Z mx_vlan_portsr+Zmx_vpn_firewallr,Zmx_cellular_firewallr-Zmx_inbound_firewallr.Zmx_port_forwarding_rulesr/Zmx_static_routesr0Zmx_warm_spare_settingsr1Zmalware_settingsr2Zmanagement_interface_settingsr3Zmeraki_auth_usersr4Zmonitored_media_serversr5Znamed_tag_scoper6Znetflow_settingsr7Znetworksr8Z openapi_specr9Z organizationsr:Zpiir;Zradio_settingsr<Z saml_rolesr=smr>Z snmp_settingsr?Zssidsr@Zsecurity_eventsrAZsplash_login_attemptsrBZsplash_settingsrCZ switch_aclsrDZswitch_port_schedulesrEZ switch_portsrFZswitch_profilesrGZswitch_settingsrHZ switch_stacksrIZsyslog_serversrJZtraffic_analysis_settingsrKZtraffic_shapingrLZuplink_settingsrMZvlansrNZ webhook_logsrOZwireless_healthrPZwireless_settings)selfrkrlrmrnrorprqrrrsrtruZ output_logZlog_pathZlog_file_prefixZ print_consolesuppress_loggingrvrwrx formatterZhandler_consoleZ handler_logrm/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki_v0/__init__.py__init__ws                                                                                   zDashboardAPI.__init__)r~ __module__ __qualname____doc__rRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrrrrrrd^srd)rr|rylegacyZ rest_sessionZ api.api_usagerZapi.action_batchesrZ api.adminsrZapi.alert_settingsrZapi.bluetooth_clientsr Zapi.bluetooth_settingsr Z%api.camera_quality_retention_profilesr Z api.camerasr Zapi.change_logr Z api.clientsrZapi.config_templatesrZ(api.connectivity_monitoring_destinationsrZ api.content_filtering_categoriesrZapi.content_filtering_rulesrZapi.dashboard_branding_policiesrZ api.devicesrZ api.eventsrZapi.firewalled_servicesrZapi.floor_plansrZapi.group_policiesrZapi.http_serversrZapi.intrusion_settingsrZ api.licensesrZapi.link_aggregationsrZapi.mg_dhcp_settingsrZapi.mg_lan_settingsrZ+api.mg_connectivity_monitoring_destinationsrZapi.mg_port_forwarding_rulesr Zapi.mg_subnet_pool_settingsr!Zapi.mg_uplink_settingsr"Zapi.mr_l3_firewallr#Z api.mv_senser$Zapi.mx_1_1_nat_rulesr%Zapi.mx_1_many_nat_rulesr&Zapi.mx_l3_firewallr'Z api.mx_l7_application_categoriesr(Zapi.mx_l7_firewallr)Zapi.mx_vlan_portsr*Zapi.mx_vpn_firewallr+Zapi.mx_cellular_firewallr,Zapi.mx_inbound_firewallr-Zapi.mx_port_forwarding_rulesr.Zapi.mx_static_routesr/Zapi.mx_warm_spare_settingsr0Zapi.malware_settingsr1Z!api.management_interface_settingsr2Zapi.meraki_auth_usersr3Zapi.monitored_media_serversr4Zapi.named_tag_scoper5Zapi.netflow_settingsr6Z api.networksr7Zapi.openapi_specr8Zapi.organizationsr9Zapi.piir:Zapi.radio_settingsr;Zapi.saml_rolesr<Zapi.smr=Zapi.snmp_settingsr>Z api.ssidsr?Zapi.security_eventsr@Zapi.splash_login_attemptsrAZapi.splash_settingsrBZapi.switch_aclsrCZapi.switch_port_schedulesrDZapi.switch_portsrEZapi.switch_profilesrFZapi.switch_settingsrGZapi.switch_stacksrHZapi.syslog_serversrIZapi.traffic_analysis_settingsrJZapi.traffic_shapingrKZapi.uplink_settingsrLZ api.vlansrMZapi.webhook_logsrNZapi.wireless_healthrOZapi.wireless_settingsrPconfigrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrc __version__objectrdrrrrs                                                                             T