Skip to content
Snippets Groups Projects
Commit 1ceb0385 authored by Takumaru Sekine's avatar Takumaru Sekine Committed by Yas Naoi
Browse files

Issue #3177875 by sekinet, yas: Fix a status message of VPC Peering Connection...

Issue #3177875 by sekinet, yas: Fix a status message of VPC Peering Connection creation form that shows a successful message while failed
parent 77314f91
No related branches found
No related tags found
No related merge requests found
......@@ -198,7 +198,26 @@ class VpcPeeringConnectionCreateForm extends AwsCloudContentForm {
'VpcPeeringConnectionIds' => [$entity->getVpcPeeringConnectionId()],
], FALSE);
$this->processOperationStatus($entity, 'created');
$entities = $storage->loadByProperties([
'cloud_context' => $cloud_context,
'vpc_peering_connection_id' => $vpc_peering_connection_id,
]);
if (count($entities) > 0) {
$entity = array_shift($entities);
}
if ($entity->getStatusCode() === 'failed') {
$this->processOperationErrorStatus($entity, 'created');
$message = $this->t("The VPC Peering Connection @name has failed status. During this state, it cannot be accepted, rejected, or deleted. The failed VPC peering connection remains visible to the requester for 2 hours.", [
'@name' => $entity->label(),
]);
$this->messenger->addError($message);
}
else {
$this->processOperationStatus($entity, 'created');
}
$this->clearCacheValues();
$form_state->setRedirect('view.aws_cloud_vpc_peering_connection.list', ['cloud_context' => $entity->getCloudContext()]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment