action_factory
drunc.fsm.action_factory
Classes
FSMActionFactory()
Source code in drunc/fsm/action_factory.py
Functions
get_action(action_name, action_configuration)
Construct the action interface for the given action name and configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_name
|
str
|
The name of the action to construct. |
required |
configuration
|
FSMaction
|
The configuration for the action. |
required |
Returns:
| Type | Description |
|---|---|
|
An instance of the action interface corresponding to the given action name. |
Raises:
| Type | Description |
|---|---|
UnknownAction
|
If the action name is not recognized. |
InvalidAction
|
If the constructed action does not have valid pre/post transition methods. |