Problem/Motivation

Fix the owner ID in AWS Cloud Key Pair

Issue fork cloud-3188595

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

Xiaohua Guan created an issue. See original summary.

xiaohua guan’s picture

Status: Active » Needs review
yas’s picture

StatusFileSize
new3.24 KB
yas’s picture

Status: Needs review » Needs work

@xiaohua-guan

Thank you for fixing the issue. I posted my comment above. Could you please check it?

xiaohua guan’s picture

@yas

I can't update the tag of a keypair after it is created. So I disabled the owner textfield.

yas’s picture

@xiaohua-guan

It looks we can update a tag value from AWS Management Console. Can we update a tag value by using a sequence of deleteTags() and createTags() API in KeyPairEditFrom::save()?

xiaohua guan’s picture

Status: Needs work » Needs review

@yas

Thanks for your comment. I changed the code in order to modify owner id. Please take a look again.

FYI, in the last comment I said that I can't update tag because I failed to update tags of a key pair by using key pair name. I wanted to use the resource id of a key pair, but there was no such field, so I used key pair name.

After I confirmed APIs again, I found key pair ID, which is what I want. So I added the field and the problem was resolved.

yas’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new9.75 KB

@xiaohua-guan

Thank you for the update. I tested the patch and it looks good to me. I'll merge the patch to 3.x and close this issue as Fixed.

yas’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new414.5 KB

@xiaohua-guan

I tested the patch further more and it has an issue with the following error:

edit.png

Here is the use case.

  1. Create a new key pair
  2. Edit the key pair just right after creating the new key pair above 1.

In this case, it looks the key pair entity doesn't have Key Pair ID. When I click Refresh button, it starts working. Therefore, I think we need to update the key pair information when

  1. Creating a new key pair and click a Save button to populate the Key Pair ID _OR_
  2. Clicking an Edit button to fill out the Key Pair ID

Could you please address that?

Thanks

PS

FYI, in the last comment I said that I can't update tag because I failed to update tags of a key pair by using key pair name. I wanted to use the resource id of a key pair, but there was no such field, so I used key pair name.

After I confirmed APIs again, I found key pair ID, which is what I want. So I added the field and the problem was resolved.

Thank for the detailed explanation.

xiaohua guan’s picture

Status: Needs work » Needs review

@yas

Sorry for the bug. I fixed it and failed test cases. Please check again. Thanks.

yas’s picture

StatusFileSize
new12.5 KB
yas’s picture

Status: Needs review » Reviewed & tested by the community

@xiaohua-guan

Thank you for the update. I tested the patch and it looks perfect now. I'll merge the patch to 3.x and close this issue as Fixed.

  • yas committed 8fac08f on 3.x authored by Xiaohua Guan
    Issue #3188595 by Xiaohua Guan, yas: Fix the owner ID in AWS Cloud Key...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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