Add datastore_id to OS model and related functionality; update validation and relationships

This commit is contained in:
baodev0
2026-07-21 11:10:45 +07:00
parent c3b5417b19
commit 2d43e95855
9 changed files with 69 additions and 15 deletions
@@ -123,6 +123,7 @@ class CreateVirtualMachineJob implements ShouldQueue
'product_id' => $product->id,
'template' => $infra->template,
'host_id' => $infra->host->id,
'datastore_id' => $infra->datastore?->id,
'vcenter_id' => $infra->vcenter->id,
]);
@@ -133,6 +134,7 @@ class CreateVirtualMachineJob implements ShouldQueue
'vcenter' => $infra->vcenter,
'template' => $infra->template,
'addon' => $addonData,
'datastore' => $infra->datastore,
]);
if (is_array($result) && ($result['error'] ?? false)) {