Beispiel #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $mountId = $input->getArgument('mount_id');
     $configInput = $input->getOption('config');
     try {
         $mount = $this->globalService->getStorage($mountId);
     } catch (NotFoundException $e) {
         $output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts"</error>');
         return 404;
     }
     $this->updateStorageStatus($mount, $configInput, $output);
     $this->writeArrayInOutputFormat($input, $output, ['status' => StorageNotAvailableException::getStateCodeName($mount->getStatus()), 'code' => $mount->getStatus(), 'message' => $mount->getStatusMessage()]);
 }
 /**
  * StorageNotAvailableException constructor.
  *
  * @param string $message
  * @param int $code
  * @param \Exception $previous
  * @since 6.0.0
  */
 public function __construct($message = '', $code = self::STATUS_INDETERMINATE, \Exception $previous = null)
 {
     parent::__construct($message, $code, $previous);
 }