refactor: implement centralized cache key management and add utility traits for vCenter SSH operations.
This commit is contained in:
@@ -102,7 +102,7 @@ class VPSController extends Controller
|
||||
], 400);
|
||||
}
|
||||
|
||||
$result = $this->vCenterService->restartVM($vps, $vps->vmware_id);
|
||||
$result = $this->vCenterService->StartVirtualMachine($vps, $vps->vmware_id);
|
||||
|
||||
if (is_string($result)) {
|
||||
return response()->json([
|
||||
@@ -114,7 +114,7 @@ class VPSController extends Controller
|
||||
if ($result['error'] ?? true) {
|
||||
return response()->json([
|
||||
'error' => true,
|
||||
'message' => $result['message'] ?? 'Failed to power on VM'
|
||||
'message' => $result['data'] ?? 'Failed to power on VM'
|
||||
], 400);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class VPSController extends Controller
|
||||
], 400);
|
||||
}
|
||||
|
||||
$result = $this->vCenterService->restartVM($vps, $vps->vmware_id);
|
||||
$result = $this->vCenterService->ShutdownGuestVirtualMachine($vps, $vps->vmware_id);
|
||||
|
||||
if (is_string($result)) {
|
||||
return response()->json([
|
||||
@@ -159,7 +159,7 @@ class VPSController extends Controller
|
||||
if ($result['error'] ?? true) {
|
||||
return response()->json([
|
||||
'error' => true,
|
||||
'message' => $result['message'] ?? 'Failed to power off VM'
|
||||
'message' => $result['data'] ?? 'Failed to power off VM'
|
||||
], 400);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user