예제 #1
0
def leader_settings_changed():
    dlog("noop (leader-elected) called")
예제 #2
0
def noop():
    dlog("noop (stop) called")
    pass
예제 #3
0
def storage_backend_remove(rel_id=None):
    dlog("storage_backend_remove called")
    status_set("maintenance", "Removing Datera Driver")
    _remove()
예제 #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")
예제 #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")