Skip to content
Snippets Groups Projects

Issue #3271565 by Xiaohua Guan, yas: Support to run the operations from Cloud...

Merged Issue #3271565 by Xiaohua Guan, yas: Support to run the operations from Cloud...
Merged xiaohua guan requested to merge issue/cloud-3271565:3271565-support-to-run into 5.x
Files
5
@@ -125,6 +125,16 @@ class VolumeAttachForm extends AwsDeleteForm {
]);
if ($result !== NULL) {
$form_state->setRedirect("view.{$entity->getEntityTypeId()}.list", ['cloud_context' => $entity->getCloudContext()]);
if (!empty($result['SendToWorker'])) {
$this->messenger->addStatus($this->t('The Volume %volume is attaching to %instance remotely.', [
'%volume' => $volume_id,
'%instance' => $instance_id,
]));
return;
}
// Set the instance_id in the volume entity and save.
$entity->setAttachmentInformation($instance_id);
$entity->setState($result['State'] ?? 'in-use');
@@ -135,8 +145,6 @@ class VolumeAttachForm extends AwsDeleteForm {
'%volume' => $volume_id,
'%instance' => $instance_id,
]));
$form_state->setRedirect("view.{$entity->getEntityTypeId()}.list", ['cloud_context' => $entity->getCloudContext()]);
}
}
Loading