FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: Add option to filter teams by product by divacvl · Pull Request #234 · sysdiglabs/sysdig-sdk-python · GitHub

This repository was archived by the owner on May 7, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 4 additions & 1 deletion sdcclient/_common.py
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
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,13 @@ def edit_user(self, user_email, firstName=None, lastName=None, systemRole=None):
return [False, self.lasterr]
return [True, 'Successfully edited user']

def get_teams(self, team_filter=''):
def get_teams(self, team_filter='', product_filter=''):
'''**Description**
Return the set of teams that match the filter specified. The *team_filter* should be a substring of the names of the teams to be returned.

**Arguments**
- **team_filter**: the team filter to match when returning the list of teams
- **product_filter**: the product to match when returning the list of teams (SDC-Monitor, SDS-secure)

**Success Return Value**
The teams that match the filter.
Expand All @@ -713,6 +714,8 @@ def get_teams(self, team_filter=''):
if not self._checkResponse(res):
return [False, self.lasterr]
ret = [t for t in res.json()['teams'] if team_filter in t['name']]
if product_filter:
ret = [t for t in ret if product_filter in t['products']]
return [True, ret]

def get_team(self, name):
Expand Down

Back | FazBrowse Home | New Git URL