hub: document listChannels arguments
Describe the arguments and return value for the listChannels() method.
This commit is contained in:
parent
40d205b73f
commit
993be46a4c
1 changed files with 14 additions and 2 deletions
|
|
@ -5430,8 +5430,20 @@ def get_buildroot(buildrootID, strict=False):
|
|||
|
||||
|
||||
def list_channels(hostID=None, event=None):
|
||||
"""List channels. If hostID is specified, only list
|
||||
channels associated with the host with that ID."""
|
||||
"""
|
||||
List builder channels.
|
||||
|
||||
:param hostID: Koji builder host ID or hostname. If specified, Koji will
|
||||
return only the channels associated with this builder host.
|
||||
If unspecified, Koji will return all channels.
|
||||
:type hostID: int or str
|
||||
:param int event: The event ID at which to search. If unspecified, the
|
||||
default behavior is to search for the "active" host
|
||||
settings. You must specify a hostID parameter with this
|
||||
option.
|
||||
:returns: list of dicts, one per channel. For example,
|
||||
[{'id': 20, 'name': 'container'}]
|
||||
"""
|
||||
fields = {'channels.id': 'id', 'channels.name': 'name'}
|
||||
columns, aliases = zip(*fields.items())
|
||||
if hostID:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue