Skip to content

Commit 395195a

Browse files
author
Shiyue Cheng
committed
updated w/ release 1.0.0b19
1 parent 0616dbe commit 395195a

6 files changed

Lines changed: 9 additions & 5 deletions

File tree

meraki/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
SUPPRESS_LOGGING, SIMULATE_API_CALLS, BE_GEO_ID, MERAKI_PYTHON_SDK_CALLER
2121
)
2222

23-
__version__ = '1.0.0b18'
23+
__version__ = '1.0.0b19'
2424

2525
class DashboardAPI(object):
2626
"""
@@ -72,7 +72,7 @@ def __init__(self, api_key=None, base_url=DEFAULT_BASE_URL, single_request_timeo
7272
self._logger.setLevel(logging.DEBUG)
7373

7474
formatter = logging.Formatter(
75-
fmt='%(name)12s: %(levelname)8s > %(message)s',
75+
fmt='%(asctime)s %(name)12s: %(levelname)8s > %(message)s',
7676
datefmt='%Y-%m-%d %H:%M:%S'
7777
)
7878

meraki/aio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(self, api_key=None, base_url=DEFAULT_BASE_URL, single_request_timeo
7272
self._logger.setLevel(logging.DEBUG)
7373

7474
formatter = logging.Formatter(
75-
fmt='%(name)12s: %(levelname)8s > %(message)s',
75+
fmt='%(asctime)s %(name)12s: %(levelname)8s > %(message)s',
7676
datefmt='%Y-%m-%d %H:%M:%S'
7777
)
7878

meraki/aio/api/organizations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ def getOrganizationInventoryDevices(self, organizationId: str, total_pages=1, di
773773
- 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.
774774
- 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.
775775
- usedState (string): Filter results by used or unused inventory. Accepted values are "used" or "unused".
776+
- search (string): Search for devices in inventory based on serial number, mac address, or model.
776777
"""
777778

778779
kwargs.update(locals())
@@ -787,7 +788,7 @@ def getOrganizationInventoryDevices(self, organizationId: str, total_pages=1, di
787788
}
788789
resource = f'/organizations/{organizationId}/inventoryDevices'
789790

790-
query_params = ['perPage', 'startingAfter', 'endingBefore', 'usedState', ]
791+
query_params = ['perPage', 'startingAfter', 'endingBefore', 'usedState', 'search', ]
791792
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
792793

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

meraki/aio/rest_session.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ async def _request(self, metadata, method, url, **kwargs):
176176
for _ in range(retries):
177177
# Make the HTTP request to the API endpoint
178178
try:
179+
self._logger.info(f'{method} {abs_url}')
179180
response = await self._req_session.request(method, abs_url, **kwargs)
180181
reason = response.reason if response.reason else None
181182
status = response.status

meraki/api/organizations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ def getOrganizationInventoryDevices(self, organizationId: str, total_pages=1, di
773773
- 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.
774774
- 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.
775775
- usedState (string): Filter results by used or unused inventory. Accepted values are "used" or "unused".
776+
- search (string): Search for devices in inventory based on serial number, mac address, or model.
776777
"""
777778

778779
kwargs.update(locals())
@@ -787,7 +788,7 @@ def getOrganizationInventoryDevices(self, organizationId: str, total_pages=1, di
787788
}
788789
resource = f'/organizations/{organizationId}/inventoryDevices'
789790

790-
query_params = ['perPage', 'startingAfter', 'endingBefore', 'usedState', ]
791+
query_params = ['perPage', 'startingAfter', 'endingBefore', 'usedState', 'search', ]
791792
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
792793

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

meraki/rest_session.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def request(self, metadata, method, url, **kwargs):
157157
try:
158158
if response:
159159
response.close()
160+
self._logger.info(f'{method} {abs_url}')
160161
response = self._req_session.request(method, abs_url, allow_redirects=False, **kwargs)
161162
reason = response.reason if response.reason else ''
162163
status = response.status_code

0 commit comments

Comments
 (0)