storm.engine package

Module contents

Engine module.

class storm.engine.Engine(state_res, event_queue=None, task_executor=<concurrent.futures.thread.ThreadPoolExecutor object>)

Bases: object

The 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:
  • name (string) – The name of the platform to be dismissed.
  • destroy (bool) – If the platform must be destroyed.
Return type:

EngineTask

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:
Return type:

EngineTask

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:
  • name (string) – The name of the registered platform.
  • prov (string) – The provider name which implements the registered platform.
  • props (dict) – Optional properties dictionary.
Return type:

EngineTask

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:
Return type:

EngineTask

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: Exception

Engine task cancellation.

Submodules

storm.engine.image module

class storm.engine.image.Image(data_res, props)

Bases: object

definition
extends
ref
class storm.engine.image.ImageCommand(cmd_data)

Bases: object

args
class storm.engine.image.ImageDef(res_parent, def_data)

Bases: object

execution
provision
resources
class storm.engine.image.ImageRef(ref_data)

Bases: object

name
version
class storm.engine.image.ImageResource(res_parent, res_data)

Bases: object

properties
source_res
target

storm.engine.layout module

class storm.engine.layout.Container(config)

Bases: object

class storm.engine.layout.Layout(data_res, props)

Bases: object

destroy()