Files
one/include/VirtualMachineHook.h
T
Rubén S. Montero ba0856229c #15 : Added driver wrapper. Driver files in install program. Added the
HookManager and HookManagerDriver. Included the Hook driver in conf file


git-svn-id: http://svn.opennebula.org/one/trunk@453 3034c82b-c49b-4eb3-8279-a7acafdc01c0
2009-04-03 23:34:33 +00:00

58 lines
2.4 KiB
C++

/* -------------------------------------------------------------------------- */
/* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
/* not use this file except in compliance with the License. You may obtain */
/* a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
#ifndef VIRTUAL_MACHINE_HOOK_H_
#define VIRTUAL_MACHINE_HOOK_H_
#include <vector>
#include <string>
#include "Hook.h"
using namespace std;
/**
* This class is general VM Allocate Hook that executes a command locally
* when the VM is inserted in the database. The VirtualMachine object is
* looked
*/
class VirtualMachineAllocateHook : public Hook
{
public:
// -------------------------------------------------------------------------
// Init a LOCAL hook of ALLOCATE type
// -------------------------------------------------------------------------
VirtualMachineAllocateHook(const string& name,
const string& cmd,
const string& args):
Hook(name, cmd, args, Hook::ALLOCATE, false){};
virtual ~VirtualMachineAllocateHook(){};
// -------------------------------------------------------------------------
// Hook methods
// -------------------------------------------------------------------------
bool check_hook(void *arg)
{
return true;
}
void do_hook(void *arg);
};
#endif