-
-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rpc] Rename Env RPC methods. Refs #153
Env.filter_groups -> Env.Group.filter Env.filter_properties -> Env.Property.filter Env.filter_values -> Env.Value.filter
- Loading branch information
Showing
12 changed files
with
122 additions
and
118 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tcms\.xmlrpc\.api\.env\.group module | ||
==================================== | ||
|
||
.. automodule:: tcms.xmlrpc.api.env.group | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tcms\.xmlrpc\.api\.env\.property module | ||
======================================= | ||
|
||
.. automodule:: tcms.xmlrpc.api.env.property | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains 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 |
---|---|---|
@@ -1,7 +1,17 @@ | ||
tcms\.xmlrpc\.api\.env module | ||
============================= | ||
tcms\.xmlrpc\.api\.env package | ||
============================== | ||
|
||
.. automodule:: tcms.xmlrpc.api.env | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Submodules | ||
---------- | ||
|
||
.. toctree:: | ||
|
||
tcms.xmlrpc.api.env.group | ||
tcms.xmlrpc.api.env.property | ||
tcms.xmlrpc.api.env.value | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tcms\.xmlrpc\.api\.env\.value module | ||
==================================== | ||
|
||
.. automodule:: tcms.xmlrpc.api.env.value | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" """ | ||
# Note: empty doc-string because otherwise Sphinx will not pick this up | ||
# when rendering the documentation |
This file contains 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from modernrpc.core import rpc_method | ||
|
||
from tcms.management.models import TCMSEnvGroup | ||
from tcms.xmlrpc.utils import parse_bool_value | ||
|
||
|
||
@rpc_method(name='Env.Group.filter') | ||
def filter(query): | ||
""" | ||
.. function:: XML-RPC Env.Group.filter(query) | ||
Perform a search and return the resulting list of | ||
:class:`tcms.management.models.TCMSEnvGroup` objects. | ||
:param query: Field lookups for :class:`tcms.management.models.TCMSEnvGroup` | ||
:type query: dict | ||
:returns: List of serialized :class:`tcms.management.models.TCMSEnvGroup` objects | ||
:rtype: list(dict) | ||
""" | ||
if 'is_active' in query: | ||
query['is_active'] = parse_bool_value(query['is_active']) | ||
return TCMSEnvGroup.to_xmlrpc(query) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from modernrpc.core import rpc_method | ||
|
||
from tcms.management.models import TCMSEnvProperty | ||
from tcms.xmlrpc.utils import parse_bool_value | ||
|
||
|
||
@rpc_method(name='Env.Property.filter') | ||
def filter(query): | ||
""" | ||
.. function:: XML-RPC Env.Property.filter(query) | ||
Performs a search and returns the resulting list of environment properties. | ||
:param query: Field lookups for :class:`tcms.management.models.TCMSEnvProperty` | ||
:type query: dict | ||
:returns: List of serialized :class:`tcms.management.models.TCMSEnvProperty` objects | ||
:rtype: list(dict) | ||
""" | ||
if 'is_active' in query: | ||
query['is_active'] = parse_bool_value(query['is_active']) | ||
return TCMSEnvProperty.to_xmlrpc(query) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from modernrpc.core import rpc_method | ||
|
||
from tcms.management.models import TCMSEnvValue | ||
from tcms.xmlrpc.utils import parse_bool_value | ||
|
||
|
||
@rpc_method(name='Env.Value.filter') | ||
def filter(query): | ||
""" | ||
.. function:: XML-RPC Env.Value.filter(query) | ||
Performs a search and returns the resulting list of environment values. | ||
:param query: Field lookups for :class:`tcms.management.models.TCMSEnvValue` | ||
:type query: dict | ||
:returns: List of serialized :class:`tcms.management.models.TCMSEnvValue` objects | ||
:rtype: list(dict) | ||
""" | ||
if 'is_active' in query: | ||
query['is_active'] = parse_bool_value(query['is_active']) | ||
return TCMSEnvValue.to_xmlrpc(query) |
This file contains 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