Skip to content
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

feat(helper.py): Add promisc to subscribe_filters #2792

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions kernelci/api/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@
"""API object"""
return self._api

def subscribe_filters(self, filters=None, channel='node'):
def subscribe_filters(self, filters=None, channel='node',
promiscuous=False):
"""Subscribe to a channel with some added filters"""
sub_id = self.api.subscribe(channel)
sub_id = self.api.subscribe(channel, promiscuous)
self._filters[sub_id] = filters
return sub_id

Expand Down Expand Up @@ -192,7 +193,7 @@

return True

def _extract_combos(self, rules, key):

Check warning on line 196 in kernelci/api/helper.py

View workflow job for this annotation

GitHub Actions / Lint

Method could be a function
"""
Process tree/branch rules and extract "combo" values.

Expand Down Expand Up @@ -234,7 +235,7 @@

return (allow, allow_combos, deny, deny_combos)

def _match_combos(self, node, combos):

Check warning on line 238 in kernelci/api/helper.py

View workflow job for this annotation

GitHub Actions / Lint

Method could be a function
"""
Check whether the current node's tree/branch attributes match one of the
combinations present in combos.
Expand Down