Skip to content

Compute v2: Add the user id to the get create and delete keypair#2186

Merged
jtopjian merged 7 commits intogophercloud:masterfrom
jtopjian:keypair-add-userid
Jul 2, 2021
Merged

Compute v2: Add the user id to the get create and delete keypair#2186
jtopjian merged 7 commits intogophercloud:masterfrom
jtopjian:keypair-add-userid

Conversation

@jtopjian
Copy link
Copy Markdown
Contributor

For #2145
Supersedes #2146

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 30, 2021

Coverage Status

Coverage decreased (-0.03%) to 79.87% when pulling 0a5eba0 on jtopjian:keypair-add-userid into c9471fc on gophercloud:master.

@jtopjian
Copy link
Copy Markdown
Contributor Author

jtopjian commented Jul 1, 2021

@kayrus Let me know your thoughts on this. Generally, I'm not opposed to adding an opts field to existing functions, but since Key Pairs are part of the earliest and foundational resources in Gophercloud, I want to be careful and retain backwards compatibility.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jul 1, 2021

Build succeeded.

// GetWithOpts is similar to Get, but can take a GetOpts struct.
// The options within GetOpts require the client to have a microversion set.
// The original Get function is retained for non-microverisoned requests.
func GetWithOpts(client *gophercloud.ServiceClient, name string, opts GetOptsBuilder) (r GetResult) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtopjian GetWithOpts func looks hacky. I'd extend the Get function, even if it breaks the previous API.

@kayrus
Copy link
Copy Markdown
Contributor

kayrus commented Jul 1, 2021

@jtopjian can you also add a UserID parameter to the List function?

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jul 1, 2021

Build failed.

@kayrus
Copy link
Copy Markdown
Contributor

kayrus commented Jul 1, 2021

@jtopjian thanks a lot. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants