- Introduced `ip` and `dns` columns to the `module_vmware` table to store assigned IP addresses and DNS configurations. - Implemented `ChangePasswordViaSshJob` for secure password changes via SSH. - Created `ChangePasswordJob` for handling password changes during VM provisioning. - Developed `ChangePasswordViaVsphereJob` to reset VM guest OS passwords using PowerShell scripts executed on the vSphere host. - Added `SendVmCredentialsEmailJob` to send final VM credentials to customers. - Implemented `WaitVmReadyJob` to poll vSphere API until VMware Tools are running and guest IP is available. - Created `VmProvisionService` for managing VM provisioning tasks, including password generation and updates. - Developed `VsphereHostSshService` for executing PowerShell scripts on the vSphere host via SSH. - Added `IpPoolSeeder` to populate IP pools for VM service initialization.
35 lines
720 B
PHP
35 lines
720 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ModuleNetwork extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'module_network';
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'type',
|
|
'network',
|
|
'module_host_id'
|
|
];
|
|
|
|
public function host()
|
|
{
|
|
return $this->belongsTo(\App\Models\ModuleHost::class,'module_host_id','id');
|
|
}
|
|
public function ipAddresses()
|
|
{
|
|
return $this->hasMany(\App\Models\ModuleIpAddress::class, 'module_network_id');
|
|
}
|
|
|
|
public function ipPools()
|
|
{
|
|
return $this->hasMany(\App\Models\IpPool::class, 'module_network_id');
|
|
}
|
|
}
|