partition->getEntity(); $inputData = [ 'method' => $input->method, 'client' => $input->client->getEntity()->getUuid(), 'image' => $image->getUuid(), 'p2pMode' => $input->p2pMode, 'p2pTime' => $input->p2pTime, 'mcastIp' => $input->mcastIp, 'mcastPort' => $input->mcastPort, 'mcastSpeed' => $input->mcastSpeed, 'mcastMode' => $input->mcastMode, 'numDisk' => (string) $partition->getDiskNumber(), 'numPartition' => (string) $partition->getPartitionNumber(), ]; switch ($input->method){ case DeployMethodTypes::UNICAST: $agentJobId = $this->deployImageOgAgentAction->__invoke($image, $input, DeployMethodTypes::UNICAST); $this->createService->__invoke($input->client->getEntity(), CommandTypes::DEPLOY_IMAGE, TraceStatus::IN_PROGRESS, $agentJobId, $inputData); break; case DeployMethodTypes::MULTICAST: $agentJobId = $this->deployImageOgAgentAction->__invoke($image, $input, DeployMethodTypes::MULTICAST); $this->createService->__invoke($image->getClient(), CommandTypes::DEPLOY_IMAGE, TraceStatus::IN_PROGRESS, $agentJobId, $inputData); break; } return new JsonResponse(data: [], status: Response::HTTP_OK); } }