Method: Fog::OpenStack::Monitoring::NotificationMethods#find_by_id

Defined in:
lib/fog/openstack/monitoring/models/notification_methods.rb

#find_by_id(id) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/fog/openstack/monitoring/models/notification_methods.rb', line 22

def find_by_id(id)
  cached_notification_method = detect { |notification_method| notification_method.id == id }
  return cached_notification_method if cached_notification_method
  notification_method_hash = service.get_notification_method(id).body
  Fog::OpenStack::Monitoring::NotificationMethod.new(
    notification_method_hash.merge(:service => service)
  )
end