-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CBAPI-5258: Implement audit log search API #500
Conversation
src/cbc_sdk/platform/audit.py
Outdated
@staticmethod | ||
def _create_valid_time_filter(kwargs): | ||
""" | ||
Verifies that an alert criteria key has the timerange functionality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alert criteria
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's why this was still only a draft PR, because I wanted one more chance to go over all the docstrings. :)
src/cbc_sdk/platform/__init__.py
Outdated
from cbc_sdk.platform.audit import AuditLog | ||
from cbc_sdk.platform.audit import AuditLogRecord | ||
|
||
from cbc_sdk.platform.audit import AuditLogRecord as AuditLog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to rename this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the name of the class is misleading; it was AuditLog
but it really represents a single record in the audit log, hence, AuditLogRecord
. The old name must be kept around, however, for backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AuditLog is both plural and singular. It is an Audit Log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, you're saying that the class shouldn't be renamed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I am suggesting we don't rename the class unless we have a functional reason why we need a different name
@@ -39,3 +67,275 @@ def get_auditlogs(cb): | |||
""" | |||
res = cb.get_object("/integrationServices/v3/auditlogs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a plan to replace this with _queue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be story CBAPI-5259.
Pull request checklist
Please check if your PR fulfills the following requirements:
What is the ticket or issue number?
https://jira.carbonblack.local/browse/CBAPI-5258
Pull Request Description
Implemented audit log search by using a query object in the standard pattern. Query object supports standard criteria and exclusions and async queries.
Does this introduce a breaking change?
How Has This Been Tested?
Unit tests have been written; test coverage at 97%.