vmshepherd.runtime package

Submodules

vmshepherd.runtime.abstract module

Runtime manager or runtime data storage stores intermediate states of VmShepherd cycles that need to be shared across multiple instances of application like:
  • healthchecks status,
  • try counts
  • time and dates of last manage

and locking mechanism.

The locking mechanism guarantees a preset is managed by one instance at a time.

Initialization - consider following config:

runtime:
  driver: SomeHC
  param1: AAAA
  param2: BBBB
  some_x: CCC

All params will be passed as config dict to the driver init:

class vmshepherd.runtime.abstract.AbstractRuntimeData(instance_id, config=None)[source]

Bases: object

acquire_lock(name)[source]
get_preset_data(name)[source]
reconfigure(config)[source]
release_lock(name)[source]
set_preset_data(name, data)[source]
class vmshepherd.runtime.abstract.Data(d)[source]

Bases: object

dump()[source]

vmshepherd.runtime.inmemory_driver module

class vmshepherd.runtime.inmemory_driver.InMemoryDriver(instance_id, config=None)[source]

Bases: vmshepherd.runtime.abstract.AbstractRuntimeData

Simple in-memory driver for runtime data and locks managment.

Module contents