Class: Fog::Hetznercloud::Compute::SshKeys
- Inherits:
-
Collection
- Object
- Collection
- Fog::Hetznercloud::Compute::SshKeys
- Defined in:
- lib/fog/hetznercloud/models/compute/ssh_keys.rb
Instance Method Summary collapse
Instance Method Details
#all(filters = {}) ⇒ Object
7 8 9 10 |
# File 'lib/fog/hetznercloud/models/compute/ssh_keys.rb', line 7 def all(filters = {}) ssh_keys = service.list_ssh_keys(filters).body['ssh_keys'] || [] load(ssh_keys) end |
#get(identity) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/fog/hetznercloud/models/compute/ssh_keys.rb', line 12 def get(identity) if (ssh_key = service.get_ssh_key(identity).body['ssh_key']) new(ssh_key) end rescue Fog::Hetznercloud::Compute::UnknownResourceError nil end |