Skip to content

Commit

Permalink
[api] new method BugSystem.filter()
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Jan 13, 2019
1 parent 6d918ca commit 1b6882c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/source/modules/tcms.xmlrpc.api.bugsystem.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tcms.xmlrpc.api.bugsystem module
================================

.. automodule:: tcms.xmlrpc.api.bugsystem
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/modules/tcms.xmlrpc.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Submodules

tcms.xmlrpc.api.auth
tcms.xmlrpc.api.bug
tcms.xmlrpc.api.bugsystem
tcms.xmlrpc.api.build
tcms.xmlrpc.api.category
tcms.xmlrpc.api.component
Expand Down
1 change: 1 addition & 0 deletions tcms/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
'tcms.xmlrpc.api.auth',
'tcms.xmlrpc.api.bug',
'tcms.xmlrpc.api.build',
'tcms.xmlrpc.api.bugsystem',
'tcms.xmlrpc.api.category',
'tcms.xmlrpc.api.component',
'tcms.xmlrpc.api.plantype',
Expand Down
23 changes: 23 additions & 0 deletions tcms/xmlrpc/api/bugsystem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from modernrpc.core import rpc_method

from tcms.testcases.models import BugSystem


__all__ = (
'filter',
)


@rpc_method(name='BugSystem.filter')
def filter(query): # pylint: disable=redefined-builtin
"""
.. function:: XML-RPC BugSystem.filter(query)
Get list of bug systems.
:param query: Field lookups for :class:`tcms.testcases.models.BugSystem`
:type query: dict
:return: List of serialized :class:`tcms.testcases.models.BugSystem` objects.
"""
return BugSystem.to_xmlrpc(query)

0 comments on commit 1b6882c

Please sign in to comment.