freezer_dr.notifiers.common package

Submodules

freezer_dr.notifiers.common.driver module

class freezer_dr.notifiers.common.driver.NotifierBaseDriver(url, username, password, templates_dir, notify_from, admin_list=None, **kwargs)[source]

Bases: object

Used to notify admins/users at any stage that an error happened or process completed or something went wrong !

abstract notify(message)[source]

This method will be used in different places to notify admins about certain problem :param message: String message name :return:

abstract notify_status(node, status)[source]

Custom notification method. Can be used if you want to send custom notification about Tenant, Instance, or go deeper if you want :param node: Compute Host, Tenant, Instance, … :param status: Error, Success, Info :return: True, False

freezer_dr.notifiers.common.manager module

class freezer_dr.notifiers.common.manager.NotificationManager[source]

Bases: object

get_driver()[source]
notify(nodes, status)[source]

Send Notification to users added on tenants that has VMs running on the affected host. :param nodes: List of hosts that are affected, contains instances running on those hosts, tenants, users added on those tenants. :param status: success or error :return:

Module contents