Refactor VM resource specs resolution and enhance order payment success email with addon summary; add UpdateVmConfigJob for CPU/RAM updates
This commit is contained in:
@@ -31,7 +31,7 @@ use Illuminate\Support\Facades\Log;
|
||||
*
|
||||
* Assigns a real static IP to the VM guest OS and verifies it is active.
|
||||
* Only persists the IP to DB (module_vmware + virtual_machines) after
|
||||
* successful guest-side verification, then dispatches ChangePasswordViaVsphereJob.
|
||||
* successful guest-side verification, then dispatches UpdateVmConfigJob → ChangePasswordViaVsphereJob.
|
||||
*
|
||||
* Flow:
|
||||
* [1] Resolve network config from order item → product → ipAddress template
|
||||
@@ -41,7 +41,7 @@ use Illuminate\Support\Facades\Log;
|
||||
* [5] On FAIL → release IP, try next
|
||||
* [6] Call verifyIPLinux.ps1 / verifyIPWindows.ps1 via SSH
|
||||
* [7] On FAIL → release IP, try next
|
||||
* [8] SUCCESS → persistIp() → dispatch ChangePasswordViaVsphereJob
|
||||
* [8] SUCCESS → persistIp() → dispatch UpdateVmConfigJob → ChangePasswordViaVsphereJob
|
||||
* [9] All attempts exhausted → mark VM inactive (status=0)
|
||||
*/
|
||||
class AssignIpToGuestJob implements ShouldQueue
|
||||
@@ -184,7 +184,7 @@ class AssignIpToGuestJob implements ShouldQueue
|
||||
'attempt' => $attempt,
|
||||
]);
|
||||
|
||||
ChangePasswordViaVsphereJob::dispatch(
|
||||
UpdateVmConfigJob::dispatch(
|
||||
$this->moduleVmwareId,
|
||||
$this->vmId,
|
||||
$this->osFamily,
|
||||
@@ -226,8 +226,8 @@ class AssignIpToGuestJob implements ShouldQueue
|
||||
'attempt' => $attempt,
|
||||
]);
|
||||
|
||||
// Dispatch password change now that IP is confirmed
|
||||
ChangePasswordViaVsphereJob::dispatch(
|
||||
// Dispatch addon config update → then password change
|
||||
UpdateVmConfigJob::dispatch(
|
||||
$this->moduleVmwareId,
|
||||
$this->vmId,
|
||||
$this->osFamily,
|
||||
|
||||
Reference in New Issue
Block a user