/* -------------------------------------------------------------------------- */ /* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ /* */ /* 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 HOOK_MANAGER_DRIVER_H_ #define HOOK_MANAGER_DRIVER_H_ #include #include #include #include "Mad.h" #include "VirtualMachinePool.h" #include "HookLog.h" using namespace std; /** * HookManagerDriver provides a base class to implement Hook (Execution) * Drivers. This class implements the protocol and recover functions * from the Mad interface. This class may be used to further specialize * the Execution driver. */ class HookManagerDriver : public Mad { public: HookManagerDriver( int userid, const map& attrs, bool sudo) : Mad(userid,attrs,sudo) {}; virtual ~HookManagerDriver(){}; /** * Implements the Hook driver protocol. * @param message the string read from the driver */ void protocol(const string& message) const; /** * TODO: What do we need here? just poll the Hosts to recover.. */ void recover(); /**