Class: Fog::HP::LB::Protocols

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

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.list_protocols.body['protocols']
  load(data)
end

#get(record_id) ⇒ Object



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

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