update assign ip windows
This commit is contained in:
@@ -258,13 +258,13 @@ class CreateVirtualMachineJob implements ShouldQueue
|
||||
]);
|
||||
|
||||
// Dispatch AssignIPJob để chạy sau 5 phút
|
||||
AssignIPJob::dispatch($vmId, $moduleVmware->id, $availableIP)
|
||||
AssignIPJob::dispatch($vmId, $moduleVmware->id, $moduleIpAddress->ip)
|
||||
->delay(now()->addMinutes(5));
|
||||
|
||||
Log::info('✅ Đã dispatch AssignIPJob để chạy sau 5 phút', [
|
||||
'vm_id' => $vmId,
|
||||
'module_vmware_id' => $moduleVmware->id,
|
||||
'assigned_ip' => $availableIP,
|
||||
'assigned_ip' => $moduleIpAddress->ip,
|
||||
'delay_minutes' => 5
|
||||
]);
|
||||
|
||||
@@ -333,6 +333,11 @@ class CreateVirtualMachineJob implements ShouldQueue
|
||||
$ipPoolList = IpPool::where('module_network_id', $networkId)
|
||||
->orderBy('ip_address')
|
||||
->get();
|
||||
|
||||
Log::info('✅ Lấy IP available từ pool', [
|
||||
'ip_pool_list' => $ipPoolList,
|
||||
'network_id' => $networkId
|
||||
]);
|
||||
|
||||
if ($ipPoolList->isEmpty()) {
|
||||
// Nếu không có IP trong pool, trả về IP default
|
||||
|
||||
Reference in New Issue
Block a user