/** * Get ESX jobs for this agent * * @param type $device_id deviceid of the agent runing and want job info to run * * @return $response array */ function run($taskjobstate) { $credential = new PluginFusioninventoryCredential(); $credentialip = new PluginFusioninventoryCredentialIp(); $credentialip->getFromDB($taskjobstate->fields['items_id']); $credential->getFromDB($credentialip->fields['plugin_fusioninventory_credentials_id']); $order['uuid'] = $taskjobstate->fields['uniqid']; $order['host'] = $credentialip->fields['ip']; $order['user'] = $credential->fields['username']; $order['password'] = $credential->fields['password']; return $order; }
/** * Get types of datas available to select for taskjob definition for ESX method * * @param $a_itemtype array types yet added for definitions * * @return array ('itemtype'=>'value', 'itemtype'=>'value'...) * itemtype itemtype of object * value name of the itemtype **/ static function task_definitiontype_InventoryComputerESX($a_itemtype) { $a_itemtype['PluginFusioninventoryCredentialIp'] = PluginFusioninventoryCredentialIp::getTypeName(); return $a_itemtype; }