tcms.rpc.api.component module

tcms.rpc.api.component.create(values, rpc_context=None)[source]
RPC Component.create(values)

Create new component.

Parameters:
  • values (dict) – Field values for tcms.management.models.Component

  • rpc_context (modernrpc.core.RpcRequestContext) – Provides access to the current request, protocol, entry point name and handler instance from the rpc method

Returns:

Serialized tcms.management.models.Component object

Return type:

dict

Raises:
  • ValueError – if data validation fails

  • PermissionDenied – if missing management.add_component permission

Note

If initial_owner_id is not specified this field is set to the user issuing the RPC request!

tcms.rpc.api.component.filter(query)[source]
RPC Component.filter(query)

Search and return the resulting list of components.

Parameters:

query (dict) – Field lookups for tcms.management.models.Component

Returns:

List of serialized tcms.management.models.Component objects

Return type:

list(dict)

tcms.rpc.api.component.update(component_id, values, rpc_context=None)[source]
RPC Component.update

Update component with new values.

Parameters:
  • component_id (int) – PK of Component to be updated

  • values (dict) – Fields and values to be updated

  • rpc_context (modernrpc.core.RpcRequestContext) – Provides access to the current request, protocol, entry point name and handler instance from the rpc method

Returns:

Serialized tcms.management.models.Component object

Return type:

dict

Raises:
  • ValueError – if data validation fails

  • PermissionDenied – if missing management.change_component permission