From 2d279880c93137258d9f548925ccdcd8428ba01f Mon Sep 17 00:00:00 2001 From: "Mr. Senko" Date: Fri, 26 Jan 2018 15:13:05 +0200 Subject: [PATCH] [rpc] Remove Product.get and Product.check_product. Refs #153 replace these methods with Product.filter() method --- tcms/xmlrpc/api/product.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/tcms/xmlrpc/api/product.py b/tcms/xmlrpc/api/product.py index bd4304e3c7..63dc4bc8da 100644 --- a/tcms/xmlrpc/api/product.py +++ b/tcms/xmlrpc/api/product.py @@ -14,12 +14,10 @@ __all__ = ( 'check_category', 'check_component', - 'check_product', 'filter', 'filter_categories', 'filter_components', 'filter_versions', - 'get', 'get_builds', 'get_cases', 'get_categories', @@ -79,27 +77,6 @@ def check_component(name, product): return Component.objects.get(name=name, product=p).serialize() -@rpc_method(name='Product.check_product') -def check_product(name): - """ - Description: Looks up and returns a validated product. - - Params: $name - Integer/String - Integer: product_id of the product in the Database - String: Product name - - Returns: Hash: Matching Product object hash or error if not found. - - Example: - # Get with product ID - >>> Product.check_product(61) - # Get with product name - >>> Product.check_product('Red Hat Enterprise Linux 5') - """ - p = pre_check_product(values=name) - return p.serialize() - - @rpc_method(name='Product.filter') def filter(query): """ @@ -219,21 +196,6 @@ def filter_versions(query): return Version.to_xmlrpc(query) -@rpc_method(name='Product.get') -def get(id): - """ - Description: Used to load an existing product from the database. - - Params: $id - An integer representing the ID in the database - - Returns: A blessed TCMS Product object hash - - Example: - >>> Product.get(61) - """ - return Product.objects.get(id=int(id)).serialize() - - @rpc_method(name='Product.get_builds') def get_builds(product, is_active=True): """