-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
11 changed files
with
107 additions
and
123 deletions.
There are no files selected for viewing
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,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 |
---|---|---|
@@ -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,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