Ejemplo n.º 1
0
def leader_settings_changed():
    dlog("noop (leader-elected) called")
Ejemplo n.º 2
0
def noop():
    dlog("noop (stop) called")
    pass
Ejemplo n.º 3
0
def storage_backend_remove(rel_id=None):
    dlog("storage_backend_remove called")
    status_set("maintenance", "Removing Datera Driver")
    _remove()
Ejemplo n.º 4
0
def install():
    dlog("Install called")
    status_set("maintenance", "Installing Datera Driver")
    _install()
    application_version_set(get_version())
    status_set("maintenance", "Datera Driver installation finished")
Ejemplo n.º 5
0
    status_set("maintenance", "Removing Datera Driver")
    _remove()


@hooks.hook('start')
def install():
    dlog("Install called")
    status_set("maintenance", "Installing Datera Driver")
    _install()
    application_version_set(get_version())
    status_set("maintenance", "Datera Driver installation finished")


@hooks.hook('stop')
def noop():
    dlog("noop (stop) called")
    pass


if __name__ == '__main__':
    try:
        hooks.execute(sys.argv)
    except UnregisteredHookError as e:
        dlog('Unknown hook {} - skipping.'.format(e))


# Leader hooks must be wired up.
@hooks.hook('leader-elected', 'leader-settings-changed')
def leader_settings_changed():
    dlog("noop (leader-elected) called")