nopasaran.primitives.action_primitives.https_1_response_primitives.HTTPS1ResponsePrimitives¶
- class nopasaran.primitives.action_primitives.https_1_response_primitives.HTTPS1ResponsePrimitives¶
Bases:
objectClass containing HTTPS/1.1 server action primitives for the state machine.
- __init__()¶
Methods
__init__()add_https_1_route(inputs, outputs, state_machine)Add a route to the HTTPS server.
close_https_1_server(inputs, outputs, ...)Close the HTTPS server.
create_https_1_server(inputs, outputs, ...)Create an instance of HTTPS1SocketServer and store it in an output variable in the machine’s state.
generate_https_1_certificate(inputs, ...)Generate a self-signed certificate for the HTTPS server using the provided identifier.
start_https_1_server(inputs, outputs, ...)Start the HTTPS server.
wait_for_https_1_request(inputs, outputs, ...)Wait for an HTTPS request.
- static add_https_1_route(inputs, outputs, state_machine)¶
Add a route to the HTTPS server.
Number of input arguments: 2
Number of output arguments: 0
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the HTTPS1SocketServer instance.
The name of the variable containing the dictionary or list with route parameters.
outputs (List[str]): The list of output variable names. No output arguments for this method.
state_machine: The state machine object.
- Returns:
None
- static close_https_1_server(inputs, outputs, state_machine)¶
Close the HTTPS server.
Number of input arguments: 1
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains one mandatory input argument:
The name of the variable containing the HTTPS1SocketServer instance.
- outputs (List[str]): The list of output variable names. It contains one output argument:
The name of the variable to store the event name.
state_machine: The state machine object.
- Returns:
None
- static create_https_1_server(inputs, outputs, state_machine)¶
Create an instance of HTTPS1SocketServer and store it in an output variable in the machine’s state.
Number of input arguments: 0
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- outputs (List[str]): The list of output variable names. It contains one mandatory output argument,
which is the name of the variable to store the created HTTPS1SocketServer instance.
state_machine: The state machine object.
- Returns:
None
- static generate_https_1_certificate(inputs, outputs, state_machine)¶
Generate a self-signed certificate for the HTTPS server using the provided identifier.
Number of input arguments: 2
Number of output arguments: 0
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the HTTPS1SocketServer instance.
The name of the variable containing the identifier (e.g., common name or IP address) to use in the certificate.
outputs (List[str]): The list of output variable names. No output arguments for this method.
state_machine: The state machine object.
- Returns:
None
- static start_https_1_server(inputs, outputs, state_machine)¶
Start the HTTPS server.
Number of input arguments: 3
Number of output arguments: 2
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains three mandatory input arguments:
The name of the variable containing the HTTPS1SocketServer instance.
The name of the variable containing the host.
The name of the variable containing the port.
- outputs (List[str]): The list of output variable names. It contains two output arguments:
The name of the variable to store the event name.
The name of the variable to store the message.
state_machine: The state machine object.
- Returns:
None
- static wait_for_https_1_request(inputs, outputs, state_machine)¶
Wait for an HTTPS request.
Number of input arguments: 3
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains three mandatory input arguments:
The name of the variable containing the HTTPS1SocketServer instance.
The name of the variable containing the port.
The name of the variable containing the timeout duration.
- outputs (List[str]): The list of output variable names. It contains one output argument:
The name of the variable to store the received request data.
state_machine: The state machine object.
- Returns:
None