Updated ogrepo sync funcionality
testing/ogcore-api/pipeline/head This commit looks good Details

pull/26/head
Manuel Aranda Rosales 2025-03-19 16:49:31 +01:00
parent 2f813099c5
commit a06a0998f9
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@ namespace App\Controller\OgRepository\Image;
use App\Controller\OgRepository\AbstractOgRepositoryController; use App\Controller\OgRepository\AbstractOgRepositoryController;
use App\Dto\Input\BackupImageInput; use App\Dto\Input\BackupImageInput;
use App\Dto\Input\ConvertImageToVirtualInput;
use App\Entity\ImageImageRepository; use App\Entity\ImageImageRepository;
use App\Model\CommandTypes; use App\Model\CommandTypes;
use App\Model\ImageStatus; use App\Model\ImageStatus;
@ -26,7 +27,7 @@ class ConvertImageToVirtualAction extends AbstractOgRepositoryController
* @throws RedirectionExceptionInterface * @throws RedirectionExceptionInterface
* @throws ClientExceptionInterface * @throws ClientExceptionInterface
*/ */
public function __invoke(ConvertImageToVirtualAction $input, ImageImageRepository $imageImageRepository): JsonResponse public function __invoke(ConvertImageToVirtualInput $input, ImageImageRepository $imageImageRepository): JsonResponse
{ {
$image = $imageImageRepository->getImage(); $image = $imageImageRepository->getImage();
@ -37,7 +38,7 @@ class ConvertImageToVirtualAction extends AbstractOgRepositoryController
$params = [ $params = [
'json' => [ 'json' => [
'ID_img' => $imageImageRepository->getImageFullsum(), 'ID_img' => $imageImageRepository->getImageFullsum(),
'vm_extension' => 'opengnsys' 'vm_extension' => $input->extension,
] ]
]; ];

View File

@ -37,7 +37,8 @@ class ResponseController extends AbstractOgRepositoryController
str_starts_with($action, "CreateAuxiliarFiles_") => $this->handleImageRepositoryAction($data, true), str_starts_with($action, "CreateAuxiliarFiles_") => $this->handleImageRepositoryAction($data, true),
str_starts_with($action, "TransferImage_"), str_starts_with($action, "ExportImage_") => $this->processImageAction($data), str_starts_with($action, "TransferImage_"), str_starts_with($action, "ExportImage_") => $this->processImageAction($data),
str_starts_with($action, "BackupImage_") => $this->handleImageRepositoryAction($data), str_starts_with($action, "BackupImage_") => $this->handleImageRepositoryAction($data),
str_starts_with($action, "ConvertImage_") => $this->handleImageRepositoryAction($data), str_starts_with($action, "ConvertImageToVirtual") => $this->handleImageRepositoryAction($data),
str_starts_with($action, "ConvertImageFromVirtual") => $this->handleImageRepositoryAction($data),
default => $this->jsonResponseError('Invalid action', Response::HTTP_BAD_REQUEST), default => $this->jsonResponseError('Invalid action', Response::HTTP_BAD_REQUEST),
}; };
} }