get_log_messages console REST API function, other enhancements#391
get_log_messages console REST API function, other enhancements#391KUGDev wants to merge 3 commits into
Conversation
45c9b39 to
e521abf
Compare
… status query parameters to list_jobs, corrected members parsing, list_members enhancement Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
e521abf to
eb3675a
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #391 +/- ##
==========================================
+ Coverage 82.13% 83.10% +0.97%
==========================================
Files 49 49
Lines 2916 3055 +139
==========================================
+ Hits 2395 2539 +144
+ Misses 521 516 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
zFernand0
left a comment
There was a problem hiding this comment.
Changes are looking good.
I still have to do some more testing, and I may have more comments later on, but so far so good.
I do have a few small requests 🙏
| def __init__(self, response: dict[str, Any]) -> None: | ||
| for raw_key, value in response.items(): | ||
| key = to_snake_case(raw_key) | ||
| super().__setattr__(key, value) |
There was a problem hiding this comment.
Shouldn't we be calling setattr inside the for loop?
| super().__setattr__(key, value) | |
| super().__setattr__(key, value) |
I could be mistaken, but it seems that only the last property will get set 😅
There was a problem hiding this comment.
Yes, good catch, fixed!
|
|
||
| @mock.patch("logging.Logger.error") | ||
| @mock.patch("requests.Session.send") | ||
| def test_create_data_set_po_empty_dirblk(self, mock_send_request, mock_logger_error: mock.MagicMock): |
There was a problem hiding this comment.
This seems to be duplicated down in line 67
Should this one be renamed to test_create_data_set_po_zero_dirblk? (or something similar?)
There was a problem hiding this comment.
Looks like I mistakenly copied this one, removed in the latest commit
Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
What It Does
Added get_log_messages console REST API function, added exec-data and status query parameters to list_jobs, corrected members parsing, list_members enhancement
How to Test
Use
Console.get_log_messagesto get messages from SYSLOG/OPERLOG.Use
fetch_exec_data=Trueflag withJobs.list_jobsto fetchexec-datawith the list of jobs.User
status='ACTIVE'flag withJobs.list_jobsto fetch jobs that are active at the moment.Review Checklist
I certify that I have:
Additional Comments