class Sysdig::UpdateAlert

Public Instance Methods

mock(alert_id, alert) click to toggle source
# File lib/sysdig/update_alert.rb, line 11
def mock(alert_id, alert)
  body = service.data[:alerts].fetch(alert_id.to_i)

  body.merge!(Sysdig::CreateAlert.slice(alert))

  service.response(
    :body => {"alert" => body},
  )
end
real(alert_id, alert) click to toggle source

@note alert might mean lock version which should be fun

# File lib/sysdig/update_alert.rb, line 3
def real(alert_id, alert)
  service.request(
    :method => :put,
    :path   => File.join("/api/alerts", alert_id.to_s),
    :body   => { "alert" => Sysdig::CreateAlert.slice(alert) },
  )
end