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
DBUS: Add ListByAttr(attr, filter, limit) #6367
Conversation
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.
The code looks good to me but I'm missing some type of automated test, either a unit-test or an integration test.
As the original requestor of the feature, perhaps @flo-renaud may want to review this also. |
Added a test into the file you linked. |
Hi Alejandro, Did I miss something in my configuration, or command I am using?
|
The problem here is that there are two pre-existing bugs that affect this new feature as it shares the code with
I guess you need to add |
I do have this and Attached log of the failed ListByAttr lookup with "string:sn" "string:user1" "uint32:0" |
flake8 check is failing to post the result to the PR, but manually running it shows:
|
Thanks. I was looking for this information. (Good to know I can run it manually) |
Thanks! Once the flake8 issues are fixed it would be good for me. |
Extended ListByName()'s mechanics to handle an attribute passed as parameters instead of forcing "name." ListByName() will pass "name." Created a dbus function ListByAttr() using ListByName()'s mechanics but passing the attribute requested by the user. Resolves: SSSD#6020 :feature: Introduced the dbus function org.freedesktop.sssd.infopipe.Users.ListByAttr(attr, value, limit) listing upto limit users matching the filter attr=value.
Should be fixed now. Let me know if it is not the case. |
@ikerexxe In addition to the flake8 fix, I made some changes related to the problem found by @justin-stephenson . You may want to review them. |
Covscan failed due to infra failure. |
LGTM. Thanks for the patches. |
Hi, this works now but output is repeated twice. If this is acceptable and will be addressed separately then ack from my side.
|
Hi. It is one of the preexisting bugs mentioned in the description. It will be fixed at some time in the future. |
Extended ListByName()'s mechanics to handle an attribute passed as parameters instead of forcing "name". ListByName() will pass "name."
Created a dbus function ListByAttr() passing the attribute requested by the user.
Resolves: #6020
:feature: Introduced the dbus function org.freedesktop.sssd.infopupe.Users.ListByAttr(attr, value, limit) listing users matching the filter attr=value.
Please have in mind these issues below also affect this implementation as they share the mechanics with ListByName(). They have to be addressed separate from this PR.
[D-Bus] ListByName() fails when not using wildcards
[D-Bus] ListByName() returns twice the same entry