Class: BrocadeAPIClient::Events
- Inherits:
-
Object
- Object
- BrocadeAPIClient::Events
- Defined in:
- lib/BrocadeAPIClient/events.rb
Overview
Evens REST API methods
Instance Method Summary collapse
- #custom_events(startindex = '0', count = '10', origin = 'syslog', severity = 'INFO') ⇒ Object
-
#initialize(http_client) ⇒ Events
constructor
A new instance of Events.
- #syslog_events(count = '10') ⇒ Object
- #trap_events(count = '10') ⇒ Object
Constructor Details
#initialize(http_client) ⇒ Events
Returns a new instance of Events.
15 16 17 18 |
# File 'lib/BrocadeAPIClient/events.rb', line 15 def initialize(http_client) @http_client = http_client @base_url = '/resourcegroups/All/events' end |
Instance Method Details
#custom_events(startindex = '0', count = '10', origin = 'syslog', severity = 'INFO') ⇒ Object
30 31 32 33 |
# 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') ⇒ Object
20 21 22 23 |
# 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') ⇒ Object
25 26 27 28 |
# 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 |