wei.core.interfaces.rest_interface
Handling REST execution for steps in the RPL-SDL efforts
- pydantic model wei.core.interfaces.rest_interface.RestInterface
Basic Interface for interacting with WEI modules using REST
Show JSON schema
{ "title": "RestInterface", "description": "Basic Interface for interacting with WEI modules using REST", "type": "object", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- static config_validator(config: Dict[str, Any]) bool
Validates the configuration for the interface
- Parameters:
config (Dict) – The configuration for the module
- Returns:
bool – Whether the configuration is valid or not
- static get_resources(module: Module, **kwargs: Any) Any
Gets the resources information from the node
- static send_action(step: Step, module: Module, **kwargs: Any) Tuple[StepStatus, str, str]
Executes a single step from a workflow using a REST API
- Parameters:
step (Step) – A single step from a workflow definition
- Returns:
action_response (str) – A status of the step (in theory provides async support with IDLE, RUNNING, but for now is just SUCCEEDED/FAILED)
action_msg (str) – the data or information returned from running the step.
action_log (str) – A record of the execution of the step