Problem/Motivation

  • Fix an issue of OpenStack image in SPA forms (drupal/cloud_dashboard).

Issue fork cloud-3411129

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Ryo Yamashita created an issue. See original summary.

Ryo Yamashita’s picture

Status: Needs work » Needs review

@yas

Please review it. Thanks.

yas’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +chatgpt

@ryo-yamashita

Thank you for the fix. I posted my comments. Thanks

yas’s picture

@ryo-yamashita

Also, please refactor the following method like https://chat.openai.com/share/b2ee03d3-7bc9-4849-bba1-689db51b8afb:

public function deleteProcess(CloudContentEntityBase $entity, callable $process_cloud_resouce, callable $process_entity): bool {

  try {
    $this->cloudConfigPluginManager->setCloudContext($entity->getCloudContext());
    $cloud_config = $this->cloudConfigPluginManager->loadConfigEntity();

    if ($cloud_config->isRemote()) {
      $process_cloud_resouce($entity);
      $this->processOperationStatus($entity, 'deleted remotely');

      return TRUE;
    }

    if (!$process_cloud_resouce($entity)) {
      $this->processOperationErrorStatus($entity, 'deleted');

      return FALSE;
    }

    $process_entity($entity);
    $this->processOperationStatus($entity, 'deleted');

    return TRUE;

  } catch (\Exception $e) {
    $this->handleException($e);

    // Exception handling: return FALSE indicating failure.
    return FALSE;
  }
}
Ryo Yamashita’s picture

Status: Needs work » Needs review

@yas

Please review it. Thanks.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@ryo-yamashita

Thank you for the update. I'll merge the patch to 5.x and 6.x, and close this issue as Fixed.

  • yas committed aba2d272 on 6.x authored by Ryo Yamashita
    Issue #3411129 by Ryo Yamashita, yas: Fix an issue of OpenStack image in...

  • yas committed b89f4375 on 5.x authored by Ryo Yamashita
    Issue #3411129 by Ryo Yamashita, yas: Fix an issue of OpenStack image in...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.