mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
feature #476: new hook trigger on PROLOG
This commit is contained in:
parent
cefb00c9ea
commit
5e3258c6f6
@ -315,6 +315,7 @@ IMAGE_MAD = [
|
||||
# name : for the hook, useful to track the hook (OPTIONAL)
|
||||
# on : when the hook should be executed,
|
||||
# - CREATE, when the VM is created (onevm create)
|
||||
# - PROLOG, when the VM is in the prolog state
|
||||
# - RUNNING, after the VM is successfully booted
|
||||
# - SHUTDOWN, after the VM is shutdown
|
||||
# - STOP, after the VM is stopped (including VM image transfers)
|
||||
|
@ -93,6 +93,16 @@ VirtualMachinePool::VirtualMachinePool(SqlDB * db,
|
||||
|
||||
add_hook(hook);
|
||||
}
|
||||
else if ( on == "PROLOG" )
|
||||
{
|
||||
VirtualMachineStateHook * hook;
|
||||
|
||||
hook = new VirtualMachineStateHook(name, cmd, arg, remote,
|
||||
VirtualMachine::PROLOG, VirtualMachine::ACTIVE);
|
||||
add_hook(hook);
|
||||
|
||||
state_hook = true;
|
||||
}
|
||||
else if ( on == "RUNNING" )
|
||||
{
|
||||
VirtualMachineStateHook * hook;
|
||||
|
Loading…
Reference in New Issue
Block a user