Skip to content
Snippets Groups Projects
Commit c613d6be authored by Yoftahe Akalu's avatar Yoftahe Akalu Committed by Yas Naoi
Browse files

Issue #3119979 by nilesh.addweb, yas: Hotfix - Refactor to add a link to the...

Issue #3119979 by nilesh.addweb, yas: Hotfix - Refactor to add a link to the message when associating an EIP
parent 483d42d7
No related branches found
No related tags found
No related merge requests found
......@@ -203,15 +203,14 @@ class ElasticIpAssociateForm extends AwsDeleteForm {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->ec2Service->setCloudContext($this->entity->getCloudContext());
$entity = $this->entity;
// Determine if elastic_ip is attaching to instance or network_interface.
if ($form_state->getValue('resource_type') === 'instance') {
$get_instance_id = $form_state->getValue('instance_id');
$entity_id = $form_state->getValue('instance_id');
$private_ip = $form_state->getValue('instance_private_ip');
if ($instance_id !== -1) {
$instance = Instance::load($get_instance_id);
if ($entity_id !== -1) {
$instance = Instance::load($entity_id);
$instance_id = $instance->getInstanceId();
$instance_link = $this->entityLinkRenderer->renderViewElement(
......
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