update fix deadcode, security
This commit is contained in:
@@ -129,14 +129,6 @@ class vCenter
|
||||
{
|
||||
return $this->template->getAllTemplate();
|
||||
}
|
||||
public function getAllVersion($library = ''): bool|array|string
|
||||
{
|
||||
return $this->template->getAllVersion($library);
|
||||
}
|
||||
public function getTemplateFromDatastore($datastore = '')
|
||||
{
|
||||
return $this->template->getTemplateFromDatastore($datastore);
|
||||
}
|
||||
|
||||
// ─── VM Lifecycle ─────────────────────────────────────────────────────────
|
||||
|
||||
@@ -148,10 +140,6 @@ class vCenter
|
||||
{
|
||||
return $this->vm->findVirtualMachineByName($vmName);
|
||||
}
|
||||
public function FindVirtualMachine($name = ''): string|bool
|
||||
{
|
||||
return $this->vm->FindVirtualMachine($name);
|
||||
}
|
||||
public function CreateVirtualMachine($product_data): array|string
|
||||
{
|
||||
return $this->vm->CreateVirtualMachine($product_data);
|
||||
@@ -168,22 +156,10 @@ class vCenter
|
||||
{
|
||||
return $this->vm->GetIPAddressVirtualMachine($vmware_id);
|
||||
}
|
||||
public function GetNetworkVirtualMachine($vmware_id = ''): array
|
||||
{
|
||||
return $this->vm->GetNetworkVirtualMachine($vmware_id);
|
||||
}
|
||||
public function ConfigNetworkVirtualMachine($vmware_id = '', $config = []): int
|
||||
{
|
||||
return $this->vm->ConfigNetworkVirtualMachine($vmware_id, $config);
|
||||
}
|
||||
public function GetVMStats($vmware_id = ''): array
|
||||
{
|
||||
return $this->vm->GetVMStats($vmware_id);
|
||||
}
|
||||
public function reBuildVPS(string $vmName): array|string
|
||||
{
|
||||
return $this->vm->reBuildVPS($vmName);
|
||||
}
|
||||
public function UpgradeMemoryVirtualMachine($vmware_id = '', $ram = 0): array|string
|
||||
{
|
||||
return $this->vm->UpgradeMemoryVirtualMachine($vmware_id, $ram);
|
||||
@@ -254,21 +230,6 @@ class vCenter
|
||||
{
|
||||
return $this->snapshot->RevertSnapShot($product, $snap);
|
||||
}
|
||||
|
||||
// ─── VM OS Configuration ─────────────────────────────────────────────────
|
||||
|
||||
public function ConfigVirtualMachineUbuntu($vmware_id = '', $product = null, $password = ''): void
|
||||
{
|
||||
$this->vmConfig->ConfigVirtualMachineUbuntu($vmware_id, $product, $password);
|
||||
}
|
||||
public function ConfigCentOSVersion8($vmware_id = '', $product = [], $password = ''): void
|
||||
{
|
||||
$this->vmConfig->ConfigCentOSVersion8($vmware_id, $product, $password);
|
||||
}
|
||||
public function ConfigCentOSVersion7($vmware_id = '', $product = [], $password = ''): void
|
||||
{
|
||||
$this->vmConfig->ConfigCentOSVersion7($vmware_id, $product, $password);
|
||||
}
|
||||
public function ConfigWindowsVersion10($vmware_id = '', $product = [], $password = ''): void
|
||||
{
|
||||
$this->vmConfig->ConfigWindowsVersion10($vmware_id, $product, $password);
|
||||
@@ -286,18 +247,6 @@ class vCenter
|
||||
$this->vmConfig->ConfigRockyLinuxVersion9($vmware_id, $product, $password);
|
||||
}
|
||||
|
||||
// ─── Credentials & PowerShell ────────────────────────────────────────────
|
||||
|
||||
public function resetGuestPasswordViaPs1(
|
||||
string $vmName,
|
||||
string $guestUser,
|
||||
string $guestPassword,
|
||||
string $newPassword,
|
||||
string $targetUser = 'Administrator',
|
||||
): array|string {
|
||||
return $this->shell->resetGuestPasswordViaPs1($vmName, $guestUser, $guestPassword, $newPassword, $targetUser);
|
||||
}
|
||||
|
||||
public function changeRDPPortWindows(
|
||||
string $vmName,
|
||||
string $guestUser,
|
||||
@@ -330,9 +279,4 @@ class vCenter
|
||||
$hostname,
|
||||
);
|
||||
}
|
||||
|
||||
public function getWindowsRdpPort(string $vmwareId, string $guestUser, string $guestPassword): ?int
|
||||
{
|
||||
return $this->shell->getWindowsRdpPort($vmwareId, $guestUser, $guestPassword);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user