storm.engine package¶
Module contents¶
Engine module.
-
class
storm.engine.Engine(state_res, event_queue=None, task_executor=<concurrent.futures.thread.ThreadPoolExecutor object>)¶ Bases:
objectThe engine of the management tool.
Parameters: - state_res (Resource) – Resource holding the state of the engine.
- event_queue (EngineEventQueue) – Event queue used for dispatching engine task events.
- task_executor (TaskExecutor) – Executor used to run executor tasks.
-
dismiss(name, destroy=False)¶ Dismiss a registered platform.
Parameters: Return type: Returns: The task running the dismiss process.
Raises Exception: If the platform with the given name does not exist.
-
emerge(layout)¶ Try to do layout to be in the given state accross platforms.
Parameters: layout (storm.engine.layout.Layout) – The layout to be put into construction. Return type: EngineTask Returns: The task running the emerge process.
-
offer(name, image)¶ Build and publish the given image to the given platform.
Parameters: - name (string) – Name of the platform.
- image (storm.engine.image.Image) – The image to be built and published.
Return type: Returns: The task running the offer process.
Raises Exception: If the platform with the given name does not exist.
-
platforms()¶ Returns a dictionary containing name/provider entries.
Return type: EngineTask Returns: The task running the platforms process.
-
register(name, prov, props=None)¶ Register a new platform with the given name implemented by the given provider.
Parameters: Return type: Returns: The task running the registration process.
Raises Exception: If a platform with the given name already exists.
-
retire(name, image)¶ Remove and unpublish the given image from the given platform.
Parameters: - name (string) – Name of the platform.
- image (storm.engine.image.Image) – The image to be removed and unpublished.
Return type: Returns: The task running the retire process.
Raises Exception: If the platform with the given name does not exist.
-
store()¶ Store the current engine state to the state resource.
-
watch(name)¶ Requests the state of some platform.
Parameters: name (string) – The name of the platform that will give its state. Return type: EngineTask Returns: The task running the watch process. Raises Exception: If the platform with the given name does not exist.
-
exception
storm.engine.EngineTaskCancelled¶ Bases:
ExceptionEngine task cancellation.