[PR#237] Properly populate urlobject with ORG KEY value in _count() function#247
Closed
abowersox-cb wants to merge 1 commit into
Closed
[PR#237] Properly populate urlobject with ORG KEY value in _count() function#247abowersox-cb wants to merge 1 commit into
abowersox-cb wants to merge 1 commit into
Conversation
llyon-cb
approved these changes
Jul 13, 2020
a66ac08 to
5477d95
Compare
5477d95 to
512b3bd
Compare
Contributor
Author
|
Closing because PR #237 was merged in, rendering this one redundant. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the ticket or issue number?
Ticket Number: https://jira.carbonblack.local/browse/CBAPI-1736
Issue Number: N/A
Original Pull Request Properly populate urlobject with ORG KEY value in _count() function #237
Pull Request Description
(From original pull request)
using .len() on ThreatHunter Event query objects throws a 403 error because the _count() function in cbapi/psc/threathunter/query.py does not populate self._doc_class.urlobject with an ORG KEY value (i.e. self._cb.credentials.org_key). This fix adds the required .format() function that inserts the ORG KEY into the urlobject.
A similar fix was added for the _perform_query() function where the url variable is assigned a properly populated urlobject value (which includes the ORG KEY value), but is then not used in the get_object() function that follows it.
Does this introduce a breaking change?
How Has This Been Tested?
Original test information in PR #237
Other information:
This had to be implemented as a new PR because the original PR bumped the CBAPI version number, a change we don't want to make until all PR changes are settled.