- Add is_lxc column to ext_proxmox_oses for tracking template type - OS model now has vmType() helper returning 'lxc' or 'qemu' - Install uses OS template's type for clone API path (not node type) - createServer validates OS type matches node type before provisioning - calculateNode filters nodes by LXC/KVM type based on selected OS - Reinstall OS list filtered to only show matching template types - Admin location OS repeater now has LXC Template checkbox
31 lines
543 B
PHP
31 lines
543 B
PHP
<?php
|
|
|
|
namespace Paymenter\Extensions\Servers\Proxmox\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OS extends Model
|
|
{
|
|
protected $table = 'ext_proxmox_oses';
|
|
|
|
protected $fillable = [
|
|
// Shows to customer
|
|
'name',
|
|
'vm_id',
|
|
'location_id',
|
|
'is_lxc',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_lxc' => 'boolean',
|
|
];
|
|
|
|
/**
|
|
* Get the VM type string for Proxmox API paths.
|
|
*/
|
|
public function vmType(): string
|
|
{
|
|
return $this->is_lxc ? 'lxc' : 'qemu';
|
|
}
|
|
}
|