#ifndef _PARALLEL_HOST_H_ #define _PARALLEL_HOST_H_ #include #ifdef WIN32 #include #include #include #include #endif class host; class CParallelHost { public: CParallelHost(){} ~CParallelHost(); CParallelHost(CLIHandler*, outputHandler*, string, outputHandler*, string, string, int); CParallelHost(CLIHandler* cHandle, outputHandler* oHandle, string hostIP, outputHandler* coHandle, string threadId, int iter); void ProcessParallelCommands(boost::barrier*, presetMetaData*); void ProcessCommand(boost::barrier*, presetMetaData*); connectionHandler* getConnectionHandler(); void SetHostPtr(host* pHostPtr); void SetHostType(int hostType); protected: private: bool GetInterfaceInformation(boost::barrier *parThreadBar, presetMetaData *pMetaData); void checkCommandOutput(string, string); string generateTimeStamp(); void ProcessParallelCommand(presetMetaData presetInfo, string fileName); void ProcessParallelPresetCommand(boost::barrier *parThreadBar, presetMetaData *pPresetInfo); bool GetLinuxInterfaceInfo(boost::barrier *parThreadBar, presetMetaData *pMetaData, bool bEsx = false); bool GetSunOSInterfaceInfo(boost::barrier *parThreadBar, presetMetaData *pMetaData); bool GetAIXInterfaceInformation(boost::barrier *parThreadBar, presetMetaData *pMetaData); bool GetESXInterfaceInfo(boost::barrier *parThreadBar, presetMetaData *pMetaData); bool SendCmdAndGetOutput(string strCmd, vector* vec_strDrivers, ofstream* pFilePtr = NULL); // Repeated from CHost..Have a look bool ProcessThruRSH(string strCmd, string fileName, bool bWriteToVec, vector* vec_strFileData, bool bWriteToTemp, ofstream* pFilePtr); static boost::mutex mutex_parallel_Host; connectionHandler* pconnectionHandle; outputHandler* pcommonOutputHandle; outputHandler* poutputHandle; CLIHandler* pcHandle; ofstream* tempFilePtr; string strPassWord; string strHostIP; string pFileID; string strSarPath; string strIOPath; int iterationNum; string m_strHostType; host* m_pHost; int m_HostType; CkSshKey *m_pSSHKey; }; #endif