77from .api .organizations import Organizations
88from .api .networks import Networks
99from .api .devices import Devices
10- from .api .insight import Insight
11- from .api .wireless import Wireless
12- from .api .camera import Camera
1310from .api .appliance import Appliance
14- from .api .switch import Switch
11+ from .api .camera import Camera
1512from .api .cellular_gateway import CellularGateway
13+ from .api .insight import Insight
1614from .api .sm import Sm
15+ from .api .switch import Switch
16+ from .api .wireless import Wireless
1717from .config import (
18- API_KEY_ENVIRONMENT_VARIABLE , DEFAULT_BASE_URL , SINGLE_REQUEST_TIMEOUT , CERTIFICATE_PATH , WAIT_ON_RATE_LIMIT ,
19- NGINX_429_RETRY_WAIT_TIME , ACTION_BATCH_RETRY_WAIT_TIME , RETRY_4XX_ERROR , RETRY_4XX_ERROR_WAIT_TIME ,
20- MAXIMUM_RETRIES , OUTPUT_LOG , LOG_PATH , LOG_FILE_PREFIX , PRINT_TO_CONSOLE , SUPPRESS_LOGGING , SIMULATE_API_CALLS ,
21- BE_GEO_ID , MERAKI_PYTHON_SDK_CALLER
18+ API_KEY_ENVIRONMENT_VARIABLE , DEFAULT_BASE_URL , SINGLE_REQUEST_TIMEOUT , CERTIFICATE_PATH , REQUESTS_PROXY ,
19+ WAIT_ON_RATE_LIMIT , NGINX_429_RETRY_WAIT_TIME , ACTION_BATCH_RETRY_WAIT_TIME , RETRY_4XX_ERROR ,
20+ RETRY_4XX_ERROR_WAIT_TIME , MAXIMUM_RETRIES , OUTPUT_LOG , LOG_PATH , LOG_FILE_PREFIX , PRINT_TO_CONSOLE ,
21+ SUPPRESS_LOGGING , SIMULATE_API_CALLS , BE_GEO_ID , MERAKI_PYTHON_SDK_CALLER
2222)
2323
24- __version__ = '1.0.0b4 '
24+ __version__ = '1.0.0b5 '
2525
2626class DashboardAPI (object ):
2727 """
@@ -31,6 +31,7 @@ class DashboardAPI(object):
3131 - base_url (string): preceding all endpoint resources
3232 - single_request_timeout (integer): maximum number of seconds for each API call
3333 - certificate_path (string): path for TLS/SSL certificate verification if behind local proxy
34+ - requests_proxy (string): proxy server and port, if needed, for HTTPS
3435 - wait_on_rate_limit (boolean): retry if 429 rate limit error encountered?
3536 - nginx_429_retry_wait_time (integer): Nginx 429 retry wait time
3637 - action_batch_retry_wait_time (integer): action batch concurrency error retry wait time
@@ -48,13 +49,13 @@ class DashboardAPI(object):
4849 """
4950
5051 def __init__ (self , api_key = None , base_url = DEFAULT_BASE_URL , single_request_timeout = SINGLE_REQUEST_TIMEOUT ,
51- certificate_path = CERTIFICATE_PATH , wait_on_rate_limit = WAIT_ON_RATE_LIMIT ,
52- nginx_429_retry_wait_time = NGINX_429_RETRY_WAIT_TIME ,
53- action_batch_retry_wait_time = ACTION_BATCH_RETRY_WAIT_TIME ,
54- retry_4xx_error = RETRY_4XX_ERROR , retry_4xx_error_wait_time = RETRY_4XX_ERROR_WAIT_TIME ,
55- maximum_retries = MAXIMUM_RETRIES , output_log = OUTPUT_LOG , log_path = LOG_PATH ,
56- log_file_prefix = LOG_FILE_PREFIX , print_console = PRINT_TO_CONSOLE , suppress_logging = SUPPRESS_LOGGING ,
57- simulate = SIMULATE_API_CALLS , be_geo_id = BE_GEO_ID , caller = MERAKI_PYTHON_SDK_CALLER ):
52+ certificate_path = CERTIFICATE_PATH , requests_proxy = REQUESTS_PROXY ,
53+ wait_on_rate_limit = WAIT_ON_RATE_LIMIT , nginx_429_retry_wait_time = NGINX_429_RETRY_WAIT_TIME ,
54+ action_batch_retry_wait_time = ACTION_BATCH_RETRY_WAIT_TIME , retry_4xx_error = RETRY_4XX_ERROR ,
55+ retry_4xx_error_wait_time = RETRY_4XX_ERROR_WAIT_TIME , maximum_retries = MAXIMUM_RETRIES ,
56+ output_log = OUTPUT_LOG , log_path = LOG_PATH , log_file_prefix = LOG_FILE_PREFIX ,
57+ print_console = PRINT_TO_CONSOLE , suppress_logging = SUPPRESS_LOGGING , simulate = SIMULATE_API_CALLS ,
58+ be_geo_id = BE_GEO_ID , caller = MERAKI_PYTHON_SDK_CALLER ):
5859 # Check API key
5960 api_key = api_key or os .environ .get (API_KEY_ENVIRONMENT_VARIABLE )
6061 if not api_key :
@@ -99,6 +100,7 @@ def __init__(self, api_key=None, base_url=DEFAULT_BASE_URL, single_request_timeo
99100 base_url = base_url ,
100101 single_request_timeout = single_request_timeout ,
101102 certificate_path = certificate_path ,
103+ requests_proxy = requests_proxy ,
102104 wait_on_rate_limit = wait_on_rate_limit ,
103105 nginx_429_retry_wait_time = nginx_429_retry_wait_time ,
104106 action_batch_retry_wait_time = action_batch_retry_wait_time ,
@@ -114,10 +116,10 @@ def __init__(self, api_key=None, base_url=DEFAULT_BASE_URL, single_request_timeo
114116 self .organizations = Organizations (self ._session )
115117 self .networks = Networks (self ._session )
116118 self .devices = Devices (self ._session )
117- self .insight = Insight (self ._session )
118- self .wireless = Wireless (self ._session )
119- self .camera = Camera (self ._session )
120119 self .appliance = Appliance (self ._session )
121- self .switch = Switch (self ._session )
120+ self .camera = Camera (self ._session )
122121 self .cellulargateway = CellularGateway (self ._session )
122+ self .insight = Insight (self ._session )
123123 self .sm = Sm (self ._session )
124+ self .switch = Switch (self ._session )
125+ self .wireless = Wireless (self ._session )
0 commit comments