Created
October 17, 2014 20:05
-
-
Save mattias-lidman/8e4b5c32fe55bad73ba4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 3 def ssh_pubkeys(self): | |
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 2 creds = self.credentials.get_all_credentials_of_type('ssh2') | |
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 1 creds_dict = [] | |
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)|493 # TODO: We're already getting type=ssh2, is this necessary? | |
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 1 for cred in creds: | |
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 2 if cred.attributes['credential_type'] == 'ssh2': | |
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 3 creds_dict.append({'credential_type' : 'ssh2', 'ssh_key' : cred.attributes['ssh_key']}) | |
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 4 return creds_dict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment