carbonblack / cbapi-python

Carbon Black API - Python language bindings
Other
147 stars 86 forks source link

CB-38082: Fix order for paginated sensor search #308

Closed zacharyestep closed 2 years ago

zacharyestep commented 2 years ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Bugfix/issue

Please check the type of change your PR introduces:

What is the ticket or issue number?

cb-38082

Pull Request Description

One line change to change the sort order for EDR sensor searches from 'last_checkin_time' (default when none provided explicitly) to 'hostname' to make the sort stable as sensors checkin during paging

Does this introduce a breaking change?

How Has This Been Tested?

Manual testing

`from cbapi.response import CbResponseAPI, Sensor import logging logging.basicConfig(level=logging.DEBUG)

cb=CbResponseAPI() cb_sensors = cb.select(Sensor).all() sensors = list(cb_sensors) `

Other information: