Skip to content

Commit 23e30e6

Browse files
author
Naor Livne
committed
adding updated filter for reports
1 parent 7aae71f commit 23e30e6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

NebulaPythonSDK/sdk.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def update_device_group(self, device_group, config):
177177

178178
# list device_group configuration
179179
def list_reports(self, page_size=10, hostname=None, device_group=None, report_creation_time_filter="gt",
180-
report_creation_time=None, last_id=None):
180+
report_creation_time=None, last_id=None, updated=None):
181181
url = self.host + "/api/" + self.API_VERSION + "/reports"
182182
headers = self.headers
183183
querystring = {
@@ -186,7 +186,8 @@ def list_reports(self, page_size=10, hostname=None, device_group=None, report_cr
186186
"device_group": device_group,
187187
"report_creation_time_filter": report_creation_time_filter,
188188
"report_creation_time": report_creation_time,
189-
"last_id": last_id
189+
"last_id": last_id,
190+
"updated": updated
190191
}
191192
response = requests.request("GET", url, headers=headers, timeout=self.request_timeout, params=querystring)
192193
filtered_response = {"status_code": response.status_code, "reply": response.json()}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__author__ = 'Naor Livne'
44
__author_email__ = 'naorlivne@gmail.com'
5-
__version__ = '2.6.1'
5+
__version__ = '2.6.2'
66

77
with open('README.md') as f:
88
long_description = f.read()

test/test_nebula_python_sdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_delete_device_group_does_not_exists(self, device_group="test_non_existi
231231

232232
def test_list_reports(self):
233233
nebula_connection_object = nebula_connection()
234-
reply = nebula_connection_object.list_reports(hostname="test_non_existing_hostname",
234+
reply = nebula_connection_object.list_reports(hostname="test_non_existing_hostname", updated=None,
235235
device_group="test_non_existing_device_group",
236236
report_creation_time=123, report_creation_time_filter="eq")
237237
self.assertEqual(reply["status_code"], 200)

0 commit comments

Comments
 (0)