class BrocadeAPIClient::Events

Evens REST API methods

Public Class Methods

new(http_client) click to toggle source
# File lib/BrocadeAPIClient/events.rb, line 15
def initialize(http_client)
  @http_client = http_client
  @base_url = '/resourcegroups/All/events'
end

Public Instance Methods

custom_events(startindex = '0', count = '10', origin = 'syslog', severity = 'INFO') click to toggle source
# File lib/BrocadeAPIClient/events.rb, line 30
def custom_events(startindex = '0', count = '10', origin = 'syslog', severity = 'INFO')
  api_url = @base_url + '?startindex=' + startindex + '&count=' + count + '&specialEvent=true' + '&origin=' + origin + '&severity=' + severity
  _response, _body = @http_client.get(api_url)
end
syslog_events(count = '10') click to toggle source
# File lib/BrocadeAPIClient/events.rb, line 20
def syslog_events(count = '10')
  api_url = @base_url + '?startindex=0&count=' + count + '&specialEvent=true&origin=syslog'
  _response, _body = @http_client.get(api_url)
end
trap_events(count = '10') click to toggle source
# File lib/BrocadeAPIClient/events.rb, line 25
def trap_events(count = '10')
  api_url = @base_url + '?startindex=0&count=' + count + '&specialEvent=true&origin=trap'
  _response, _body = @http_client.get(api_url)
end