Class: Fog::HP::LB::Algorithms

Inherits:
Collection
  • Object
show all
Defined in:
lib/monkey/hp/models/lb/algorithms.rb

Instance Method Summary collapse

Instance Method Details

#allObject



31
32
33
34
# File 'lib/monkey/hp/models/lb/algorithms.rb', line 31

def all
  data = service.list_algorithms.body['algorithms']
  load(data)
end

#get(record_id) ⇒ Object



36
37
38
39
40
41
# File 'lib/monkey/hp/models/lb/algorithms.rb', line 36

def get(record_id)
  record = service.get_algorithm_details(record_id).body['algorithm']
  new(record)
rescue Fog::HP::LB::NotFound
  nil
end