backend.vm_manage.event_handle

class backend.vm_manage.event_handle.Recycle(terminator, recycle_period, *args, **kwargs)[source]

Cleanup vmm services, now only terminator :param vmm: :return:

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

terminate()[source]
class backend.vm_manage.event_handle.EventHandler(opts, vmm, terminator)[source]
post_init()[source]
on_health_check_result(msg)[source]
on_vm_spawned(msg)[source]
on_vm_termination_request(msg)[source]
on_vm_termination_result(msg)[source]
run()[source]

Method to be run in sub-process; can be overridden in sub-class

terminate()[source]

Terminate process; sends SIGTERM signal or uses TerminateProcess()

start_listen()[source]

Listens redis pubsub and perform requested actions. Message payload is packed in json, it should be a dictionary

at the root level with reserved field topic which is required for message routing