diff --git a/app/app.rb b/app/app.rb index f41f13b..3769fe4 100755 --- a/app/app.rb +++ b/app/app.rb @@ -1,52 +1,52 @@ -# @!macro [attach] sinatra.get -# -# @overload get "$1" -# -# @return HTTP response. Hash formatted in the format defined by -# requested output type(XML, YAML or JSON). -# -# -# -# @!macro [new] type -# @param [String] :type Type is one of Nagios objects like hosts, hostgroupsroups, etc. -# -# @!macro [new] name -# @param [String] :name -# -# @!macro [new] hostname -# @param [String] :hostname Configured Nagios hostname -# -# @!macro [new] service_name -# @param [String] :service_name Configured Nagios service for the host -# -# @!macro [new] accepted -# -# Accepted output type modifiers: -# -# @!macro [new] list -# -# - +/_list+ : Short list of available objects, depending on the -# current request context: hosts, services, etc. -# -# @!macro [new] state -# -# - +/_state+ - Instead of full status information send only -# current state. For hosts up/down, for services OK, Warn, -# Critical, Unknown (0,1,2-1) -# -# @!macro [new] full -# -# - +/_full+ - Show full status information. When used in -# /_status/_full call will display full hoststaus and -# servicestatus information for each host. -# -# require_relative '../lib/nagira' ## # Main class of Nagira application implementing RESTful API for # Nagios. # class Nagira < Sinatra::Base - include OutputTypeable + # @!macro [attach] sinatra.get + # + # @overload get "$1" + # + # @return HTTP response. Hash formatted in the format defined by + # requested output type(XML, YAML or JSON). + # + # + # + # @!macro [new] type + # @param [String] :type Type is one of Nagios objects like hosts, hostgroupsroups, etc. + # + # @!macro [new] name + # @param [String] :name + # + # @!macro [new] hostname + # @param [String] :hostname Configured Nagios hostname + # + # @!macro [new] service_name + # @param [String] :service_name Configured Nagios service for the host + # + # @!macro [new] accepted + # + # Accepted output type modifiers: + # + # @!macro [new] list + # + # - +/_list+ : Short list of available objects, depending on the + # current request context: hosts, services, etc. + # + # @!macro [new] state + # + # - +/_state+ - Instead of full status information send only + # current state. For hosts up/down, for services OK, Warn, + # Critical, Unknown (0,1,2-1) + # + # @!macro [new] full + # + # - +/_full+ - Show full status information. When used in + # /_status/_full call will display full hoststaus and + # servicestatus information for each host. + # + # + end diff --git a/app/get/config.rb b/app/get/config.rb index 12e343b..f8e9faf 100644 --- a/app/get/config.rb +++ b/app/get/config.rb @@ -1,17 +1,5 @@ class Nagira < Sinatra::Base - # Config routes - # ============================================================ - - # @!macro [attach] sinatra.get - # - # @overload get "$1" - # - # @return HTTP response. Hash formatted in the format defined by - # requested output type(XML, YAML or JSON). - # - # - # @method get_config # @overload get("/_config") # diff --git a/app/get/status.rb b/app/get/status.rb index 01a7c26..5b7827a 100644 --- a/app/get/status.rb +++ b/app/get/status.rb @@ -2,52 +2,6 @@ require_relative 'status/servicegroups' class Nagira < Sinatra::Base - # @!macro [attach] sinatra.get - # - # @overload get "$1" - # - # @return HTTP response. Hash formatted in the format defined by - # requested output type(XML, YAML or JSON). - # - # - # - # @!macro [new] type - # @param [String] :type Type is one of Nagios objects like hosts, hostgroupsroups, etc. - # - # @!macro [new] name - # @param [String] :name - # - # @!macro [new] hostname - # @param [String] :hostname Configured Nagios hostname - # - # @!macro [new] service_name - # @param [String] :service_name Configured Nagios service for the host - # - # @!macro [new] accepted - # - # Accepted output type modifiers: - # - # @!macro [new] list - # - # - +/_list+ : Short list of available objects, depending on the - # current request context: hosts, services, etc. - # - # @!macro [new] state - # - # - +/_state+ - Instead of full status information send only - # current state. For hosts up/down, for services OK, Warn, - # Critical, Unknown (0,1,2-1) - # - # @!macro [new] full - # - # - +/_full+ - Show full status information. When used in - # /_status/_full call will display full hoststaus and - # servicestatus information for each host. - # - # - - # Status routes - # ============================================================ ## # @method get_status_hostname_services_service_name diff --git a/app/get/status/hostgroups.rb b/app/get/status/hostgroups.rb index a5dd9ee..4341c08 100644 --- a/app/get/status/hostgroups.rb +++ b/app/get/status/hostgroups.rb @@ -1,12 +1,4 @@ class Nagira < Sinatra::Base - # @!macro [attach] sinatra.get - # - # @overload get "$1" - # - # @return HTTP response. Hash formatted in the format defined by - # requested output type(XML, YAML or JSON). - # - ## # @method get_status_hostgroup diff --git a/app/get/status/servicegroups.rb b/app/get/status/servicegroups.rb index 328d789..a8deeb7 100644 --- a/app/get/status/servicegroups.rb +++ b/app/get/status/servicegroups.rb @@ -1,12 +1,4 @@ class Nagira < Sinatra::Base - # @!macro [attach] sinatra.get - # - # @overload get "$1" - # - # @return HTTP response. Hash formatted in the format defined by - # requested output type(XML, YAML or JSON). - # - ## # @method get_status_servicegroup