Class: Fog::Compute::Gridscale::Sshkeys

Inherits:
PagingCollection show all
Defined in:
lib/fog/compute/gridscale/models/sshkeys.rb

Instance Method Summary collapse

Methods inherited from PagingCollection

#next_page, #previous_page

Instance Method Details

#all(filters = {}) ⇒ Object



9
10
11
12
13
# File 'lib/fog/compute/gridscale/models/sshkeys.rb', line 9

def all(filters={})
  data = service.sshkeys_get(filters)
  sshkeys = data.body["sshkeys"].values
  load(sshkeys)
end

#get(sshkey_uuid) ⇒ Object



15
16
17
18
19
20
# File 'lib/fog/compute/gridscale/models/sshkeys.rb', line 15

def get(sshkey_uuid)
  sshkey = service.sshkey_get(sshkey_uuid).body['sshkey']
  new(sshkey) if sshkey
rescue Fog::Errors::NotFound
  nil
end