Methods

Class/Module Index [+]

Quicksearch

Fog::Compute::HP::KeyPairs

Public Instance Methods

all() click to toggle source
# File lib/fog/hp/models/compute/key_pairs.rb, line 12
def all
  items = []
  service.list_key_pairs.body['keypairs'].each do |kp|
    items = items + kp.map { |key, value| value }
  end
  load(items)
end
get(key_pair_name) click to toggle source
# File lib/fog/hp/models/compute/key_pairs.rb, line 20
def get(key_pair_name)
  if key_pair_name
    self.all.select {|kp| kp.name == key_pair_name}.first
  end
rescue Fog::Compute::HP::NotFound
  nil
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.