Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -61,7 +61,7 @@ class AssignIpToGuestJob implements ShouldQueue
|
||||
public readonly int $moduleVmwareId,
|
||||
public readonly string $vmId,
|
||||
public readonly string $osFamily, // VmProvisionService::OS_LINUX | OS_WINDOWS
|
||||
public readonly string $guestPassword = VmProvisionService::TEMPLATE_PASSWORD,
|
||||
public readonly string $guestPassword,
|
||||
public readonly ?int $reservationId = null,
|
||||
public readonly ?int $reservedIpPoolId = null,
|
||||
) {}
|
||||
|
||||
@@ -157,7 +157,7 @@ class RetryProvisioningOrchestrator implements ShouldQueue
|
||||
moduleVmwareId: $moduleVmware->id,
|
||||
vmId: $vmId,
|
||||
osFamily: $osFamily,
|
||||
guestPassword: $moduleVmware->plain_password ?? \App\Services\VmProvisionService::TEMPLATE_PASSWORD,
|
||||
guestPassword: $moduleVmware->plain_password ?? \App\Services\VmProvisionService::templatePassword(),
|
||||
);
|
||||
Log::info('RetryProvisioningOrchestrator: dispatched AssignIpToGuestJob', [
|
||||
'module_vmware_id' => $moduleVmware->id,
|
||||
@@ -301,8 +301,8 @@ class RetryProvisioningOrchestrator implements ShouldQueue
|
||||
'next_due_date' => $nextDueDate,
|
||||
'next_invoice' => $nextDueDate,
|
||||
'user' => 'Administrator',
|
||||
'password' => \App\Services\VmProvisionService::TEMPLATE_PASSWORD,
|
||||
'plain_password' => \App\Services\VmProvisionService::TEMPLATE_PASSWORD,
|
||||
'password' => \App\Services\VmProvisionService::templatePassword(),
|
||||
'plain_password' => \App\Services\VmProvisionService::templatePassword(),
|
||||
'hostname' => $serverName,
|
||||
'vmware_id' => $vmId,
|
||||
'vcenter_id' => $vcenterModel->id,
|
||||
|
||||
@@ -368,7 +368,7 @@ class UpdateVmConfigJob implements ShouldQueue
|
||||
$this->moduleVmwareId,
|
||||
$this->vmId,
|
||||
$this->osFamily,
|
||||
VmProvisionService::TEMPLATE_PASSWORD,
|
||||
VmProvisionService::templatePassword(),
|
||||
$this->reservationId,
|
||||
$this->reservedIpPoolId,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user