tcms.rpc.api.product module¶
- tcms.rpc.api.product.create(values)[source]¶
- RPC Product.create(values)
Create a new Product object and store it in the database.
- Parameters:
values (dict) – Field values for
tcms.management.models.Product
- Returns:
Serialized
tcms.management.models.Product
object- Return type:
- Raises:
ValueError – if input values don’t validate
PermissionDenied – if missing management.add_product permission
- tcms.rpc.api.product.filter(query=None)[source]¶
- RPC Product.filter(query)
Perform a search and return the resulting list of products.
- Parameters:
query (dict) – Field lookups for
tcms.management.models.Product
- Returns:
Serialized list of
tcms.management.models.Product
objects- Return type:
Example:
# Get all of products named 'Red Hat Enterprise Linux 5' >>> Product.filter({'name': 'Red Hat Enterprise Linux 5'})