class Hotdog::Sources::BaseSource

Attributes

application[R]
logger[R]
options[R]

Public Class Methods

new(application) click to toggle source
# File lib/hotdog/sources.rb, line 6
def initialize(application)
  @application = application
  @logger = application.logger
  @options = application.options
end

Public Instance Methods

add_tags(host_name, tags, options={}) click to toggle source
# File lib/hotdog/sources.rb, line 99
def add_tags(host_name, tags, options={})
  raise(NotImplementedError)
end
api_key() click to toggle source
# File lib/hotdog/sources.rb, line 27
def api_key() #=> String
  options[:api_key]
end
application_key() click to toggle source
# File lib/hotdog/sources.rb, line 31
def application_key() #=> String
  options[:application_key]
end
cancel_downtime(id, options={}) click to toggle source
# File lib/hotdog/sources.rb, line 39
def cancel_downtime(id, options={})
  raise(NotImplementedError)
end
detach_tags(host_name, options={}) click to toggle source
# File lib/hotdog/sources.rb, line 103
def detach_tags(host_name, options={})
  raise(NotImplementedError)
end
endpoint() click to toggle source
# File lib/hotdog/sources.rb, line 23
def endpoint() #=> String
  options[:endpoint]
end
get_all_downtimes(options={}) click to toggle source
# File lib/hotdog/sources.rb, line 43
def get_all_downtimes(options={})
  #
  # This should return some `Array<Hash<String,String>>` like follows
  #
  # ```json
  # [
  #   {
  #     "recurrence": null,
  #     "end": 1533593208,
  #     "monitor_tags": [
  #       "*"
  #     ],
  #     "canceled": null,
  #     "monitor_id": null,
  #     "org_id": 12345,
  #     "disabled": false,
  #     "start": 1533592608,
  #     "creator_id": 78913,
  #     "parent_id": null,
  #     "timezone": "UTC",
  #     "active": false,
  #     "scope": [
  #       "host:i-abcdef01234567890"
  #     ],
  #     "message": null,
  #     "downtime_type": null,
  #     "id": 278432422,
  #     "updater_id": null
  #   }
  # ]
  # ```
  #
  raise(NotImplementedError)
end
get_all_tags(options={}) click to toggle source
# File lib/hotdog/sources.rb, line 78
def get_all_tags(options={})
  #
  # This should return some `Hash<String,Array<String>>` like follows
  #
  # ```json
  # {
  #   "tagname:tagvalue": [
  #     "foo",
  #     "bar",
  #     "baz"
  #   ]
  # }
  # ```
  #
  raise(NotImplementedError)
end
get_host_tags(host_name, options={}) click to toggle source
# File lib/hotdog/sources.rb, line 95
def get_host_tags(host_name, options={})
  raise(NotImplementedError)
end
id() click to toggle source
# File lib/hotdog/sources.rb, line 15
def id() #=> Integer
  raise(NotImplementedError)
end
name() click to toggle source
# File lib/hotdog/sources.rb, line 19
def name() #=> String
  raise(NotImplementedError)
end
schedule_downtime(scope, options={}) click to toggle source
# File lib/hotdog/sources.rb, line 35
def schedule_downtime(scope, options={})
  raise(NotImplementedError)
end
update_tags(host_name, tags, options={}) click to toggle source
# File lib/hotdog/sources.rb, line 107
def update_tags(host_name, tags, options={})
  raise(NotImplementedError)
end