Skip to content

Add get_by_fingerprint to SSHKeyClient#34

Merged
LKaemmerling merged 1 commit intomasterfrom
add-get-by-fingerprint-to-ssh-key
Mar 6, 2019
Merged

Add get_by_fingerprint to SSHKeyClient#34
LKaemmerling merged 1 commit intomasterfrom
add-get-by-fingerprint-to-ssh-key

Conversation

@LKaemmerling
Copy link
Copy Markdown
Member

This PR adds a new method
client.ssh_keys.get_by_fingerprint("fingerprint")

Which allows to get an ssh key by its fingerprint. The fingerprint is unique.

Currently this is the solution we will replace with the new method:

            if self.module.params.get("fingerprint") is not None:
                result = self.client.ssh_keys.get_all(fingerprint=self.module.params.get("fingerprint"))
                if len(result) == 1:
                    self.hcloud_ssh_key = result[0]

@LKaemmerling LKaemmerling added enhancement New feature or request accepted labels Mar 5, 2019
@LKaemmerling LKaemmerling requested a review from LD250 March 5, 2019 15:19
@LKaemmerling LKaemmerling merged commit d13a46f into master Mar 6, 2019
@LKaemmerling LKaemmerling deleted the add-get-by-fingerprint-to-ssh-key branch March 6, 2019 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants